<? header('Content-type: text/xml'); ?>
<rss version="2.0">
<channel>
<title>Latest News from Hope House Childre's Hospices</title>
<description></description>
<link>http://www.bowmontbe.org.uk/en/index.php</link>
<copyright>(c) 2007 bowmontbe.org.uk All Rights Reserved</copyright>

<?
/* -- Configure Database Variables Below --*/
$dbhost = 'localhost';
$dbusername = 'bowmontb';
$dbpasswd = 'hgGt55re';
$database_name = 'bowmontb_cms';

/* Database Stuff, used to connect to your database, do not modify below this line */

$connection = mysql_pconnect("$dbhost","$dbusername","$dbpasswd") 
	or die ("Couldn't connect to server.");
	
$db = mysql_select_db("$database_name", $connection)
	or die("Couldn't select database.");

$thisWeek = strtotime("-7 days", date("Y-m-d"));

$SQL = mysql_query("SELECT c.title, c.content, n.url, UNIX_TIMESTAMP(n.date) AS date FROM tsl_news n, tsl_content c WHERE c.content_id=n.content_id AND n.language='1' AND n.date < '$thisWeek' ORDER BY n.date ASC") or die(mysql_error());
while ($row = mysql_fetch_array($SQL) ) {
?>
     <item> 
        <title><?=htmlentities(strip_tags($row['title'])); ?></title> 
        <description> <?=htmlentities(strip_tags($row['content'],'ENT_QUOTES'));?></description> 
        <link>http://www.bowmontbe.org.uk/en/latest-news/hope-house-news/<?=$row['url']?>.php</link> 
        <pubDate> <?=strftime( "%a, %d %b %Y %T %Z" , $row['date']); ?></pubDate> 
     </item>    
<? } ?>
</channel>
</rss>