$noerror = false; break; } } if ($noerror) { $ip_info->set_status("FREE"); $ip_info->update(); } /* else { //echo "<meta http-equiv=\"REFRESH\" content=\"0;url=".$_SERVER['SCRIPT_NAME']."?tab=".$_GET['tab']."&pluginID=".$_GET['pluginID']."&className=".$_GET['className']."&family=".$_GET['family']."&success=delete\">"; }*/ } else { if (isset($_POST['ip_assign'])) { IP_Database::assign_ip_by_id($_POST['id'], $_POST['ip_status']); } else { if (isset($_POST['ip_host'])) { //get the ip and do some calculatins $ip = $_POST['ip_hostip'] . "/" . $_POST['ip_hostsubnet']; $ip_manager->set_IP($ip, $ip_info->get_family()); //check if the host is a valid host if ($ip_manager->get_is_negative() == false) { //if not then create a new manager to calculate for more checks $test_manager = new Netblock($ip_info->get_address_ip()); //if the address is part of the network, then create a new host if (substr($ip_manager->get_binary(), 0, $ip_info->get_subnet_size()) == substr($test_manager->get_binary(), 0, $ip_info->get_subnet_size())) { //set the information $host = new IP_Database(); $host->set_address_int($ip_manager->get_long()); $host->set_subnet_size($ip_manager->get_length());