Exemple #1
0
if (POST('withoutmenu') != "1") {
    include "../hmenu.php";
    $get_param = "ip={$ip}&name=" . urlencode($sname);
} else {
    $get_param = "ip={$ip}&name=" . urlencode($sname) . "&withoutmenu=1";
}
if (POST('insert') && !empty($sname)) {
    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", "modifysensorform.php?" . $get_param);
        die;
    }
    $db = new ossim_db();
    $conn = $db->connect();
    Sensor::update($conn, $sname, $ip, $priority, $port, $tzone, $descr);
    $db->close($conn);
    Util::clean_json_cache_files("sensors");
}
if (isset($_SESSION['_sensor'])) {
    unset($_SESSION['_sensor']);
}
?>
    <script type='text/javascript'>document.location.href="modifysensorform.php?<?php 
echo $get_param;
?>
&update=1"</script>

</body>
</html>