aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjwangen <jwangen>2002-09-18 07:00:43 +0000
committerjwangen <jwangen>2002-09-18 07:00:43 +0000
commit6ce685298140d362f78445aeaffb19c1d9d63435 (patch)
treea6936bb2c8eb2c32c5fe0c8d2d156e66a4c3b68c
parentab055f768fe83a1d375cc3dbdbfd426d1b345bb9 (diff)
downloadphpicalendar-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.php2
-rw-r--r--ical_parser.php8
-rw-r--r--init.inc.php3
-rw-r--r--week.php3
4 files changed, 7 insertions, 9 deletions
diff --git a/day.php b/day.php
index 25d094a..b7b7031 100644
--- a/day.php
+++ b/day.php
@@ -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)) {
diff --git a/week.php b/week.php
index b9b9ea9..0d37a05 100644
--- a/week.php
+++ b/week.php
@@ -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"

© 2014-2024 Faster IT GmbH | imprint | privacy policy