<?php
/**********************************************
 * (c) flamegreen 2006
 * Ian McFarland
 **********************************************/

/**********************************************
 * MAIN
 **********************************************/

 // add the xml header
 $page->addHeader('Content-Type: application/xml');

 // create the tags
 $tags  = new Tags($db, $util, $VARS);

 // create the article system
 $article 		= new Article($db, $tags, $VARS);
 $articles_arr 	= $article->getArticlesArr($VARS['cat_id'], RSS_NEWS_COUNT, 't'); 				// no category

 // assign the articles if we have any
 if (!empty($articles_arr)) {
	 $page->assign('ArticlesArr', $articles_arr);
 }

 if (!empty($VARS['cat_id'])) {
 	$category_arr = $article->getCategoryArr($VARS['cat_id']);
 }

 // RSS title & Description
 $page->assignByValue('RSS_TITLE', "Wilson Nesbitt Solicitors - {$category_arr['title']} News");
 $page->assignByValue('RSS_DESCRIPTION', "Wilson Nesbitt Solicitors - {$category_arr['title']} News RSS feed");

 // add the tempalte
 $page->addTemplate('info/rss/articles_rss.tpl');

 // output the page
 $page->output();
?>
