Exemple #1
0
     $force = false;
     if ($temp_block->is_stub()) {
         $force = true;
     }
     if (!$ip_info->remove($force)) {
         echo Form::error($ip_info->get_error());
     } 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_force_delete'])) {
         $all_children = get_all_children($ip_info->get_netblock_id(), $ip_info->get_family());
         $noerror = true;
         foreach ($all_children as $id => $ip_id) {
             $temp_block = new IP_Database($ip_id);
             if (!$temp_block->remove(true)) {
                 echo Form::error($ip_info->get_error());
                 $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 {