diff options
author | Chad Little <clittle@users.sourceforge.net> | 2002-10-23 06:39:06 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2002-10-23 06:39:06 +0000 |
commit | 609650a5e790ecd6c1107a8a8924936284a9c010 (patch) | |
tree | 7814f132e9ad6343ddbe0ab41aab4d845425e9ba | |
parent | 626ad791d35bfaba4678f54c144e321f0fc8f23c (diff) | |
download | phpicalendar-609650a5e790ecd6c1107a8a8924936284a9c010.tar.gz phpicalendar-609650a5e790ecd6c1107a8a8924936284a9c010.tar.bz2 phpicalendar-609650a5e790ecd6c1107a8a8924936284a9c010.zip |
Added BASE to files, started 0.8 README
-rw-r--r-- | README | 9 | ||||
-rw-r--r-- | day.php | 5 | ||||
-rw-r--r-- | functions/ical_parser.php | 13 | ||||
-rw-r--r-- | functions/init.inc.php | 6 | ||||
-rw-r--r-- | month.php | 9 | ||||
-rw-r--r-- | rss/rss.php | 44 | ||||
-rw-r--r-- | week.php | 6 | ||||
-rw-r--r-- | year.php | 3 |
8 files changed, 52 insertions, 43 deletions
@@ -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. @@ -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 @@ <?php -include('./functions/init.inc.php'); -include('./functions/date_add.php'); -include('./functions/date_functions.php'); -include('./functions/draw_functions.php'); -include('./functions/overlapping_events.php'); -include('./functions/timezones.php'); +define('BASE', './'); +include(BASE.'functions/init.inc.php'); +include(BASE.'functions/date_add.php'); +include(BASE.'functions/date_functions.php'); +include(BASE.'functions/draw_functions.php'); +include(BASE.'functions/overlapping_events.php'); +include(BASE.'functions/timezones.php'); $fillTime = $day_start; $day_array = array (); diff --git a/functions/init.inc.php b/functions/init.inc.php index a4af8ce..fec8708 100644 --- a/functions/init.inc.php +++ b/functions/init.inc.php @@ -18,8 +18,10 @@ if(phpversion() >= '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); @@ -1,11 +1,8 @@ <?php $current_view = "month"; - include("./functions/ical_parser.php"); - if ($minical_view == "current") $minical_view = "month"; - - //might not need this, depending on implimentation, doesn't work correctly in current form anyway - //setcookie("last_view", "month"); - + define('BASE', './'); + include(BASE.'functions/ical_parser.php'); + if ($minical_view == 'current') $minical_view = 'month'; ereg ("([0-9]{4})([0-9]{2})([0-9]{2})", $getdate, $day_array2); $this_day = $day_array2[3]; diff --git a/rss/rss.php b/rss/rss.php index eb3978d..c134698 100644 --- a/rss/rss.php +++ b/rss/rss.php @@ -1,7 +1,10 @@ -<? -$getdate = date ("Ymd"); -$cal = "Jareds32Classes"; -include('../functions/ical_parser.php'); +<?php + +define('BASE', '../'); + +#$getdate = date ("Ymd"); +#$cal = "Jareds32Classes"; +include(BASE.'functions/ical_parser.php'); $rss = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"."\n"; @@ -14,22 +17,23 @@ $rss .= '<description>Someones PHP iCalendar</description>'."\n"; $rss .= '<language>us-en</language>'."\n"; $rss .= '<copyright>Copyright 2002, yoursite.com.</copyright>'."\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, '<b><i><u>'); - $event_text = word_wrap($event_text, 21, $tomorrows_events_lines); - $description = stripslashes(urldecode($val["description"])); - $description = strip_tags($description, '<b><i><u>'); - $rss .= '<item>'."\n"; - $rss .= '<title>'.$event_start.' '.$event_text.'</title>'."\n"; - $rss .= '<link>http://localhost/phpicalendar/day.php?getdate='.$getdate.'&cal='.$cal.'</link>'."\n"; - $rss .= '<description>'.$description.'</description>'."\n"; - $rss .= '</item>'."\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, '<b><i><u>'); + $event_text = word_wrap($event_text, 21, $tomorrows_events_lines); + $description = stripslashes(urldecode($val["description"])); + $description = strip_tags($description, '<b><i><u>'); + $rss .= '<item>'."\n"; + $rss .= '<title>'.$event_start.' '.$event_text.'</title>'."\n"; + $rss .= '<link>http://localhost/phpicalendar/day.php?getdate='.$getdate.'&cal='.$cal.'</link>'."\n"; + $rss .= '<description>'.$description.'</description>'."\n"; + $rss .= '</item>'."\n"; + } + } } @@ -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 @@ -1,6 +1,7 @@ <?php $current_view = 'year'; -include('./functions/ical_parser.php'); +define('BASE', './'); +include(BASE.'functions/ical_parser.php'); ereg ("([0-9]{4})([0-9]{2})([0-9]{2})", $getdate, $day_array2); $this_day = $day_array2[3]; |