<? header('Content-type: text/xml');
include("admin/system/engine.php");
global $settings, $row, $prefix, $p, $PHP_SELF;?>

	

<rss version="2.0">
<channel>
<title><?php echo $website ?></title>
<description>Adventure comic staring Jack!</description>
<link>http://www.jackofallblades.com</link>
<copyright>2005 Zachary Lewis and Arthur Frederic, all rights reserved</copyright>

<?

$result = mysql_query("SELECT * FROM ".$prefix."articles WHERE status = '1' ORDER BY aid DESC LIMIT 0,10");

function RSSCleanup($text) {

$text = ereg_replace("&mdash;","--",$text);
$text = ereg_replace("—","--",$text);
$text = preg_replace("/\[b\](.+?)\[\/b\]/is", "\\1", $text);
$text = preg_replace("/\[i\](.+?)\[\/i\]/is", "\\1", $text);
$text = preg_replace("/\[u\](.+?)\[\/u\]/is", "\\1", $text);

//foreign characters
$text = ereg_replace("&egrave;","e",$text);
$text = ereg_replace("&aacute;","a",$text);
	
	
return $text;

}

//Change the following to apply to your site
while($row=mysql_fetch_object($result))
{

	$body = RSSCleanup($row->body);
	$title = RSSCleanup($row->title);
	$pubDate=strftime("%a, %d %b %Y %T %Z",revertTimestamp($row->time));
	echo "<item>
	<title>".$title."</title>
	<description>Jack of All Blades Comic!</description>
	<link>http://www.jackofallblades.com/index.php?p=$row->parentid&a=$row->aid</link>
	<pubDate>".$pubDate."</pubDate>
	</item>";

} ?>

</channel>
</rss>
