<?php
define('IN_PHPMPS', true);
require dirname(__FILE__) . '/include/common.php';

$citysid = $_REQUEST['citysid'] ? intval($_REQUEST['citysid']) : '';
  if($citysid) {
         $cityinfos = $db->getRow("SELECT areaid, areaname FROM {$table}area where areaid=".$citysid);
		 setcookie("cityid",  $cityinfos['areaid'], time() + 3600 * 24 * 15);
		 setcookie("cityname",  $cityinfos['areaname'], time() + 3600 * 24 * 15);
		 clear_caches('phpcache');
		 showmsg("正在切换城市...", 'index.php');
  }else{
	 $here_arr[] = array('name'=>'城市切换');
	 $here = get_here($here_arr);
	 $seo['title'] = '切换城市_'.$CFG['webname'];
	 include template('city_list'); 
  }
  
?>