/** * 设置地区 */ public function setcitydq() { if (IS_POST) { $id = $_POST['id']; //省id $diqu = $_POST['diqu']; //获取市的id $m = new CityModel(); $pidstr = $m->getsqid($id); #修改地区 $res = $m->updatedq($pidstr, $diqu); if ($res) { $this->success("操作成功", U("Index/city")); } else { $this->error("操作失败"); } exit; } parent::_initalize(); $this->assign("systemConfig", $this->systemConfig); $id = $_GET['id']; $this->assign("id", $id); $cof = (include WEB_ROOT . 'Common/config2.php'); $this->assign("diqu", $cof['diqu']); $this->display(); }