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 /rss | |
parent | 626ad791d35bfaba4678f54c144e321f0fc8f23c (diff) | |
download | phpicalendar-609650a5e790ecd6c1107a8a8924936284a9c010.tar.gz phpicalendar-609650a5e790ecd6c1107a8a8924936284a9c010.tar.bz2 phpicalendar-609650a5e790ecd6c1107a8a8924936284a9c010.zip |
Added BASE to files, started 0.8 README
Diffstat (limited to 'rss')
-rw-r--r-- | rss/rss.php | 44 |
1 files changed, 24 insertions, 20 deletions
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"; + } + } } |