<?php	
	ini_set('display_errors', true);
 	header('Content-type: text/xml');

	require_once 'includes/global.php';
	require_once('classes/dbconnect.php');
 ?>
<rss version="2.0">
	<channel>
		<title>Rock and Roll Cooking Show</title>
		<description>Food that Rocks! The Recipes from the Rock n Roll Cooking Show.</description>
		<link>http://www.therockandrollcookingshow.com</link>
		<copyright>2006 Rock n Roll Cooking Show</copyright>
	<?php
		$q = "SELECT * FROM rr_recipes ORDER BY DateAdded DESC";
		$result = mysql_query($q, getLinkID());
		$rows = mysql_num_rows($result);
		for($i=0;$i<$rows;$i++){
			$data = mysql_fetch_array($result);
			?><item>
				<title><?php echo htmlentities(strip_tags($data['RecipeName'])); ?></title>
				<description><?php echo htmlentities(strip_tags($data['RecipeDescription'],'ENT_QUOTES'));?></description>
				<link>http://www.therocknrollcookingshow.com/episodes.php?section=recipe&amp;action=viewRecipes&amp;id=<?php echo $data["RecipeID"]; ?></link>
				<pubDate><?php echo displayDateMySQL($data['DateAdded']); ?></pubDate>
     		</item>  
			<?php
		}
		?>
	</channel>
</rss>
