Esempio n. 1
0
 public function view_modify()
 {
     $data = WebAdAct::actModify();
     $this->smarty->assign('title', '修改网站广告信息');
     $this->smarty->assign('topic', $data['res']['topic']);
     $this->smarty->assign('content', htmlspecialchars($data['res']['content']));
     $this->smarty->assign('is_enable', $data['res']['is_enable']);
     $this->smarty->assign('layer', $data['res']['layer']);
     $this->smarty->assign('typeId', $data['res']['typeId']);
     $this->smarty->assign('id', $data['id']);
     $this->smarty->display('admin/webAdModify.htm');
 }
Esempio n. 2
0
 /**
  * WebAdAct::act_delWebAd()
  * 删除网站广告
  * @param int $id ID
  * @return  bool
  */
 public function act_delWebAd()
 {
     $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 = WebAdModel::delWebAd($id);
     self::$errCode = WebAdModel::$errCode;
     self::$errMsg = WebAdModel::$errMsg;
     return $res;
 }