pandorafms/pandora_console/operation/agentes/exportdata.php

332 lines
13 KiB
PHP
Raw Normal View History

<?php
2007-03-28 Sancho Lerena <slerena@artica.es> * tip.css, pandora.css: Some updates to fix render in tooltips and datos3 background color. * config.php: Version update. * operation/menu.php: Added reporting suboption: Custom Graph Builder. * operation/reporting/graph_builder.php: New custom and combined graphic generator that uses new function from fgraph graphic_combined_module(). * reporting/fgraph.php: new function graphic_combined_module() to generate combined graphs. Needs to finish implementation to show alerts and evetns (most work done). Function grafico_db_agentes_purge() now uses Pear Graph instead jpgraph. * operation/agents/exportdata.php: Now uses indexes and improve the overall speed. * operation/agents/estado_grupo.php: Rewritten version, much more fast than previous. * operation/events/events.php: Fixed code to mass delete/update and added some audit control points. * pandora_db.php: audit_db() now uses utimestamp. event_insert() now uses utimestamp. Added function give_agent_id_from_module_id(). * operation/agents/estado_ultimopaquete.php: Now render in red timestamp for "outdated" data. Fixes some minor problems with module groups and interval rendering. * operation/agents/estado_monitores.php: now uses utimestamp. * operation/agents/ver_agente.php: Uses lang_label labels for some texts. Fixed image bug. * operation/servers/view_server.php: Added version of server and some cosmetic adjustments. * godmode/db/db_main.php: Applied new graphic. * godmode/agentes/module_manager.php: Now sort by modulegroup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-03-28 18:07:29 +02:00
// Pandora FMS - the Free monitoring system
// ========================================
// Copyright (c) 2004-2007 Sancho Lerena, slerena@gmail.com
// Main PHP/SQL code development and project architecture and management
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
// Copyright (c) 2007 Leandro Doctors, ldoctors@gusila.org.ar
// For code belongs to average_per_hourday matrix report code
// Copyright (c) 2004-2007 Raul Mateos Martin, raulofpandora@gmail.com
// CSS and some PHP code additions
// Copyright (c) 2006-2007 Jonathan Barajas, jonathan.barajas[AT]gmail[DOT]com
// Javascript Active Console code.
// Copyright (c) 2006 Jose Navarro <contacto@indiseg.net>
// Additions to code for Pandora FMS 1.2 graph code and new XML reporting template managemement
2007-03-28 Sancho Lerena <slerena@artica.es> * tip.css, pandora.css: Some updates to fix render in tooltips and datos3 background color. * config.php: Version update. * operation/menu.php: Added reporting suboption: Custom Graph Builder. * operation/reporting/graph_builder.php: New custom and combined graphic generator that uses new function from fgraph graphic_combined_module(). * reporting/fgraph.php: new function graphic_combined_module() to generate combined graphs. Needs to finish implementation to show alerts and evetns (most work done). Function grafico_db_agentes_purge() now uses Pear Graph instead jpgraph. * operation/agents/exportdata.php: Now uses indexes and improve the overall speed. * operation/agents/estado_grupo.php: Rewritten version, much more fast than previous. * operation/events/events.php: Fixed code to mass delete/update and added some audit control points. * pandora_db.php: audit_db() now uses utimestamp. event_insert() now uses utimestamp. Added function give_agent_id_from_module_id(). * operation/agents/estado_ultimopaquete.php: Now render in red timestamp for "outdated" data. Fixes some minor problems with module groups and interval rendering. * operation/agents/estado_monitores.php: now uses utimestamp. * operation/agents/ver_agente.php: Uses lang_label labels for some texts. Fixed image bug. * operation/servers/view_server.php: Added version of server and some cosmetic adjustments. * godmode/db/db_main.php: Applied new graphic. * godmode/agentes/module_manager.php: Now sort by modulegroup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-03-28 18:07:29 +02:00
// 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
2007-03-28 Sancho Lerena <slerena@artica.es> * tip.css, pandora.css: Some updates to fix render in tooltips and datos3 background color. * config.php: Version update. * operation/menu.php: Added reporting suboption: Custom Graph Builder. * operation/reporting/graph_builder.php: New custom and combined graphic generator that uses new function from fgraph graphic_combined_module(). * reporting/fgraph.php: new function graphic_combined_module() to generate combined graphs. Needs to finish implementation to show alerts and evetns (most work done). Function grafico_db_agentes_purge() now uses Pear Graph instead jpgraph. * operation/agents/exportdata.php: Now uses indexes and improve the overall speed. * operation/agents/estado_grupo.php: Rewritten version, much more fast than previous. * operation/events/events.php: Fixed code to mass delete/update and added some audit control points. * pandora_db.php: audit_db() now uses utimestamp. event_insert() now uses utimestamp. Added function give_agent_id_from_module_id(). * operation/agents/estado_ultimopaquete.php: Now render in red timestamp for "outdated" data. Fixes some minor problems with module groups and interval rendering. * operation/agents/estado_monitores.php: now uses utimestamp. * operation/agents/ver_agente.php: Uses lang_label labels for some texts. Fixed image bug. * operation/servers/view_server.php: Added version of server and some cosmetic adjustments. * godmode/db/db_main.php: Applied new graphic. * godmode/agentes/module_manager.php: Now sort by modulegroup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-03-28 18:07:29 +02:00
// 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.
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
function give_average_from_module ($id_agente, $id_agente_modulo, $hour, $day, $start_date, $end_date){
// Return average value from an agentmodule, for a specific hour of specific day of week,
// Only valid for non-string kind of data.
require ("include/config.php");
$query1 = "SELECT AVG(datos)
FROM tagente_datos
WHERE id_agente_modulo = ". $id_agente_modulo."
AND HOUR(timestamp) = ".$hour."
AND WEEKDAY(timestamp) = ".$day."
AND timestamp >= '$start_date'
AND timestamp <= '$end_date'";
if (($resq1 = mysql_query($query1)) AND ($row=mysql_fetch_array($resq1)))
return $row[0];
else
return 0;
}
function generate_average_table ($id_de_mi_agente, $id_agente_modulo, $fecha_inicio, $fecha_fin){
// Genera una tabla con los promedios de los datos de un módulo no-string
require ("include/config.php");
require ("include/languages/language_".$language_code.".php");
$dias_de_la_semana = array ($lang_label["sunday"],$lang_label["monday"],$lang_label["tuesday"],$lang_label["wednesday"],$lang_label["thurdsday"],$lang_label["friday"],$lang_label["saturday"]);
$nombre_modulo = dame_nombre_modulo_agentemodulo($id_agente_modulo);
// Table header
echo "<table border=0 cellpadding=4 cellspacing=4 width=600 class='databox'>";
echo "<tbody><tr><th rowspan=\"2\">".$lang_label["hour"]."</th>";
echo "<th colspan=\"7\">".$lang_label["day"]."</Th></tr>";
echo "<tr>";
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
for ($dia=0;$dia<7;++$dia)
echo "<th>".$dias_de_la_semana[$dia]."</th>";
echo "</tr>";
$color = 0;
for ($hora=0;$hora<24;++$hora){
if ($color == 1){
$tdcolor = "datos";
$color = 0;
} else {
$tdcolor = "datos2";
$color = 1;
}
echo "<tr><th class='datos3'> $hora ".$lang_label["hr"]."</th>";
for ($dia=0; $dia<7; ++$dia){
echo "<td class='$tdcolor'>";
echo format_numeric (give_average_from_module ($id_de_mi_agente, $id_agente_modulo, $hora, $dia, $fecha_inicio, $fecha_fin));
echo "</td >";
}
echo "</tr>";
}
echo "</tbody></table>";
}
// ----------------------------------
// Main code
// ----------------------------------
// Load global vars
require("include/config.php");
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
// Security checks
if (comprueba_login() != 0) {
2007-03-28 Sancho Lerena <slerena@artica.es> * tip.css, pandora.css: Some updates to fix render in tooltips and datos3 background color. * config.php: Version update. * operation/menu.php: Added reporting suboption: Custom Graph Builder. * operation/reporting/graph_builder.php: New custom and combined graphic generator that uses new function from fgraph graphic_combined_module(). * reporting/fgraph.php: new function graphic_combined_module() to generate combined graphs. Needs to finish implementation to show alerts and evetns (most work done). Function grafico_db_agentes_purge() now uses Pear Graph instead jpgraph. * operation/agents/exportdata.php: Now uses indexes and improve the overall speed. * operation/agents/estado_grupo.php: Rewritten version, much more fast than previous. * operation/events/events.php: Fixed code to mass delete/update and added some audit control points. * pandora_db.php: audit_db() now uses utimestamp. event_insert() now uses utimestamp. Added function give_agent_id_from_module_id(). * operation/agents/estado_ultimopaquete.php: Now render in red timestamp for "outdated" data. Fixes some minor problems with module groups and interval rendering. * operation/agents/estado_monitores.php: now uses utimestamp. * operation/agents/ver_agente.php: Uses lang_label labels for some texts. Fixed image bug. * operation/servers/view_server.php: Added version of server and some cosmetic adjustments. * godmode/db/db_main.php: Applied new graphic. * godmode/agentes/module_manager.php: Now sort by modulegroup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-03-28 18:07:29 +02:00
require ("general/noaccess.php");
exit;
}
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
$id_user = $_SESSION["id_usuario"];
if ( (give_acl($id_user, 0, "AR")==0) AND (give_acl($id_user, 0, "AW")==0) ){
require ("general/noaccess.php");
exit;
}
if ((isset($_POST["export"])) AND (! isset($_POST["update_agent"]))){
if (isset($_POST["export_type"]))
$export_type = $_POST["export_type"];
else
$export_type = 3; // Standard table;
if ($export_type == 1) { // CSV
echo "<h2>".$lang_label["ag_title"]." &gt; ";
echo $lang_label["export_title"]."<a href='help/".$help_code."/chap3.php#336' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h2>";
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
if (isset ($_POST["origen_modulo"])){
$origen = $_POST["origen"];
if (give_acl($id_user, dame_id_grupo($origen), "AR")!=1) {
audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to access Agent Export Data");
require ("general/noaccess.php");
}
$origen_modulo = $_POST["origen_modulo"];
$id_agentemodulo = $origen_modulo[0];
$start_date =$_POST["start_date"];
$end_date=$_POST["end_date"];
$start_time =$_POST["start_time"];
$end_time=$_POST["end_time"];
$from_date = $start_date." ".$start_time;
$to_date = $end_date." ".$end_time;
$agentmodule_name = dame_nombre_modulo_agentemodulo($origen_modulo[0]);
echo $lang_label["db_agent_bra"]. "<b>" . dame_nombre_agente($origen). "- $agentmodule_name</b>". $lang_label["from2"]. "<b>". $from_date. "</b>". $lang_label["to2"]. "<b>". $to_date. "</b><br>";
echo "<a href='operation/agentes/export_csv.php?from_date=$from_date&to_date=$to_date&agent=$origen&agentmodule=$id_agentemodulo'><img src='images/disk.png'> ".$lang_label["get_file"]."</a> pandora_export_$agentmodule_name.txt";
} else
echo "<b class='error'>".$lang_label["no_sel_mod"]."</b>";
}
if ($export_type == 2){ // Avarage day/hour matrix
if (isset ($_POST["origen_modulo"])){
$origen = $_POST["origen"];
$origen_modulo = $_POST["origen_modulo"];
$start_date =$_POST["start_date"];
$end_date=$_POST["end_date"];
$start_time =$_POST["start_time"];
$end_time=$_POST["end_time"];
2007-03-28 Sancho Lerena <slerena@artica.es> * tip.css, pandora.css: Some updates to fix render in tooltips and datos3 background color. * config.php: Version update. * operation/menu.php: Added reporting suboption: Custom Graph Builder. * operation/reporting/graph_builder.php: New custom and combined graphic generator that uses new function from fgraph graphic_combined_module(). * reporting/fgraph.php: new function graphic_combined_module() to generate combined graphs. Needs to finish implementation to show alerts and evetns (most work done). Function grafico_db_agentes_purge() now uses Pear Graph instead jpgraph. * operation/agents/exportdata.php: Now uses indexes and improve the overall speed. * operation/agents/estado_grupo.php: Rewritten version, much more fast than previous. * operation/events/events.php: Fixed code to mass delete/update and added some audit control points. * pandora_db.php: audit_db() now uses utimestamp. event_insert() now uses utimestamp. Added function give_agent_id_from_module_id(). * operation/agents/estado_ultimopaquete.php: Now render in red timestamp for "outdated" data. Fixes some minor problems with module groups and interval rendering. * operation/agents/estado_monitores.php: now uses utimestamp. * operation/agents/ver_agente.php: Uses lang_label labels for some texts. Fixed image bug. * operation/servers/view_server.php: Added version of server and some cosmetic adjustments. * godmode/db/db_main.php: Applied new graphic. * godmode/agentes/module_manager.php: Now sort by modulegroup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-03-28 18:07:29 +02:00
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
$agentmodule_name = dame_nombre_modulo_agentemodulo($origen_modulo[0]);
$from_date = $start_date." ".$start_time;
$to_date = $end_date." ".$end_time;
// Header
echo "<h2>".$lang_label["ag_title"]." &gt; ";
echo $lang_label["export_title"]."<a href='help/".$help_code."/chap3.php#336' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h2>";
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
echo $lang_label["db_agent_bra"]. "<b>" . dame_nombre_agente($origen). "- $agentmodule_name</b>". $lang_label["from2"]. "<b>". $from_date. "</b>". $lang_label["to2"]. "<b>". $to_date. "</b><br>";
echo "<br>";
// For each module
for ($a=0;$a <count($origen_modulo); $a++){
$id_modulo = $origen_modulo[$a];
$tipo = dame_nombre_tipo_modulo(dame_id_tipo_modulo_agentemodulo($id_modulo));
if ($tipo != "generic_data_string")
echo "<br>". generate_average_table ($origen,$id_modulo,$from_date,$to_date);
}
}
}
2007-03-28 Sancho Lerena <slerena@artica.es> * tip.css, pandora.css: Some updates to fix render in tooltips and datos3 background color. * config.php: Version update. * operation/menu.php: Added reporting suboption: Custom Graph Builder. * operation/reporting/graph_builder.php: New custom and combined graphic generator that uses new function from fgraph graphic_combined_module(). * reporting/fgraph.php: new function graphic_combined_module() to generate combined graphs. Needs to finish implementation to show alerts and evetns (most work done). Function grafico_db_agentes_purge() now uses Pear Graph instead jpgraph. * operation/agents/exportdata.php: Now uses indexes and improve the overall speed. * operation/agents/estado_grupo.php: Rewritten version, much more fast than previous. * operation/events/events.php: Fixed code to mass delete/update and added some audit control points. * pandora_db.php: audit_db() now uses utimestamp. event_insert() now uses utimestamp. Added function give_agent_id_from_module_id(). * operation/agents/estado_ultimopaquete.php: Now render in red timestamp for "outdated" data. Fixes some minor problems with module groups and interval rendering. * operation/agents/estado_monitores.php: now uses utimestamp. * operation/agents/ver_agente.php: Uses lang_label labels for some texts. Fixed image bug. * operation/servers/view_server.php: Added version of server and some cosmetic adjustments. * godmode/db/db_main.php: Applied new graphic. * godmode/agentes/module_manager.php: Now sort by modulegroup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-03-28 18:07:29 +02:00
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
if ($export_type == 3) { // Standard table
echo "<h2>".$lang_label["ag_title"]." &gt; ";
echo $lang_label["export_title"]."<a href='help/".$help_code."/chap3.php#336' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h2>";
2007-03-28 Sancho Lerena <slerena@artica.es> * tip.css, pandora.css: Some updates to fix render in tooltips and datos3 background color. * config.php: Version update. * operation/menu.php: Added reporting suboption: Custom Graph Builder. * operation/reporting/graph_builder.php: New custom and combined graphic generator that uses new function from fgraph graphic_combined_module(). * reporting/fgraph.php: new function graphic_combined_module() to generate combined graphs. Needs to finish implementation to show alerts and evetns (most work done). Function grafico_db_agentes_purge() now uses Pear Graph instead jpgraph. * operation/agents/exportdata.php: Now uses indexes and improve the overall speed. * operation/agents/estado_grupo.php: Rewritten version, much more fast than previous. * operation/events/events.php: Fixed code to mass delete/update and added some audit control points. * pandora_db.php: audit_db() now uses utimestamp. event_insert() now uses utimestamp. Added function give_agent_id_from_module_id(). * operation/agents/estado_ultimopaquete.php: Now render in red timestamp for "outdated" data. Fixes some minor problems with module groups and interval rendering. * operation/agents/estado_monitores.php: now uses utimestamp. * operation/agents/ver_agente.php: Uses lang_label labels for some texts. Fixed image bug. * operation/servers/view_server.php: Added version of server and some cosmetic adjustments. * godmode/db/db_main.php: Applied new graphic. * godmode/agentes/module_manager.php: Now sort by modulegroup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-03-28 18:07:29 +02:00
if (isset ($_POST["origen_modulo"])){
$origen = $_POST["origen"];
if (give_acl($id_user,dame_id_grupo($origen),"AR")!=1) {
audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to access Agent Export Data");
require ("general/noaccess.php");
}
2007-03-28 Sancho Lerena <slerena@artica.es> * tip.css, pandora.css: Some updates to fix render in tooltips and datos3 background color. * config.php: Version update. * operation/menu.php: Added reporting suboption: Custom Graph Builder. * operation/reporting/graph_builder.php: New custom and combined graphic generator that uses new function from fgraph graphic_combined_module(). * reporting/fgraph.php: new function graphic_combined_module() to generate combined graphs. Needs to finish implementation to show alerts and evetns (most work done). Function grafico_db_agentes_purge() now uses Pear Graph instead jpgraph. * operation/agents/exportdata.php: Now uses indexes and improve the overall speed. * operation/agents/estado_grupo.php: Rewritten version, much more fast than previous. * operation/events/events.php: Fixed code to mass delete/update and added some audit control points. * pandora_db.php: audit_db() now uses utimestamp. event_insert() now uses utimestamp. Added function give_agent_id_from_module_id(). * operation/agents/estado_ultimopaquete.php: Now render in red timestamp for "outdated" data. Fixes some minor problems with module groups and interval rendering. * operation/agents/estado_monitores.php: now uses utimestamp. * operation/agents/ver_agente.php: Uses lang_label labels for some texts. Fixed image bug. * operation/servers/view_server.php: Added version of server and some cosmetic adjustments. * godmode/db/db_main.php: Applied new graphic. * godmode/agentes/module_manager.php: Now sort by modulegroup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-03-28 18:07:29 +02:00
$origen_modulo = $_POST["origen_modulo"];
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
$agentmodule_name = dame_nombre_modulo_agentemodulo($origen_modulo[0]);
$start_date =$_POST["start_date"];
$end_date=$_POST["end_date"];
$start_time =$_POST["start_time"];
$end_time=$_POST["end_time"];
$from_date = $start_date." ".$start_time;
$to_date = $end_date." ".$end_time;
2007-03-28 Sancho Lerena <slerena@artica.es> * tip.css, pandora.css: Some updates to fix render in tooltips and datos3 background color. * config.php: Version update. * operation/menu.php: Added reporting suboption: Custom Graph Builder. * operation/reporting/graph_builder.php: New custom and combined graphic generator that uses new function from fgraph graphic_combined_module(). * reporting/fgraph.php: new function graphic_combined_module() to generate combined graphs. Needs to finish implementation to show alerts and evetns (most work done). Function grafico_db_agentes_purge() now uses Pear Graph instead jpgraph. * operation/agents/exportdata.php: Now uses indexes and improve the overall speed. * operation/agents/estado_grupo.php: Rewritten version, much more fast than previous. * operation/events/events.php: Fixed code to mass delete/update and added some audit control points. * pandora_db.php: audit_db() now uses utimestamp. event_insert() now uses utimestamp. Added function give_agent_id_from_module_id(). * operation/agents/estado_ultimopaquete.php: Now render in red timestamp for "outdated" data. Fixes some minor problems with module groups and interval rendering. * operation/agents/estado_monitores.php: now uses utimestamp. * operation/agents/ver_agente.php: Uses lang_label labels for some texts. Fixed image bug. * operation/servers/view_server.php: Added version of server and some cosmetic adjustments. * godmode/db/db_main.php: Applied new graphic. * godmode/agentes/module_manager.php: Now sort by modulegroup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-03-28 18:07:29 +02:00
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
echo $lang_label["db_agent_bra"]. "<b>" . dame_nombre_agente($origen). "- $agentmodule_name</b>". $lang_label["from2"]. "<b>". $from_date. "</b>". $lang_label["to2"]. "<b>". $to_date. "</b><br>";
echo "<br><table cellpadding='4' cellspacing='4' width='600' class='databox'>";
echo "<tr><th class='datos'>".$lang_label["module"]."</th><th class=datos>".$lang_label["data"]."<th class='datos'>Timestamp</th>";
// Begin the render !
for ($a=0; $a <count($origen_modulo); $a++){ // For each module (not used multiple modules yet!)
2007-03-28 Sancho Lerena <slerena@artica.es> * tip.css, pandora.css: Some updates to fix render in tooltips and datos3 background color. * config.php: Version update. * operation/menu.php: Added reporting suboption: Custom Graph Builder. * operation/reporting/graph_builder.php: New custom and combined graphic generator that uses new function from fgraph graphic_combined_module(). * reporting/fgraph.php: new function graphic_combined_module() to generate combined graphs. Needs to finish implementation to show alerts and evetns (most work done). Function grafico_db_agentes_purge() now uses Pear Graph instead jpgraph. * operation/agents/exportdata.php: Now uses indexes and improve the overall speed. * operation/agents/estado_grupo.php: Rewritten version, much more fast than previous. * operation/events/events.php: Fixed code to mass delete/update and added some audit control points. * pandora_db.php: audit_db() now uses utimestamp. event_insert() now uses utimestamp. Added function give_agent_id_from_module_id(). * operation/agents/estado_ultimopaquete.php: Now render in red timestamp for "outdated" data. Fixes some minor problems with module groups and interval rendering. * operation/agents/estado_monitores.php: now uses utimestamp. * operation/agents/ver_agente.php: Uses lang_label labels for some texts. Fixed image bug. * operation/servers/view_server.php: Added version of server and some cosmetic adjustments. * godmode/db/db_main.php: Applied new graphic. * godmode/agentes/module_manager.php: Now sort by modulegroup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-03-28 18:07:29 +02:00
$id_modulo = $origen_modulo[$a];
$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")
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
$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
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
$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);
$color=1;
while ($row = mysql_fetch_array ($result1)){
if ($color == 1){
$tdcolor = "datos";
$color = 0;
} else {
$tdcolor = "datos2";
$color = 1;
}
echo "<tr><td class='$tdcolor'>";
echo $agentmodule_name;
echo "</td><td class='$tdcolor'>";
2007-03-28 Sancho Lerena <slerena@artica.es> * tip.css, pandora.css: Some updates to fix render in tooltips and datos3 background color. * config.php: Version update. * operation/menu.php: Added reporting suboption: Custom Graph Builder. * operation/reporting/graph_builder.php: New custom and combined graphic generator that uses new function from fgraph graphic_combined_module(). * reporting/fgraph.php: new function graphic_combined_module() to generate combined graphs. Needs to finish implementation to show alerts and evetns (most work done). Function grafico_db_agentes_purge() now uses Pear Graph instead jpgraph. * operation/agents/exportdata.php: Now uses indexes and improve the overall speed. * operation/agents/estado_grupo.php: Rewritten version, much more fast than previous. * operation/events/events.php: Fixed code to mass delete/update and added some audit control points. * pandora_db.php: audit_db() now uses utimestamp. event_insert() now uses utimestamp. Added function give_agent_id_from_module_id(). * operation/agents/estado_ultimopaquete.php: Now render in red timestamp for "outdated" data. Fixes some minor problems with module groups and interval rendering. * operation/agents/estado_monitores.php: now uses utimestamp. * operation/agents/ver_agente.php: Uses lang_label labels for some texts. Fixed image bug. * operation/servers/view_server.php: Added version of server and some cosmetic adjustments. * godmode/db/db_main.php: Applied new graphic. * godmode/agentes/module_manager.php: Now sort by modulegroup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-03-28 18:07:29 +02:00
echo $row["datos"];
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
echo "</td><td class='$tdcolor'>";
2007-03-28 Sancho Lerena <slerena@artica.es> * tip.css, pandora.css: Some updates to fix render in tooltips and datos3 background color. * config.php: Version update. * operation/menu.php: Added reporting suboption: Custom Graph Builder. * operation/reporting/graph_builder.php: New custom and combined graphic generator that uses new function from fgraph graphic_combined_module(). * reporting/fgraph.php: new function graphic_combined_module() to generate combined graphs. Needs to finish implementation to show alerts and evetns (most work done). Function grafico_db_agentes_purge() now uses Pear Graph instead jpgraph. * operation/agents/exportdata.php: Now uses indexes and improve the overall speed. * operation/agents/estado_grupo.php: Rewritten version, much more fast than previous. * operation/events/events.php: Fixed code to mass delete/update and added some audit control points. * pandora_db.php: audit_db() now uses utimestamp. event_insert() now uses utimestamp. Added function give_agent_id_from_module_id(). * operation/agents/estado_ultimopaquete.php: Now render in red timestamp for "outdated" data. Fixes some minor problems with module groups and interval rendering. * operation/agents/estado_monitores.php: now uses utimestamp. * operation/agents/ver_agente.php: Uses lang_label labels for some texts. Fixed image bug. * operation/servers/view_server.php: Added version of server and some cosmetic adjustments. * godmode/db/db_main.php: Applied new graphic. * godmode/agentes/module_manager.php: Now sort by modulegroup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-03-28 18:07:29 +02:00
echo $row["timestamp"];
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
echo "</td></tr>";
}
}
2007-03-28 Sancho Lerena <slerena@artica.es> * tip.css, pandora.css: Some updates to fix render in tooltips and datos3 background color. * config.php: Version update. * operation/menu.php: Added reporting suboption: Custom Graph Builder. * operation/reporting/graph_builder.php: New custom and combined graphic generator that uses new function from fgraph graphic_combined_module(). * reporting/fgraph.php: new function graphic_combined_module() to generate combined graphs. Needs to finish implementation to show alerts and evetns (most work done). Function grafico_db_agentes_purge() now uses Pear Graph instead jpgraph. * operation/agents/exportdata.php: Now uses indexes and improve the overall speed. * operation/agents/estado_grupo.php: Rewritten version, much more fast than previous. * operation/events/events.php: Fixed code to mass delete/update and added some audit control points. * pandora_db.php: audit_db() now uses utimestamp. event_insert() now uses utimestamp. Added function give_agent_id_from_module_id(). * operation/agents/estado_ultimopaquete.php: Now render in red timestamp for "outdated" data. Fixes some minor problems with module groups and interval rendering. * operation/agents/estado_monitores.php: now uses utimestamp. * operation/agents/ver_agente.php: Uses lang_label labels for some texts. Fixed image bug. * operation/servers/view_server.php: Added version of server and some cosmetic adjustments. * godmode/db/db_main.php: Applied new graphic. * godmode/agentes/module_manager.php: Now sort by modulegroup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-03-28 18:07:29 +02:00
echo "</table>";
} else
echo "<b class='error'>".$lang_label["no_sel_mod"]."</b>";
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
2007-03-28 Sancho Lerena <slerena@artica.es> * tip.css, pandora.css: Some updates to fix render in tooltips and datos3 background color. * config.php: Version update. * operation/menu.php: Added reporting suboption: Custom Graph Builder. * operation/reporting/graph_builder.php: New custom and combined graphic generator that uses new function from fgraph graphic_combined_module(). * reporting/fgraph.php: new function graphic_combined_module() to generate combined graphs. Needs to finish implementation to show alerts and evetns (most work done). Function grafico_db_agentes_purge() now uses Pear Graph instead jpgraph. * operation/agents/exportdata.php: Now uses indexes and improve the overall speed. * operation/agents/estado_grupo.php: Rewritten version, much more fast than previous. * operation/events/events.php: Fixed code to mass delete/update and added some audit control points. * pandora_db.php: audit_db() now uses utimestamp. event_insert() now uses utimestamp. Added function give_agent_id_from_module_id(). * operation/agents/estado_ultimopaquete.php: Now render in red timestamp for "outdated" data. Fixes some minor problems with module groups and interval rendering. * operation/agents/estado_monitores.php: now uses utimestamp. * operation/agents/ver_agente.php: Uses lang_label labels for some texts. Fixed image bug. * operation/servers/view_server.php: Added version of server and some cosmetic adjustments. * godmode/db/db_main.php: Applied new graphic. * godmode/agentes/module_manager.php: Now sort by modulegroup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-03-28 18:07:29 +02:00
}
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
} else {
// Option B: Print Form
// Form view
$ahora=date("Y/m/d H:i:s");
$ahora_s = date("U");
$ayer = date ("Y/m/d H:i:s", $ahora_s - 86400);
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
if (isset($_GET["date_from"]))
$date_from=$_GET["date_from"];
else
if (isset($_POST["from_date"]))
$date_from = $_POST["from_date"];
else
$date_from = $ayer;
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
if (isset($_GET["date_to"]))
$date_to = $_GET["date_to"];
else
if (isset($_POST["to_date"]))
$date_to = $_POST["to_date"];
else
$date_to = $ahora;
echo "<h2>".$lang_label["ag_title"]." &gt; ";
echo $lang_label["export_data"]."<a href='help/$help_code/chap3.php#336' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h2>";
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
echo '<form method="post" action="index.php?sec=estado&sec2=operation/agentes/exportdata" name="export_form">';
echo '<table width=550 border=0 cellspacing=3 cellpadding=5 class=databox>';
echo '<tr>';
echo "<td class='datos'><b>".$lang_label["source_agent"]."</b><br><br>";
echo "<td class='datos'>";
// Show combo with agents
echo '<select name="origen" class="w130">';
2007-03-28 Sancho Lerena <slerena@artica.es> * tip.css, pandora.css: Some updates to fix render in tooltips and datos3 background color. * config.php: Version update. * operation/menu.php: Added reporting suboption: Custom Graph Builder. * operation/reporting/graph_builder.php: New custom and combined graphic generator that uses new function from fgraph graphic_combined_module(). * reporting/fgraph.php: new function graphic_combined_module() to generate combined graphs. Needs to finish implementation to show alerts and evetns (most work done). Function grafico_db_agentes_purge() now uses Pear Graph instead jpgraph. * operation/agents/exportdata.php: Now uses indexes and improve the overall speed. * operation/agents/estado_grupo.php: Rewritten version, much more fast than previous. * operation/events/events.php: Fixed code to mass delete/update and added some audit control points. * pandora_db.php: audit_db() now uses utimestamp. event_insert() now uses utimestamp. Added function give_agent_id_from_module_id(). * operation/agents/estado_ultimopaquete.php: Now render in red timestamp for "outdated" data. Fixes some minor problems with module groups and interval rendering. * operation/agents/estado_monitores.php: now uses utimestamp. * operation/agents/ver_agente.php: Uses lang_label labels for some texts. Fixed image bug. * operation/servers/view_server.php: Added version of server and some cosmetic adjustments. * godmode/db/db_main.php: Applied new graphic. * godmode/agentes/module_manager.php: Now sort by modulegroup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-03-28 18:07:29 +02:00
if ( (isset($_POST["update_agent"])) AND (isset($_POST["origen"])) ) {
echo "<option value=".$_POST["origen"].">".dame_nombre_agente($_POST["origen"]);
}
$sql1='SELECT * FROM tagente';
$result=mysql_query($sql1);
while ($row=mysql_fetch_array($result)){
if ( (isset($_POST["update_agent"])) AND (isset($_POST["origen"])) ){
if (give_acl($id_user, $row["id_grupo"], "AR")==1)
if ( $_POST["origen"] != $row["id_agente"])
echo "<option value=".$row["id_agente"].">".$row["nombre"];
}
else
if (give_acl($id_user, $row["id_grupo"], "AR")==1)
echo "<option value=".$row["id_agente"].">".$row["nombre"];
}
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
echo "</select> &nbsp;&nbsp;";
echo "<input type=submit name='update_agent' class='sub next' value='".$lang_label["get_info"]."'><br><br>";
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
echo '<tr>';
echo "<td class='datos2'>";
2007-03-28 Sancho Lerena <slerena@artica.es> * tip.css, pandora.css: Some updates to fix render in tooltips and datos3 background color. * config.php: Version update. * operation/menu.php: Added reporting suboption: Custom Graph Builder. * operation/reporting/graph_builder.php: New custom and combined graphic generator that uses new function from fgraph graphic_combined_module(). * reporting/fgraph.php: new function graphic_combined_module() to generate combined graphs. Needs to finish implementation to show alerts and evetns (most work done). Function grafico_db_agentes_purge() now uses Pear Graph instead jpgraph. * operation/agents/exportdata.php: Now uses indexes and improve the overall speed. * operation/agents/estado_grupo.php: Rewritten version, much more fast than previous. * operation/events/events.php: Fixed code to mass delete/update and added some audit control points. * pandora_db.php: audit_db() now uses utimestamp. event_insert() now uses utimestamp. Added function give_agent_id_from_module_id(). * operation/agents/estado_ultimopaquete.php: Now render in red timestamp for "outdated" data. Fixes some minor problems with module groups and interval rendering. * operation/agents/estado_monitores.php: now uses utimestamp. * operation/agents/ver_agente.php: Uses lang_label labels for some texts. Fixed image bug. * operation/servers/view_server.php: Added version of server and some cosmetic adjustments. * godmode/db/db_main.php: Applied new graphic. * godmode/agentes/module_manager.php: Now sort by modulegroup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-03-28 18:07:29 +02:00
echo "<b>".$lang_label["modules"]."</b><br><br>";
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
echo "<td class='datos2'>";
// Combo with modules
echo "<select name='origen_modulo[]' size=8 class='w130'>";
if ((isset($_POST["update_agent"])) AND (isset($_POST["origen"])) ) {
2007-03-28 Sancho Lerena <slerena@artica.es> * tip.css, pandora.css: Some updates to fix render in tooltips and datos3 background color. * config.php: Version update. * operation/menu.php: Added reporting suboption: Custom Graph Builder. * operation/reporting/graph_builder.php: New custom and combined graphic generator that uses new function from fgraph graphic_combined_module(). * reporting/fgraph.php: new function graphic_combined_module() to generate combined graphs. Needs to finish implementation to show alerts and evetns (most work done). Function grafico_db_agentes_purge() now uses Pear Graph instead jpgraph. * operation/agents/exportdata.php: Now uses indexes and improve the overall speed. * operation/agents/estado_grupo.php: Rewritten version, much more fast than previous. * operation/events/events.php: Fixed code to mass delete/update and added some audit control points. * pandora_db.php: audit_db() now uses utimestamp. event_insert() now uses utimestamp. Added function give_agent_id_from_module_id(). * operation/agents/estado_ultimopaquete.php: Now render in red timestamp for "outdated" data. Fixes some minor problems with module groups and interval rendering. * operation/agents/estado_monitores.php: now uses utimestamp. * operation/agents/ver_agente.php: Uses lang_label labels for some texts. Fixed image bug. * operation/servers/view_server.php: Added version of server and some cosmetic adjustments. * godmode/db/db_main.php: Applied new graphic. * godmode/agentes/module_manager.php: Now sort by modulegroup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-03-28 18:07:29 +02:00
// Populate Module/Agent combo
$agente_modulo = $_POST["origen"];
$sql1="SELECT * FROM tagente_modulo WHERE id_agente = ".$agente_modulo;
$result = mysql_query($sql1);
while ($row=mysql_fetch_array($result)){
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
echo "<option value=".$row["id_agente_modulo"].">".$row["nombre"];
2007-03-28 Sancho Lerena <slerena@artica.es> * tip.css, pandora.css: Some updates to fix render in tooltips and datos3 background color. * config.php: Version update. * operation/menu.php: Added reporting suboption: Custom Graph Builder. * operation/reporting/graph_builder.php: New custom and combined graphic generator that uses new function from fgraph graphic_combined_module(). * reporting/fgraph.php: new function graphic_combined_module() to generate combined graphs. Needs to finish implementation to show alerts and evetns (most work done). Function grafico_db_agentes_purge() now uses Pear Graph instead jpgraph. * operation/agents/exportdata.php: Now uses indexes and improve the overall speed. * operation/agents/estado_grupo.php: Rewritten version, much more fast than previous. * operation/events/events.php: Fixed code to mass delete/update and added some audit control points. * pandora_db.php: audit_db() now uses utimestamp. event_insert() now uses utimestamp. Added function give_agent_id_from_module_id(). * operation/agents/estado_ultimopaquete.php: Now render in red timestamp for "outdated" data. Fixes some minor problems with module groups and interval rendering. * operation/agents/estado_monitores.php: now uses utimestamp. * operation/agents/ver_agente.php: Uses lang_label labels for some texts. Fixed image bug. * operation/servers/view_server.php: Added version of server and some cosmetic adjustments. * godmode/db/db_main.php: Applied new graphic. * godmode/agentes/module_manager.php: Now sort by modulegroup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-03-28 18:07:29 +02:00
}
} else {
echo "<option value=-1>".$lang_label["N/A"];
2007-03-28 Sancho Lerena <slerena@artica.es> * tip.css, pandora.css: Some updates to fix render in tooltips and datos3 background color. * config.php: Version update. * operation/menu.php: Added reporting suboption: Custom Graph Builder. * operation/reporting/graph_builder.php: New custom and combined graphic generator that uses new function from fgraph graphic_combined_module(). * reporting/fgraph.php: new function graphic_combined_module() to generate combined graphs. Needs to finish implementation to show alerts and evetns (most work done). Function grafico_db_agentes_purge() now uses Pear Graph instead jpgraph. * operation/agents/exportdata.php: Now uses indexes and improve the overall speed. * operation/agents/estado_grupo.php: Rewritten version, much more fast than previous. * operation/events/events.php: Fixed code to mass delete/update and added some audit control points. * pandora_db.php: audit_db() now uses utimestamp. event_insert() now uses utimestamp. Added function give_agent_id_from_module_id(). * operation/agents/estado_ultimopaquete.php: Now render in red timestamp for "outdated" data. Fixes some minor problems with module groups and interval rendering. * operation/agents/estado_monitores.php: now uses utimestamp. * operation/agents/ver_agente.php: Uses lang_label labels for some texts. Fixed image bug. * operation/servers/view_server.php: Added version of server and some cosmetic adjustments. * godmode/db/db_main.php: Applied new graphic. * godmode/agentes/module_manager.php: Now sort by modulegroup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-03-28 18:07:29 +02:00
}
echo "</select>";
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
echo "<tr><td class='datos'>";
echo "<b>".$lang_label["begin_date"]."</b>";
echo "<td class='datos'>";
echo "<input type='text' id='start_date' name='start_date' size=10 value='".substr($date_from,0,10)."'> <img src='images/calendar_view_day.png' onclick='scwShow(scwID(\"start_date\"),this);'> ";
echo "<input type='text' name='start_time' size=10 value='".substr($date_from,11,8)."'>";
2007-03-28 Sancho Lerena <slerena@artica.es> * tip.css, pandora.css: Some updates to fix render in tooltips and datos3 background color. * config.php: Version update. * operation/menu.php: Added reporting suboption: Custom Graph Builder. * operation/reporting/graph_builder.php: New custom and combined graphic generator that uses new function from fgraph graphic_combined_module(). * reporting/fgraph.php: new function graphic_combined_module() to generate combined graphs. Needs to finish implementation to show alerts and evetns (most work done). Function grafico_db_agentes_purge() now uses Pear Graph instead jpgraph. * operation/agents/exportdata.php: Now uses indexes and improve the overall speed. * operation/agents/estado_grupo.php: Rewritten version, much more fast than previous. * operation/events/events.php: Fixed code to mass delete/update and added some audit control points. * pandora_db.php: audit_db() now uses utimestamp. event_insert() now uses utimestamp. Added function give_agent_id_from_module_id(). * operation/agents/estado_ultimopaquete.php: Now render in red timestamp for "outdated" data. Fixes some minor problems with module groups and interval rendering. * operation/agents/estado_monitores.php: now uses utimestamp. * operation/agents/ver_agente.php: Uses lang_label labels for some texts. Fixed image bug. * operation/servers/view_server.php: Added version of server and some cosmetic adjustments. * godmode/db/db_main.php: Applied new graphic. * godmode/agentes/module_manager.php: Now sort by modulegroup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-03-28 18:07:29 +02:00
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
echo "<tr><td class='datos2'>";
echo "<b>".$lang_label["end_date"]."</b>";
echo "<td class='datos2'>";
echo "<input type='text' id='end_date' name='end_date' size=10 value='".substr($date_to,0,10)."'> <img src='images/calendar_view_day.png' onclick='scwShow(scwID(\"end_date\"),this);'> ";
echo "<input type='text' name='end_time' size=10 value='".substr($date_to,11,8)."'>";
2007-03-28 Sancho Lerena <slerena@artica.es> * tip.css, pandora.css: Some updates to fix render in tooltips and datos3 background color. * config.php: Version update. * operation/menu.php: Added reporting suboption: Custom Graph Builder. * operation/reporting/graph_builder.php: New custom and combined graphic generator that uses new function from fgraph graphic_combined_module(). * reporting/fgraph.php: new function graphic_combined_module() to generate combined graphs. Needs to finish implementation to show alerts and evetns (most work done). Function grafico_db_agentes_purge() now uses Pear Graph instead jpgraph. * operation/agents/exportdata.php: Now uses indexes and improve the overall speed. * operation/agents/estado_grupo.php: Rewritten version, much more fast than previous. * operation/events/events.php: Fixed code to mass delete/update and added some audit control points. * pandora_db.php: audit_db() now uses utimestamp. event_insert() now uses utimestamp. Added function give_agent_id_from_module_id(). * operation/agents/estado_ultimopaquete.php: Now render in red timestamp for "outdated" data. Fixes some minor problems with module groups and interval rendering. * operation/agents/estado_monitores.php: now uses utimestamp. * operation/agents/ver_agente.php: Uses lang_label labels for some texts. Fixed image bug. * operation/servers/view_server.php: Added version of server and some cosmetic adjustments. * godmode/db/db_main.php: Applied new graphic. * godmode/agentes/module_manager.php: Now sort by modulegroup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-03-28 18:07:29 +02:00
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
echo "<tr><td class='datos'>";
echo "<b>".$lang_label["export_type"]."</b>";
echo "<td class='datos'>";
// Combo for data export type
echo "<select name='export_type'>";
echo "<option value=3>".$lang_label["datatable"];
echo "<option value=1>".$lang_label["csv"];
echo "<option value=2>".$lang_label["average_per_hourday"];
echo "</select>";
echo "</table>";
// Submit button
echo "<table width=570>";
echo "<tr><td align='right'>";
echo "<input type=submit name='export' class='sub wand' value=".$lang_label["export"].">";
echo "</table>";
echo "</form>";
2007-03-28 Sancho Lerena <slerena@artica.es> * tip.css, pandora.css: Some updates to fix render in tooltips and datos3 background color. * config.php: Version update. * operation/menu.php: Added reporting suboption: Custom Graph Builder. * operation/reporting/graph_builder.php: New custom and combined graphic generator that uses new function from fgraph graphic_combined_module(). * reporting/fgraph.php: new function graphic_combined_module() to generate combined graphs. Needs to finish implementation to show alerts and evetns (most work done). Function grafico_db_agentes_purge() now uses Pear Graph instead jpgraph. * operation/agents/exportdata.php: Now uses indexes and improve the overall speed. * operation/agents/estado_grupo.php: Rewritten version, much more fast than previous. * operation/events/events.php: Fixed code to mass delete/update and added some audit control points. * pandora_db.php: audit_db() now uses utimestamp. event_insert() now uses utimestamp. Added function give_agent_id_from_module_id(). * operation/agents/estado_ultimopaquete.php: Now render in red timestamp for "outdated" data. Fixes some minor problems with module groups and interval rendering. * operation/agents/estado_monitores.php: now uses utimestamp. * operation/agents/ver_agente.php: Uses lang_label labels for some texts. Fixed image bug. * operation/servers/view_server.php: Added version of server and some cosmetic adjustments. * godmode/db/db_main.php: Applied new graphic. * godmode/agentes/module_manager.php: Now sort by modulegroup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-03-28 18:07:29 +02:00
}
2007-05-03 Sancho Lerena <slerena@artica.es> * include/FreeSans.ttf: Added to repos, should be here to use in graphs. * include/functions_db.php: Deleted noaccess include from comprueba_login(). This should return value, not render pages or exit. * include/config.inc.php: Modified some typos. * include/calendar.js: Added generic calendar javascript, to be used on exportdata and incident management code. * include/languages/language_en.php: More strings. * install.php: In my render, box height is too low. PLEASE recheck before changing this kind of properties because in other browsers could have a bad render (Sophus!). * index.php: Added script call (need to be done on header). * operation/agentes/export_csv.php: Added new file to create a standalone CSV on download icon / link. * operation/agentes/exportdata.php: New export data code, used some code from Leando Doctors, and mixed with old code. Now have three options to render export data. * operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro. * operation/active_console/lib/extra_functions.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/lib/db_functions.php:Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. * operation/active_console/index.php: Solved a lot of warnings, but there are TONS of more warnings that need to be corrected. This code DONT work if you are showing warning/notice erros. This code is not ready for production usage, too buggy yet :( * pandora_graphical_console_data.sql: Cleanup. * godmode/agentes/module_manager.php: Added wizard button. * pandora_graphical_console.sql: Cleanup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
?>