diff options
author | Chad Little <clittle@users.sourceforge.net> | 2003-09-17 05:18:23 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2003-09-17 05:18:23 +0000 |
commit | 9ee9d70b3288ae2ca420b03698fa0b2d76677f3c (patch) | |
tree | 59cb757a5606f75e00fed6ea4dfce004d9cfc2d3 | |
parent | d390d4472192244f6ee1a1b68dde32b5ae28fec3 (diff) | |
download | phpicalendar-9ee9d70b3288ae2ca420b03698fa0b2d76677f3c.tar.gz phpicalendar-9ee9d70b3288ae2ca420b03698fa0b2d76677f3c.tar.bz2 phpicalendar-9ee9d70b3288ae2ca420b03698fa0b2d76677f3c.zip |
Moved all html head/meta data/body/ect to 'header.inc.php' so people can
more easily modify the top to fit their site.
-rw-r--r-- | admin.php | 14 | ||||
-rw-r--r-- | config.inc.php | 1 | ||||
-rw-r--r-- | day.php | 21 | ||||
-rw-r--r-- | includes/header.inc.php | 22 | ||||
-rw-r--r-- | month.php | 20 | ||||
-rw-r--r-- | preferences.php | 12 | ||||
-rw-r--r-- | print.php | 70 | ||||
-rw-r--r-- | week.php | 19 | ||||
-rw-r--r-- | year.php | 16 |
9 files changed, 62 insertions, 133 deletions
@@ -40,22 +40,10 @@ else { $is_loged_in = login ($username, $password); } } +include (BASE.'includes/header.inc.php'); ?> - -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" - "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> -<html> -<head> - <meta http-equiv="content-type" content="text/html;charset=UTF-8"> - <title><?php echo "$admin_header_lang"; ?></title> - <link rel="stylesheet" type="text/css" href="<?php echo BASE."styles/$style_sheet/default.css"; ?>"> -</head> -<body bgcolor="#FFFFFF"> <center> - -<?php include (BASE.'includes/header.inc.php'); ?> - <table width="640" border="0" cellspacing="0" cellpadding="0" class="calborder"> <tr> <td align="center" valign="middle"> 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. @@ -42,26 +42,9 @@ if (isset($master_array[($getdate)])) { } } } -?> - -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" - "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> -<html> -<head> - <meta http-equiv="content-type" content="text/html;charset=UTF-8"> - <title><?php echo "$calendar_name - $display_date"; ?></title> - <link rel="stylesheet" type="text/css" href="<?php echo BASE."styles/$style_sheet/default.css"; ?>"> - <?php - // if RSS is enabled, set the RSS auto-discovery link - if ($enable_rss == 'yes') { - echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"".$default_path."/rss/rss.php?cal=".$cal."&rssview=day\">"; - } - ?> +include (BASE.'includes/header.inc.php'); -<?php if (isset($master_array['-2'])) include (BASE.'functions/todo.js'); ?> -</head> -<body bgcolor="#FFFFFF"> -<?php include (BASE.'includes/header.inc.php'); ?> +?> <center> <table border="0" width="700" cellspacing="0" cellpadding="0"> <tr> 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 /* Begin Custom Header */ ?> +<? if ($current_view == 'preferences') $display_date = $preferences_lang; ?> - -<?php /* End Custom Header */ ?> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" + "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> +<html> +<head> + <meta http-equiv="content-type" content="text/html;charset=UTF-8"> + <title><?php echo "$calendar_name - $display_date"; ?></title> + <link rel="stylesheet" type="text/css" href="<?php echo BASE."styles/$style_sheet/default.css"; ?>"> + <?php + + // if RSS is enabled, set the RSS auto-discovery link + if ($enable_rss == 'yes') { + echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"".$default_path."/rss/rss.php?cal=".$cal."&rssview=week\">"; + } + if (isset($master_array['-2'])) include (BASE.'functions/todo.js'); + + ?> +</head> +<body bgcolor="#FFFFFF">
\ No newline at end of file @@ -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'); ?> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" - "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> -<html> -<head> - <meta http-equiv="content-type" content="text/html;charset=UTF-8"> - <title><?php echo "$calendar_name - $display_month"; ?></title> - <link rel="stylesheet" type="text/css" href="styles/<?php echo "$style_sheet/default.css"; ?>"> - <?php - // if RSS is enabled, set the RSS auto-discovery link - if ($enable_rss == 'yes') - { - echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"".$default_path."/rss/rss.php?cal=".$cal."&rssview=month\">"; - } - ?> -</head> -<body> -<?php include (BASE.'includes/header.inc.php'); ?> <center> <table width="735" border="0" cellspacing="0" cellpadding="0" class="calborder"> <tr> 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'); + ?> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" - "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> -<html> -<head> - <meta http-equiv="content-type" content="text/html;charset=UTF-8"> - <title><?php echo "$calendar_lang - $preferences_lang"; ?></title> - <link rel="stylesheet" type="text/css" href="<?php echo BASE."styles/$style_sheet/default.css"; ?>"> -</head> -<body bgcolor="#FFFFFF"> -<?php include (BASE.'includes/header.inc.php'); ?> <center> <table border="0" width="700" cellspacing="0" cellpadding="0"> <tr> @@ -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 = ''; } - ?> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" - "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> -<html> -<head> - <meta http-equiv="content-type" content="text/html;charset=UTF-8"> - <title><?php echo "$calendar_name: $print_title"; ?></title> - <link rel="stylesheet" type="text/css" href="styles/<?php echo $style_sheet.'/default.css'; ?>"> -</head> -<body bgcolor="#FFFFFF"> -<?php if ($header_always == 'yes') include (BASE.'includes/header.inc.php'); ?> +include (BASE.'includes/header.inc.php'); + +?> <center> <table border="0" width="700" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" class="calborder"> <tr> @@ -69,7 +61,7 @@ if ($printview == 'day') { <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="right" width="40%" class="navback"><?php echo "<a class=\"psf\" href=\"print.php?cal=$cal&getdate=$prev&printview=$printview\"><img src=\"styles/$style_sheet/left_day.gif\" alt=\"[$print_prev_nav]\" border=\"0\" align=\"right\"></a>"; ?></td> - <td align="center" width="20%" class="navback" nowrap valign="middle"><font class="H20"><?php echo $print_title; ?></font></td> + <td align="center" width="20%" class="navback" nowrap valign="middle"><font class="H20"><?php echo $display_date; ?></font></td> <td align="left" width="40%" class="navback"><?php echo "<a class=\"psf\" href=\"print.php?cal=$cal&getdate=$next&printview=$printview\"><img src=\"styles/$style_sheet/right_day.gif\" alt=\"[$print_next_nav]\" border=\"0\" align=\"left\"></a>"; ?></td> </tr> </table> @@ -42,25 +42,10 @@ for ($i=0;$i<7;$i++) { } $thisdate = ($thisdate + (25 * 60 * 60)); } +include (BASE.'includes/header.inc.php'); + ?> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" - "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> -<html> -<head> - <meta http-equiv="content-type" content="text/html;charset=UTF-8"> - <title><?php echo "$calendar_name - $display_date"; ?></title> - <link rel="stylesheet" type="text/css" href="<?php echo BASE."styles/$style_sheet/default.css"; ?>"> - <?php - // if RSS is enabled, set the RSS auto-discovery link - if ($enable_rss == 'yes') { - echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"".$default_path."/rss/rss.php?cal=".$cal."&rssview=week\">"; - } - ?> - <?php if (isset($master_array['-2'])) include (BASE.'functions/todo.js'); ?> -</head> -<body bgcolor="#FFFFFF"> -<?php include (BASE.'includes/header.inc.php'); ?> <center> <table border="0" width="720" cellspacing="0" cellpadding="0"> <tr> @@ -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'); ?> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" - "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> -<html> -<head> - <meta http-equiv="content-type" content="text/html; charset=utf-8"> - <title><?php echo "$calendar_name - $this_year2"; ?></title> - <link rel="stylesheet" type="text/css" href="styles/<?php echo $style_sheet.'/default.css'; ?>"> - <meta name="generator" content="BBEdit 6.5.3"> -</head> -<body> -<?php include (BASE.'includes/header.inc.php'); ?> <center> <table width="676" border="0" cellspacing="0" cellpadding="0" class="calborder"> <tr> @@ -44,7 +34,7 @@ $thisday2 = localizeDate($dateFormat_week_list, $unix_time); <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="right" width="45%" class="navback"><?php echo "<a class=\"psf\" href=\"year.php?cal=$cal&getdate=$prev_year\"><img src=\"styles/$style_sheet/left_day.gif\" alt=\"[$last_year_lang]\" border=\"0\" align=\"right\"></a>"; ?></td> - <td align="center" width="10%" class="navback" nowrap valign="middle"><font class="H20"><?php echo $this_year2; ?></font></td> + <td align="center" width="10%" class="navback" nowrap valign="middle"><font class="H20"><?php echo $display_date; ?></font></td> <td align="left" width="45%" class="navback"><?php echo "<a class=\"psf\" href=\"year.php?cal=$cal&getdate=$next_year\"><img src=\"styles/$style_sheet/right_day.gif\" alt=\"[$next_year_lang]\" border=\"0\" align=\"left\"></a>"; ?></td> </tr> </table> |