From 861f1a309d18fa8c425ce27b71bd6ee93047e3f6 Mon Sep 17 00:00:00 2001 From: raulmateos Date: Mon, 17 Jul 2006 16:37:43 +0000 Subject: [PATCH] (Pandora Console) * exportdata.php. Add a line at the end of table git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@141 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/CHANGELOG | 2 + .../operation/agentes/exportdata.php | 49 +++++++++++++------ 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/pandora_console/CHANGELOG b/pandora_console/CHANGELOG index 3dda21fc7c..e11dd46bdf 100644 --- a/pandora_console/CHANGELOG +++ b/pandora_console/CHANGELOG @@ -1,5 +1,7 @@ 2006-07-17 Raul Mateos + * exportdata.php. Add a line at the end of table + * view_server.php. Add different colors between rows (cosmetic changes) * Some headers changed to show the "official" GPL Header info diff --git a/pandora_console/operation/agentes/exportdata.php b/pandora_console/operation/agentes/exportdata.php index b19738bfc3..8eb9349fc3 100644 --- a/pandora_console/operation/agentes/exportdata.php +++ b/pandora_console/operation/agentes/exportdata.php @@ -1,12 +1,25 @@ , 2003-2006 -// Raul Mateos , 2005-2006 -// Load global variables +// Pandora - the Free monitoring system +// ==================================== +// Copyright (c) 2004-2006 Sancho Lerena, slerena@gmail.com +// Copyright (c) 2005-2006 Artica Soluciones Tecnologicas S.L, info@artica.es +// Copyright (c) 2004-2006 Raul Mateos Martin, raulofpandora@gmail.com +// 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; either version 2 +// of the License, or (at your option) any later version. +// 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_user = $_SESSION["id_usuario"]; if ( (give_acl($id_user, 0, "AR")==1) OR (give_acl($id_user, 0, "AW")==1) ){ @@ -29,9 +42,9 @@ if (comprueba_login() == 0) $to_date=$_POST["to_date"]; echo $lang_label["db_agent_bra"]."".dame_nombre_agente($origen)."".$lang_label["from2"]."".$from_date."".$lang_label["to2"]."".$to_date."
"; if ($csv == 0){ - echo "
".$lang_label["module"]."".$lang_label["data"]."Timestamp"; - $separador_1 = "
"; - $separador_2 = ""; + echo "
"; + $separador_1 = ""; + } echo "
".$lang_label["module"]."".$lang_label["data"]."Timestamp
"; + $separador_2 = ""; $separador_3= ""; } else { $separador_1 = "
'"; @@ -44,9 +57,9 @@ if (comprueba_login() == 0) $sql1='SELECT * FROM tdatos WHERE id_agente = '.$origen; $tipo = dame_nombre_tipo_modulo(dame_id_tipo_modulo_agentemodulo($id_modulo)); if ($tipo == "generic_data_string") - $sql1='SELECT * FROM tagente_datos_string WHERE timestamp > "'.$from_date.'" AND timestamp < "'.$to_date.'" AND id_agente_modulo ='.$id_modulo.' ORDER BY timestamp desc'; + $sql1='SELECT * FROM tagente_datos_string WHERE timestamp > "'.$from_date.'" AND timestamp < "'.$to_date.'" AND id_agente_modulo ='.$id_modulo.' ORDER BY timestamp DESC'; else - $sql1='SELECT * FROM tagente_datos WHERE timestamp > "'.$from_date.'" AND timestamp < "'.$to_date.'" AND id_agente_modulo ='.$id_modulo.' ORDER BY timestamp desc'; + $sql1='SELECT * FROM tagente_datos WHERE timestamp > "'.$from_date.'" AND timestamp < "'.$to_date.'" AND id_agente_modulo ='.$id_modulo.' ORDER BY timestamp DESC'; $result1=mysql_query($sql1); while ($row=mysql_fetch_array($result1)){ echo $separador_1; @@ -58,13 +71,17 @@ if (comprueba_login() == 0) echo $separador_3; } } + if ($csv == 0) { + echo "
"; - }else echo "".$lang_label["no_sel_mod"].""; + + } else echo "".$lang_label["no_sel_mod"].""; } } else { // Form view ?>

-

 

+

 

@@ -103,7 +120,7 @@ if (comprueba_login() == 0) } } ?> -


+


-

+
">
@@ -199,4 +216,4 @@ if (comprueba_login() == 0) audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to access Agent Export Data"); require ("general/noaccess.php"); } -?> +?> \ No newline at end of file