enable_rss != 'yes') {
exit(error($lang['l_rss_notenabled'], $cal, '../'));
}
if (empty($default_path)) {
if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) {
$default_path = 'https://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].substr($_SERVER['PHP_SELF'],0,strpos($_SERVER['PHP_SELF'],'/rss/'));
} else {
$default_path = 'http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].substr($_SERVER['PHP_SELF'],0,strpos($_SERVER['PHP_SELF'],'/rss/'));
}
}
$current_view = "rss_index";
$display_date = "RSS Info";
$rss_list = "
\n";
$xml_icon ="";
$cals[] = '';
$cal_displaynames[] = $all_cal_comb_lang;
foreach ($cals as $k=>$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 " "
$rss_list .= ''.$cal_displaynames[$k].' '. $lang['l_calendar'].' | ';
/* Changed to show links without urlencode, but links valid urls */
$rss_list .= "".$lang['l_day']." | ";
$rss_list .= ''.$xml_icon.' RSS 0.91 | | ';
$rss_list .= ''.$xml_icon.' RSS 1.0 | | ';
$rss_list .= ''.$xml_icon.' RSS 2.0 |
';
$rss_list .= "".$lang['l_week']." | ";
$rss_list .= ''.$xml_icon.' RSS 0.91 | | ';
$rss_list .= ''.$xml_icon.' RSS 1.0 | | ';
$rss_list .= ''.$xml_icon.' RSS 2.0 | ';
$rss_list .= "".$lang['l_month']." | ";
$rss_list .= ''.$xml_icon.' RSS 0.91 | | ';
$rss_list .= ''.$xml_icon.' RSS 1.0 | | ';
$rss_list .= ''.$xml_icon.' RSS 2.0 |
';
$footer_check = $phpiCal_config->default_path.'/rss/rss.php?cal%3D'.rawurlencode($file.'&cpath='.$cpath.'&rssview='.$phpiCal_config->default_view);
$validrss_check = str_replace('%', '%25', $footer_check);
$rss_list .= " |
\n";
}
$rss_list .= "
\n";
/* End link modification */
$page = new Page(BASE.'templates/'.$phpiCal_config->template.'/rss_index.tpl');
$page->replace_files(array(
'header' => BASE.'templates/'.$phpiCal_config->template.'/header.tpl',
'footer' => BASE.'templates/'.$phpiCal_config->template.'/footer.tpl',
'event_js' => ''
));
$page->replace_tags(array(
'version' => $phpiCal_config->phpicalendar_version,
'default_path' => $phpiCal_config->default_path.'/',
'template' => $phpiCal_config->template,
'cal' => $cal,
'getdate' => $getdate,
'calendar_name' => $cal_displayname,
'display_date' => $display_date,
'current_view' => $current_view,
'sidebar_date' => @$sidebar_date,
'rss_powered' => $rss_powered,
'rss_list' => $rss_list,
'charset' => $phpiCal_config->charset,
'rss_available' => '',
'rssdisable' => '',
'rss_valid' => '',
'rss_docinfo' => "RSS feeds can also be set up for a specified number of days before or after a given date, or between two dates. See the documentation for how to set up the URLs",
/* Replaces footer.tpl {validrss_check} with $validrss_check */
'validrss_check' => $validrss_check,
'show_search' => $phpiCal_config->show_search,
'l_rss_info' => $lang['l_rss_info'],
'l_rss_subhead' => $lang['l_rss_subhead'],
'l_day' => $lang['l_day'],
'l_week' => $lang['l_week'],
'l_month' => $lang['l_month'],
'l_year' => $lang['l_year'],
'l_subscribe' => $lang['l_subscribe'],
'l_download' => $lang['l_download'],
'l_this_months' => $lang['l_this_months'],
'l_powered_by' => $lang['l_powered_by'],
'l_this_site_is' => $lang['l_this_site_is']
));
$page->output();
?>