本文整理汇总了PHP中is_numericint函数的典型用法代码示例。如果您正苦于以下问题:PHP is_numericint函数的具体用法?PHP is_numericint怎么用?PHP is_numericint使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了is_numericint函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
$pconfig['tunnel-remote-addr'] = $a_gifs[$id]['tunnel-remote-addr'];
$pconfig['link1'] = isset($a_gifs[$id]['link1']);
$pconfig['link0'] = isset($a_gifs[$id]['link0']);
$pconfig['descr'] = $a_gifs[$id]['descr'];
}
if ($_POST) {
unset($input_errors);
$pconfig = $_POST;
/* input validation */
$reqdfields = explode(" ", "if remote-addr tunnel-local-addr tunnel-remote-addr tunnel-remote-net");
$reqdfieldsn = array(gettext("Parent interface"), gettext("gif remote address"), gettext("gif tunnel local address"), gettext("gif tunnel remote address"), gettext("gif tunnel remote netmask"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
if (!is_ipaddr($_POST['tunnel-local-addr']) || !is_ipaddr($_POST['tunnel-remote-addr']) || !is_ipaddr($_POST['remote-addr'])) {
$input_errors[] = gettext("The tunnel local and tunnel remote fields must have valid IP addresses.");
}
if (!is_numericint($_POST['tunnel-remote-net'])) {
$input_errors[] = gettext("The gif tunnel subnet must be an integer.");
}
if (is_ipaddrv4($_POST['tunnel-local-addr'])) {
if (!is_ipaddrv4($_POST['tunnel-remote-addr'])) {
$input_errors[] = gettext("The gif tunnel remote address must be IPv4 where tunnel local address is IPv4.");
}
if ($_POST['tunnel-remote-net'] > 32 || $_POST['tunnel-remote-net'] < 1) {
$input_errors[] = gettext("The gif tunnel subnet must be an integer between 1 and 32.");
}
}
if (is_ipaddrv6($_POST['tunnel-local-addr'])) {
if (!is_ipaddrv6($_POST['tunnel-remote-addr'])) {
$input_errors[] = gettext("The gif tunnel remote address must be IPv6 where tunnel local address is IPv6.");
}
if ($_POST['tunnel-remote-net'] > 128 || $_POST['tunnel-remote-net'] < 1) {
示例2: elseif
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
require_once "guiconfig.inc";
require_once "/usr/local/pkg/snort/snort.inc";
global $g;
$snortdir = SNORTDIR;
if (isset($_POST['id']) && is_numericint($_POST['id'])) {
$id = $_POST['id'];
} elseif (isset($_GET['id']) && is_numericint($_GET['id'])) {
$id = htmlspecialchars($_GET['id']);
}
if (isset($_POST['eng_id']) && isset($_POST['eng_id'])) {
$eng_id = $_POST['eng_id'];
} elseif (isset($_GET['eng_id']) && is_numericint($_GET['eng_id'])) {
$eng_id = htmlspecialchars($_GET['eng_id']);
}
if (is_null($id)) {
// Clear and close out any session variable we created
session_start();
unset($_SESSION['ftp_client_import']);
session_write_close();
header("Location: /snort/snort_interfaces.php");
exit;
}
if (!is_array($config['installedpackages']['snortglobal']['rule'])) {
$config['installedpackages']['snortglobal']['rule'] = array();
}
if (!is_array($config['installedpackages']['snortglobal']['rule'][$id]['ftp_client_engine']['item'])) {
$config['installedpackages']['snortglobal']['rule'][$id]['ftp_client_engine']['item'] = array();
示例3: array
$config['dhcpd'][$if]['staticmap'] = array();
}
if (!is_array($config['dhcpd'][$if]['pool'])) {
$config['dhcpd'][$if]['pool'] = array();
}
$a_pools =& $config['dhcpd'][$if]['pool'];
$static_arp_enabled = isset($config['dhcpd'][$if]['staticarp']);
$netboot_enabled = isset($config['dhcpd'][$if]['netboot']);
$a_maps =& $config['dhcpd'][$if]['staticmap'];
$ifcfgip = get_interface_ip($if);
$ifcfgsn = get_interface_subnet($if);
$ifcfgdescr = convert_friendly_interface_to_friendly_descr($if);
if (is_numericint($_GET['id'])) {
$id = $_GET['id'];
}
if (isset($_POST['id']) && is_numericint($_POST['id'])) {
$id = $_POST['id'];
}
if (isset($id) && $a_maps[$id]) {
$pconfig['mac'] = $a_maps[$id]['mac'];
$pconfig['cid'] = $a_maps[$id]['cid'];
$pconfig['hostname'] = $a_maps[$id]['hostname'];
$pconfig['ipaddr'] = $a_maps[$id]['ipaddr'];
$pconfig['filename'] = $a_maps[$id]['filename'];
$pconfig['rootpath'] = $a_maps[$id]['rootpath'];
$pconfig['descr'] = $a_maps[$id]['descr'];
$pconfig['arp_table_static_entry'] = isset($a_maps[$id]['arp_table_static_entry']);
$pconfig['deftime'] = $a_maps[$id]['defaultleasetime'];
$pconfig['maxtime'] = $a_maps[$id]['maxleasetime'];
$pconfig['gateway'] = $a_maps[$id]['gateway'];
$pconfig['domain'] = $a_maps[$id]['domain'];
示例4: gettext
$input_errors[] = gettext("Timeout needs to be an integer.");
}
if ($_POST['fwdelay'] && !is_numericint($_POST['fwdelay'])) {
$input_errors[] = gettext("Forward Delay needs to be an integer between 4 and 30.");
}
if ($_POST['hellotime'] && !is_numericint($_POST['hellotime'])) {
$input_errors[] = gettext("Hello time for STP needs to be an integer between 1 and 2.");
}
if ($_POST['priority'] && !is_numericint($_POST['priority'])) {
$input_errors[] = gettext("Priority for STP needs to be an integer between 0 and 61440.");
}
if ($_POST['holdcnt'] && !is_numericint($_POST['holdcnt'])) {
$input_errors[] = gettext("Transmit Hold Count for STP needs to be an integer between 1 and 10.");
}
foreach ($ifacelist as $ifn => $ifdescr) {
if ($_POST[$ifn] != "" && !is_numericint($_POST[$ifn])) {
$input_errors[] = sprintf(gettext("%s interface priority for STP needs to be an integer between 0 and 240."), $ifdescr);
}
}
$i = 0;
foreach ($ifacelist as $ifn => $ifdescr) {
if ($_POST["{$ifn}{$i}"] != "" && !is_numeric($_POST["{$ifn}{$i}"])) {
$input_errors[] = sprintf(gettext("%s interface path cost for STP needs to be an integer between 1 and 200000000."), $ifdescr);
}
$i++;
}
if (!is_array($_POST['members']) || count($_POST['members']) < 1) {
$input_errors[] = gettext("At least one member interface must be selected for a bridge.");
}
if (is_array($_POST['static'])) {
foreach ($_POST['static'] as $ifstatic) {
示例5: gettext
if ($_POST['raminrtradvinterval'] < "3") {
$input_errors[] = gettext("Minimum advertisement interval must be no less than 3.");
}
if ($_POST['ramaxrtradvinterval'] && $_POST['raminrtradvinterval'] > 0.75 * $_POST['ramaxrtradvinterval']) {
$input_errors[] = gettext("Minimum advertisement interval must be no greater than 0.75 * Maximum advertisement interval");
}
}
if ($_POST['ramaxrtradvinterval']) {
if (!is_numericint($_POST['ramaxrtradvinterval'])) {
$input_errors[] = gettext("Maximum advertisement interval must be an integer.");
}
if ($_POST['ramaxrtradvinterval'] < "4" || $_POST['ramaxrtradvinterval'] > "1800") {
$input_errors[] = gettext("Maximum advertisement interval must be no less than 4 and no greater than 1800.");
}
}
if ($_POST['raadvdefaultlifetime'] && !is_numericint($_POST['raadvdefaultlifetime'])) {
$input_errors[] = gettext("Router lifetime must be an integer between 1 and 9000.");
}
if (!$input_errors) {
if (!is_array($config['dhcpdv6'][$if])) {
$config['dhcpdv6'][$if] = array();
}
$config['dhcpdv6'][$if]['ramode'] = $_POST['ramode'];
$config['dhcpdv6'][$if]['rapriority'] = $_POST['rapriority'];
$config['dhcpdv6'][$if]['rainterface'] = $_POST['rainterface'];
$config['dhcpdv6'][$if]['ravalidlifetime'] = $_POST['ravalidlifetime'];
$config['dhcpdv6'][$if]['rapreferredlifetime'] = $_POST['rapreferredlifetime'];
$config['dhcpdv6'][$if]['raminrtradvinterval'] = $_POST['raminrtradvinterval'];
$config['dhcpdv6'][$if]['ramaxrtradvinterval'] = $_POST['ramaxrtradvinterval'];
$config['dhcpdv6'][$if]['raadvdefaultlifetime'] = $_POST['raadvdefaultlifetime'];
$config['dhcpdv6'][$if]['radomainsearchlist'] = $_POST['radomainsearchlist'];
示例6: gettext
if ($_POST['udpmultipletimeout'] && !is_numericint($_POST['udpmultipletimeout'])) {
$input_errors[] = gettext("The UDP multiple timeout value must be an integer.");
}
if ($_POST['icmpfirsttimeout'] && !is_numericint($_POST['icmpfirsttimeout'])) {
$input_errors[] = gettext("The ICMP first timeout value must be an integer.");
}
if ($_POST['icmperrortimeout'] && !is_numericint($_POST['icmperrortimeout'])) {
$input_errors[] = gettext("The ICMP error timeout value must be an integer.");
}
if ($_POST['otherfirsttimeout'] && !is_numericint($_POST['otherfirsttimeout'])) {
$input_errors[] = gettext("The Other first timeout value must be an integer.");
}
if ($_POST['othersingletimeout'] && !is_numericint($_POST['othersingletimeout'])) {
$input_errors[] = gettext("The Other single timeout value must be an integer.");
}
if ($_POST['othermultipletimeout'] && !is_numericint($_POST['othermultipletimeout'])) {
$input_errors[] = gettext("The Other multiple timeout value must be an integer.");
}
ob_flush();
flush();
if (!$input_errors) {
if ($_POST['disablefilter'] == "yes") {
$config['system']['disablefilter'] = "enabled";
} else {
unset($config['system']['disablefilter']);
}
if ($_POST['disablevpnrules'] == "yes") {
$config['system']['disablevpnrules'] = true;
} else {
unset($config['system']['disablevpnrules']);
}
示例7: gettext
if ($_POST['pppoe_resetminute'] != "" && !is_numericint($_POST['pppoe_resetminute']) && $_POST['pppoe_resetminute'] >= 0 && $_POST['pppoe_resetminute'] <= 59) {
$input_errors[] = gettext("PPPoE yeniden başlatma dakikası (0-59) arasında olmalıdır.");
}
if ($_POST['pppoe_resetdate'] != "" && !is_numeric(str_replace("/", "", $_POST['pppoe_resetdate']))) {
$input_errors[] = gettext("PPPoE yeniden başlatma tarih değeri (mm/dd/yyyy) bu şekilde tanımlanmalıdır.");
}
if ($_POST['pptp_local'] && !is_ipaddr($_POST['pptp_local'])) {
$input_errors[] = "Geçerli bir PPTP yerel IP adresi tanımlanmalıdır.";
}
if ($_POST['pptp_subnet'] && !is_numeric($_POST['pptp_subnet'])) {
$input_errors[] = "Geçerli bir PPTP subnet bit count tanımlanmalıdır.";
}
if ($_POST['pptp_remote'] && !is_ipaddr($_POST['pptp_remote'])) {
$input_errors[] = "PPTP uzak IP için geçerli bir IP adresi tanımlanmaldır.";
}
if ($_POST['pptp_idletimeout'] != "" && !is_numericint($_POST['pptp_idletimeout'])) {
$input_errors[] = "idle timeout bir tamsayı olmak zorundadır.";
}
if ($_POST['spoofmac'] && !is_macaddr($_POST['spoofmac'])) {
$input_errors[] = "Geçerli bir MAC adresi tanımlanmalıdır.";
}
if ($_POST['mtu'] && ($_POST['mtu'] < 576 || $_POST['mtu'] > 1500)) {
$input_errors[] = "MTU değeri 576 ile 1500 byte arasında olmalıdır.";
}
/* Wireless interface? */
if (isset($wancfg['wireless'])) {
$wi_input_errors = wireless_config_post();
if ($wi_input_errors) {
$input_errors = array_merge($input_errors, $wi_input_errors);
}
}
示例8: unset
unset($a_vip[$_GET['id']]);
interface_proxyarp_configure($viface);
} else {
interface_vip_bring_down($a_vip[$_GET['id']]);
unset($a_vip[$_GET['id']]);
}
if (count($config['virtualip']['vip']) == 0) {
unset($config['virtualip']['vip']);
}
write_config();
header("Location: firewall_virtual_ip.php");
exit;
}
}
} else {
if ($_GET['changes'] == "mods" && is_numericint($_GET['id'])) {
$id = $_GET['id'];
}
}
$pgtitle = array(gettext("Firewall"), gettext("Virtual IP Addresses"));
include "head.inc";
$main_buttons = array(array('href' => 'firewall_virtual_ip_edit.php', 'label' => 'Add'));
?>
<body>
<?php
include "fbegin.inc";
?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
示例9: array
$reqdfieldsn = array(gettext("Server address"), gettext("Remote start address"));
if ($_POST['radiusenable']) {
$reqdfields = array_merge($reqdfields, explode(" ", "radiusserver radiussecret"));
$reqdfieldsn = array_merge($reqdfieldsn, array(gettext("RADIUS server address"), gettext("RADIUS shared secret")));
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
if ($_POST['localip'] && !is_ipaddr($_POST['localip'])) {
$input_errors[] = gettext("A valid server address must be specified.");
}
if ($_POST['remoteip'] && !is_ipaddr($_POST['remoteip'])) {
$input_errors[] = gettext("A valid remote start address must be specified.");
}
if ($_POST['radiusserver'] && !is_ipaddr($_POST['radiusserver'])) {
$input_errors[] = gettext("A valid RADIUS server address must be specified.");
}
if (!is_numericint($_POST['n_pppoe_units']) || $_POST['n_pppoe_units'] > 255) {
$input_errors[] = gettext("Number of PPPoE users must be between 1 and 255");
}
if (!is_numeric($_POST['pppoe_subnet']) || $_POST['pppoe_subnet'] < 0 || $_POST['pppoe_subnet'] > 32) {
$input_errors[] = gettext("Subnet mask must be an interger between 0 and 32");
}
$_POST['remoteip'] = $pconfig['remoteip'] = gen_subnet($_POST['remoteip'], $_POST['pppoe_subnet']);
$subnet_start = ip2ulong($_POST['remoteip']);
$subnet_end = ip2ulong($_POST['remoteip']) + $_POST['pppoe_subnet'] - 1;
if (ip2ulong($_POST['localip']) >= $subnet_start && ip2ulong($_POST['localip']) <= $subnet_end) {
$input_errors[] = gettext("The specified server address lies in the remote subnet.");
}
if ($_POST['localip'] == get_interface_ip($_POST['interface'])) {
$input_errors[] = gettext("The specified server address is equal to an interface ip address.");
}
for ($x = 0; $x < 4999; $x++) {
示例10: gettext
if (!empty($_POST['adaptiveend']) && !is_numericint($_POST['adaptiveend'])) {
$input_errors[] = gettext("The Firewall Adaptive End value must be an integer.");
}
if ($_POST['maximumstates'] && !is_numericint($_POST['maximumstates'])) {
$input_errors[] = gettext("The Firewall Maximum States value must be an integer.");
}
if ($_POST['aliasesresolveinterval'] && !is_numericint($_POST['aliasesresolveinterval'])) {
$input_errors[] = gettext("The Aliases Hostname Resolve Interval value must be an integer.");
}
if ($_POST['maximumtableentries'] && !is_numericint($_POST['maximumtableentries'])) {
$input_errors[] = gettext("The Firewall Maximum Table Entries value must be an integer.");
}
if ($_POST['tcpidletimeout'] && !is_numericint($_POST['tcpidletimeout'])) {
$input_errors[] = gettext("The TCP idle timeout must be an integer.");
}
if ($_POST['reflectiontimeout'] && !is_numericint($_POST['reflectiontimeout'])) {
$input_errors[] = gettext("The Reflection timeout must be an integer.");
}
ob_flush();
flush();
if (!$input_errors) {
if ($_POST['disablefilter'] == "yes") {
$config['system']['disablefilter'] = "enabled";
} else {
unset($config['system']['disablefilter']);
}
if ($_POST['disablevpnrules'] == "yes") {
$config['system']['disablevpnrules'] = true;
} else {
unset($config['system']['disablevpnrules']);
}
示例11: array
*
*/
##|+PRIV
##|*IDENT=page-system-usermanager
##|*NAME=System: User Manager
##|*DESCR=Allow access to the 'System: User Manager' page.
##|*MATCH=system_usermanager.php*
##|-PRIV
require "certs.inc";
require "guiconfig.inc";
// start admin user code
$pgtitle = array(gettext("System"), gettext("User Manager"), gettext("Users"));
if (isset($_POST['userid']) && is_numericint($_POST['userid'])) {
$id = $_POST['userid'];
}
if (isset($_GET['userid']) && is_numericint($_GET['userid'])) {
$id = $_GET['userid'];
}
if (!isset($config['system']['user']) || !is_array($config['system']['user'])) {
$config['system']['user'] = array();
}
$a_user =& $config['system']['user'];
$act = $_GET['act'];
if (isset($_SERVER['HTTP_REFERER'])) {
$referer = $_SERVER['HTTP_REFERER'];
} else {
$referer = '/system_usermanager.php';
}
if (isset($id) && $a_user[$id]) {
$pconfig['usernamefld'] = $a_user[$id]['name'];
$pconfig['descr'] = $a_user[$id]['descr'];
示例12: gettext
if ($_POST['destination_subnet'] && !is_numericint($_POST['destination_subnet'])) {
$input_errors[] = gettext("A valid destination bit count must be specified.");
}
if ($_POST['destination_type'] == "any") {
if ($_POST['destination_not']) {
$input_errors[] = gettext("Negating destination address of \"any\" is invalid.");
}
}
if ($_POST['target'] && !is_ipaddr($_POST['target']) && !is_subnet($_POST['target']) && !is_alias($_POST['target']) && !isset($_POST['nonat']) && !($_POST['target'] == "other-subnet")) {
$input_errors[] = gettext("A valid target IP address must be specified.");
}
if ($_POST['target'] == "other-subnet") {
if (!is_ipaddr($_POST['targetip'])) {
$input_errors[] = gettext("A valid target IP must be specified when using the 'Other Subnet' type.");
}
if (!is_numericint($_POST['targetip_subnet'])) {
$input_errors[] = gettext("A valid target bit count must be specified when using the 'Other Subnet' type.");
}
}
/* Verify Pool Options */
$poolopts = "";
if ($_POST['poolopts']) {
if (is_subnet($_POST['target']) || $_POST['target'] == "other-subnet") {
$poolopts = $_POST['poolopts'];
} elseif (is_alias($_POST['target'])) {
if (substr($_POST['poolopts'], 0, 11) == "round-robin") {
$poolopts = $_POST['poolopts'];
} else {
$input_errors[] = gettext("Only Round Robin pool options may be chosen when selecting an alias.");
}
}
示例13: gettext
if ($_POST['localip'] && !is_ipaddr($_POST['localip'])) {
$input_errors[] = gettext("A valid server address must be specified.");
}
if ($_POST['remoteip'] && !is_ipaddr($_POST['remoteip'])) {
$input_errors[] = gettext("A valid remote start address must be specified.");
}
if ($_POST['radiusserver'] && !is_ipaddr($_POST['radiusserver'])) {
$input_errors[] = gettext("A valid RADIUS server address must be specified.");
}
if (!is_numericint($_POST['n_pppoe_units']) || $_POST['n_pppoe_units'] > 255) {
$input_errors[] = gettext("Number of PPPoE users must be between 1 and 255");
}
if (!is_numericint($_POST['n_pppoe_maxlogin']) || $_POST['n_pppoe_maxlogin'] > 255) {
$input_errors[] = gettext("User Max Logins must be between 1 and 255");
}
if (!is_numericint($_POST['pppoe_subnet']) || $_POST['pppoe_subnet'] > 32) {
$input_errors[] = gettext("Subnet mask must be an interger between 0 and 32");
}
$_POST['remoteip'] = $pconfig['remoteip'] = gen_subnet($_POST['remoteip'], $_POST['pppoe_subnet']);
if (is_inrange_v4($_POST['localip'], $_POST['remoteip'], ip_after($_POST['remoteip'], $_POST['pppoe_subnet'] - 1))) {
$input_errors[] = gettext("The specified server address lies in the remote subnet.");
}
if ($_POST['localip'] == get_interface_ip($_POST['interface'])) {
$input_errors[] = gettext("The specified server address is equal to an interface ip address.");
}
for ($x = 0; $x < 4999; $x++) {
if ($_POST["username{$x}"]) {
if (empty($_POST["password{$x}"])) {
$input_errors[] = sprintf(gettext("No password specified for username %s"), $_POST["username{$x}"]);
}
if ($_POST["ip{$x}"] != "" && !is_ipaddr($_POST["ip{$x}"])) {
示例14: list
if (is_numericint($_GET['id'])) {
$id = $_GET['id'];
}
if (isset($_POST['id']) && is_numericint($_POST['id'])) {
$id = $_POST['id'];
}
if (isset($_GET['dup']) && is_numericint($_GET['dup'])) {
$id = $_GET['dup'];
}
if (isset($id) && $a_routes[$id]) {
list($pconfig['network'], $pconfig['network_subnet']) = explode('/', $a_routes[$id]['network']);
$pconfig['gateway'] = $a_routes[$id]['gateway'];
$pconfig['descr'] = $a_routes[$id]['descr'];
$pconfig['disabled'] = isset($a_routes[$id]['disabled']);
}
if (isset($_GET['dup']) && is_numericint($_GET['dup'])) {
unset($id);
}
if ($_POST) {
global $aliastable;
unset($input_errors);
$pconfig = $_POST;
/* input validation */
$reqdfields = explode(" ", "network network_subnet gateway");
$reqdfieldsn = explode(",", gettext("Destination network") . "," . gettext("Destination network bit count") . "," . gettext("Gateway"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
if ($_POST['network'] && !is_ipaddr($_POST['network']) && !is_alias($_POST['network'])) {
$input_errors[] = gettext("A valid IPv4 or IPv6 destination network must be specified.");
}
if ($_POST['network_subnet'] && !is_numeric($_POST['network_subnet'])) {
$input_errors[] = gettext("A valid destination network bit count must be specified.");
示例15: gettext
if (is_ipaddr_configured($_POST['localip'])) {
$input_errors[] = gettext("'Server address' parameter should NOT be set to any IP address currently in use on this firewall.");
}
if ($_POST['l2tp_subnet'] && !is_ipaddr($_POST['remoteip'])) {
$input_errors[] = gettext("A valid remote start address must be specified.");
}
if ($_POST['radiusserver'] && !is_ipaddr($_POST['radiusserver'])) {
$input_errors[] = gettext("A valid RADIUS server address must be specified.");
}
if ($_POST['secret'] != $_POST['secret_confirm']) {
$input_errors[] = gettext("Secret and confirmation must match");
}
if ($_POST['radiussecret'] != $_POST['radiussecret_confirm']) {
$input_errors[] = gettext("Secret and confirmation must match");
}
if (!is_numericint($_POST['n_l2tp_units']) || $_POST['n_l2tp_units'] > 255) {
$input_errors[] = gettext("Number of L2TP users must be between 1 and 255");
}
/* if this is an AJAX caller then handle via JSON */
if (isAjax() && is_array($input_errors)) {
input_errors2Ajax($input_errors);
exit;
}
if (!$input_errors) {
$_POST['remoteip'] = $pconfig['remoteip'] = gen_subnet($_POST['remoteip'], $_POST['l2tp_subnet']);
$subnet_start = ip2ulong($_POST['remoteip']);
$subnet_end = ip2ulong($_POST['remoteip']) + $_POST['n_l2tp_units'] - 1;
if (ip2ulong($_POST['localip']) >= $subnet_start && ip2ulong($_POST['localip']) <= $subnet_end) {
$input_errors[] = gettext("The specified server address lies in the remote subnet.");
}
if ($_POST['localip'] == get_interface_ip("lan")) {