include "../hmenu.php"; ?> <h1> <?php echo gettext("Delete Agentless Host"); ?> </h1> <?php $txt_error = null; ossim_valid($ip, OSS_IP_ADDR, 'illegal:' . _("Ip Address")); if (ossim_error()) { $txt_error = ossim_get_error(); } else { $db = new ossim_db(); $conn = $db->connect(); $res = Agentless::delete_host_ossec($conn, $ip); $txt_error = $res == false ? _("Error to delete host from .passlist") : null; if ($txt_error == null) { $res = Agentless::delete_host_data($conn, $ip); $txt_error = $res == false ? _("Error to delete host") : null; } $db->close($conn); } if (!empty($txt_error)) { Util::print_error($txt_error); Util::make_form("POST", "agentless.php"); } else { echo "<p>" . _("Host succesfully deleted") . "</p>"; echo "<script>document.location.href='agentless.php'</script>"; } ?>