From 609650a5e790ecd6c1107a8a8924936284a9c010 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Wed, 23 Oct 2002 06:39:06 +0000 Subject: Added BASE to files, started 0.8 README --- README | 9 +++++++++ day.php | 5 +++-- functions/ical_parser.php | 13 +++++++------ functions/init.inc.php | 6 ++++-- month.php | 9 +++------ rss/rss.php | 44 ++++++++++++++++++++++++-------------------- week.php | 6 ------ year.php | 3 ++- 8 files changed, 52 insertions(+), 43 deletions(-) diff --git a/README b/README index 92810a9..250d14f 100644 --- a/README +++ b/README @@ -61,6 +61,15 @@ COPYING for more information about our license. Changes: -------- +0.8 + -Added search capability + -Added RSS feeds for day, week, month + -Added 'clickable links' for web addresses. + -Tweeked Red and Grey styles. + -Fixed a bug causing Sunday to be listed twice. + -Fixed a bug preventing < 4.1.0 php users to run app. + -Fixed a bug displaying quotes in summary. + 0.7 -Added Year view. -New themes, Green, Orange, Grey, and Tan. diff --git a/day.php b/day.php index 06ae4bc..22bdd9c 100644 --- a/day.php +++ b/day.php @@ -7,9 +7,10 @@ if (isset($HTTP_GET_VARS['jumpto_day'])) { $getdate = date('Ymd', $jumpto_day_time); } } +define('BASE', './'); $current_view = 'day'; -include('./functions/ical_parser.php'); -if ($minical_view == "current") $minical_view = "day"; +include(BASE.'functions/ical_parser.php'); +if ($minical_view == 'current') $minical_view = 'day'; $starttime = '0500'; $weekstart = 1; diff --git a/functions/ical_parser.php b/functions/ical_parser.php index d385b0e..196e4b4 100644 --- a/functions/ical_parser.php +++ b/functions/ical_parser.php @@ -1,11 +1,12 @@ = '4.2.0') extract($HTTP_POST_VARS); } */ -include('./config.inc.php'); -include('./functions/error.php'); + +define('BASE', './'); +include(BASE.'config.inc.php'); +include(BASE.'functions/error.php'); // language support $language = strtolower($language); diff --git a/month.php b/month.php index 8afbee9..3ce20eb 100644 --- a/month.php +++ b/month.php @@ -1,11 +1,8 @@ "."\n"; @@ -14,22 +17,23 @@ $rss .= 'Someones PHP iCalendar'."\n"; $rss .= 'us-en'."\n"; $rss .= 'Copyright 2002, yoursite.com.'."\n"; - -foreach ($master_array[("$getdate")] as $event_times) { - foreach ($event_times as $val) { - $event_start = @$val["event_start"]; - $event_start = date ($timeFormat, @strtotime ("$event_start")); - $event_text = stripslashes(urldecode($val["event_text"])); - $event_text = strip_tags($event_text, ''); - $event_text = word_wrap($event_text, 21, $tomorrows_events_lines); - $description = stripslashes(urldecode($val["description"])); - $description = strip_tags($description, ''); - $rss .= ''."\n"; - $rss .= ''.$event_start.' '.$event_text.''."\n"; - $rss .= 'http://localhost/phpicalendar/day.php?getdate='.$getdate.'&cal='.$cal.''."\n"; - $rss .= ''.$description.''."\n"; - $rss .= ''."\n"; - } +if (isset($master_array[($getdate)]) && sizeof($master_array[($getdate)]) > 0) { + foreach ($master_array[("$getdate")] as $event_times) { + foreach ($event_times as $val) { + $event_start = @$val["event_start"]; + $event_start = date ($timeFormat, @strtotime ("$event_start")); + $event_text = stripslashes(urldecode($val["event_text"])); + $event_text = strip_tags($event_text, ''); + $event_text = word_wrap($event_text, 21, $tomorrows_events_lines); + $description = stripslashes(urldecode($val["description"])); + $description = strip_tags($description, ''); + $rss .= ''."\n"; + $rss .= ''.$event_start.' '.$event_text.''."\n"; + $rss .= 'http://localhost/phpicalendar/day.php?getdate='.$getdate.'&cal='.$cal.''."\n"; + $rss .= ''.$description.''."\n"; + $rss .= ''."\n"; + } + } } diff --git a/week.php b/week.php index 9106d94..bed9991 100644 --- a/week.php +++ b/week.php @@ -4,12 +4,6 @@ $current_view = "week"; include("./functions/ical_parser.php"); if ($minical_view == "current") $minical_view = "week"; -//if ($use_sessions == "yes") { -// session_start(); -// if (is_array($aArray)) $master_array = $aArray; -// echo "using sessions"; -//} - $starttime = "0500"; $weekstart = 1; // dpr 20020926: moved variable gridLength to config.inc.php diff --git a/year.php b/year.php index 56ce445..9c14d3e 100644 --- a/year.php +++ b/year.php @@ -1,6 +1,7 @@