<?php
//อลนบอ๘ีพ
require('../inc/common.inc.php');
include ROOT_PATH.'./models/common.php';

$site = new common("site");
$site_info = $site->GetPage(); 
$str_sit="";

if($_REQUEST['type']=='xml')
{
	$str_sit = to_array2xml($site_info);
	header('Content-Type: text/xml'); 
	echo $str_sit;
	
}else{
	
	foreach($site_info AS $key => $val)
	{	
		$str_site .= "(".$val['id'].",'".addslashes($val['sitename'])."','".addslashes($val['siteurl'])."','".addslashes($val['breakurl'])."','".addslashes($val['breaksuff'])."',".$val['sitetype'].",'".$val['cityid']."',".$val['sort'].",'".$val['pinyin']."','".$val['siteapi']."','".$val['apirep']."','".$val['css']."',".$val['recommend'].",".$val['isallowed'].",'".$val['cityapi']."','".$val['cityrep']."','".$val['citysiteapi']."','".$val['qq']."','".$val['msn']."','".$val['tel']."',".$val['level'].",'','".$val['email']."',".$val['goodorder'].",'".$val['gather_method']."','".$val['apikey']."','".$val['limitnum']."','".$val['limitcity']."'),";
	}
	$str_site = rtrim($str_site,",");
	
	echo $str_site;	
	
}

?>