".$lang_label["delete_event_ok"].""; audit_db($id_user,$REMOTE_ADDR, "Event deleted","Deleted event: ".return_event_description ($id_evento)); } } else { audit_db($id_user,$REMOTE_ADDR, "ACL Violation", "Trying to delete event ID".$id_evento); } } // Check Event (only incident write access). if (isset($_GET["check"])){ $id_evento = $_GET["check"]; // Look for event_id following parameters: id_group. $id_group = gime_idgroup_from_idevent($id_evento); if (give_acl($config["id_user"], $id_group, "IW") ==1){ $sql2="UPDATE tevento SET estado = 1, id_usuario = '".$config["id_user"]."' WHERE id_evento = ".$id_evento; $result2=mysql_query($sql2); if ($result2) { echo "

".$lang_label["validate_event_ok"]."

"; audit_db($config["id_user"],$REMOTE_ADDR, "Event validated","Validate event: ".return_event_description ($id_evento)); } else { echo "

".$lang_label["validate_event_failed"]."

"; } } else { audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to checkout event ".return_event_description ($id_evento)); } } // Mass-process DELETE if (isset($_POST["deletebt"])){ $count=0; while ($count <= $config["block_size"]){ if (isset($_POST["eventid".$count])){ $event_id = $_POST["eventid".$count]; // Look for event_id following parameters: id_group. $id_group = gime_idgroup_from_idevent($event_id); if (give_acl($id_user, $id_group, "IM") ==1){ mysql_query("DELETE FROM tevento WHERE id_evento = ".$event_id); audit_db($id_user,$REMOTE_ADDR, "Event deleted","Deleted event: ".return_event_description ($event_id)); } else { audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to delete event ".return_event_description ($event_id)); } } $count++; } } // Mass-process UPDATE if (isset($_POST["updatebt"])){ $count=0; while ($count <= $config["block_size"]){ if (isset($_POST["eventid".$count])){ $id_evento = $_POST["eventid".$count]; $id_group = gime_idgroup_from_idevent($id_evento); if (give_acl($id_user, $id_group, "IW") ==1){ $sql2="UPDATE tevento SET estado=1, id_usuario = '".$id_user."' WHERE estado = 0 AND id_evento = ".$id_evento; $result2=mysql_query($sql2); audit_db($id_user,$REMOTE_ADDR, "Event validated","Validate event: ".return_event_description ($id_evento)); } else { audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to checkout event ID".$id_evento); } } $count++; } } // *********************************************************************** // Main code form / page // *********************************************************************** // Get data $offset = get_parameter ( "offset",0); $ev_group = get_parameter ("ev_group", 0); // group $search = get_parameter ("search", ""); // free search $event_type = get_parameter ("event_type", "all"); // 0 all $severity = get_parameter ("severity", -1); // -1 all $status = get_parameter ("status", 0); // -1 all, 0 only red, 1 only green $id_agent = get_parameter ("id_agent", -1); $sql_post = ""; if ($ev_group > 1) $sql_post .= " AND id_grupo = $ev_group"; if ($status == 1) $sql_post .= " AND estado = 1"; if ($status == 0) $sql_post .= " AND estado = 0"; if ($search != "") $sql_post .= " AND evento LIKE '%$search%'"; if ($event_type != "all") $sql_post .= " AND event_type = '$event_type'"; if ($severity != -1) $sql_post .= " AND criticity >= $severity"; if ($id_agent != -1) $sql_post .= " AND id_agente = $id_agent"; $url = "index.php?sec=eventos&sec2=operation/events/events&search=$search&event_type=$event_type&severity=$severity&status=$status&ev_group=$ev_group&refr=60&id_agent=$id_agent"; echo "

".$lang_label["events"]." > ".lang_string ("event_main_view"). " "; if ($config["pure"] == 1) echo ""; else echo ""; echo "

"; echo ""; echo "".lang_string("Event control filter")." ".''; if ($config["pure"] == 1) echo "