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


PHP _POST函数代码示例

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


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

示例1: getExtraParamsArr

/**
 * gets the extra params from the page post or get
 *
 * @param $baseName
 * @param $terminator
 * @param $lookInGet
 * @param $lookInPost
 */
function getExtraParamsArr($baseName, $terminator, $lookInGet = true, $lookInPost = true)
{
    // init an array for
    $retVal = array();
    // are we looking at the post variables
    if ($lookInPost) {
        // for each value in the post variables
        foreach (array_keys($_POST) as $item) {
            // is our base string there
            $pos = strpos($item, $terminator);
            // is this a match
            if ($pos !== false) {
                $pos += strlen($terminator);
                $retVal[] = array("ID" => substr($item, $pos), "val" => $_POST[$item]);
            }
        }
    }
    // are we looking at the get variables
    if ($lookInGet) {
        // for each value in the post variables
        foreach (array_keys($_GET) as $item) {
            // is our base string there
            $pos = strpos($item, $terminator);
            // is this a match
            if ($pos !== false) {
                $retVal[] = array("ID" => substr($item, $pos + 1), "val" => _POST($item));
            }
        }
    }
    // return to the caller
    return $retVal;
}
开发者ID:zekuny,项目名称:RTPUI,代码行数:40,代码来源:GetFormParams.php

示例2: render_editor

 public function render_editor($node)
 {
     $page = dynamic_cast($node, 'Page');
     $data = array();
     if (_POST('action') == 'save') {
         $this->def_save_node($data, $page);
     }
     $this->fill_def_form_data($data, $page);
     $avail_types = array('text' => Loc::get('page/type/text'), 'transfer' => Loc::get('page/type/transfer'), 'redirect' => Loc::get('page/type/redirect'));
     $data['rows'][] = array('id' => 'page_type', 'label' => Loc::get('page/label/page-type'), 'type' => 'dropdown', 'value' => $page->page_type, 'options' => $avail_types);
     $data['auto_submit'] = array('page_type');
     switch ($page->page_type) {
         case 'transfer':
             $data['rows'][] = array('id' => 'transfer_path', 'label' => Loc::get('page/label/transfer-path'), 'type' => 'text', 'value' => $page->transfer_path);
             break;
         case 'redirect':
             $data['rows'][] = array('id' => 'redirect_url', 'label' => 'URL', 'type' => 'text', 'value' => $page->redirect_url);
             break;
         default:
             $data['rows'][] = array('id' => 'use_html_editor', 'label' => Loc::get('page/label/use-html-editor'), 'type' => 'checkbox', 'value' => $page->use_html_editor);
             $data['rows'][] = array('id' => 'content', 'label' => Loc::get('page/label/content'), 'type' => $page->use_html_editor ? 'editor' : 'textarea', 'value' => $page->content);
             $data['auto_submit'][] = 'use_html_editor';
             break;
     }
     return $this->render_form($data);
 }
开发者ID:restorer,项目名称:deprecated-zame-cms,代码行数:26,代码来源:admin.php

示例3: on_remove_submit

 protected function on_remove_submit($action)
 {
     $name = preg_replace("/[^A-Za-z0-9_\\-\\.]/", '', trim(_POST('name')));
     if (strlen($name) && @file_exists(PUB_BASE . $this->type . '/' . $name)) {
         @unlink(PUB_BASE . $this->type . '/' . $name);
     }
 }
开发者ID:restorer,项目名称:deprecated-zame-cms,代码行数:7,代码来源:index.php

示例4: check_login

 protected function check_login()
 {
     if (User::is_empty_users()) {
         return;
     }
     if (!_SESSION('logged', false) || _SESSION('logged_ip') != $_SERVER['REMOTE_ADDR']) {
         $this->vars['error'] = '';
         if (_POST('enter')) {
             $username = strtolower(trim(_POST('data')));
             $pwd_hash = User::password_to_hash(trim(_POST('value')));
             $user = strlen($username) ? Node::get_by_model_path('User', $username) : null;
             if ($user != null && $user->pwd_hash == $pwd_hash) {
                 $_SESSION['logged'] = true;
                 $_SESSION['logged_ip'] = $_SERVER['REMOTE_ADDR'];
                 $this->redirect($_SERVER['REQUEST_URI']);
                 return;
             } else {
                 $this->vars['error'] = Loc::get('cms/admin/invalid-login-or-password');
             }
         }
         $this->template_name = dirname(__FILE__) . '/login.tpl';
         $this->_flow = PAGE_FLOW_RENDER;
         return;
     }
 }
开发者ID:restorer,项目名称:deprecated-zame-cms,代码行数:25,代码来源:index.php

示例5: Render

 function Render()
 {
     $vars = array();
     $vars['img'] = $this->img;
     $vars['code'] = _POST('code');
     $vars['code_error'] = $this->codeError;
     $tpl = new Template();
     echo $tpl->Process(BASE_PATH . 'remove.tpl', $vars);
 }
开发者ID:restorer,项目名称:deprecated-simple-image-hosting,代码行数:9,代码来源:remove.php

示例6: init

 public static function init()
 {
     if (!empty($_POST['json'])) {
         if (get_magic_quotes_gpc()) {
             $_POST['json'] = stripslashes($_POST['json']);
         }
         $_POST = json_decode($_POST['json'], true);
     }
     self::$session = _POST('session', array());
     self::$pagination = _POST('pagination', array('page' => 1, 'count' => 10));
 }
开发者ID:dx8719,项目名称:ECMobile_Universal,代码行数:11,代码来源:GZ_Api.php

示例7: s_ajax_page_on_init

 function s_ajax_page_on_init()
 {
     if (!InPOST('__s_ajax_method')) {
         return;
     }
     $aj_method = _POST('__s_ajax_method');
     if (array_key_exists(AJ_INIT, $this->_events)) {
         foreach ($this->_events[AJ_INIT] as $method) {
             $res = call_user_func(array($this, $method), $aj_method);
             if ($this->_flow != PAGE_FLOW_NORMAL) {
                 if (isset($res)) {
                     echo "fail:{$res}";
                 }
                 $this->s_ajax_page_save_log();
                 return;
             }
         }
     }
     $this->_flow = PAGE_FLOW_BREAK;
     $method = "aj_{$aj_method}";
     if (!method_exists($this, $method)) {
         echo "fail:method {$method} not found";
         $this->s_ajax_page_save_log();
         return;
     }
     $args_array = SJson::deserialize(_POST('__s_ajax_args'));
     if (!is_array($args_array)) {
         echo "fail:fail to deserialize arguments";
         $this->s_ajax_page_save_log();
         return;
     }
     try {
         $res = call_user_func_array(array($this, $method), $args_array);
     } catch (Exception $ex) {
         echo 'fail:', $ex->getMessage();
         $this->s_ajax_page_save_log();
         return;
     }
     echo 'succ:';
     if (isset($res)) {
         echo SJson::serialize($res);
     }
     $this->s_ajax_page_save_log();
     exit;
 }
开发者ID:restorer,项目名称:deprecated-s-imple-php-framework,代码行数:45,代码来源:ajax_page.php

示例8: _GET

// подгружаем настройки из БД, получаем заполненый класс $cfg
include_once "../../../inc/functions.php";
// загружаем функции
include_once "../../../inc/login.php";
// загружаем функции
$page = _GET('page');
$limit = _GET('rows');
$sidx = _GET('sidx');
$sord = _GET('sord');
$oper = _POST('oper');
$id = _POST('id');
$sname = _POST('sname');
$host = _POST('host');
$basename = _POST('basename');
$username = _POST('username');
$pass = _POST('pass');
if ($oper == '') {
    //создадим структуру модуля..
    $sql = "CREATE TABLE IF NOT EXISTS `zabbix_mod_cfg` (\n  `id` int(11) NOT NULL AUTO_INCREMENT,\n  `sname` varchar(50) NOT NULL,\n  `host` varchar(50) NOT NULL,\n  `basename` varchar(50) NOT NULL,\n  `username` varchar(50) NOT NULL,\n  `pass` varchar(50) NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1";
    $result = $sqlcn->ExecuteSQL($sql);
    if (!$sidx) {
        $sidx = 1;
    }
    $result = $sqlcn->ExecuteSQL("SELECT COUNT(*) AS count FROM zabbix_mod_cfg");
    $row = mysqli_fetch_array($result);
    $count = $row['count'];
    if ($count > 0) {
        $total_pages = ceil($count / $limit);
    } else {
        $total_pages = 0;
    }
开发者ID:Kozlov-V,项目名称:webuseorg3,代码行数:31,代码来源:config.php

示例9: define

 *    2319 Est.Tower Van Palace 
 *    No.2 Guandongdian South Street 
 *    Beijing , China
 *
 *  U.S. Office:
 *    One Park Place, Elmira College, NY, 14901, USA
 *
 *  QQ Group:   329673575
 *  BBS:        bbs.ecmobile.cn
 *  Fax:        +86-10-6561-5510
 *  Mail:       info@geek-zoo.com
 */
define('INIT_NO_USERS', true);
require EC_PATH . '/includes/init.php';
GZ_Api::authSession();
include_once EC_PATH . '/includes/lib_transaction.php';
$address_id = _POST('address_id', 0);
if (empty($address_id)) {
    GZ_Api::outPut(101);
}
$sql = "SELECT * FROM " . $GLOBALS['ecs']->table('user_address') . " WHERE address_id = '{$address_id}'";
$arr = $GLOBALS['db']->getRow($sql);
if (empty($arr)) {
    GZ_Api::outPut(8);
}
/* 保存到session */
$_SESSION['flow_consignee'] = stripslashes_deep($arr);
$address = array('address_id' => $address_id);
$sql = "UPDATE " . $GLOBALS['ecs']->table('users') . " SET address_id = '{$address_id}' WHERE user_id = '{$_SESSION['user_id']}'";
$res = $GLOBALS['db']->query($sql);
GZ_Api::outPut(array());
开发者ID:blowfishJ,项目名称:galaxyCode,代码行数:31,代码来源:setDefault.php

示例10: define

 *   _/_/_/    _/_/_/    _/_/_/  _/    _/  _/_/_/_/_/    _/_/      _/_/       
 *                                                                          
 *
 *  Copyright 2013-2014, Geek Zoo Studio
 *  http://www.ecmobile.cn/license.html
 *
 *  HQ China:
 *    2319 Est.Tower Van Palace 
 *    No.2 Guandongdian South Street 
 *    Beijing , China
 *
 *  U.S. Office:
 *    One Park Place, Elmira College, NY, 14901, USA
 *
 *  QQ Group:   329673575
 *  BBS:        bbs.ecmobile.cn
 *  Fax:        +86-10-6561-5510
 *  Mail:       info@geek-zoo.com
 */
define('INIT_NO_USERS', true);
require EC_PATH . '/includes/init.php';
GZ_Api::authSession();
include_once EC_PATH . '/includes/lib_transaction.php';
include_once EC_PATH . '/includes/lib_order.php';
$user_id = $_SESSION['user_id'];
$order_id = _POST('order_id', 0);
if (cancel_order($order_id, $user_id)) {
    GZ_Api::outPut(array());
} else {
    GZ_Api::outPut(8);
}
开发者ID:dx8719,项目名称:ECMobile_Universal,代码行数:31,代码来源:cancel.php

示例11: _POST

 *
 *  U.S. Office:
 *    One Park Place, Elmira College, NY, 14901, USA
 *
 *  QQ Group:   329673575
 *  BBS:        bbs.ecmobile.cn
 *  Fax:        +86-10-6561-5510
 *  Mail:       info@geek-zoo.com
 */
require EC_PATH . '/includes/init.php';
include_once EC_PATH . '/includes/lib_order.php';
include_once EC_PATH . '/includes/lib_passport.php';
$username = _POST('name');
$password = _POST('password');
$email = _POST('email');
$fileld = _POST('fileld', array());
if ($_CFG['shop_reg_closed']) {
    GZ_Api::outPut(11);
}
$other = array();
$filelds = array();
foreach ($fileld as $val) {
    $filelds[$val['id']] = $val['value'];
}
$other['msn'] = isset($filelds[1]) ? $filelds[1] : '';
$other['qq'] = isset($filelds[2]) ? $filelds[2] : '';
$other['office_phone'] = isset($filelds[3]) ? $filelds[3] : '';
$other['home_phone'] = isset($filelds[4]) ? $filelds[4] : '';
$other['mobile_phone'] = isset($filelds[5]) ? $filelds[5] : '';
if (register($username, $password, $email, $other) === false) {
    GZ_Api::outPut(11);
开发者ID:dx8719,项目名称:ECMobile_Universal,代码行数:31,代码来源:signup.php

示例12: _GET

include_once "../../../inc/config.php";
// подгружаем настройки из БД, получаем заполненый класс $cfg
include_once "../../../inc/functions.php";
// загружаем функции
include_once "../../../inc/login.php";
// загружаем функции
$page = _GET('page');
$limit = _GET('rows');
$sidx = _GET('sidx');
$sord = _GET('sord');
$oper = _POST('oper');
$id = _POST('id');
$name = _POST('name');
$chanel_id = _POST('chanel_id');
$astra_id = _GET('astra_id');
$group_id = _POST('group_id');
if ($oper == '') {
    if (!$sidx) {
        $sidx = 1;
    }
    $result = $sqlcn->ExecuteSQL("SELECT COUNT(*) AS count FROM astra_chanels where astra_id='{$astra_id}'");
    //echo "SELECT COUNT(*) AS count FROM astra_mon where astra_id='$astra_id'";
    $row = mysqli_fetch_array($result);
    $count = $row['count'];
    if ($count > 0) {
        $total_pages = ceil($count / $limit);
    } else {
        $total_pages = 0;
    }
    if ($page > $total_pages) {
        $page = $total_pages;
开发者ID:Kozlov-V,项目名称:webuseorg3,代码行数:31,代码来源:get_chan_mon.php

示例13: _POST

if ($orgid == "") {
    $err[] = "Не выбрана организация!";
}
$login = _POST("login");
if ($login == "") {
    $err[] = "Не задан логин!";
}
$pass = _POST("pass");
if ($pass == "") {
    $err[] = "Не задан пароль!";
}
$email = _POST("email");
if ($email == "") {
    $err[] = "Не задан E-mail!";
}
$mode = _POST("mode");
if ($mode == "") {
    $err[] = "Не задан режим!";
}
if (!preg_match("/^[a-zA-Z0-9\\._-]+@[a-zA-Z0-9\\._-]+\\.[a-zA-Z]{2,4}\$/", $email)) {
    $err[] = "Не верно указан E-mail";
}
if ($step == "add") {
    if (DoubleLogin($login) != 0) {
        $err[] = "Такой логин уже есть в базе!";
    }
    if (DoubleEmail($email) != 0) {
        $err[] = "Такой E-mail уже есть в базе!";
    }
}
// Закончили всяческие проверки
开发者ID:Glavnyuk,项目名称:webuseorg3,代码行数:31,代码来源:libre_users_form.php

示例14: array

 *    Beijing , China
 *
 *  U.S. Office:
 *    One Park Place, Elmira College, NY, 14901, USA
 *
 *  QQ Group:   329673575
 *  BBS:        bbs.ecmobile.cn
 *  Fax:        +86-10-6561-5510
 *  Mail:       info@geek-zoo.com
 */
require EC_PATH . '/includes/init.php';
// define('DEBUG_MODE', 1);
// define('INIT_NO_SMARTY', true);
// $smarty = new GZ_Smarty('search');
$data = array();
$cat_id = _POST('category_id', 0);
$children = get_children($cat_id);
$cat = get_cat_info($cat_id);
// 获得分类的相关信息
if ($cat['grade'] == 0 && $cat['parent_id'] != 0) {
    $cat['grade'] = get_parent_grade($cat_id);
    //如果当前分类级别为空,取最近的上级分类
}
if ($cat['grade'] > 1) {
    $sql = "SELECT min(g.shop_price) AS min, max(g.shop_price) as max " . " FROM " . $ecs->table('goods') . " AS g " . " WHERE ({$children} OR " . get_extension_goods($children) . ') AND g.is_delete = 0 AND g.is_on_sale = 1 AND g.is_alone_sale = 1  ';
    //获得当前分类下商品价格的最大值、最小值
    $row = $db->getRow($sql);
    // 取得价格分级最小单位级数,比如,千元商品最小以100为级数
    $price_grade = 0.0001;
    for ($i = -2; $i <= log10($row['max']); $i++) {
        $price_grade *= 10;
开发者ID:blowfishJ,项目名称:galaxyCode,代码行数:31,代码来源:price_range.php

示例15: _POST

 *
 *  HQ China:
 *    2319 Est.Tower Van Palace 
 *    No.2 Guandongdian South Street 
 *    Beijing , China
 *
 *  U.S. Office:
 *    One Park Place, Elmira College, NY, 14901, USA
 *
 *  QQ Group:   329673575
 *  BBS:        bbs.ecmobile.cn
 *  Fax:        +86-10-6561-5510
 *  Mail:       info@geek-zoo.com
 */
require EC_PATH . '/includes/init.php';
$goods_id = _POST('goods_id', 0);
if (!$goods_id) {
    GZ_Api::outPut(101);
}
$page_size = GZ_Api::$pagination['count'];
$page = GZ_Api::$pagination['page'];
//0评论的是商品,1评论的是文章
$out = GZ_assign_comment($goods_id, 0, $page, $page_size);
GZ_Api::outPut($out['comments'], $out['pager']);
/**
 * 查询评论内容
 *
 * @access  public
 * @params  integer     $id
 * @params  integer     $type
 * @params  integer     $page
开发者ID:blowfishJ,项目名称:galaxyCode,代码行数:31,代码来源:comments.php


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