public function view_modify() { $this->smarty->assign('title', '修改运输方式名预警'); $id = isset($_GET['id']) ? intval(trim($_GET['id'])) : 0; if (empty($id) || !is_numeric($id)) { redirect_to("index.php?mod=trackWarnCarrier&act=index"); exit; } $trackWarnCarrier = new TrackWarnCarrierAct(); $res = $trackWarnCarrier->actModify($id); $erpCarrierList = TransOpenApiAct::act_getErpCarrierList(); $this->smarty->assign('shipErp', $erpCarrierList); //ERP运输方式列表 $carrierList = TransOpenApiModel::getCarrier(2); $this->smarty->assign('lists', $carrierList); //运输方式列表 $trackCarrierList = TransOpenApiModel::getTrackCarrierList(); $this->smarty->assign('shipTrack', $trackCarrierList); //跟踪号系统运输方式列表 $this->smarty->assign('carrier_name', $res['trackName']); $this->smarty->assign('ship_erp', $res['erpName']); $this->smarty->assign('ship_id', $res['carrierId']); $this->smarty->assign('id', $res['id']); $this->smarty->display('trackWarnCarrierModify.htm'); }
/** * TrackWarnCarrierAct::act_delTrackWarnCarrier() * 删除运输方式名预警 * @param int $id 运输方式名预警ID * @return bool */ public function act_delTrackWarnCarrier() { $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 = TrackWarnCarrierModel::delTrackWarnCarrier($id); self::$errCode = TrackWarnCarrierModel::$errCode; self::$errMsg = TrackWarnCarrierModel::$errMsg; return $res; }