From 7476e46daabcee0995eb4f794a62b5306586aa6f Mon Sep 17 00:00:00 2001 From: Chad Little Date: Sun, 24 Nov 2002 23:04:43 +0000 Subject: Moved all includes to their own folder. Modified pages accordingly. Fixed footer. --- day.php | 8 +- event.php | 90 --------- footer.inc.php | 1 - functions/date_add.php | 2 +- functions/error.php | 2 +- functions/event.js | 2 +- functions/todo.js | 2 +- header.inc.php | 1 - includes/calendar_nav.php | 300 +++++++++++++++++++++++++++ includes/event.php | 90 +++++++++ includes/footer.inc.php | 1 + includes/header.inc.php | 1 + includes/sidebar.php | 504 ++++++++++++++++++++++++++++++++++++++++++++++ includes/todo.php | 119 +++++++++++ month.php | 6 +- preferences.php | 4 +- print.php | 4 +- rss/index.php | 4 +- search.php | 4 +- sidebar.php | 504 ---------------------------------------------- todo.php | 118 ----------- week.php | 4 +- year.php | 4 +- 23 files changed, 1038 insertions(+), 737 deletions(-) delete mode 100644 event.php delete mode 100644 footer.inc.php delete mode 100644 header.inc.php create mode 100644 includes/calendar_nav.php create mode 100644 includes/event.php create mode 100644 includes/footer.inc.php create mode 100644 includes/header.inc.php create mode 100644 includes/sidebar.php create mode 100644 includes/todo.php delete mode 100644 sidebar.php delete mode 100644 todo.php diff --git a/day.php b/day.php index 134bc57..dacf4b9 100644 --- a/day.php +++ b/day.php @@ -50,13 +50,13 @@ if (is_array($master_array[($getdate)])) { <?php echo "$calendar_name - $display_date"; ?> - + "> - +
@@ -290,8 +290,8 @@ if (is_array($master_array[($getdate)])) {
- - + +
diff --git a/event.php b/event.php deleted file mode 100644 index 2a58efd..0000000 --- a/event.php +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - <?php echo $calendar_name2; ?> - "> - -
- - - - - - - - - - - - -
- - ('.$start.' - '.$end.')'; - if ($start == '' && $end == '' && isset($start, $end)) $event_times = ' - ('.$all_day_lang.')'; - ?> - - - - - - - - - - - - -

'; ?>
- [:space:]]+[[:alnum:]/]", - '\0', $description); ?>
-
-
- - diff --git a/footer.inc.php b/footer.inc.php deleted file mode 100644 index b382f72..0000000 --- a/footer.inc.php +++ /dev/null @@ -1 +0,0 @@ -
$powered_by_lang PHP iCalendar 0.9 CVS"; if ($enable_rss == 'yes') { echo "
\n"; if ($current_view == 'rssindex') { echo '[Valid RSS]'; } else { echo $this_site_is_lang.' RSS-Enabled
'; } } echo ''; ?> \ No newline at end of file diff --git a/functions/date_add.php b/functions/date_add.php index 6449943..be40f23 100644 --- a/functions/date_add.php +++ b/functions/date_add.php @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/functions/error.php b/functions/error.php index 1bc4fca..8b5b914 100644 --- a/functions/error.php +++ b/functions/error.php @@ -64,7 +64,7 @@ function error($error_msg='There was an error processing the request.', $file='N - + diff --git a/functions/event.js b/functions/event.js index 00ee211..59e762d 100644 --- a/functions/event.js +++ b/functions/event.js @@ -5,7 +5,7 @@ var windowW = 450; var windowH = 275; - var url = "event.php?event="+event+ + var url = "includes/event.php?event="+event+ "&calendar_name="+calendarname+ "&start="+start+ "&end="+end+ diff --git a/functions/todo.js b/functions/todo.js index e2a5d41..a3b82e7 100644 --- a/functions/todo.js +++ b/functions/todo.js @@ -6,7 +6,7 @@ var windowW = 450; var windowH = 275; - var url = "todo.php?vtodo="+vtodo+ + var url = "includes/todo.php?vtodo="+vtodo+ "&calendar_name="+calendarname+ "&start="+start+ "&due="+due+ diff --git a/header.inc.php b/header.inc.php deleted file mode 100644 index 922f9d8..0000000 --- a/header.inc.php +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/includes/calendar_nav.php b/includes/calendar_nav.php new file mode 100644 index 0000000..2fccf2d --- /dev/null +++ b/includes/calendar_nav.php @@ -0,0 +1,300 @@ + 24) { + $cal_displayname2 = substr("$cal_displayname2", 0, 21); + $cal_displayname2 = $cal_displayname2 . "..."; + } + + $next_day = date("Ymd", strtotime("+1 day", $unix_time)); + $prev_day = date("Ymd", strtotime("-1 day", $unix_time)); + + $fake_getdate_time = strtotime($this_year.'-'.$this_month.'-15'); + ?> +
+ + + + + + + + + + + + + + +
\"right\""; ?>\"right\""; ?>
+ + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + $day\n"; + $start_day = strtotime("+1 day", $start_day); + } + ?> + + + + + $day"; + if ($i == 0) echo "\n"; + if (isset($master_array[("$daylink")]) && ($check_month == $minical_month)) { + echo "\n"; + } else { + echo "\n"; + } + $start_day = strtotime("+1 day", $start_day); + $i++; + if ($i == 7) { + echo "\n"; + $i = 0; + $checkagain = date ("m", $start_day); + if ($checkagain != $minical_month) $whole_month = FALSE; + } + } while ($whole_month == TRUE); + ?> +
\n"; + echo "$day\n"; + echo "\n"; + echo "$day\n"; + echo "
+
+
+
+ + + + + + +
+ + + + +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+
+ + + + +
+ + + + + + + +
+ + + + + + + + + + + + +
+ $goday_lang
\n + $goweek_lang
\n + $gomonth_lang
\n + $goyear_lang
\n + $goprint_lang
\n + $preferences_lang
\n + $subscribe_lang | $download_lang\n + "; ?> +
+
+
+
+
+ + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + $day\n"; + $start_day = strtotime("+1 day", $start_day); + } + ?> + + + + + $day"; + if ($i == 0) echo "\n"; + if (isset($master_array[("$daylink")]) && ($check_month == $minical_month)) { + echo "\n"; + } else { + echo "\n"; + } + $start_day = strtotime("+1 day", $start_day); + $i++; + if ($i == 7) { + echo "\n"; + $i = 0; + $checkagain = date ("m", $start_day); + if ($checkagain != $minical_month) $whole_month = FALSE; + } + } while ($whole_month == TRUE); + ?> +
\n"; + echo "$day\n"; + echo "\n"; + echo "$day\n"; + echo "
+
+
+
diff --git a/includes/event.php b/includes/event.php new file mode 100644 index 0000000..8a37ed5 --- /dev/null +++ b/includes/event.php @@ -0,0 +1,90 @@ + + + + + + <?php echo $calendar_name2; ?> + "> + +
+ + + + + + + + + + + + +
+ + ('.$start.' - '.$end.')'; + if ($start == '' && $end == '' && isset($start, $end)) $event_times = ' - ('.$all_day_lang.')'; + ?> + + + + + + + + + + + + +

'; ?>
+ [:space:]]+[[:alnum:]/]", + '\0', $description); ?>
+
+
+ + diff --git a/includes/footer.inc.php b/includes/footer.inc.php new file mode 100644 index 0000000..2b550a3 --- /dev/null +++ b/includes/footer.inc.php @@ -0,0 +1 @@ +
$powered_by_lang PHP iCalendar 0.9 CVS"; if ($enable_rss == 'yes') { echo "
\n"; if ($current_view == 'rssindex') { echo '[Valid RSS]'; } else { echo $this_site_is_lang.' RSS-Enabled
'; } } echo ''; ?> \ No newline at end of file diff --git a/includes/header.inc.php b/includes/header.inc.php new file mode 100644 index 0000000..922f9d8 --- /dev/null +++ b/includes/header.inc.php @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/includes/sidebar.php b/includes/sidebar.php new file mode 100644 index 0000000..c0b0140 --- /dev/null +++ b/includes/sidebar.php @@ -0,0 +1,504 @@ + 24) { + $cal_displayname2 = substr("$cal_displayname2", 0, 21); + $cal_displayname2 = $cal_displayname2 . "..."; + } + + $search_box = '
'; + + ?> + + + + + +
+ + + + + + + + + + + + +
\"right\""; ?>\"right\""; ?>
+ + + + + + + + + + + + +
+ $goday_lang
\n + $goweek_lang
\n + $gomonth_lang
\n + $goyear_lang
\n + $goprint_lang
\n + $preferences_lang
\n + $subscribe_lang | $download_lang\n + "; ?> +
+
+
+
+ + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+
+ 0) { ?> + + + + +
+ + + + + + + + + + + + +
+ + + + + + \n"; + echo ""; + echo "\n"; + echo "\n"; + ?> +
\n"; + foreach ($master_array[("$tomorrows_date")] as $event_times) { + foreach ($event_times as $val) { + $event_text = stripslashes(urldecode($val["event_text"])); + $event_text = strip_tags($event_text, ''); + if ($event_text != "") { + $event_text2 = rawurlencode(addslashes($val["event_text"])); + $description = addslashes(urlencode($val["description"])); + $event_start = @$val["event_start"]; + $event_end = @$val["event_end"]; + $event_start = date ($timeFormat, @strtotime ("$event_start")); + $event_end = date ($timeFormat, @strtotime ("$event_end")); + $calendar_name2 = addslashes($calendar_name); + $calendar_name2 = urlencode($calendar_name2); + $event_text = word_wrap($event_text, 21, $tomorrows_events_lines); + + if (!isset($val["event_start"])) { + $event_start = $all_day_lang; + $event_end = ''; + echo "$event_text
\n"; + } else { + echo "• $event_text
\n"; + } + + } + } + } + echo "
+
+
+
+ + + + + +
+ + + + + + + + + + + + +
+ + + + + + \n"; + echo ""; + echo "\n"; + echo "\n"; + ?> +
\n"; + foreach ($master_array['-2'] as $vtodo_times) { + foreach ($vtodo_times as $val) { + $vtodo_text = stripslashes(urldecode($val["vtodo_text"])); + $vtodo_text = strip_tags($vtodo_text, ''); + if ($vtodo_text != "") { + $vtodo_text2 = rawurlencode(addslashes($val["vtodo_text"])); + $description = addslashes(urlencode($val["description"])); + $completed = $val['completed_date']; + if(isset($completed)) $completed = localizeDate($dateFormat_day, strtotime($completed)); + $status = $val["status"]; + if ((!isset($status) || $status == "COMPLETED") && isset($completed)) $status = "Completed on " . $completed; + $start_date = $val["start_date"]; + $start_date = localizeDate ($dateFormat_day, strtotime($start_date)); + if(isset($val['due_date']) && strtotime($val['due_date']) != strtotime("+1 year",strtotime($start_date))) $due_date = localizeDate ($dateFormat_day, strtotime($val['due_date'])); + else $due_date = ''; + + $calendar_name2 = addslashes($calendar_name); + $calendar_name2 = urlencode($calendar_name2); + $vtodo_text = word_wrap($vtodo_text, 21, $tomorrows_events_lines); + if ($status == 'COMPLETED' || (isset($val['completed_date']) && isset($val['completed_time']))) { + if ($show_completed == 'yes') { + $vtodo_text = "$vtodo_text"; + echo "\"\" $vtodo_text
\n"; + } + } elseif (isset($val['priority']) && ($val['priority'] != 0) && ($val['priority'] <= 5)) { + echo "\"\" $vtodo_text
\n"; + } else { + echo "\"\" $vtodo_text
\n"; + } + } + } + } + echo "
+
+
+
+ + + + + +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + $day\n"; + $start_day = strtotime("+1 day", $start_day); + } + ?> + + + + + $day"; + if ($i == 0) echo "\n"; + if (isset($master_array[("$daylink")]) && ($check_month == $minical_month)) { + echo "\n"; + } else { + echo "\n"; + } + $start_day = strtotime("+1 day", $start_day); + $i++; + if ($i == 7) { + echo "\n"; + $i = 0; + $checkagain = date ("m", $start_day); + if ($checkagain != $minical_month) $whole_month = FALSE; + } + } while ($whole_month == TRUE); + ?> +
\n"; + echo "$day\n"; + echo "\n"; + echo "$day\n"; + echo "
+
+
+
+ + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + $day\n"; + $start_day = strtotime("+1 day", $start_day); + } + ?> + + + + + $day"; + if ($i == 0) echo "\n"; + if (isset($master_array[("$daylink")]) && ($check_month == $minical_month)) { + echo "\n"; + } else { + echo "\n"; + } + $start_day = strtotime("+1 day", $start_day); + $i++; + if ($i == 7) { + echo "\n"; + $i = 0; + $checkagain = date ("m", $start_day); + if ($checkagain != $minical_month) $whole_month = FALSE; + } + } while ($whole_month == TRUE); + ?> +
\n"; + echo "$day\n"; + echo "\n"; + echo "$day\n"; + echo "
+
+
+
+ + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + $day\n"; + $start_day = strtotime("+1 day", $start_day); + } + ?> + + + + + $day"; + if ($i == 0) echo "\n"; + if (isset($master_array[("$daylink")]) && ($check_month == $minical_month)) { + echo "\n"; + } else { + echo "\n"; + } + $start_day = strtotime("+1 day", $start_day); + $i++; + if ($i == 7) { + echo "\n"; + $i = 0; + $checkagain = date ("m", $start_day); + if ($checkagain != $minical_month) $whole_month = FALSE; + } + } while ($whole_month == TRUE); + ?> +
\n"; + echo "$day\n"; + echo "\n"; + echo "$day\n"; + echo "
+
+
diff --git a/includes/todo.php b/includes/todo.php new file mode 100644 index 0000000..d9dca39 --- /dev/null +++ b/includes/todo.php @@ -0,0 +1,119 @@ + + + + + + <?php echo $calendar_name2; ?> + "> + +
+ + + + + + + + + + + + +
+ + ('.$start.' - '.$end.')'; +// if ($start == '' && $end == '' && isset($start, $end)) $vtodo_times = ' - ('.$all_day_lang.')'; + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[:space:]]+[[:alnum:]/]",'\0',$vtodo).' '.$vtodo_times.'

'; ?>
+ [:space:]]+[[:alnum:]/]", + '\0', $description); ?>
Status:
Created:
Due:
+
+
+ + diff --git a/month.php b/month.php index 0a8276d..f3f0561 100644 --- a/month.php +++ b/month.php @@ -54,7 +54,7 @@ $num_of_events = 0; - +
@@ -212,7 +212,7 @@ $num_of_events = 0;
- +
@@ -290,7 +290,7 @@ $num_of_events = 0;
- +
diff --git a/preferences.php b/preferences.php index 28d6bf7..d27a617 100644 --- a/preferences.php +++ b/preferences.php @@ -43,7 +43,7 @@ include(BASE.'functions/ical_parser.php'); "> - +
@@ -262,7 +262,7 @@ include(BASE.'functions/ical_parser.php');
- +
diff --git a/print.php b/print.php index 3730122..81b9b81 100644 --- a/print.php +++ b/print.php @@ -47,7 +47,7 @@ if ($printview == 'day') { - +
@@ -164,7 +164,7 @@ if ($printview == 'day') {
- +
\ No newline at end of file diff --git a/rss/index.php b/rss/index.php index 4ebe91e..3f3ae81 100644 --- a/rss/index.php +++ b/rss/index.php @@ -20,7 +20,7 @@ if (isset($HTTP_SERVER_VARS['HTTP_REFERER']) && $HTTP_SERVER_VARS['HTTP_REFERER' "> - +
@@ -99,7 +99,7 @@ if (isset($HTTP_SERVER_VARS['HTTP_REFERER']) && $HTTP_SERVER_VARS['HTTP_REFERER'
- +
diff --git a/search.php b/search.php index d5601d1..6672eb0 100644 --- a/search.php +++ b/search.php @@ -97,7 +97,7 @@ $search_took = number_format(($search_ended-$search_started),3); - +
@@ -283,7 +283,7 @@ $search_took = number_format(($search_ended-$search_started),3);
- + 24) { - $cal_displayname2 = substr("$cal_displayname2", 0, 21); - $cal_displayname2 = $cal_displayname2 . "..."; - } - - $search_box = '
'; - - ?> - - - - - -
- - - - - - - - - - - - -
\"right\""; ?>\"right\""; ?>
- - - - - - - - - - - - -
- $goday_lang
\n - $goweek_lang
\n - $gomonth_lang
\n - $goyear_lang
\n - $goprint_lang
\n - $preferences_lang
\n - $subscribe_lang | $download_lang\n - "; ?> -
-
-
-
- - - - -
- - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
-
- 0) { ?> - - - - -
- - - - - - - - - - - - -
- - - - - - \n"; - echo ""; - echo "\n"; - echo "\n"; - ?> -
\n"; - foreach ($master_array[("$tomorrows_date")] as $event_times) { - foreach ($event_times as $val) { - $event_text = stripslashes(urldecode($val["event_text"])); - $event_text = strip_tags($event_text, ''); - if ($event_text != "") { - $event_text2 = rawurlencode(addslashes($val["event_text"])); - $description = addslashes(urlencode($val["description"])); - $event_start = @$val["event_start"]; - $event_end = @$val["event_end"]; - $event_start = date ($timeFormat, @strtotime ("$event_start")); - $event_end = date ($timeFormat, @strtotime ("$event_end")); - $calendar_name2 = addslashes($calendar_name); - $calendar_name2 = urlencode($calendar_name2); - $event_text = word_wrap($event_text, 21, $tomorrows_events_lines); - - if (!isset($val["event_start"])) { - $event_start = $all_day_lang; - $event_end = ''; - echo "$event_text
\n"; - } else { - echo "• $event_text
\n"; - } - - } - } - } - echo "
-
-
-
- - - - - -
- - - - - - - - - - - - -
- - - - - - \n"; - echo ""; - echo "\n"; - echo "\n"; - ?> -
\n"; - foreach ($master_array['-2'] as $vtodo_times) { - foreach ($vtodo_times as $val) { - $vtodo_text = stripslashes(urldecode($val["vtodo_text"])); - $vtodo_text = strip_tags($vtodo_text, ''); - if ($vtodo_text != "") { - $vtodo_text2 = rawurlencode(addslashes($val["vtodo_text"])); - $description = addslashes(urlencode($val["description"])); - $completed = $val['completed_date']; - if(isset($completed)) $completed = localizeDate($dateFormat_day, strtotime($completed)); - $status = $val["status"]; - if ((!isset($status) || $status == "COMPLETED") && isset($completed)) $status = "Completed on " . $completed; - $start_date = $val["start_date"]; - $start_date = localizeDate ($dateFormat_day, strtotime($start_date)); - if(isset($val['due_date']) && strtotime($val['due_date']) != strtotime("+1 year",strtotime($start_date))) $due_date = localizeDate ($dateFormat_day, strtotime($val['due_date'])); - else $due_date = ''; - - $calendar_name2 = addslashes($calendar_name); - $calendar_name2 = urlencode($calendar_name2); - $vtodo_text = word_wrap($vtodo_text, 21, $tomorrows_events_lines); - if ($status == 'COMPLETED' || (isset($val['completed_date']) && isset($val['completed_time']))) { - if ($show_completed == 'yes') { - $vtodo_text = "$vtodo_text"; - echo "\"\" $vtodo_text
\n"; - } - } elseif (isset($val['priority']) && ($val['priority'] != 0) && ($val['priority'] <= 5)) { - echo "\"\" $vtodo_text
\n"; - } else { - echo "\"\" $vtodo_text
\n"; - } - } - } - } - echo "
-
-
-
- - - - - -
- - - - - - - - - - - - - -
- - - - - - - - - - - - $day\n"; - $start_day = strtotime("+1 day", $start_day); - } - ?> - - - - - $day"; - if ($i == 0) echo "\n"; - if (isset($master_array[("$daylink")]) && ($check_month == $minical_month)) { - echo "\n"; - } else { - echo "\n"; - } - $start_day = strtotime("+1 day", $start_day); - $i++; - if ($i == 7) { - echo "\n"; - $i = 0; - $checkagain = date ("m", $start_day); - if ($checkagain != $minical_month) $whole_month = FALSE; - } - } while ($whole_month == TRUE); - ?> -
\n"; - echo "$day\n"; - echo "\n"; - echo "$day\n"; - echo "
-
-
-
- - - - -
- - - - - - - - - - - - -
- - - - - - - - - - - - $day\n"; - $start_day = strtotime("+1 day", $start_day); - } - ?> - - - - - $day"; - if ($i == 0) echo "\n"; - if (isset($master_array[("$daylink")]) && ($check_month == $minical_month)) { - echo "\n"; - } else { - echo "\n"; - } - $start_day = strtotime("+1 day", $start_day); - $i++; - if ($i == 7) { - echo "\n"; - $i = 0; - $checkagain = date ("m", $start_day); - if ($checkagain != $minical_month) $whole_month = FALSE; - } - } while ($whole_month == TRUE); - ?> -
\n"; - echo "$day\n"; - echo "\n"; - echo "$day\n"; - echo "
-
-
-
- - - - -
- - - - - - - - - - - - -
- - - - - - - - - - - - $day\n"; - $start_day = strtotime("+1 day", $start_day); - } - ?> - - - - - $day"; - if ($i == 0) echo "\n"; - if (isset($master_array[("$daylink")]) && ($check_month == $minical_month)) { - echo "\n"; - } else { - echo "\n"; - } - $start_day = strtotime("+1 day", $start_day); - $i++; - if ($i == 7) { - echo "\n"; - $i = 0; - $checkagain = date ("m", $start_day); - if ($checkagain != $minical_month) $whole_month = FALSE; - } - } while ($whole_month == TRUE); - ?> -
\n"; - echo "$day\n"; - echo "\n"; - echo "$day\n"; - echo "
-
-
diff --git a/todo.php b/todo.php deleted file mode 100644 index 52e7da7..0000000 --- a/todo.php +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - <?php echo $calendar_name2; ?> - "> - -
- - - - - - - - - - - - -
- - ('.$start.' - '.$end.')'; -// if ($start == '' && $end == '' && isset($start, $end)) $vtodo_times = ' - ('.$all_day_lang.')'; - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[:space:]]+[[:alnum:]/]",'\0',$vtodo).' '.$vtodo_times.'

'; ?>
- [:space:]]+[[:alnum:]/]", - '\0', $description); ?>
Status:
Created:
Due:
-
-
- - diff --git a/week.php b/week.php index b1cf698..1e40d17 100644 --- a/week.php +++ b/week.php @@ -56,7 +56,7 @@ for ($i=0;$i<7;$i++) { - +
@@ -344,7 +344,7 @@ for ($i=0;$i<7;$i++) {
- +
diff --git a/year.php b/year.php index 4129f33..adacdb6 100644 --- a/year.php +++ b/year.php @@ -32,7 +32,7 @@ $thisday2 = localizeDate($dateFormat_week_list, $unix_time); - +
@@ -176,7 +176,7 @@ $thisday2 = localizeDate($dateFormat_week_list, $unix_time); } while (($m < 3) && ($n < 12)); ?>
- +
-- cgit v1.2.3