Example #1
0
            if ($flag == false) {
                if (Host_group_scan::can_delete_host_from_nagios($conn, $host, $hgname)) {
                    $q = new NagiosAdm();
                    $q->delHost(new NagiosHost($host, $host, ""));
                    $q->close();
                }
            }
        }
    }
    if ($nagios) {
        if (Host_group_scan::in_host_group_scan($conn, $hgname, 2007)) {
            Host_group_scan::delete($conn, $hgname, 2007);
        }
        Host_group_scan::insert($conn, $hgname, 2007);
        $q = new NagiosAdm();
        $q->addNagiosHostGroup(new NagiosHostGroup($hgname, $hosts, $sensors), $conn);
        $q->close();
    } else {
        if (Host_group_scan::in_host_group_scan($conn, $hgname, 2007)) {
            Host_group_scan::delete($conn, $hgname, 2007);
        }
    }
    Host_group::update($conn, $hgname, $threshold_c, $threshold_a, $rrd_profile, $sensors, $hosts, $descr);
    $db->close($conn);
    Util::clean_json_cache_files("(policy|vulnmeter|hostgroup)");
}
if (isset($_SESSION['_hostgroup'])) {
    unset($_SESSION['_hostgroup']);
}
if ($_SESSION["menu_sopc"] == "Host groups" && POST('withoutmenu') != "1") {
    ?>