<? header('Content-type: text/xml'); 
include("include/connect.php");
?>
<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
<title>Ai-Ya.com</title>
<description>The home to sophisticated, intelligent and Highly Irreverent and Controversial Writing</description>
<link>http://www.ai-ya.com/</link>
<language>en-us</language>
<copyright>Copyright Ai-Ya.com 2006</copyright>
<?
$q="SELECT * from articles limit 0,15 order by date desc";
$res = $foolsrush->ExecuteQuery($qry);
$tot = mysql_num_rows($res);
$rw = mysql_fetch_array($res);

if($tot!= 0)
	{
	for($i=0;$i<$tot;$i++)
		{
?> 
<item> 
<title><?=htmlentities($rw['title']); ?></title> 
<description> <?=htmlentities($rw['synopsis'],'ENT_QUOTES');?></description> 
<link>http://www.ai-ya.com/article.php?aid=<?=$rw['id'];?></link> 
<pubDate><?=strftime( "%a, %d %b %Y %T %Z" , $rw['date']); ?></pubDate> 
</item>  
<? 		} 
	}
	else
	{
?>
<item> 
<title>No New Stories</title> 
<link>http://www.ai-ya.com</link> 
</item>
<?
	}
?>
</channel>
</rss>
