/** * TrackWarnCountryAct::act_addTrackWarnCountry() * 添加目的地国家预警 * @param string $carrier_name 跟踪系统运输方式名 * @param string $ship_country 目的地国家名 * @param string $ship_id 运输方式ID * @return bool */ public function act_addTrackWarnCountry() { $carrier_name = isset($_POST["carrier_name"]) ? post_check($_POST["carrier_name"]) : ""; $ship_country = isset($_POST["ship_country"]) ? post_check($_POST["ship_country"]) : ""; $ship_id = isset($_POST["ship_id"]) ? post_check($_POST["ship_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 = 10003; self::$errMsg = "对不起,您无数据添加权限!"; return false; } if (empty($ship_id)) { self::$errCode = 10000; self::$errMsg = "运输方式有误!"; return false; } if (empty($ship_country)) { self::$errCode = 10001; self::$errMsg = "目的地国家名参数有误!"; return false; } if (empty($carrier_name)) { self::$errCode = 10002; self::$errMsg = "跟踪运输方式名有误!"; return false; } $uid = $_SESSION[C('USER_AUTH_SYS_ID')]; $data = array("trackName" => $carrier_name, "countryName" => $ship_country, "carrierId" => $ship_id, "addTime" => time(), "add_user_id" => $uid); $res = TrackWarnCountryModel::addTrackWarnCountry($data); self::$errCode = TrackWarnCountryModel::$errCode; self::$errMsg = TrackWarnCountryModel::$errMsg; return $res; }