/* ------------------------------------------------------------------------- *\ | | | RSS Tutorial Plugin - rss.php | | | | $Id:: rss.php 182 2008-08-15 18:23:53Z $: | | | \* ------------------------------------------------------------------------- */ $page = 'rss'; include "header.php"; include "./include/functions_rss.php"; // Redirect if disabled if( !$setting['setting_rss_enabled'] ) { cheader("home.php"); exit(); } // Process input $type = ( !empty($_GET['type']) ? $_GET['type'] : NULL ); $start = ( !empty($_GET['start']) ? $_GET['start'] : NULL ); $limit = ( !empty($_GET['limit']) ? $_GET['limit'] : NULL ); $user = ( !empty($_GET['user']) ? $_GET['user'] : NULL ); // Create new feed $rss_data = generic_rss($type, $start, $limit, $user); // RSS type doesn't exists if( empty($rss_data) ) { // ASSIGN VARIABLES AND DISPLAY ERROR PAGE $page = "error"; $smarty->assign('error_header', 5000004); $smarty->assign('error_message', 5000005); $smarty->assign('error_submit', 641); include "footer.php"; exit(); } // Ouput header("Content-type: application/rss+xml"); $smarty->assign('feed_url', 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] ); $smarty->assign_by_ref('rss_data', $rss_data); include "footer.php"; ?>