aboutsummaryrefslogtreecommitdiffstats
path: root/init.inc.php
diff options
context:
space:
mode:
authorjwangen <jwangen>2002-09-18 04:03:08 +0000
committerjwangen <jwangen>2002-09-18 04:03:08 +0000
commit5eebb3f6b19ec139629833939e7b84ef9d0c8109 (patch)
tree2d73ba4eab8e1d732b0a4834435a3c785a5c9af2 /init.inc.php
parentf93ed0634f4b2a17270f17006d93d8c4755099eb (diff)
downloadphpicalendar-5eebb3f6b19ec139629833939e7b84ef9d0c8109.tar.gz
phpicalendar-5eebb3f6b19ec139629833939e7b84ef9d0c8109.tar.bz2
phpicalendar-5eebb3f6b19ec139629833939e7b84ef9d0c8109.zip
Added init.inc.php for initializing variables and running functions at
the beginning. Fixed list_icals.php so the JavaScript works universally (more or less, but I figured out the problem)
Diffstat (limited to 'init.inc.php')
-rw-r--r--init.inc.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/init.inc.php b/init.inc.php
new file mode 100644
index 0000000..09134b0
--- /dev/null
+++ b/init.inc.php
@@ -0,0 +1,16 @@
+<?
+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"]));
+ setcookie("cal",$cal_filename);
+} elseif ($_COOKIE["cal"]) {
+ $cal_filename = stripslashes(urldecode($_COOKIE["cal"]));
+} else {
+ $cal_filename = $default_cal;
+}
+
+if (!isset($filename)) {
+ $filename = $calendar_path."/".$cal_filename.".ics";
+} \ No newline at end of file

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