<?php
if(!defined('R_P')) exit('Access Denied');
if(AJAX ){
	$data = array();
	foreach($channel as $channelid=>$v){
		if($v['link'] || $v['show'] == 0) continue;
		$data[$channelid] = qbase::get_object('category', $channelid)->get();
	}
	include qbase::template($_SET['skin'] . '/sitemap');
	$file = R_P . "/sitemap.html";
	$content = ob_get_contents();
	qbase::writetofile( $file, $content);
	ob_clean();
	$data = "生成完毕，<a href='" . W_P . "sitemap.html' target='_blank'>点击查看</a>";
	echo qbase::xmlPrint($data);
}else{
	header("location:sitemap.html");
}
?>