Ejemplo n.º 1
0
$db = new ossim_db();
$conn = $db->connect();
$edit = GET('action') == 'edit' ? true : false;
$ref = GET('ref');
ossim_valid($ref, OSS_LETTER, 'illegal:' . _("Reference"));
$conf = $GLOBALS["CONF"];
$map_key = $conf->get_conf("google_maps_key", FALSE);
if (ossim_error()) {
    die(ossim_error());
}
if ($edit) {
    if (!ossim_valid(GET('incident_id'), OSS_DIGIT, 'illegal:' . _("Incidend id"))) {
        die(ossim_error());
    }
    $incident_id = GET('incident_id');
    $list = Incident::get_list($conn, "WHERE incident.id={$incident_id}");
    if (count($list) != 1) {
        die(ossim_error(_("You don't have permission to see this page"), "NOTICE"));
    }
    $incident = $list[0];
    $title = $incident->get_title();
    $submitter = $incident->get_submitter();
    $priority = $incident->get_priority();
    $event_start = $incident->get_event_start();
    $event_end = $incident->get_event_end();
    $type = $incident->get_type();
    $in_charge = $incident->get_in_charge();
    switch ($ref) {
        case 'Alarm':
            list($alarm) = Incident_alarm::get_list($conn, "WHERE incident_alarm.incident_id={$incident_id}");
            $src_ips = $alarm->get_src_ips();
Ejemplo n.º 2
0
    exit;
}
$db = new ossim_db();
$conn = $db->connect();
//Timezone
$tz = Util::get_timezone();
$timetz = gmdate("U") + 3600 * $tz;
//Edit incident
if ($edit) {
    $action = 'editincident';
    $incident_id = GET('incident_id');
    if (!ossim_valid($incident_id, OSS_DIGIT, 'illegal:' . _('Incidend ID'))) {
        echo ossim_error();
        exit;
    }
    $list = Incident::get_list($conn, "AND incident.id={$incident_id}");
    if (count($list) != 1) {
        echo ossim_error(_('Error! Incident ID not found in database'));
        exit;
    }
    $incident = $list[0];
    $title = $incident->get_title();
    $submitter = $incident->get_submitter();
    $priority = $incident->get_priority();
    $type = $incident->get_type();
    $in_charge = $incident->get_in_charge();
    $event_start = $incident->get_event_start();
    $event_end = $incident->get_event_end();
    switch ($ref) {
        case 'Alarm':
            list($alarm) = Incident_alarm::get_list($conn, "WHERE incident_alarm.incident_id={$incident_id}");