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


PHP Token::show_error方法代码示例

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


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

示例1: array

require_once 'av_init.php';
Session::logcheck("environment-menu", "PolicyNetworks");
$validate = array('ngname' => array('validation' => 'OSS_NOECHARS, OSS_ALPHA, OSS_PUNC', 'e_message' => 'illegal:' . _('Group Name')), 'descr' => array('validation' => 'OSS_NULLABLE, OSS_ALL', 'e_message' => 'illegal:' . _('Description')), 'ctx' => array('validation' => 'OSS_HEX', 'e_message' => 'illegal:' . _('Entity')), 'nets[]' => array('validation' => 'OSS_ALPHA', 'e_message' => 'illegal:' . _('Networks')), 'rrd_profile' => array('validation' => 'OSS_ALPHA, OSS_NULLABLE, OSS_PUNC', 'e_message' => 'illegal:' . _('RRD Profile')), 'nagios' => array('validation' => 'OSS_NULLABLE, OSS_DIGIT', 'e_message' => 'illegal:' . _('Availability Monitoring')));
if (GET('ajax_validation') == TRUE) {
    $data['status'] = 'OK';
    $validation_errors = validate_form_fields('GET', $validate);
    if (is_array($validation_errors) && !empty($validation_errors)) {
        $data['status'] = 'error';
        $data['data'] = $validation_errors;
    }
    echo json_encode($data);
    exit;
}
if (!isset($_POST['ajax_validation_all']) || POST('ajax_validation_all') == FALSE) {
    if (!Token::verify('tk_ng_form', POST('token'))) {
        Token::show_error();
        exit;
    }
}
$ctx = POST('ctx');
$descr = POST('descr');
$ngname = POST('ngname');
$rrd_profile = POST('rrd_profile');
$networks = isset($_POST['nets']) && !empty($_POST['nets']) ? Util::clean_array(POST('nets')) : array();
$validation_errors = validate_form_fields('POST', $validate);
$data['status'] = 'OK';
$data['data'] = $validation_errors;
if (POST('ajax_validation_all') == TRUE) {
    if (is_array($validation_errors) && !empty($validation_errors)) {
        $data['status'] = 'error';
        echo json_encode($data);
开发者ID:jackpf,项目名称:ossim-arc,代码行数:31,代码来源:newnetgroup.php

示例2: validate_form_fields

            }
        }
    } else {
        $validation_errors = validate_form_fields('GET', $validate);
    }
    if (is_array($validation_errors) && !empty($validation_errors)) {
        $data['status'] = 'error';
        $data['data'] = $validation_errors;
    }
    echo json_encode($data);
    exit;
}
//Check Token
if (!isset($_POST['ajax_validation_all']) || POST('ajax_validation_all') == FALSE) {
    if (!Token::verify('tk_form_server', POST('token'))) {
        Token::show_error(_("Action not allowed"));
        exit;
    }
}
$id = POST('id');
$sname = POST('sname');
$ip = POST('ip');
$port = POST('port');
$descr = POST('descr');
$correlate = POST('correlate') ? 1 : 0;
$cross_correlate = POST('cross_correlate') ? 1 : 0;
$store = POST('store') ? 1 : 0;
$rep = POST('reputation') ? 1 : 0;
$qualify = POST('qualify') ? 1 : 0;
$resend_events = POST('resend_events') ? 1 : 0;
$resend_alarms = POST('resend_alarms') ? 1 : 0;
开发者ID:jackpf,项目名称:ossim-arc,代码行数:31,代码来源:modifyserver.php

示例3: _

                $aux_id = Av_sensor::get_id_by_ip($conn, $ip);
                $db->close();
                if (!empty($aux_id)) {
                    $data['status'] = 'error';
                    $data['data'][$_GET['name']] = _('Error! IP address associated with another sensor');
                }
            }
        }
    }
    echo json_encode($data);
    exit;
}
//Check Token
if (!isset($_POST['ajax_validation_all']) || POST('ajax_validation_all') == FALSE) {
    if (!Token::verify('tk_form_s', POST('token'))) {
        Token::show_error(_('Action not allowed'));
        exit;
    }
}
$sname = POST('sname');
$ip = POST('ip');
$priority = POST('priority');
$port = POST('port');
$tzone = POST('tzone');
$descr = POST('descr');
$location = POST('location');
$entities = POST('entities');
$validation_errors = validate_form_fields('POST', $validate);
if (empty($validation_errors['ip'])) {
    if (preg_match('/,/', $ip)) {
        $validation_errors['ip'] = _('Invalid IP address. Format allowed') . ": nnn.nnn.nnn.nnn <br/>" . _('Entered IP') . ": '<strong>" . Util::htmlentities($ip) . "</strong>'";
开发者ID:jackpf,项目名称:ossim-arc,代码行数:31,代码来源:newsensor.php


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