// Additions to Pandora FMS 1.2 graph code and new XML reporting template management // Copyright (c) 2005-2007 Artica Soluciones Tecnologicas, info@artica.es // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Load global vars require("include/config.php"); if (comprueba_login() == 0) { $id_agente = give_parameter_get_numeric("id_agente"); if ($id_agente != -1){ // get group for this id_agente $query="SELECT * FROM tagente WHERE id_agente = ".$id_agente; $res=mysql_query($query); $row=mysql_fetch_array($res); $id_grupo = $row["id_grupo"]; $id_usuario=$_SESSION["id_usuario"]; if (give_acl($id_usuario, $id_grupo, "AR")==1){ // Check for validate alert request $validate_alert = give_parameter_get ("validate_alert"); if ($validate_alert != ""){ if (give_acl($id_usuario, $id_grupo, "AW")==1){ $alert_name = get_db_value ("descripcion", "talerta_agente_modulo", "id_aam", $validate_alert); event_insert ("Manual validation of alert for '$alert_name'", $id_grupo, $id_agente, 1, $id_usuario); $sql='UPDATE talerta_agente_modulo SET times_fired = 0, internal_counter = 0 WHERE id_aam = '.$validate_alert; $result=mysql_query($sql); } } // Check for Network FLAG change request if (isset($_GET["flag"])){ if ($_GET["flag"]==1){ if (give_acl($id_usuario, $id_grupo, "AW")==1){ $query ="UPDATE tagente_modulo SET flag=1 WHERE id_agente_modulo = ".$_GET["id_agente_modulo"]; $res=mysql_query($query); } } } if (give_acl($id_usuario,$id_grupo, "AR") == 1){ echo ""; if (isset($_GET["tab"])) $tab = $_GET["tab"]; else $tab = "main"; echo ""; echo "
"; switch ($tab) { /* http://pandora.localhost/index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente=600 */ case "manage": require "estado_generalagente.php"; break; case "main": require "estado_generalagente.php"; require "estado_monitores.php"; require "estado_alertas.php"; break; case "data": require "estado_ultimopaquete.php"; break; case "alert": require "estado_alertas.php"; break; } } else { audit_db($id_usuario,$REMOTE_ADDR, "ACL Violation","Trying to read data from agent ".dame_nombre_agente($id_agente)); require ("general/noaccess.php"); } } else { audit_db($id_usuario,$REMOTE_ADDR, "ACL Violation","Trying to access (read) to agent ".dame_nombre_agente($id_agente)); include ("general/noaccess.php"); } } } ?>