<?
	if($ext == "txt"){
		echo 'Sitemap: http://www.amandaandjameswedding.com/sitemap.xml';
	}else{
		echo '<?xml version="1.0" encoding="UTF-8"?>'."\n".'<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
		$pages=$DB->query("Select `id`,`url_title`,`last_updated` From `".PREFIX."page` 
							Where `require_login`='0' Order By `last_updated` DESC");
		while($page=$DB->fetch_array($pages)){
			echo "\n<url>"
				."\n\t<loc>http://www.amandaandjameswedding.com/".$page['url_title'].".html</loc>"
				."\n\t<lastmod>".date("Y-m-d",$page['last_updated'])."</lastmod>"
				//."\n\t<changefreq>daily</changefreq>"
				//."\n\t<priority>1</priority>"
		