"/> </head> <body> <?php if (POST('insert')) { if ($data['status'] == 'error') { $txt_error = "<div>" . _("The following errors occurred") . ":</div>\n \t\t\t\t\t <div style='padding: 2px 10px 5px 10px;'>" . implode("<br/>", $validation_errors) . "</div>"; $config_nt = array('content' => $txt_error, 'options' => array('type' => 'nf_error', 'cancel_button' => false), 'style' => 'width: 80%; margin: 20px auto; text-align: left;'); $nt = new Notification('nt_1', $config_nt); $nt->show(); exit; } $db = new ossim_db(); $conn = $db->connect(); $new_id = Net_group::insert($conn, $ctx, $ngname, $rrd_profile, $networks, $descr); $db->close(); Util::memcacheFlush(); } ?> <script type='text/javascript'> if (!parent.is_lightbox_loaded(window.name)) { document.location.href="netgroup.php?msg=saved"; } else { document.location.href="netgroup_form.php?id=<?php echo $new_id; ?> &msg=saved";
if (POST('withoutmenu') != "1") { include "../hmenu.php"; $get_param = "withoutmenu=0"; } else { $get_param = "name={$ngname}&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", "newnetgroupform.php?" . $get_param); die; } $db = new ossim_db(); $conn = $db->connect(); Net_group::insert($conn, $ngname, $threshold_c, $threshold_a, $rrd_profile, $networks, $descr); /*if (POST('nessus')) { Net_group_scan::insert($conn, $ngname, 3001, 0); }*/ $db->close($conn); Util::clean_json_cache_files("(policy|vulnmeter|hostgroup)"); } if (isset($_SESSION['_netgroup'])) { unset($_SESSION['_netgroup']); } if ($_SESSION["menu_sopc"] == "Network groups" && POST('withoutmenu') != "1") { ?> <p> <?php echo gettext("Network Group succesfully inserted"); ?> </p> <script type='text/javascript'>document.location.href="netgroup.php"</script> <?php