当前位置: 首页>>代码示例>>PHP>>正文


PHP check_action函数代码示例

本文整理汇总了PHP中check_action函数的典型用法代码示例。如果您正苦于以下问题:PHP check_action函数的具体用法?PHP check_action怎么用?PHP check_action使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了check_action函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: back_base_init

/**
 * 内容管理
 * @author 王仁欢
 * @email wrh4285@163.com
 * @date 2015-08-10
 * @version 1.0.0
 */
include 'library/init.inc.php';
back_base_init();
$template = 'content/';
assign('subTitle', '栏目管理');
$action = 'edit|add|view|delete|cycle|revoke|remove';
$operation = 'edit|add';
$act = check_action($action, getGET('act'));
$act = $act == '' ? 'view' : $act;
$opera = check_action($operation, getPOST('opera'));
//======================================================================
//添加内容
if ('add' == $opera) {
    if (!check_purview('pur_content_add', $_SESSION['purview'])) {
        show_system_message('权限不足', array());
        exit;
    }
    $response = array('error' => 1, 'msg' => '');
    $title = trim(getPOST('title'));
    $author = trim(getPOST('author'));
    $section_id = trim(getPOST('section_id'));
    $keywords = trim(getPOST('keywords'));
    $description = trim(getPOST('description'));
    $content = trim(getPOST('content'));
    $wap_content = trim(getPOST('wap-content'));
开发者ID:Winsen1990,项目名称:monolith,代码行数:31,代码来源:content.php

示例2: check_action

<?php

/**
 * PC端首页
 * @author winsen
 * @version 1.0.0
 */
include 'library/init.inc.php';
$action = 'add|view';
$act = check_action($action, getGET('act'), 'view');
if ('add' == $act) {
    assign('sub_title', '账户充值');
    $get_bank_list = 'select * from ' . $db->table('bank_info');
    $bank_list = $db->fetchAll($get_bank_list);
    assign('bank_info', $bank_list);
}
if ('view' == $act) {
    assign('sub_title', '充值记录');
    $param_list = '';
    $where = '';
    $status = intval(getGET('status'));
    if ($status > 0) {
        $where .= ' and `status`=\'' . $status . '\'';
        $param_list .= '&status=' . $status;
    }
    $recharge_sn = trim(getGET('recharge_sn'));
    if ($recharge_sn != '') {
        $recharge_sn = $db->escape($recharge_sn);
        $where .= ' and `recharge_sn`=\'' . $recharge_sn . '\'';
        $param_list .= '&recharge_sn=' . $recharge_sn;
    }
开发者ID:Winsen1990,项目名称:direct-sale,代码行数:31,代码来源:recharge.php

示例3: assign

            break;
    }
    //    $response['sql'] = $get_product_list;
    $product_list = $db->fetchAll($get_product_list);
    assign('product_list', $product_list);
    $response['content'] = $smarty->fetch('product-list-item.phtml');
    $response['error'] = 0;
    echo json_encode($response);
    exit;
}
if ($id < 0) {
    redirect('index.php');
}
$state = getGET('state');
$state_list = 'sale_amount|price|discount|star|add_time';
$state = check_action($state_list, $state);
if ('' == $state) {
    $state = 'price';
}
$filter = array();
$filter['id'] = $id;
$get_category_path = 'select `path` from ' . $db->table('category') . ' where `id`=' . $id;
$path = $db->fetchOne($get_category_path);
$get_category_ids = 'select `id` from ' . $db->table('category') . ' where `path` like \'' . $path . '%\' and `id` not in (' . $path . '0)';
$category_ids = $db->fetchAll($get_category_ids);
$category_ids_tmp = array();
$category_ids_str = '';
if ($category_ids) {
    foreach ($category_ids as $key => $val) {
        $category_ids_tmp[] = $val['id'];
    }
开发者ID:Winsen1990,项目名称:easyilife,代码行数:31,代码来源:product_list.php

示例4: check_action

<?php

/**
 * Created by PhpStorm.
 * User: apple
 * Date: 15/9/17
 * Time: 上午10:24
 */
include 'library/init.inc.php';
$template = 'bank-list.phtml';
$action = 'add|edit|list|delete';
$operation = 'add|edit|delete';
$opera = check_action($operation, getPOST('opera'));
$act = check_action($action, getGET('act'));
if ('' == $act) {
    $act = 'list';
}
if ('delete' == $opera) {
    $response = array('error' => 1, 'msg' => '');
    $id = getPOST('eid');
    $id = intval($id);
    if ($id <= 0) {
        $response['msg'] = '-参数错误<br/>';
    }
    if ($response['msg'] == '') {
        if ($db->autoDelete('bank_card', '`id`=' . $id . ' and `account`=\'' . $_SESSION['account'] . '\'')) {
            $response['error'] = 0;
            $response['msg'] = '删除银行卡成功';
        } else {
            $response['msg'] = '001:系统繁忙,请稍后再试';
        }
开发者ID:Winsen1990,项目名称:easyilife,代码行数:31,代码来源:bank.php

示例5: check_action

    //            $email = $db->escape($email);
    //        } else {
    //            $response['msg'] .= '-邮箱格式不正确<br/>';
    //        }
    //    }
    if ($identity == '') {
        $identity = '';
    } else {
        if (check_identity_num($identity)) {
            $identity = $db->escape($identity);
        } else {
            $response['msg'] = '-身份证格式不正确<br />';
        }
    }
    $sex_list = 'N|F|M';
    $sex = check_action($sex_list, $sex);
    if ($sex == '') {
        $sex = 'N';
    }
    if ($response['msg'] == '') {
        $member_data = array('sex' => $sex, 'mobile' => $mobile, 'identity' => $identity);
        if ($db->autoUpdate('member', $member_data, '`account`=\'' . $_SESSION['account'] . '\'')) {
            $response['error'] = 0;
            $response['msg'] = '修改信息成功';
        } else {
            $response['msg'] = '系统繁忙,请稍后再试';
        }
    }
    echo json_encode($response);
    exit;
}
开发者ID:Winsen1990,项目名称:easyilife,代码行数:31,代码来源:profile.php

示例6: check_action

<?php

/**
 * 合伙人交费
 * @author 王仁欢
 * @email wrh4285@163.com
 * @date 2015-11-04
 * @version 1.0.0
 */
include 'library/init.inc.php';
$operation = 'wechat|alipay|wechat_pay';
$opera = check_action($operation, getPOST('opera'));
$action = 'pay|apply';
$act = check_action($action, getGET('act'), 'apply');
//找人代付
if ('pay' == $act) {
    $account = trim(getGET('account'));
    if ($account == '') {
        echo '参数错误';
        exit;
    }
    $account = $db->escape($account);
    //是否已是合伙人
    $get_level_id = 'select `level_id` from ' . $db->table('member') . ' where account = \'' . $account . '\' limit 1';
    $level_id = $db->fetchOne($get_level_id);
    if ($level_id) {
        echo $account . '已成为合伙人';
        exit;
    }
    $mch_id = '1269390401';
    $mch_key = 'CeciliaZhengWinsenPengwrhltx2015';
开发者ID:Winsen1990,项目名称:easyilife,代码行数:31,代码来源:copartner.php

示例7: str_replace

        if (isset($wechat_user->unionid)) {
            $member_data['unionid'] = $wechat_user->unionid;
        }
        $db->autoUpdate('member', $member_data, '`openid`=\'' . $wechat_user->openid . '\'');
        $get_account = 'select `account` from ' . $db->table('member') . ' where `openid`=\'' . $wechat_user->openid . '\'';
        $_SESSION['account'] = $db->fetchOne($get_account);
    } else {
        echo 'ERROR 2048: 获取授权信息失败';
        exit;
    }
}
if ($_SESSION['openid'] == '' && $_SESSION['account'] == '') {
    $no_login_script = 'code.php|login.php|register.php|forgot.php|data_center.php|index.php|article.php|article_list.php|install.php|integral_product_list.php|';
    $no_login_script .= 'category.php|product.php|cart.php|product_list.php|search.php|shop.php|distribution_shop.php|notify.php|wechat.php|notify_url.php';
    $script_name = str_replace(ROOT_PATH, '', $_SERVER['SCRIPT_FILENAME']);
    $flag = check_action($no_login_script, $script_name);
    if ($flag == '') {
        redirect('login.php');
        exit;
    }
}
//微信JS调用参数
if (is_weixin()) {
    $jssdk = new JSSDK($config['appid'], $config['appsecret']);
    $signPackage = $jssdk->GetSignPackage();
    assign('signPackage', $signPackage);
}
//统计PV,UV
if (1 == $config['statistics']) {
    $date = date('Ym', time());
    $table = 'statistics' . $date;
开发者ID:Winsen1990,项目名称:easyilife,代码行数:31,代码来源:init.inc.php

示例8: assign

            break;
        default:
            break;
    }
    $product_list = $db->fetchAll($get_product_list);
    assign('product_list', $product_list);
    $response['content'] = $smarty->fetch('search-product-item.phtml');
    $response['error'] = 0;
    echo json_encode($response);
    exit;
}
$keyword = getGET('keyword');
$keyword = $db->escape($keyword);
$mode = getGET('mode');
$mode_list = 'shop|product';
$mode = check_action($mode_list, $mode);
if ($mode == '') {
    $mode = 'product';
}
if ($mode == 'product') {
    $now = time();
    $get_product_list = 'select p.`id`,p.`name`,if(p.`promote_end`>' . $now . ',p.`promote_price`,p.`price`) as `price`,p.`img`,p.`product_sn`,(select `account` from ' . $db->table('collection') . ' where `account`=\'' . $_SESSION['account'] . '\' and `product_sn`=p.`product_sn`) as collection from ' . $db->table('product') . ' as p where p.`status`=4 and p.`name` like \'%' . $keyword . '%\'';
    $product_list = $db->fetchAll($get_product_list);
    assign('product_list', $product_list);
    assign('keyword', $keyword);
    $filter = array();
    $filter['keyword'] = $keyword;
    //获取其他筛选条件
    $where = '`name` like \'%' . $keyword . '%\'';
    //根据产品的分类获取筛选价格区间、品牌
    $attributes = array();
开发者ID:Winsen1990,项目名称:easyilife,代码行数:31,代码来源:search.php

示例9: check_action

<?php

require_once "includes/functions.inc.php";
require_once "includes/format.inc.php";
require_once "includes/config.inc.php";
if ($_POST["client"] && ($action = $_POST["action"])) {
    $client = $_POST["client"];
    $action = $_POST["action"];
    $msj = check_action($service, $client, $action);
}
// Print Document Headers
doc_header($msj);
// Get service status
$service_status = get_service_status($service, $status_opts);
// Get playback status
$playback_status = get_playback_status();
print "<strong>now playing:</strong>";
print '<div style="width:50%;"><marquee behavior="scroll" direction="left"><pre>' . $playback_status . '</pre></marquee></div>';
print '<hr align="center" width="80%" noshade="noshade" />';
// Separate each instance
$delimiters = array("\n");
$result = multiexplode($delimiters, $service_status);
// Process each instance
foreach ($result as $pre_status) {
    // Separate name and process status
    $delimiters = array(" ");
    $info = multiexplode($delimiters, $pre_status);
    // Get usefull data
    $replace = array("(", ")");
    $name = str_replace($replace, " ", "{$info['0']}");
    $status = $info[1];
开发者ID:jefonseca,项目名称:kimbo,代码行数:31,代码来源:index.php

示例10: switch

     $get_product_list .= ' and p.`integral`>0';
 }
 //店铺
 $filter['sn'] = $db->escape($filter['sn']);
 $get_product_list .= ' and p.`business_account`=\'' . $filter['sn'] . '\'';
 switch ($mode) {
     case 'sale':
         $get_product_list .= ' order by p.`sale_count` DESC';
         break;
     case 'star':
         $get_product_list .= ' order by p.`star` DESC';
         break;
     case 'price':
         $orderby = getPOST('orderby');
         $orderby_list = 'up|down';
         $orderby = check_action($orderby_list, $orderby);
         if ($orderby == '') {
             $orderby = 'up';
         }
         if ($orderby == 'up') {
             $get_product_list .= ' order by p.`price` ASC';
         } else {
             $get_product_list .= ' order by p.`price` DESC';
         }
         break;
     case 'new':
         $get_product_list .= ' order by p.`add_time` DESC';
         break;
     default:
         break;
 }
开发者ID:Winsen1990,项目名称:easyilife,代码行数:31,代码来源:shop_search.php

示例11: check_action

<?php

/**
 * PC端首页
 * @author winsen
 * @version 1.0.0
 */
include 'library/init.inc.php';
$action = 'info|password|super_password';
$act = check_action($action, getGET('act'), 'info');
if ('super_password' == $act) {
    assign('sub_title', '超级密码修改');
}
if ('password' == $act) {
    assign('sub_title', '密码修改');
}
if ('info' == $act) {
    assign('sub_title', '信息修改');
}
assign('act', $act);
$smarty->display('profile.phtml');
开发者ID:Winsen1990,项目名称:direct-sale,代码行数:21,代码来源:profile.php

示例12: intval

            if ($db->autoUpdate('member', $member, '`account`=\'' . $account . '\'')) {
                $response['errno'] = 0;
                $response['errmsg'] = '会员信息已更新';
            } else {
                $response['errmsg'] = '更新会员信息失败,请稍后再试';
            }
        }
    }
}
//会员列表
if ('list' == $opera) {
    $page = intval(getPOST('page'));
    $step = intval(getPOST('step'));
    $order_by = trim(getPOST('order_by'));
    $order_mode_list = 'ASC|DESC';
    $order_mode = check_action($order_mode_list, getPOST('order_mode'), 'ASC');
    $account = trim(getPOST('account'));
    $begin_time = getPOST('begin_time');
    $end_time = getPOST('end_time');
    $filter = getPOST('filter');
    if ($page <= 0) {
        $page = 1;
    }
    if ($step <= 0) {
        $step = 10;
    }
    $where = ' 1 ';
    $order = '';
    if (!empty($account)) {
        $field = 'account';
        $account = $db->escape($account);
开发者ID:Winsen1990,项目名称:direct-sale,代码行数:31,代码来源:member.php

示例13: lang_get_param

if (isset($_POST['btn_save_lang_recipe'])) {
    include "get.php";
    include "update.php";
    // DEFINE VARIABLE
    $cat_recipes_id = $_POST['category_id'];
    $cat_recipes_name = $_POST['category_name_lang'];
    $cat_recipes_active = $_POST['news-category-active-status'];
    $cat_recipes_visibility = $_POST['news-category-visible-status'];
    $default_check = $_POST['custom_default_value'];
    $post_cat_id = $_POST['cat_id'];
    $post_action = $_POST['category_listing_action'];
    $post_action_2 = $_POST['category_listing_option'];
    $lang_code = $_POST['custom_lang_code'];
    $get_param = lang_get_param($cat_recipes_id);
    $dml = check_action($get_param['category_id'], $lang_code);
    if ($_POST['btn_save_lang_recipe'] == "Save Changes") {
        if (isset($default_check)) {
            if ($dml['rows'] > 0) {
                update_category_lang("default", $get_param['category_active'], $get_param['category_visibility'], $cat_recipes_id, $lang_code);
                $_SESSION['alert'] = "success";
                $_SESSION['msg'] = "Changes has been saved.";
            } else {
                insert_category_lang("default", $get_param['category_id'], $get_param['category_active'], $get_param['category_visibility'], $lang_code, $get_param['additional']);
                $_SESSION['alert'] = "success";
                $_SESSION['msg'] = "Changes has been saved.";
            }
        } else {
            if ($dml['rows'] > 0) {
                update_category_lang($cat_recipes_name, $get_param['category_active'], $get_param['category_visibility'], $cat_recipes_id, $lang_code);
                $_SESSION['alert'] = "success";
开发者ID:nickyudha,项目名称:spalosophy,代码行数:30,代码来源:control.php


注:本文中的check_action函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。