本文整理汇总了PHP中validate_form_fields函数的典型用法代码示例。如果您正苦于以下问题:PHP validate_form_fields函数的具体用法?PHP validate_form_fields怎么用?PHP validate_form_fields使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了validate_form_fields函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: POST
$qualify = POST('qualify') ? 1 : 0;
$resend_events = POST('resend_events') ? 1 : 0;
$resend_alarms = POST('resend_alarms') ? 1 : 0;
$sign = POST('sign') ? 1 : 0;
$multi = POST('multi') ? 1 : 0;
$sem = POST('sem') ? 1 : 0;
$sim = POST('sim') ? 1 : 0;
$alarm_to_syslog = POST('alarm_to_syslog') ? 1 : 0;
$remoteadmin = POST('remoteadmin');
$remotepass = POST('remotepass');
$remoteurl = POST('remoteurl');
$setssh = POST('setssh') ? 1 : 0;
$rservers = POST('rservers');
$rservers = $_POST['rservers'];
unset($_POST['rservers']);
$validation_errors = validate_form_fields('POST', $validate);
$fwrd_server = array();
if (is_array($rservers) && !empty($rservers)) {
foreach ($rservers as $rserver) {
$rserver = explode('@', $rserver);
$fwr_ser = $rserver[0];
$fwr_prio = $rserver[1];
ossim_valid($fwr_ser, OSS_HEX, 'illegal:' . _("Forward Servers"));
ossim_valid($fwr_prio, OSS_DIGIT, 'illegal:' . _("Forward Priority"));
if (ossim_error()) {
$validation_errors['rservers[]'] = ossim_get_error_clean();
ossim_clean_error();
} else {
$fwrd_server[$fwr_ser] = $fwr_prio;
}
}
开发者ID:jackpf,项目名称:ossim-arc,代码行数:31,代码来源:modifyserver.php
示例2: delete_note
function delete_note($conn)
{
$validate = array('note_id' => array('validation' => 'OSS_DIGIT', 'e_message' => 'illegal:' . _('Note ID')));
$validation_errors = validate_form_fields('POST', $validate);
if (is_array($validation_errors) && !empty($validation_errors)) {
Av_exception::throw_error(Av_exception::USER_ERROR, _('Error! Note could not be deleted'));
}
$note_id = POST('note_id');
$result = Notes::delete($conn, $note_id);
if ($result == TRUE) {
$data['msg'] = _('Note deleted successfully');
} else {
Av_exception::throw_error(Av_exception::USER_ERROR, _('Error! Note could not be deleted'));
}
return $data;
}
开发者ID:jackpf,项目名称:ossim-arc,代码行数:16,代码来源:note_actions.php
注:本文中的validate_form_fields函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论