예제 #1
0
파일: newnet.php 프로젝트: jhbsz/ossimTest
if (POST('withoutmenu') != "1") {
    include "../hmenu.php";
    $get_param = "withoutmenu=0";
} else {
    $get_param = "name={$net_name}&withoutmenu=1";
}
if (POST('insert')) {
    if ($error == true) {
        $txt_error = "<div>" . _("We Found the following errors") . ":</div><div style='padding:10px;'>" . implode("<br/>", $message_error) . "</div>";
        Util::print_error($txt_error);
        Util::make_form("POST", "newnetform.php?" . $get_param);
        die;
    }
    $db = new ossim_db();
    $conn = $db->connect();
    Net::insert($conn, $net_name, $cidr, $asset, $threshold_c, $threshold_a, $rrd_profile, $alert, $persistence, $sensors, $descr, $icon);
    //if ( POST('nessus') ) { Net_scan::insert($conn, $net_name, 3001, 0); }
    if ($nagios) {
        Net_scan::insert($conn, $net_name, 2007, 0);
    }
    $db->close($conn);
    Util::clean_json_cache_files("(policy|vulnmeter|hostgroup)");
}
if (isset($_SESSION['_net'])) {
    unset($_SESSION['_net']);
}
if ($_SESSION["menu_sopc"] == "Networks" && POST('withoutmenu') != "1") {
    ?>
	<p> <?php 
    echo gettext("Network succesfully inserted");
    ?>