Exemple #1
0
 /**
  * PlatFormAct::act_delPlatForm()
  * 删除平台
  * @param int $id 平台ID
  * @return  bool
  */
 public function act_delPlatForm()
 {
     $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 = 10001;
         self::$errMsg = "对不起,您无数据删除权限!";
         return false;
     }
     if (empty($id) || !is_numeric($id)) {
         self::$errCode = 10000;
         self::$errMsg = "平台ID有误!";
         return false;
     }
     $res = PlatFormModel::delPlatForm($id);
     self::$errCode = PlatFormModel::$errCode;
     self::$errMsg = PlatFormModel::$errMsg;
     return $res;
 }
 /**
  * TrackEmailAccountAct::actModify()
  * 返回某个客服邮件帐号的信息
  * @param int $id 查询ID
  * @return array 
  */
 public function actModify()
 {
     $data = array();
     $id = isset($_GET['id']) ? intval(trim($_GET['id'])) : 0;
     if (empty($id)) {
         show_message($this->smarty, "跟踪邮件ID不能为空?", "");
         return false;
     }
     $data['id'] = $id;
     $data['lists'] = PlatFormModel::modList(1, 1, 200);
     //平台列表
     $data['res'] = TrackEmailAccountModel::modModify($id);
     self::$errCode = TrackEmailAccountModel::$errCode;
     self::$errMsg = TrackEmailAccountModel::$errMsg;
     if (self::$errCode != 0) {
         show_message($this->smarty, self::$errMsg, "");
         return false;
     }
     return $data;
 }
Exemple #3
0
 /**
  * PlatFormModel::delPlatForm()
  * 平台删除
  * @param integer $id 平台ID
  * @return bool
  */
 public static function delPlatForm($id)
 {
     self::initDB();
     $sql = "UPDATE `" . self::$prefix . self::$table . "` SET is_delete = 1 WHERE id = {$id}";
     $query = self::$dbConn->query($sql);
     if ($query) {
         $rows = self::$dbConn->affected_rows();
         if ($rows) {
             return $res;
         } else {
             self::$errCode = 10001;
             self::$errMsg = "删除数据失败";
             return false;
         }
     } else {
         self::$errCode = 10000;
         self::$errMsg = "执行SQL语句失败!";
         return false;
     }
 }