<?

/**************************
 ** Google Sitemap Index **
 ** 2006 Kyle DeMent     **
 **************************/

include('./testbin/newsite/classes/config.php');
include('./testbin/newsite/classes/dbinterface.php');

header('Content-type: text/xml');

echo '<?xml version="1.0" encoding="UTF-8"?>';
?>

<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
<?
$db = new DBInterface("runeweb_site");
$res = $db->sql("SELECT `name`,`modified` FROM `content` WHERE `category`>1");
$now = mysql_fetch_row($db->sql("SELECT CURDATE()"));
while($c = mysql_fetch_array($res))
{
	echo "\t<url>\n";
	echo "\t\t<loc>http://www.runeweb.net/index.php?page=".$c['name']."</loc>\n";
	echo "\t\t<lastmod>".$now[0]."</lastmod>\n";
	echo "\t\t<changefreq>daily</changefreq>\n";
	echo "\t</url>\n\n";
}

/*$res = $db->sql("SELECT `id` FROM `rs2_items` WHERE 1;--`id`=0");
while($c = mysql_fetch_array($res))
{
        echo "\t<url>\n";
        echo "\t\t<loc>http://www.runeweb.net/index.php?page=itemsearch&amp;action=viewitem&amp;id=".$c['id']."</loc>\n";
        echo "\t\t<lastmod>".$now[0]."</lastmod>\n";
        echo "\t\t<changefreq>daily</changefreq>\n";
        echo "\t</url>\n\n";
}*/

?>
</urlset>
