public function view_modify() { $data = ChannelManageAct::actModify(); $this->smarty->assign('title', '修改渠道'); $this->smarty->assign('lists', $data['lists']); $this->smarty->assign('ch_name', $data['res']['channelName']); $this->smarty->assign('ch_alias', $data['res']['channelAlias']); $this->smarty->assign('ch_post', $data['res']['postName']); $this->smarty->assign('ch_post1', $data['res']['postName1']); $this->smarty->assign('ch_post2', $data['res']['postName2']); $this->smarty->assign('ch_discount', $data['res']['discount']); $this->smarty->assign('ch_enabel', $data['res']['is_enable']); $this->smarty->assign('ship_id', $data['res']['carrierId']); $this->smarty->assign('ch_time', $data['res']['timeDiff']); $this->smarty->assign('id', $data['id']); $this->smarty->display('channelManageModify.htm'); }
/** * ChannelManageAct::act_delChannelManage() * 删除渠道 * @param int $id 渠道ID * @return bool */ public function act_delChannelManage() { $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 = ChannelManageModel::delChannelManage($id); self::$errCode = ChannelManageModel::$errCode; self::$errMsg = ChannelManageModel::$errMsg; return $res; }