= 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); ?>
' . $_SESSION[$page_url]['msg'] . '
'; unset($_SESSION[$page_url]['msg']); } ?>
> \n"; ?> \n"; ?> 0)) { $subnet_info['dhcp_start'] = ip2long($default_range[3]); } if (!isset($subnet_info['dhcp_stop']) or !($subnet_info['dhcp_stop'] > 0)) { $subnet_info['dhcp_stop'] = ip2long($default_range[4]); } } else { $cell_disabled = 'readonly=true'; $cl = 'down'; } print "\n"; ?> "; print_qa_select("s_dhcp", $subnet_info['dhcp']); print "\n"; ?> "; print_qa_select("s_static", $subnet_info['static']); print "\n"; $cl = 'data'; ?> \n"; ?>\n"; ?>\n"; ?>"; print_qa_select("s_office", $subnet_info['office']); print "\n"; ?> "; print_qa_select_ext("s_hotspot", $subnet_info['hotspot'], !$subnet_info['office']); print "\n"; ?> "; print_qa_select_ext("s_vpn", $subnet_info['vpn'], !$subnet_info['office']); print "\n"; ?> "; print_qa_select("s_free", $subnet_info['free']); print "\n"; ?> "; print_qa_select_ext("s_dhcp_update", $subnet_info['dhcp_update_hostname'], !$subnet_info['office']); print "\n"; ?> "; print_qa_select_ext("s_discovery", $subnet_info['discovery'], !$subnet_info['office']); print "\n"; ?>
$msg_error
\n"; } ?>