aboutsummaryrefslogtreecommitdiffstats
path: root/rss
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2002-10-23 06:39:06 +0000
committerChad Little <clittle@users.sourceforge.net>2002-10-23 06:39:06 +0000
commit609650a5e790ecd6c1107a8a8924936284a9c010 (patch)
tree7814f132e9ad6343ddbe0ab41aab4d845425e9ba /rss
parent626ad791d35bfaba4678f54c144e321f0fc8f23c (diff)
downloadphpicalendar-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.php44
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";
+ }
+ }
}

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