diff options
author | jwangen <jwangen> | 2002-09-18 07:00:43 +0000 |
---|---|---|
committer | jwangen <jwangen> | 2002-09-18 07:00:43 +0000 |
commit | 6ce685298140d362f78445aeaffb19c1d9d63435 (patch) | |
tree | a6936bb2c8eb2c32c5fe0c8d2d156e66a4c3b68c | |
parent | ab055f768fe83a1d375cc3dbdbfd426d1b345bb9 (diff) | |
download | phpicalendar-6ce685298140d362f78445aeaffb19c1d9d63435.tar.gz phpicalendar-6ce685298140d362f78445aeaffb19c1d9d63435.tar.bz2 phpicalendar-6ce685298140d362f78445aeaffb19c1d9d63435.zip |
init now keeps track of $cal and makes sure it always has the correct value
day and week lost their $cal = lines
parser hasn't changed
-rw-r--r-- | day.php | 2 | ||||
-rw-r--r-- | ical_parser.php | 8 | ||||
-rw-r--r-- | init.inc.php | 3 | ||||
-rw-r--r-- | week.php | 3 |
4 files changed, 7 insertions, 9 deletions
@@ -23,8 +23,6 @@ if ($getdate == (date("Ymd"))) { $yesterdays_date = date( "Ymd", ($yesterday)); } -if (!$cal) $cal = "$default_cal"; - ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" diff --git a/ical_parser.php b/ical_parser.php index b28dff9..6b77ae4 100644 --- a/ical_parser.php +++ b/ical_parser.php @@ -270,10 +270,10 @@ foreach($contents as $line) { ksort($master_array); reset($master_array); -// If you want to see the values in the arrays, uncomment below. -// print_r($master_array); -// print_r($day_array); -// print_r($rrule); +//If you want to see the values in the arrays, uncomment below. +//print_r($master_array); +//print_r($day_array); +//print_r($rrule); diff --git a/init.inc.php b/init.inc.php index 09134b0..50c9dce 100644 --- a/init.inc.php +++ b/init.inc.php @@ -4,11 +4,14 @@ include('./config.inc.php'); // $cal_filename should always be the filename of the calendar without .ics if (isset($_GET["cal"])) { $cal_filename = stripslashes(urldecode($_GET["cal"])); + $cal = urlencode($cal_filename); setcookie("cal",$cal_filename); } elseif ($_COOKIE["cal"]) { $cal_filename = stripslashes(urldecode($_COOKIE["cal"])); + $cal = urlencode($cal_filename); } else { $cal_filename = $default_cal; + $cal = urlencode($cal_filename); } if (!isset($filename)) { @@ -20,9 +20,6 @@ $prev_week2 = ($date - (7 * 24.4 * 60 * 60)); $next_week = date("Ymd", $next_week2); $prev_week = date("Ymd", $prev_week2); -if (!$cal) $cal = "$default_cal"; - - ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |