<? header('Content-type: text/xml'); ?>
<rss version="2.0">
<channel>
<title>Latest News from mhillscls Insurance Brokers!</title>
<description></description>
<link>http://www.john-mhillscl.co.uk/</link>
<copyright>(c) 2007 john-mhillscl.co.uk All Rights Reserved</copyright>

<?
/* -- Configure Database Variables Below --*/
$dbhost = 'localhost';
$dbusername = 'mhillscl';
$dbpasswd = 'xX56t7yi';
$database_name = 'mhillscl_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.");

$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 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.john-mhillscl.co.uk/en/mhillscls-news/<?=$row['url']?>.php</link> 
        <pubDate> <?=strftime( "%a, %d %b %Y %T %Z" , $row['date']); ?></pubDate> 
     </item>    
<? } ?>
</channel>
</rss>