<?
echo '<?xml version="1.0" encoding="ISO-8859-1" ?>';
?>
<rss version="2.0"><channel>
	<title>Big Bother News Feed</title>
	<link>http://www.stotfoldscouts.org.uk/bigbother/index.php</link>
	<description>Updated every minute of every day</description>
	<language>en-gb</language>
	<lastBuildDate>Sat, 26 Mar 05 15:00:44 GMT</lastBuildDate>
	<copyright>Copyright: (C) 1st Stotfold Scout Group</copyright>
	<ttl>15</ttl>
		
		<image>
			<title>Big Bother</title>
			<url>http://www.stotfoldscouts.org.uk/bigbother/rsslogo.jpg</url>
			<link>http://www.stotfoldscouts.org.uk/bigbother/index.php</link>
		</image>

<?php

						include "2005/phpstuff.php";
						include "2005/phpfunctions.php";

						/* Performing SQL query */
						$query = "SELECT * FROM bbnews order by date DESC, time DESC limit 0,10";
						$result = mysql_query($query) or die("Query failed : " . mysql_error());


						$num_rows = mysql_num_rows($result);
						
for($i = 0; $i<$num_rows; $i++){
echo '<item>';
echo '<title>';
						echo mysql_result($result, $i,"subject");
echo '</title>';
echo '<description>';
						$newsstory= mysql_result($result, $i,"report");
                        if($newsstory <> ""){
                        echo substr($newsstory,0,100);
                        echo '...';
                        }
echo '</description>';
echo '<link>';
						$hyperlink= mysql_result($result, $i,"hyperlink");
						 if($hyperlink == ""){
						  echo 'http://www.stotfoldscouts.org.uk/bigbother/2005/news/item.php?pk=';
							echo mysql_result($result, $i,"pk");
						}else{
							echo 'http://';
							echo $hyperlink;}
echo '</link>';							
echo '</item>';
}
						?>



</channel>
</rss>


