<?php header('Content-type: text/xml'); ?>
<rss version="2.0">
<channel>
	<title>Bieler Bros. Hot Headlines</title>
	<description>Recent Bieler Bros. News</description>
	<link>http://www.bielerbros.com/</link>
	<copyright>copyright <?php echo date("Y"); ?> Bieler Bros. Records</copyright>
	
	<?php
	require_once('../Connections/db.php');
	mysql_select_db($database_db, $db);
	$sql = mysql_query("SELECT news_id,headline,article,UNIX_TIMESTAMP(date_added) AS date_added FROM news ORDER BY date_added DESC LIMIT 0,15") or die(mysql_error());
	
	while($result = mysql_fetch_array($sql)){ ?> 
		<item> 
			<title><?php echo htmlentities(strip_tags($result['headline'])); ?></title>
			<description><?php echo htmlentities(strip_tags($result['article'],'ENT_QUOTES')); ?></description>
			<link>http://www.bielerbros.com/news.html?id=<?php echo $result['news_id']; ?></link>
			<pubDate><?php echo strftime( "%a, %d %b %Y %T %Z" , $result['date_added']); ?></pubDate>
		</item>
	<?php } ?>
</channel>
</rss>