Esempio n. 1
0
            
            <a href="policy.php">
                <?php 
    echo _("No");
    ?>
 
            </a>
        </p>
        <?php 
    if (GET('activate') == "change") {
        $db = new ossim_db();
        $conn = $db->connect();
        $ids = explode(",", $id);
        foreach ($ids as $id) {
            if ($id != "") {
                Policy::activate($conn, $id);
            }
        }
        $db->close();
    }
    exit;
}
$db = new ossim_db();
$conn = $db->connect();
$ids = explode(",", $id);
foreach ($ids as $id) {
    if ($id != "") {
        if (!Policy::is_visible($conn, $id)) {
            die(ossim_error(_("You do not have permission to edit this policy")));
        } else {
            Policy::delete($conn, $id);
Esempio n. 2
0
        echo gettext("Yes");
        ?>
</a>
					&nbsp;&nbsp;&nbsp;<a href="sensor.php" class="buttonlink">
					<?php 
        echo gettext("No");
        ?>
</a>
            </p>
            <?php 
        exit;
    } else {
        // delete sensor and deactivate policy
        require_once 'classes/Policy.inc';
        foreach ($list_policy_sensor_reference as $policy_sensor_reference) {
            Policy::activate($conn, $policy_sensor_reference->get_policy_id(), '0');
        }
    }
}
//
if ($sensor_interface_list = Sensor_interfaces::get_list($conn, $name)) {
    foreach ($sensor_interface_list as $s_int) {
        Sensor_interfaces::delete_interfaces($conn, $name, $s_int->get_interface());
    }
}
Sensor::delete($conn, $name);
$db->close($conn);
Util::clean_json_cache_files("sensors");
?>

    <p> <?php