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


PHP icms_core_DataFilter::checkVarArray方法代码示例

本文整理汇总了PHP中icms_core_DataFilter::checkVarArray方法的典型用法代码示例。如果您正苦于以下问题:PHP icms_core_DataFilter::checkVarArray方法的具体用法?PHP icms_core_DataFilter::checkVarArray怎么用?PHP icms_core_DataFilter::checkVarArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在icms_core_DataFilter的用法示例。


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

示例1: array

 * Optionally, use the options for the type for further control
 * You can leave out any variables that will be strings and then use the 3rd parameter
 * to apply the default string validation. If you set the $strict parameter to TRUE, though, 
 * you will discard any variables not explicitly found in the filter array
 */
$filter_post = array('name' => 'str', 'cid' => 'int', 'imageurl' => 'url', 'imptotal' => 'int', 'htmlbanner' => 'int', 'htmlcode' => 'html', 'contact' => 'str', 'email' => array('email', 'options' => array(0, 1)), 'login' => 'str', 'passwd' => 'str', 'extrainfo' => 'str', 'bid' => 'int', 'clickurl' => 'url', 'op' => 'str', 'impadded' => 'int', 'fct' => 'str');
$filter_get = array('bid' => 'int', 'cid' => 'int', 'fct' => 'str', 'op' => 'str');
$name = $imageurl = $htmlcode = $contact = '';
$email = $login = $passwd = $extrainfo = $clickurl = $op = '';
$bid = $cid = $imptotal = $htmlbanner = $impadded = 0;
if (!empty($_POST)) {
    $clean_POST = icms_core_DataFilter::checkVarArray($_POST, $filter_post, FALSE);
    extract($clean_POST);
}
if (!empty($_GET)) {
    $clean_GET = icms_core_DataFilter::checkVarArray($_GET, $filter_get, FALSE);
    extract($clean_GET);
}
switch ($op) {
    default:
    case 'BannersAdmin':
        BannersAdmin();
        break;
    case 'BannersAdd':
        if (!icms::$security->check()) {
            redirect_header('admin.php?fct=banners&amp;op=BannersAdmin#top', 3, implode('<br />', icms::$security->getErrors()));
        }
        if ($cid <= 0) {
            redirect_header('admin.php?fct=banners&amp;op=BannersAdmin#top');
        }
        $db =& icms_db_Factory::instance();
开发者ID:LeeGlendenning,项目名称:formulize,代码行数:31,代码来源:main.php

示例2: array

	'user_intrest'=> 'str',
	'user_mailok' => 'int',
	'theme_selected'=> 'str',
	'usecookie' => 'int',
	'xoops_upload_file' => 'array'
	'user_avatar'=> 'str',
	'op' => 'str',
*/
$filter_post = array('user_sig' => 'html', 'email' => array('email', 'options' => array(0, 1)), 'uid' => 'int', 'change_pass' => 'int', 'url' => 'url', 'user_viewemail' => 'int', 'user_viewoid' => 'int', 'attachsig' => 'int', 'user_mailok' => 'int', 'usecookie' => 'int');
$filter_get = array('uid' => 'int');
if (!empty($_GET)) {
    $clean_GET = icms_core_DataFilter::checkVarArray($_GET, $filter_get, FALSE);
    extract($clean_GET);
}
if (!empty($_POST)) {
    $clean_POST = icms_core_DataFilter::checkVarArray($_POST, $filter_post, FALSE);
    extract($clean_POST);
}
switch ($op) {
    case 'saveuser':
        if (!icms::$security->check()) {
            redirect_header('index.php', 3, _US_NOEDITRIGHT . "<br />" . implode('<br />', icms::$security->getErrors()));
        }
        if (icms::$user->getVar('uid') != $uid) {
            redirect_header('index.php', 3, _US_NOEDITRIGHT);
        }
        $errors = array();
        if ($icmsConfigUser['allow_chgmail'] == 1) {
            if (!empty($email)) {
                $email = icms_core_DataFilter::stripSlashesGPC(trim($email));
            }
开发者ID:nao-pon,项目名称:impresscms,代码行数:31,代码来源:edituser.php


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