aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2002-09-26 02:54:46 +0000
committerChad Little <clittle@users.sourceforge.net>2002-09-26 02:54:46 +0000
commita45d54a3f479740b88a319070942bcef31362d15 (patch)
treea74e7b99a6fde9805ad0fd9234e62292edf26342
parent36051c01451f9b08b71e5f8f1667526c54de1be5 (diff)
downloadphpicalendar-a45d54a3f479740b88a319070942bcef31362d15.tar.gz
phpicalendar-a45d54a3f479740b88a319070942bcef31362d15.tar.bz2
phpicalendar-a45d54a3f479740b88a319070942bcef31362d15.zip
initial session checkin. most are commented out.
-rw-r--r--config.inc.php2
-rw-r--r--day.php7
-rw-r--r--ical_parser.php21
3 files changed, 29 insertions, 1 deletions
diff --git a/config.inc.php b/config.inc.php
index a1f5a63..3d74509 100644
--- a/config.inc.php
+++ b/config.inc.php
@@ -1,6 +1,5 @@
<?php
-
$style_sheet = "default.css"; // Themes support - "default.css", "red.css", "green.css"
$fullpath = "webcal://path/to/your/webcal/calendars/"; // what iCal file are we using
$calendar_path = "./calendars"; // path to directory with calendars
@@ -8,5 +7,6 @@ $default_view = "day"; // default view for calendars = "day", "week", "
$default_cal = "Home"; // filename of calendar without .ics
$language = "english"; // Language support - "english", "polish", "german", "french", "dutch", "danish", "italian", "japanese", "norwegian"
$week_start_day = "Sunday"; // Day of the week your week starts on
+$use_sessions = "yes"; // For speedy performance on web servers, not good for localhost use.
?> \ No newline at end of file
diff --git a/day.php b/day.php
index 54939a2..cd0c493 100644
--- a/day.php
+++ b/day.php
@@ -3,6 +3,13 @@
$current_view = "day";
include("./ical_parser.php");
+//if ($use_sessions == "yes") {
+// session_start();
+// if (is_array($aArray)) $master_array = $aArray;
+// echo "using sessions";
+//}
+
+
$starttime = "0700";
$weekstart = 1;
$gridLength = 30;
diff --git a/ical_parser.php b/ical_parser.php
index 750aed2..f6cc7ba 100644
--- a/ical_parser.php
+++ b/ical_parser.php
@@ -22,6 +22,12 @@ $this_day = $day_array2[3];
$this_month = $day_array2[2];
$this_year = $day_array2[1];
+// Start the session
+//session_start();
+//if (($aYear != $this_year) || ($use_sessions != "yes") || (!is_array($aArray))) {
+//echo "not using sessions";
+
+
// open the iCal file, read it into a string
$fp = @fopen($filename, "r");
$contents = @fread ($fp, filesize ($filename));
@@ -429,6 +435,21 @@ if (is_array($master_array)) {
ksort($master_array);
reset($master_array);
}
+
+// Store information in the session
+if ($use_sessions == "yes") {
+ session_start();
+ session_register( "aArray", "aYear", "aLanguage", "aCalendar" );
+ $aArray = $master_array;
+ $aYear = $this_year;
+ $aLanguage = $language;
+ $aCalendar = $cal;
+}
+
+
+// End the session
+//}
+
//If you want to see the values in the arrays, uncomment below.
//print "<pre>";
//print_r($master_array);

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