<?php header('Content-type: text/xml'); ?>

<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<atom:link href="http://designsnack.com/rss/flash_websites.xml" rel="self" type="application/rss+xml" />
<title>Design Snack: Flash Websites</title>
<description>The ultimate inspiration tool.</description>
<link>http://designsnack.com</link>

<?php // Set up URL and pull in basic functions & mysql class
$goBack = "../";
$site_url = "http://designsnack.com";
include($goBack."config/functions.php");
include($goBack."config/mysql.php");
$db = &new MySQL($host, $dbUser, $dbPass, $dbName); 

$sql = "SELECT * FROM items WHERE hidden = 0 AND type='flash_website' AND toprated_id > 0 ORDER BY toprated_id DESC LIMIT 25";
$queryResource = mysql_query($sql);
while ($item = mysql_fetch_array($queryResource, MYSQL_ASSOC)) {

	$current_rating = $item['current_rating'];
	$item_url = $item['url'];
	$item_name = $item['title'];
	$id = $item['id'];
	$url_slug = url_slug($item_name);
	
	$url = "http://designsnack.com/item/".$url_slug."/".$id."/";	
	?>
	
	<item>
	  	<title><?php echo $item_name; ?></title>
	  	<link><?php echo $url ?></link>
		<guid><?php echo $url ?></guid>
	  	<pubDate><?php echo date("D, j M Y H:i:s T", strtotime($item['date'])) ?></pubDate>
	  	<description><![CDATA[<strong><?php echo $item_name . "</strong> (<a href=\"".$item_url."\">".$item_url."</a>)" ?><br /><img src="http://designsnack.com/screenshots/image.php?width=550&amp;image=/screenshots/<?php echo $item['screenshot']; ?>" alt="<?php echo $item_name ?>" />]]></description>
	</item>

<?php } ?>

</channel>
</rss>
