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


PHP is_posnumericint函数代码示例

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


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

示例1: gettext

 if ($_POST['max'] != "" && !is_posnumericint($_POST['max'])) {
     $input_errors[] = gettext("Maximum state entries (advanced option) must be a positive integer");
 }
 if ($_POST['max-src-nodes'] != "" && !is_posnumericint($_POST['max-src-nodes'])) {
     $input_errors[] = gettext("Maximum number of unique source hosts (advanced option) must be a positive integer");
 }
 if ($_POST['max-src-conn'] != "" && !is_posnumericint($_POST['max-src-conn'])) {
     $input_errors[] = gettext("Maximum number of established connections per host (advanced option) must be a positive integer");
 }
 if ($_POST['max-src-states'] != "" && !is_posnumericint($_POST['max-src-states'])) {
     $input_errors[] = gettext("Maximum state entries per host (advanced option) must be a positive integer");
 }
 if ($_POST['max-src-conn-rate'] != "" && !is_posnumericint($_POST['max-src-conn-rate'])) {
     $input_errors[] = gettext("Maximum new connections per host / per second(s) (advanced option) must be a positive integer");
 }
 if ($_POST['statetimeout'] != "" && !is_posnumericint($_POST['statetimeout'])) {
     $input_errors[] = gettext("State timeout (advanced option) must be a positive integer");
 }
 if (($_POST['max-src-conn-rate'] != "" and $_POST['max-src-conn-rates'] == "") || ($_POST['max-src-conn-rate'] == "" and $_POST['max-src-conn-rates'] != "")) {
     $input_errors[] = gettext("Both maximum new connections per host and the interval (per second(s)) must be specified");
 }
 if (!$_POST['tcpflags_any']) {
     $settcpflags = array();
     $outoftcpflags = array();
     foreach ($tcpflags as $tcpflag) {
         if ($_POST['tcpflags1_' . $tcpflag] == "on") {
             $settcpflags[] = $tcpflag;
         }
         if ($_POST['tcpflags2_' . $tcpflag] == "on") {
             $outoftcpflags[] = $tcpflag;
         }
开发者ID:rohankapoorcom,项目名称:pfsense,代码行数:31,代码来源:firewall_rules_edit.php

示例2: gettext

 if (!empty($pconfig['max']) && !is_posnumericint($pconfig['max'])) {
     $input_errors[] = gettext("Maximum state entries (advanced option) must be a positive integer");
 }
 if (!empty($pconfig['max-src-nodes']) && !is_posnumericint($pconfig['max-src-nodes'])) {
     $input_errors[] = gettext("Maximum number of unique source hosts (advanced option) must be a positive integer");
 }
 if (!empty($pconfig['max-src-conn']) && !is_posnumericint($pconfig['max-src-conn'])) {
     $input_errors[] = gettext("Maximum number of established connections per host (advanced option) must be a positive integer");
 }
 if (!empty($pconfig['max-src-states']) && !is_posnumericint($pconfig['max-src-states'])) {
     $input_errors[] = gettext("Maximum state entries per host (advanced option) must be a positive integer");
 }
 if (!empty($pconfig['max-src-conn-rate']) && !is_posnumericint($pconfig['max-src-conn-rate'])) {
     $input_errors[] = gettext("Maximum new connections per host / per second(s) (advanced option) must be a positive integer");
 }
 if (!empty($pconfig['statetimeout']) && !is_posnumericint($pconfig['statetimeout'])) {
     $input_errors[] = gettext("State timeout (advanced option) must be a positive integer");
 }
 if (empty($pconfig['max-src-conn-rate']) && !empty($pconfig['max-src-conn-rates']) || !empty($pconfig['max-src-conn-rate']) && empty($pconfig['max-src-conn-rates'])) {
     $input_errors[] = gettext("Both maximum new connections per host and the interval (per second(s)) must be specified");
 }
 if (empty($pconfig['tcpflags2']) && !empty($pconfig['tcpflags1'])) {
     $input_errors[] = gettext("If you specify TCP flags that should be set you should specify out of which flags as well.");
 }
 if (count($input_errors) == 0) {
     $filterent = array();
     // 1-on-1 copy of form values
     $copy_fields = array('type', 'interface', 'ipprotocol', 'tag', 'tagged', 'max', 'max-src-nodes', 'max-src-conn', 'max-src-states', 'statetimeout', 'statetype', 'os', 'descr', 'gateway', 'sched', 'associated-rule-id', 'direction', 'quick', 'max-src-conn-rate', 'max-src-conn-rates');
     foreach ($copy_fields as $fieldname) {
         if (!empty($pconfig[$fieldname])) {
             if (is_array($pconfig[$fieldname])) {
开发者ID:paudam,项目名称:opnsense-core,代码行数:31,代码来源:firewall_rules_edit.php


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