Exemple #1
0
		&nbsp;&nbsp;&nbsp;<a href="net.php">
		<?php 
    echo gettext("No");
    ?>
 </a>
    </p>
<?php 
    exit;
}
require_once 'ossim_db.inc';
require_once 'ossim_conf.inc';
require_once 'classes/Net.inc';
require_once 'classes/Net_scan.inc';
$db = new ossim_db();
$conn = $db->connect();
if (Net::can_delete($conn, $name)) {
    $conf = $GLOBALS["CONF"];
    $version = $conf->get_conf("ossim_server_version", FALSE);
    if (!preg_match("/pro|demo/i", $version)) {
        Net::delete($conn, $name);
    } else {
        Net::delete($conn, $name, 0, 0);
    }
    // also delete linked nets in templates
    Net_scan::delete($conn, $name, 3001);
    Net_scan::delete($conn, $name, 2007);
} else {
    echo "ERROR_CANNOT";
}
$db->close($conn);
?>