本文整理汇总了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');
}