Example #1
0
ossim_valid($model, OSS_TEXT, OSS_NULLABLE, OSS_SPACE, '#', 'illegal: model');
ossim_valid($serial, OSS_TEXT, OSS_NULLABLE, OSS_SPACE, '#', 'illegal: serial');
ossim_valid($mounting, OSS_TEXT, OSS_NULLABLE, OSS_SPACE, 'illegal: mounting');
ossim_valid($action, OSS_ALPHA, OSS_SCORE, OSS_NULLABLE, 'illegal: action');
ossim_valid($layer, OSS_DIGIT, OSS_NULLABLE, 'illegal: layer');
if (ossim_error()) {
    die(ossim_error());
}
require_once 'ossim_db.inc';
$db = new ossim_db();
$conn = $db->connect();
if ($action == "add" && $location != "") {
    Wireless::add_location($conn, $location, $desc);
}
if ($action == "del" && $location != "") {
    Wireless::del_location($conn, $location);
}
if ($action == "add_sensor" && $location != "" && $sensor != "") {
    Wireless::add_locations_sensor($conn, $location, $sensor, $model, $serial, $mounting);
}
if ($action == "del_sensor" && $location != "" && $sensor != "") {
    Wireless::del_locations_sensor($conn, $location, $sensor);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title> <?php 
echo gettext("OSSIM Framework");
?>
 </title>