本文整理匯總了PHP中post_check函數的典型用法代碼示例。如果您正苦於以下問題:PHP post_check函數的具體用法?PHP post_check怎麽用?PHP post_check使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了post_check函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: competence1
public function competence1()
{
$ajaxAcc = commonAct::ajaxAccess();
if (!$ajaxAcc) {
self::$errCode = "1003";
self::$errMsg = "您無用戶顆粒(添加、修改)權限!";
return false;
}
$userid = isset($_POST["userid"]) ? post_check($_POST["userid"]) : '';
$visacc = isset($_POST["visacc"]) ? post_check($_POST["visacc"]) : '';
if (empty($userid)) {
self::$errCode = "1001";
self::$errMsg = "用戶參數非法";
return false;
}
if (empty($visacc)) {
self::$errCode = "1002";
self::$errMsg = "可見帳號內容非法";
return false;
}
$userarr = explode(",", $userid);
foreach ($userarr as $userid) {
$userid = is_numeric($userid) ? $userid : 0;
if (empty($userid)) {
self::$errCode = "1000";
self::$errMsg = "單個用戶ID參數非法";
return false;
}
$data = array("user_id" => $userid, "power_ids" => $visacc);
$res = UserCompetenceModel::competence($data);
self::$errCode = UserCompetenceModel::$errCode;
self::$errMsg = UserCompetenceModel::$errMsg;
}
return $res;
}
示例2: view_addOrder
public function view_addOrder()
{
$OmAccountAct = new OmAccountAct();
$state = isset($_GET['state']) ? post_check($_GET['state']) : '';
$this->smarty->assign('state', $state);
//平台
//$platform_lsit = OmAvailableModel::getTNameList("om_platform","*","where is_delete=0");
$platform_lsit = $OmAccountAct->act_getPlatformListByPower();
$tmpPlatformList = array();
foreach ($platform_lsit as $value) {
if (in_array($value['id'], array(3))) {
$tmpPlatformList[] = $value;
}
}
$platform_lsit = $tmpPlatformList;
$this->smarty->assign('platform_lsit', $platform_lsit);
//賬號
//$account_lsit = OmAvailableModel::getTNameList("om_account","*","where is_delete=0 and platformId=3");
$account_lsit = $OmAccountAct->act_getAccountListByPlatform();
$account_lsit = array();
$this->smarty->assign('account_lsit', $account_lsit);
//物流
$Shiping = CommonModel::getCarrierList();
$this->smarty->assign('Shiping', $Shiping);
$toplevel = 2;
//一級菜單的序號
$this->smarty->assign('toplevel', $toplevel);
$secondlevel = 21;
//當前的二級菜單
$this->smarty->assign('secondlevel', $secondlevel);
$this->smarty->assign('toptitle', '訂單添加');
$this->smarty->assign('curusername', $_SESSION['userName']);
$this->smarty->display('orderAdd.htm');
}
示例3: view_printOptimal
public function view_printOptimal()
{
$list = isset($_GET['list']) ? post_check($_GET['list']) : '';
$this->smarty->assign('list', $list);
if ($_POST['route_index']) {
$userName = $_SESSION['userName'];
if (empty($list)) {
echo "請選擇需要生成索引的列表";
exit;
}
$GroupRouteAct = new GroupRouteAct();
$group_index = $GroupRouteAct->act_groupIndex();
$this->smarty->assign('status', $group_index);
$order_count = GroupRouteModel::getRouteIndexNum("where user='{$userName}'");
$this->smarty->assign('count', $order_count);
$this->smarty->assign('group_bool', 1);
}
$navlist = array(array('url' => '', 'title' => '首頁'), array('url' => 'index.php?mod=orderWaitforPrint&act=printList', 'title' => '打印發貨單'), array('url' => 'index.php?mod=PrintOrder&act=printOptimal', 'title' => '訂單最優打印'));
$this->smarty->assign('navlist', $navlist);
$this->smarty->assign('toptitle', '訂單最優打印');
$this->smarty->assign('secnev', 1);
$this->smarty->assign('curusername', $_SESSION['userName']);
$toplevel = 2;
//頂層菜單
$this->smarty->assign('toplevel', $toplevel);
$secondlevel = '22';
//當前的二級菜單
$this->smarty->assign('secondlevel', $secondlevel);
$this->smarty->display('printOrder.htm');
}
示例4: act_sureAdd
function act_sureAdd()
{
$data = array();
$property_arr = array();
$id = post_check(trim($_POST['standardId']));
$is_open = post_check(trim($_POST['isopen']));
$data['sampleTypeId'] = post_check(trim($_POST['typeId']));
$data['sName'] = post_check(trim($_POST['sName']));
$data['minimumLimit'] = post_check(trim($_POST['minimumLimit']));
$data['maximumLimit'] = post_check(trim($_POST['maximumLimit']));
$data['sizeCodeId'] = post_check(trim($_POST['codeId']));
$data['userId'] = $_SESSION['sysUserId'];
$data['createdTime'] = time();
if (empty($id)) {
$data['is_open'] = 0;
$insertid = SampleStandardModel::insertRow($data);
if ($insertid) {
return true;
} else {
return false;
}
} else {
$updatedata = SampleStandardModel::update($data, "and id='{$id}'");
if ($updatedata) {
return true;
} else {
return false;
}
}
}
示例5: view_updateScrappedProducts
public function view_updateScrappedProducts()
{
if (!isset($_SESSION['sysUserId'])) {
//檢測用戶是否登陸
header('location:index.php?mod=login&act=index');
exit;
}
$scrappedProductsAct = new ScrappedProductsAct();
$scrappedId = isset($_GET['scrappedId']) ? post_check($_GET['scrappedId']) : '';
if (empty($scrappedId)) {
//為空時,跳轉到列表頁麵,輸出錯誤信息
$status = '審核失敗,id為空';
header("location:index.php?mod=scrappedProducts&act=getScrappedProductsList&status={$status}");
exit;
}
$now = time();
$set = "SET scrappedStatus='1',processTime='{$now}' ";
$where = "WHERE id='{$scrappedId}' ";
$affectRow = $scrappedProductsAct->act_updateScrappedProducts($set, $where);
if ($affectRow) {
$status = '審核成功';
} else {
$status = '審核失敗';
}
header("location:index.php?mod=scrappedProducts&act=getScrappedProductsList&status={$status}");
}
示例6: act_sureAddCurr
function act_sureAddCurr()
{
$bool = array();
$data = array();
$id = trim($_POST['currId']);
$data['currency'] = post_check(trim($_POST['currency']));
$data['rates'] = post_check(trim($_POST['rates']));
$data['userId'] = $_SESSION['sysUserId'];
$data['modefyTime'] = time();
if (empty($id)) {
$bool = CurrencyModel::getCurrencyList("*", "where currency='{$data['currency']}'");
if ($bool) {
return 2;
}
$insertid = CurrencyModel::insertRow($data);
if ($insertid) {
return 1;
} else {
return false;
}
} else {
$bool = CurrencyModel::getCurrencyList("*", "where id!={$id} and currency='{$data['currency']}'");
if ($bool) {
return 2;
}
$updatedata = CurrencyModel::update($data, "and id='{$id}'");
if ($updatedata) {
return 1;
} else {
return false;
}
}
}
示例7: view_statusMenu
public function view_statusMenu()
{
$state = isset($_GET['state']) ? post_check($_GET['state']) : '';
$this->smarty->assign('state', $state);
$StatusMenuAct = new StatusMenuAct();
$menu = $StatusMenuAct->act_getStatusMenuList("*", "where is_delete=0 and storeId=1");
$this->smarty->assign('menu', $menu);
$navlist = array(array('url' => '', 'title' => '係統設置'), array('url' => '', 'title' => '訂單流程'));
$this->smarty->assign('navlist', $navlist);
//流程狀態分組
if (!empty($menu)) {
$group = array();
foreach ($menu as $info) {
if ($info['groupId'] == '0') {
$group[$info['id']] = '一級分組';
continue;
}
$group_info = StatusMenuGroupModel::getMenuGroupList("statusName", "where statusCode='{$info['groupId']}'");
$group[$info['id']] = $group_info[0]['statusName'];
}
}
$this->smarty->assign('group', $group);
$toplevel = 3;
//一級菜單的序號
$this->smarty->assign('toplevel', $toplevel);
$secondlevel = 39;
//當前的二級菜單
$this->smarty->assign('secondlevel', $secondlevel);
$this->smarty->assign('toptitle', '訂單流程');
$this->smarty->assign('curusername', $_SESSION['userName']);
$this->smarty->display('statusMenu.htm');
}
示例8: act_sureAddAttr
function act_sureAddAttr()
{
$bool = array();
$data = array();
$id = trim($_POST['attrId']);
$data['attributesName'] = post_check(trim($_POST['attributesName']));
if (empty($id)) {
$bool = OrderAttrModel::getOrderAttrList("*", "where attributesName='{$data['attributesName']}'");
if ($bool) {
return 2;
}
$insertid = OrderAttrModel::insertRow($data);
if ($insertid) {
return 1;
} else {
return false;
}
} else {
$bool = OrderAttrModel::getOrderAttrList("*", "where id!={$id} and attributesName='{$data['attributesName']}'");
if ($bool) {
return 2;
}
$updatedata = OrderAttrModel::update($data, "and id='{$id}'");
if ($updatedata) {
return 1;
} else {
return false;
}
}
}
示例9: editPartnerType
/**
* 修改供應商類型信息的函數
* @return $result $result > 0 成功,否則失敗
*/
public function editPartnerType()
{
$data['category_name'] = post_check($_POST['category_name']);
$id = post_check($_POST['category_id']);
$where = " and id = '{$id}' ";
$result = PartnerTypeModel::update($data, $where);
return $result;
}
示例10: actIndex
/**
* TrackEmailStatAct::actIndex()
* 列出符合條件的數據並分頁顯示
* @param string $condition 查詢條件
* @param integer $curpage 頁碼
* @param integer $pagenum 每頁個數
* @return array
*/
public function actIndex()
{
$data = array();
$condition = '';
$trackEmailStat = new TrackEmailStatModel();
//接收參數生成條件
$curpage = isset($_GET['page']) ? abs(intval($_GET['page'])) : 1;
$type = isset($_GET['type']) ? trim($_GET['type']) : '';
$key = isset($_GET['key']) ? post_check(trim($_GET['key'])) : '';
$timeNode = isset($_GET['timeNode']) ? post_check(trim($_GET['timeNode'])) : '';
$condition .= "1";
if ($type && $key) {
if (!in_array($type, array('trackNumber', 'platAccount'))) {
redirect_to("index.php?mod=trackEmailStat&act=index");
}
$condition .= ' AND ' . $type . " = '" . $key . "'";
}
if (!empty($timeNode)) {
if (!in_array($timeNode, array('addTime', 'lastTime'))) {
redirect_to("index.php?mod=trackEmailStat&act=index");
}
$startTime = isset($_GET['startTime']) ? strtotime(trim($_GET['startTime']) . " 00:00:00") : strtotime(date("Y-m-d", time()) . " 00:00:00");
$endTime = isset($_GET['endTime']) ? strtotime(trim($_GET['endTime']) . " 23:59:59") : strtotime(date("Y-m-d", time()) . " 23:59:59");
if ($startTime && $endTime) {
$condition .= ' AND ' . $timeNode . " BETWEEN '" . $startTime . "' AND " . "'" . $endTime . "'";
}
}
//獲取符合條件的數據並分頁
$pagenum = 20;
$total = $trackEmailStat->modListCount($condition);
$res = $trackEmailStat->modList($condition, $curpage, $pagenum);
$page = new Page($total, $pagenum, '', 'CN');
$pageStr = "";
if ($res) {
if ($total > $pagenum) {
$pageStr = $page->fpage(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
} else {
$pageStr = $page->fpage(array(0, 1, 2, 3));
}
} else {
$pageStr = '暫無數據';
}
//封裝數據返回
$data['key'] = $key;
$data['type'] = $type;
$data['lists'] = $res;
$data['pages'] = $pageStr;
$data['timeNode'] = $timeNode;
$data['startTime'] = $startTime ? date('Y-m-d', $startTime) : '';
$data['endTime'] = $endTime ? date('Y-m-d', $endTime) : '';
self::$errCode = trackEmailStatModel::$errCode;
self::$errMsg = trackEmailStatModel::$errMsg;
if (self::$errCode != 0) {
show_message($this->smarty, self::$errMsg, "");
return false;
}
return $data;
}
示例11: view_editType
/**
* 編輯供應商信息的函數
* @return void
*/
public function view_editType()
{
$category_id = post_check($_GET['id']);
$result = PartnerTypeAct::act_getPartnerTypeInfo($category_id);
$category_name = $result[0]['category_name'];
$this->smarty->assign("category_id", $category_id);
$this->smarty->assign("category_name", $category_name);
$this->smarty->display('editPartnerType.htm');
}
示例12: view_edit
/**
* 修改
*/
public function view_edit()
{
$id = post_check($_GET['id']);
$entity = AgreementModel::getById($id);
//echo '<pre>';print_r($entity);exit;
$this->smarty->assign('entity', $entity);
$this->smarty->assign("companyTypeList", array('1' => '企業法人', '2' => '個體經營'));
$this->smarty->assign("statusList", array('1' => '正常', '2' => '限製'));
$this->smarty->assign('title', '修改協議');
$this->smarty->display('editAgreement.htm');
}
示例13: view_positionList
public function view_positionList()
{
$state = isset($_GET['state']) ? post_check($_GET['state']) : '';
echo $state;
echo "<br>";
$this->smarty->assign('state', $state);
$position_arr = array();
$PositionAct = new PositionAct();
$position_info = $PositionAct->act_getPositionList("*", "where storeId=1");
if (!empty($position_info)) {
foreach ($position_info as $position) {
$x = $position['x_alixs'];
$y = $position['y_alixs'];
$z = $position['z_alixs'];
$f = $position['floor'];
$position_arr["({$x},{$y},{$z},{$f})"] = $position['pName'];
}
}
//var_dump($position_arr);
$this->smarty->assign('position_arr', $position_arr);
$hang = 40;
//一列行數
$row_position_nums = 4;
//一行倉位數
$second_north_row = 6;
//二樓北區列數
$second_south_row = 7;
//二樓南區列數
$third_row = 8;
//三樓南區列數
$distance = 10;
//南北區距離
$distance_row = $row_position_nums + 1;
//每列X坐標間隔數
$this->smarty->assign('hang', $hang);
$this->smarty->assign('row_position_nums', $row_position_nums);
$this->smarty->assign('second_north_row', $second_north_row);
$this->smarty->assign('second_south_row', $second_south_row);
$this->smarty->assign('third_row', $third_row);
$this->smarty->assign('distance', $distance);
$this->smarty->assign('distance_row', $distance_row);
$navlist = array(array('url' => 'index.php?mod=warehouseManagement&act=whStore', 'title' => '倉位設置'), array('url' => 'index.php?mod=position&act=positionList', 'title' => 'A倉管理'));
$this->smarty->assign('navlist', $navlist);
$this->smarty->assign('toptitle', 'A倉管理');
$toplevel = 4;
//一級菜單的序號 0 開始
$this->smarty->assign('toplevel', $toplevel);
$secondlevel = "010";
//當前的二級菜單
$this->smarty->assign('secondlevel', $secondlevel);
$this->smarty->assign('curusername', $_SESSION['userName']);
$this->smarty->display('positionInfo.htm');
}
示例14: view_index
public function view_index()
{
$trackWarnNode = new TrackWarnNodeAct();
$this->smarty->assign('title', '運輸方式節點預警管理');
//接收參數生成條件
$curpage = isset($_GET['page']) ? abs(intval($_GET['page'])) : 1;
$type = isset($_GET['type']) ? trim($_GET['type']) : '';
$key = isset($_GET['key']) ? post_check(trim($_GET['key'])) : '';
$carrierId = isset($_GET['carrierId']) ? intval($_GET['carrierId']) : 0;
$condition = "1";
if ($type && $key) {
if (!in_array($type, array('nodeName', 'trackName'))) {
redirect_to("index.php?mod=trackWarnNode&act=index");
}
$condition .= ' AND ' . $type . " = '" . $key . "'";
}
if (!empty($carrierId)) {
$condition .= " AND carrierId = '{$carrierId}'";
}
//獲取符合條件的數據並分頁
$pagenum = 20;
//每頁顯示的個數
$res = $trackWarnNode->actList($condition, $curpage, $pagenum);
$total = $trackWarnNode->actListCount($condition);
//頁麵總數量
$page = new Page($total, $pagenum, '', 'CN');
$pageStr = "";
if ($res) {
if ($total > $pagenum) {
$pageStr = $page->fpage(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
} else {
$pageStr = $page->fpage(array(0, 1, 2, 3));
}
} else {
$pageStr = '暫無數據';
}
//替換頁麵內容變量
$this->smarty->assign('key', $key);
//關鍵詞
$this->smarty->assign('type', $type);
//條件選項
$this->smarty->assign('lists', $res);
//數據集
$this->smarty->assign('carrierId', $carrierId);
//運輸方式ID
$carrierList = TransOpenApiModel::getCarrier(2);
$this->smarty->assign('carrierList', $carrierList);
//運輸方式列表
$this->smarty->assign('pageStr', $pageStr);
//分頁輸出
$this->smarty->display('trackWarnNode.htm');
}
示例15: view_index
public function view_index()
{
$condition = '';
$partitionManage = new PartitionManageAct();
$this->smarty->assign('title', '分區管理');
//接收參數生成條件
$curpage = isset($_GET['page']) ? abs(intval($_GET['page'])) : 1;
$type = isset($_GET['type']) ? trim($_GET['type']) : '';
$key = isset($_GET['key']) ? post_check(trim($_GET['key'])) : '';
$chid = isset($_GET['chid']) ? intval($_GET['chid']) : 0;
//渠道ID
$condition .= "1";
$condition .= " AND channelId = {$chid}";
if ($type && $key) {
if (!in_array($type, array('partitionCode', 'partitionName'))) {
redirect_to("index.php?mod=partitionManage&act=index");
}
$condition .= ' AND ' . $type . " = '" . $key . "'";
}
//獲取符合條件的數據並分頁
$pagenum = 20;
//每頁顯示的個數
$res = $partitionManage->actList($condition, $curpage, $pagenum);
$total = $partitionManage->actListCount($condition);
//頁麵總數量
$page = new Page($total, $pagenum, '', 'CN');
$pageStr = "";
if ($res) {
if ($total > $pagenum) {
$pageStr = $page->fpage(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
} else {
$pageStr = $page->fpage(array(0, 1, 2, 3));
}
} else {
$pageStr = '暫無數據';
}
$carrierId = PartitionManageModel::getCarrierId($chid);
//替換頁麵內容變量
$this->smarty->assign('chid', $chid);
//渠道ID
$this->smarty->assign('carrierId', $carrierId);
//運輸方式ID
$this->smarty->assign('key', $key);
//關鍵詞
$this->smarty->assign('type', $type);
//查詢選項
$this->smarty->assign('lists', $res);
//循環賦值
$this->smarty->assign('pageStr', $pageStr);
//分頁輸出
$this->smarty->display('partitionManage.htm');
}