= 0)) { $dhcp_fail = 1; } if (!$dhcp_fail and ($new['dhcp_start'] - $new['ip_int_start'] <= 0)) { $dhcp_fail = 1; } if (!$dhcp_fail and ($new['dhcp_stop'] - $new['ip_int_stop'] >= 0)) { $dhcp_fail = 1; } if (!$dhcp_fail and ($new['dhcp_stop'] - $new['ip_int_start'] <= 0)) { $dhcp_fail = 1; } if (!$dhcp_fail and ($new['dhcp_start'] - $new['dhcp_stop'] >= 0)) { $dhcp_fail = 1; } if ($dhcp_fail) { $new['dhcp_start'] = ip2long($range[3]); $new['dhcp_stop'] = ip2long($range[4]); } $gateway = ip2long(trim($_POST['s_gateway'])); if (!isset($gateway)) { $gateway = $range[5]; } $new['gateway'] = $gateway; if ($new['hotspot']) { $new['dhcp_update_hostname'] = 0; $new['discovery'] = 0; $new['vpn'] = 0; } if ($new['vpn']) { $new['discovery'] = 0; $new['dhcp'] = 0; } if ($new['office']) { $new['free'] = 0; } if (!$new['office']) { $new['discovery'] = 0; $new['dhcp'] = 0; $new['static'] = 0; $new['dhcp_update_hostname'] = 0; $new['gateway'] = 0; $new['dhcp_start'] = 0; $new['dhcp_stop'] = 0; } update_record($db_link, "subnets", "id='$id'", $new); header("Location: " . $_SERVER["REQUEST_URI"]); exit; } unset($_POST); require_once($_SERVER['DOCUMENT_ROOT'] . "/inc/header.php"); print_control_submenu($page_url); $sSQL = "SELECT * FROM subnets WHERE id=$id"; $subnet_info = get_record_sql($db_link, $sSQL); ?>