Ejemplo n.º 1
0
 public function view_modify()
 {
     $data = WebConfigAct::actModify();
     $this->smarty->assign('title', '修改网站后台配置信息');
     $this->smarty->assign('cKey', $data['res']['cKey']);
     $this->smarty->assign('cValue', htmlspecialchars($data['res']['cValue']));
     $this->smarty->assign('is_enable', $data['res']['is_enable']);
     $this->smarty->assign('id', $data['id']);
     $this->smarty->display('admin/webConfigModify.htm');
 }
Ejemplo n.º 2
0
 /**
  * WebConfigAct::act_delWebConfig()
  * 删除网站后台配置
  * @param int $id ID
  * @return  bool
  */
 public function act_delWebConfig()
 {
     $id = isset($_POST["id"]) ? intval(trim($_POST["id"])) : 0;
     $act = isset($_REQUEST["act"]) ? post_check($_REQUEST["act"]) : "";
     $mod = isset($_REQUEST["mod"]) ? post_check($_REQUEST["mod"]) : "";
     if (!AuthUser::checkLogin($mod, $act)) {
         self::$errCode = 30001;
         self::$errMsg = "对不起,您无数据删除权限!";
         return false;
     }
     if (empty($id) || !is_numeric($id)) {
         self::$errCode = 30000;
         self::$errMsg = "ID有误!";
         return false;
     }
     $res = WebConfigModel::delWebConfig($id);
     self::$errCode = WebConfigModel::$errCode;
     self::$errMsg = WebConfigModel::$errMsg;
     return $res;
 }