From 9ee9d70b3288ae2ca420b03698fa0b2d76677f3c Mon Sep 17 00:00:00 2001 From: Chad Little Date: Wed, 17 Sep 2003 05:18:23 +0000 Subject: Moved all html head/meta data/body/ect to 'header.inc.php' so people can more easily modify the top to fit their site. --- admin.php | 14 +--------- config.inc.php | 1 - day.php | 21 ++------------- includes/header.inc.php | 22 +++++++++++++--- month.php | 20 ++------------ preferences.php | 12 ++------- print.php | 70 ++++++++++++++++++++++--------------------------- week.php | 19 ++------------ year.php | 16 +++-------- 9 files changed, 62 insertions(+), 133 deletions(-) diff --git a/admin.php b/admin.php index 45d8e72..14ec9c7 100644 --- a/admin.php +++ b/admin.php @@ -40,22 +40,10 @@ else { $is_loged_in = login ($username, $password); } } +include (BASE.'includes/header.inc.php'); ?> - - - - - - <?php echo "$admin_header_lang"; ?> - "> - -
- - -
diff --git a/config.inc.php b/config.inc.php index f4f4ddf..e0c91c5 100644 --- a/config.inc.php +++ b/config.inc.php @@ -40,7 +40,6 @@ $use_color_cals = 'yes'; // Display each calendar in the pop-up as a differe $daysofweek_dayview = 'no'; // Display the days of the week in day.php view. $enable_rss = 'yes'; // Enable RSS access to your calendars (good thing). $show_search = 'no'; // Show the search box in the sidebar. -$header_always = 'yes'; // Set to yes to have header on print.php $allow_preferences = 'yes'; // Allow visitors to change various preferences via cookies. $printview_default = 'no'; // Set print view as the default view. day, week, and month only supported views for $default_view (listed well above). $show_todos = 'yes'; // Show your todo list on the side of day and week view. diff --git a/day.php b/day.php index ccabe8e..2b6ed59 100644 --- a/day.php +++ b/day.php @@ -42,26 +42,9 @@ if (isset($master_array[($getdate)])) { } } } -?> - - - - - - <?php echo "$calendar_name - $display_date"; ?> - "> - "; - } - ?> +include (BASE.'includes/header.inc.php'); - - - - +?>
diff --git a/includes/header.inc.php b/includes/header.inc.php index dbc3425..09ceb52 100644 --- a/includes/header.inc.php +++ b/includes/header.inc.php @@ -1,4 +1,20 @@ - + - - + + + + + <?php echo "$calendar_name - $display_date"; ?> + "> + "; + } + if (isset($master_array['-2'])) include (BASE.'functions/todo.js'); + + ?> + + \ No newline at end of file diff --git a/month.php b/month.php index 55e7a83..e0694e5 100644 --- a/month.php +++ b/month.php @@ -34,32 +34,16 @@ $prev_month_time = mktime(0,0,0,$prev_month_month,$prev_month_day,$prev_month_ye $next_month = date("Ymd", $next_month_time); $prev_month = date("Ymd", $prev_month_time); -$display_month = localizeDate ($dateFormat_month, $date); +$display_date = localizeDate ($dateFormat_month, $date); $parse_month = date ("Ym", $date); $first_of_month = $this_year.$this_month."01"; $start_month_day = dateOfWeek($first_of_month, $week_start_day); $thisday2 = localizeDate($dateFormat_week_list, $unix_time); $num_of_events = 0; +include (BASE.'includes/header.inc.php'); ?> - - - - - <?php echo "$calendar_name - $display_month"; ?> - "> - "; - } - ?> - - -
diff --git a/preferences.php b/preferences.php index 4dd231d..91fdccc 100644 --- a/preferences.php +++ b/preferences.php @@ -64,17 +64,9 @@ if ((!isset($HTTP_COOKIE_VARS['phpicalendar'])) || ($cookie_unset)) { $cookie_time = $day_start; } +include (BASE.'includes/header.inc.php'); + ?> - - - - - <?php echo "$calendar_lang - $preferences_lang"; ?> - "> - - -
diff --git a/print.php b/print.php index 4596082..8690826 100644 --- a/print.php +++ b/print.php @@ -8,56 +8,48 @@ if (strlen($cal_displayname2) > 24) { $cal_displayname2 = $cal_displayname2 . "..."; } -$start_week_time = strtotime(dateOfWeek($getdate, $week_start_day)); -$end_week_time = $start_week_time + (6 * 25 * 60 * 60); -$parse_month = date ("Ym", strtotime($getdate)); -$printview = $HTTP_GET_VARS['printview']; -$cal_displayname = str_replace("32", " ", $cal); -$events_week = 0; -$unix_time = strtotime("$getdate"); +$start_week_time = strtotime(dateOfWeek($getdate, $week_start_day)); +$end_week_time = $start_week_time + (6 * 25 * 60 * 60); +$parse_month = date ("Ym", strtotime($getdate)); +$printview = $HTTP_GET_VARS['printview']; +$cal_displayname = str_replace("32", " ", $cal); +$events_week = 0; +$unix_time = strtotime("$getdate"); if ($printview == 'day') { - $print_title = localizeDate ($dateFormat_day, strtotime($getdate)); - $next = date("Ymd", strtotime("+1 day", $unix_time)); - $prev = date("Ymd", strtotime("-1 day", $unix_time)); - $zero_events = $no_events_day_lang; + $display_date = localizeDate ($dateFormat_day, strtotime($getdate)); + $next = date("Ymd", strtotime("+1 day", $unix_time)); + $prev = date("Ymd", strtotime("-1 day", $unix_time)); + $zero_events = $no_events_day_lang; $print_next_nav = $next_day_lang; $print_prev_nav = $last_day_lang; - $week_start = ''; - $week_end = ''; + $week_start = ''; + $week_end = ''; } elseif ($printview == 'week') { - $start_week = localizeDate($dateFormat_week, $start_week_time); - $end_week = localizeDate($dateFormat_week, $end_week_time); - $print_title = "$start_week - $end_week"; - $week_start = date("Ymd", $start_week_time); - $week_end = date("Ymd", $end_week_time); - $next = date("Ymd", strtotime("+1 week", $unix_time)); - $prev = date("Ymd", strtotime("-1 week", $unix_time)); - $zero_events = $no_events_week_lang; + $start_week = localizeDate($dateFormat_week, $start_week_time); + $end_week = localizeDate($dateFormat_week, $end_week_time); + $display_date = "$start_week - $end_week"; + $week_start = date("Ymd", $start_week_time); + $week_end = date("Ymd", $end_week_time); + $next = date("Ymd", strtotime("+1 week", $unix_time)); + $prev = date("Ymd", strtotime("-1 week", $unix_time)); + $zero_events = $no_events_week_lang; $print_next_nav = $next_week_lang; $print_prev_nav = $last_week_lang; } elseif ($printview == 'month') { - $print_title = localizeDate ($dateFormat_month, strtotime($getdate)); - $next = date("Ymd", strtotime("+1 month", $unix_time)); - $prev = date("Ymd", strtotime("-1 month", $unix_time)); - $zero_events = $no_events_month_lang; + $print_title = localizeDate ($dateFormat_month, strtotime($getdate)); + $next = date("Ymd", strtotime("+1 month", $unix_time)); + $prev = date("Ymd", strtotime("-1 month", $unix_time)); + $zero_events = $no_events_month_lang; $print_next_nav = $next_month_lang; $print_prev_nav = $last_month_lang; - $week_start = ''; - $week_end = ''; + $week_start = ''; + $week_end = ''; } - ?> - - - - - <?php echo "$calendar_name: $print_title"; ?> - - - - +include (BASE.'includes/header.inc.php'); + +?>
@@ -69,7 +61,7 @@ if ($printview == 'day') {
- +
diff --git a/week.php b/week.php index 78853e4..9cb77c1 100644 --- a/week.php +++ b/week.php @@ -42,25 +42,10 @@ for ($i=0;$i<7;$i++) { } $thisdate = ($thisdate + (25 * 60 * 60)); } +include (BASE.'includes/header.inc.php'); + ?> - - - - - <?php echo "$calendar_name - $display_date"; ?> - "> - "; - } - ?> - - - -
diff --git a/year.php b/year.php index 1bb54a0..b42c996 100644 --- a/year.php +++ b/year.php @@ -7,7 +7,7 @@ ereg ("([0-9]{4})([0-9]{2})([0-9]{2})", $getdate, $day_array2); $this_day = $day_array2[3]; $this_month = $day_array2[2]; $this_year = $day_array2[1]. '01'. '01'; -$this_year2 = $day_array2[1]; +$display_date = $day_array2[1]; $unix_time = strtotime($getdate); $startYear = strtotime ($this_year); @@ -20,19 +20,9 @@ $prev_year = date ("Ymd", $prev_year); $thisday2 = localizeDate($dateFormat_week_list, $unix_time); +include (BASE.'includes/header.inc.php'); ?> - - - - - <?php echo "$calendar_name - $this_year2"; ?> - - - - -
@@ -44,7 +34,7 @@ $thisday2 = localizeDate($dateFormat_week_list, $unix_time);
- +
-- cgit v1.2.3