".$lang_label["delete_event_ok"]."";} } else { audit_db($id_usuario,$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($id_usuario, $id_group, "IW") ==1){ $sql2="UPDATE tevento SET estado=1, id_usuario = '".$id_usuario."' WHERE id_evento = ".$id_evento; $result2=mysql_query($sql2); if ($result2) { echo "

".$lang_label["validate_event_ok"]."

";} } else { audit_db($id_usuario,$REMOTE_ADDR, "ACL Violation","Trying to checkout event ID".$id_evento); } } // Mass-process DELETE if (isset($_POST["deletebt"])){ $count=0; while ($count <= $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_usuario, $id_group, "IM") ==1){ mysql_query("DELETE FROM tevento WHERE id_evento =".$event_id); } else { audit_db($id_usuario,$REMOTE_ADDR, "ACL Violation","Trying to delete event ID".$id_evento); } } $count++; } } // Mass-process UPDATE if (isset($_POST["updatebt"])){ $count=0; while ($count <= $block_size){ if (isset($_POST["eventid".$count])){ $id_evento = $_POST["eventid".$count]; $id_group = gime_idgroup_from_idevent($id_evento); if (give_acl($id_usuario, $id_group, "IW") ==1){ $sql2="UPDATE tevento SET estado=1, id_usuario = '".$id_usuario."' WHERE estado = 0 AND id_evento = ".$id_evento; $result2=mysql_query($sql2); } else { audit_db($id_usuario,$REMOTE_ADDR, "ACL Violation","Trying to checkout event ID".$id_evento); } } $count++; } } echo "

".$lang_label["events"]."

"; echo "

".$lang_label["event_main_view"]." ".$lang_label["help"]."

"; echo ""; if (isset($_POST["ev_group"])) { $ev_group = $_POST["ev_group"]; } else { $ev_group = -1; } echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
".$lang_label["group"].""; echo ""; echo ""; echo " - ".$lang_label["validated_event"]; echo "
"; echo " - ".$lang_label["not_validated_event"]; echo "
"; echo " - ".$lang_label["validate_event"]; echo "
"; echo " - ".$lang_label["delete_event"]; echo "
".$lang_label["events"].""; echo ""; echo ""; echo ""; echo ""; echo "
"; echo "
"; //pagination $total_eventos = count($event_list); pagination($total_eventos, "index.php?sec=eventos&sec2=operation/events/events", $offset); if (isset($_GET["offset"])){ $offset=entrada_limpia($_GET["offset"]); } else { $offset=0; } echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "'; echo ""; $color = 1; $id_evento = 0; if ($offset !=0) $offset_limit = $offset +1; else $offset_limit = $offset; // Skip offset records for ($a=$offset_limit;$a < ($block_size + $offset + 1);$a++){ if (isset($event_list[$a])) { $id_evento = $event_list[$a]; if ($id_evento != ""){ if (isset($_POST["event"])) { $event = entrada_limpia($_POST["event"]); if ($event=="All") { if (isset($ev_group) && ($ev_group > 1)) { $sql="SELECT * FROM tevento WHERE id_evento = '$id_evento' AND id_grupo = '$ev_group'"; } else { $sql="SELECT * FROM tevento WHERE id_evento = '$id_evento'"; } } else { if (isset($ev_group) && ($ev_group > 1)) { $sql="SELECT * FROM tevento WHERE evento= '$event' AND id_evento = '$id_evento' AND id_grupo = '$ev_group'"; } else { $sql="SELECT * FROM tevento WHERE evento= '$event' AND id_evento = '$id_evento'"; } } } else { $sql="SELECT * FROM tevento WHERE id_evento = $id_evento"; } $result=mysql_query($sql); $row=mysql_fetch_array($result); $id_group = $row["id_grupo"]; if ($color == 1){ $tdcolor = "datos"; $color = 0; } else { $tdcolor = "datos2"; $color = 1; } //if (give_acl($id_usuario, $id_group, "IR") == 1){ // Only incident read access to view data $offset_counter++; echo ""; echo ""; //} } } } echo ""; echo "
".$lang_label["status"]."".$lang_label["event_name"]."".$lang_label["agent_name"]."".$lang_label["group"]."".$lang_label["id_user"]."".$lang_label["timestamp"]."".$lang_label["action"].""; echo ""; echo '
"; if ($row["estado"] == 0) echo ""; else echo ""; echo "".$row["evento"]; if ($row["id_agente"] > 0){ echo "".dame_nombre_agente($row["id_agente"]).""; echo " ( ".dame_grupo($id_group)." )"; } else { // for SNMP generated alerts echo "".$lang_label["alert"]." / SNMP"; echo ""; } if ($row["estado"] <> 0) echo " ".dame_nombre_real($row["id_usuario"])."".substr($row["id_usuario"],0,8).""; echo "".$row["timestamp"]; echo ""; if (($row["estado"] == 0) and (give_acl($id_usuario,$id_group,"IW") ==1)) echo ""; if (give_acl($id_usuario,$id_group,"IM") ==1) echo ""; echo ""; echo ""; echo "
"; echo " "; if (give_acl($id_usuario, 0,"IM") ==1){ echo ""; } echo "
"; } else {echo "
".$lang_label["no_event"]."
";} } else { audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to access event viewer"); require ("general/noaccess.php"); } } ?>