From cb7f301d3a39acebecd56fa8d831e275bc8980f0 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 9 Feb 2004 00:51:48 +0000 Subject: Initial wiring of rss index and template. --- rss/index.php | 137 +++++++++++++++++++++------------------------------------- 1 file changed, 50 insertions(+), 87 deletions(-) (limited to 'rss') diff --git a/rss/index.php b/rss/index.php index 3163702..fca8327 100644 --- a/rss/index.php +++ b/rss/index.php @@ -1,93 +1,56 @@ -
- - - - -
- - - - - - - - - - - - - - - - -
- - - - - - -
-
- - - - - -
-
- RSS 0.91 enabled.
-
- tags - $filelist = availableCalendarNames($username, $password, $ALL_CALENDARS_COMBINED); - foreach ($filelist as $file) { - // $cal_filename is the filename of the calendar without .ics - // $cal is a urlencoded version of $cal_filename - // $cal_displayname is $cal_filename with occurrences of "32" replaced with " " - $cal_filename_tmp = substr($file,0,-4); - $cal_tmp = urlencode($cal_filename_tmp); - $cal_displayname_tmp = str_replace("32", " ", $cal_filename_tmp); - echo ''.$cal_displayname_tmp.' '. $calendar_lang.'
'; - echo $default_path.'/rss/rss.php?cal='.$cal_tmp.'&rssview=day
'; - echo $default_path.'/rss/rss.php?cal='.$cal_tmp.'&rssview=week
'; - echo $default_path.'/rss/rss.php?cal='.$cal_tmp.'&rssview=month
'; - $footer_check = $default_path.'/rss/rss.php?cal='.$default_cal.'&rssview='.$default_view; - echo '

'; - } - ?> -
-
-
-
- + +$filelist = availableCalendarNames($username, $password, $ALL_CALENDARS_COMBINED); +foreach ($filelist as $file) { + // $cal_filename is the filename of the calendar without .ics + // $cal is a urlencoded version of $cal_filename + // $cal_displayname is $cal_filename with occurrences of "32" replaced with " " + $cal_filename_tmp = substr($file,0,-4); + $cal_tmp = urlencode($cal_filename_tmp); + $cal_displayname_tmp = str_replace("32", " ", $cal_filename_tmp); + $rss_list = ''.$cal_displayname_tmp.' '. $calendar_lang.'
'; + $rss_list .= $default_path.'/rss/rss.php?cal='.$cal_tmp.'&rssview=day
'; + $rss_list .= $default_path.'/rss/rss.php?cal='.$cal_tmp.'&rssview=week
'; + $rss_list .= $default_path.'/rss/rss.php?cal='.$cal_tmp.'&rssview=month
'; + $footer_check = $default_path.'/rss/rss.php?cal='.$default_cal.'&rssview='.$default_view; +} + + +$page = new Page(BASE.'templates/'.$template.'/rss_index.tpl'); + +$page->replace_tags(array( + 'header' => BASE.'templates/'.$template.'/header.tpl', + 'footer' => BASE.'templates/'.$template.'/footer.tpl', + 'sidebar' => BASE.'templates/'.$template.'/sidebar.tpl', + 'event_js' => BASE.'functions/event.js', + 'default_path' => $default_path, + 'template' => $template, + 'cal' => $cal, + 'getdate' => $getdate, + 'calendar_name' => $calendar_name, + 'display_date' => $display_date, + 'current_view' => $current_view, + 'sidebar_date' => $sidebar_date, + 'rss_powered' => $rss_powered, + 'rss_list' => $rss_list, + 'rss_available' => '', + 'rssdisable' => '', + 'rss_valid' => '', + 'todo_js' => '', + 'show_search' => '' + )); + +$page->output(); + + +?> + \ No newline at end of file -- cgit v1.2.3