pandorafms/pandora_console/operation/events/export_csv.php

100 lines
3.0 KiB
PHP
Raw Normal View History

<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for 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.
session_start();
2009-03-03 Esteban Sanchez <estebans@artica.es> * general/main_menu.php: Operation and godmode menus files includes now the dependant files. * godmode/agentes/modificar_agente.php: Removed unnecessary require() * godmode/alerts/alert_list.php: Avoid notice for undefined index when calling max(). Added option to delete the template. * godmode/alerts/configure_alert_template.php, godmode/alerts/alert_templates.php: Fixed field2_recovery and field3_recovery updating. * operation/menu.php, godmode/menu.php: Require functions_menu.php. * include/config_process.php: Updated build version. * include/functions.php: Keep time in a static variable on get_system_time(). * include/functions_db.php: Now a custom operation can be passed to format_array_to_where_clause_sql() if the field key is numeric. * include/functions_reporting.php: Return float value on get_agentmodule_sla(). Added required files. * include/functions_ui.php: Show template name on format_alert_row(). Style correction. * operation/agentes/export_csv.php: Style correction. * operation/events/export_csv.php: Use pandora functions to fetch results. Fixed auth part. Style correction. * operation/reporting/custom_reporting.php: Fixed enterprise include. * operation/reporting/reporting_xml.php: Fixed auth part. * index.php: process_page_head() may looked for uninitialized $config["refr"]. * include/styles/pandora_width.css: Fixed style for ol.steps git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1500 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-03 16:21:13 +01:00
require_once ("../../include/config.php");
if (!isset ($config["auth"])) {
require_once ("../../include/auth/mysql.php");
} else {
require_once ("../../include/auth/".$config["auth"]["scheme"].".php");
}
require_once ("../../include/functions.php");
require_once ("../../include/functions_db.php");
require_once ("../../include/functions_events.php");
2009-03-03 Esteban Sanchez <estebans@artica.es> * general/main_menu.php: Operation and godmode menus files includes now the dependant files. * godmode/agentes/modificar_agente.php: Removed unnecessary require() * godmode/alerts/alert_list.php: Avoid notice for undefined index when calling max(). Added option to delete the template. * godmode/alerts/configure_alert_template.php, godmode/alerts/alert_templates.php: Fixed field2_recovery and field3_recovery updating. * operation/menu.php, godmode/menu.php: Require functions_menu.php. * include/config_process.php: Updated build version. * include/functions.php: Keep time in a static variable on get_system_time(). * include/functions_db.php: Now a custom operation can be passed to format_array_to_where_clause_sql() if the field key is numeric. * include/functions_reporting.php: Return float value on get_agentmodule_sla(). Added required files. * include/functions_ui.php: Show template name on format_alert_row(). Style correction. * operation/agentes/export_csv.php: Style correction. * operation/events/export_csv.php: Use pandora functions to fetch results. Fixed auth part. Style correction. * operation/reporting/custom_reporting.php: Fixed enterprise include. * operation/reporting/reporting_xml.php: Fixed auth part. * index.php: process_page_head() may looked for uninitialized $config["refr"]. * include/styles/pandora_width.css: Fixed style for ol.steps git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1500 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-03 16:21:13 +01:00
session_write_close ();
$config["id_user"] = $_SESSION["id_usuario"];
2009-03-03 Esteban Sanchez <estebans@artica.es> * general/main_menu.php: Operation and godmode menus files includes now the dependant files. * godmode/agentes/modificar_agente.php: Removed unnecessary require() * godmode/alerts/alert_list.php: Avoid notice for undefined index when calling max(). Added option to delete the template. * godmode/alerts/configure_alert_template.php, godmode/alerts/alert_templates.php: Fixed field2_recovery and field3_recovery updating. * operation/menu.php, godmode/menu.php: Require functions_menu.php. * include/config_process.php: Updated build version. * include/functions.php: Keep time in a static variable on get_system_time(). * include/functions_db.php: Now a custom operation can be passed to format_array_to_where_clause_sql() if the field key is numeric. * include/functions_reporting.php: Return float value on get_agentmodule_sla(). Added required files. * include/functions_ui.php: Show template name on format_alert_row(). Style correction. * operation/agentes/export_csv.php: Style correction. * operation/events/export_csv.php: Use pandora functions to fetch results. Fixed auth part. Style correction. * operation/reporting/custom_reporting.php: Fixed enterprise include. * operation/reporting/reporting_xml.php: Fixed auth part. * index.php: process_page_head() may looked for uninitialized $config["refr"]. * include/styles/pandora_width.css: Fixed style for ol.steps git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1500 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-03 16:21:13 +01:00
if (! give_acl ($config["id_user"], 0, "AR") && ! give_acl ($config["id_user"], 0, "AW")) {
exit;
}
2009-03-03 Esteban Sanchez <estebans@artica.es> * general/main_menu.php: Operation and godmode menus files includes now the dependant files. * godmode/agentes/modificar_agente.php: Removed unnecessary require() * godmode/alerts/alert_list.php: Avoid notice for undefined index when calling max(). Added option to delete the template. * godmode/alerts/configure_alert_template.php, godmode/alerts/alert_templates.php: Fixed field2_recovery and field3_recovery updating. * operation/menu.php, godmode/menu.php: Require functions_menu.php. * include/config_process.php: Updated build version. * include/functions.php: Keep time in a static variable on get_system_time(). * include/functions_db.php: Now a custom operation can be passed to format_array_to_where_clause_sql() if the field key is numeric. * include/functions_reporting.php: Return float value on get_agentmodule_sla(). Added required files. * include/functions_ui.php: Show template name on format_alert_row(). Style correction. * operation/agentes/export_csv.php: Style correction. * operation/events/export_csv.php: Use pandora functions to fetch results. Fixed auth part. Style correction. * operation/reporting/custom_reporting.php: Fixed enterprise include. * operation/reporting/reporting_xml.php: Fixed auth part. * index.php: process_page_head() may looked for uninitialized $config["refr"]. * include/styles/pandora_width.css: Fixed style for ol.steps git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1500 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-03 16:21:13 +01:00
$offset = (int) get_parameter ("offset");
$ev_group = (int) get_parameter ("ev_group"); // group
$search = (int) get_parameter ("search"); // free search
$event_type = (string) get_parameter ("event_type", "all"); // 0 all
$severity = (int) get_parameter ("severity", -1); // -1 all
$status = (int) get_parameter ("status", -1); // -1 all, 0 only red, 1 only green
$id_agent = (int) get_parameter ("id_agent", -1);
2009-03-03 Esteban Sanchez <estebans@artica.es> * general/main_menu.php: Operation and godmode menus files includes now the dependant files. * godmode/agentes/modificar_agente.php: Removed unnecessary require() * godmode/alerts/alert_list.php: Avoid notice for undefined index when calling max(). Added option to delete the template. * godmode/alerts/configure_alert_template.php, godmode/alerts/alert_templates.php: Fixed field2_recovery and field3_recovery updating. * operation/menu.php, godmode/menu.php: Require functions_menu.php. * include/config_process.php: Updated build version. * include/functions.php: Keep time in a static variable on get_system_time(). * include/functions_db.php: Now a custom operation can be passed to format_array_to_where_clause_sql() if the field key is numeric. * include/functions_reporting.php: Return float value on get_agentmodule_sla(). Added required files. * include/functions_ui.php: Show template name on format_alert_row(). Style correction. * operation/agentes/export_csv.php: Style correction. * operation/events/export_csv.php: Use pandora functions to fetch results. Fixed auth part. Style correction. * operation/reporting/custom_reporting.php: Fixed enterprise include. * operation/reporting/reporting_xml.php: Fixed auth part. * index.php: process_page_head() may looked for uninitialized $config["refr"]. * include/styles/pandora_width.css: Fixed style for ol.steps git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1500 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-03 16:21:13 +01:00
$filter = array ();
if ($ev_group > 1)
2009-03-03 Esteban Sanchez <estebans@artica.es> * general/main_menu.php: Operation and godmode menus files includes now the dependant files. * godmode/agentes/modificar_agente.php: Removed unnecessary require() * godmode/alerts/alert_list.php: Avoid notice for undefined index when calling max(). Added option to delete the template. * godmode/alerts/configure_alert_template.php, godmode/alerts/alert_templates.php: Fixed field2_recovery and field3_recovery updating. * operation/menu.php, godmode/menu.php: Require functions_menu.php. * include/config_process.php: Updated build version. * include/functions.php: Keep time in a static variable on get_system_time(). * include/functions_db.php: Now a custom operation can be passed to format_array_to_where_clause_sql() if the field key is numeric. * include/functions_reporting.php: Return float value on get_agentmodule_sla(). Added required files. * include/functions_ui.php: Show template name on format_alert_row(). Style correction. * operation/agentes/export_csv.php: Style correction. * operation/events/export_csv.php: Use pandora functions to fetch results. Fixed auth part. Style correction. * operation/reporting/custom_reporting.php: Fixed enterprise include. * operation/reporting/reporting_xml.php: Fixed auth part. * index.php: process_page_head() may looked for uninitialized $config["refr"]. * include/styles/pandora_width.css: Fixed style for ol.steps git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1500 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-03 16:21:13 +01:00
$filter['id_grupo'] = $ev_group;
if ($status == 1)
2009-03-03 Esteban Sanchez <estebans@artica.es> * general/main_menu.php: Operation and godmode menus files includes now the dependant files. * godmode/agentes/modificar_agente.php: Removed unnecessary require() * godmode/alerts/alert_list.php: Avoid notice for undefined index when calling max(). Added option to delete the template. * godmode/alerts/configure_alert_template.php, godmode/alerts/alert_templates.php: Fixed field2_recovery and field3_recovery updating. * operation/menu.php, godmode/menu.php: Require functions_menu.php. * include/config_process.php: Updated build version. * include/functions.php: Keep time in a static variable on get_system_time(). * include/functions_db.php: Now a custom operation can be passed to format_array_to_where_clause_sql() if the field key is numeric. * include/functions_reporting.php: Return float value on get_agentmodule_sla(). Added required files. * include/functions_ui.php: Show template name on format_alert_row(). Style correction. * operation/agentes/export_csv.php: Style correction. * operation/events/export_csv.php: Use pandora functions to fetch results. Fixed auth part. Style correction. * operation/reporting/custom_reporting.php: Fixed enterprise include. * operation/reporting/reporting_xml.php: Fixed auth part. * index.php: process_page_head() may looked for uninitialized $config["refr"]. * include/styles/pandora_width.css: Fixed style for ol.steps git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1500 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-03 16:21:13 +01:00
$filter['estado'] = 1;
if ($status == 0)
2009-03-03 Esteban Sanchez <estebans@artica.es> * general/main_menu.php: Operation and godmode menus files includes now the dependant files. * godmode/agentes/modificar_agente.php: Removed unnecessary require() * godmode/alerts/alert_list.php: Avoid notice for undefined index when calling max(). Added option to delete the template. * godmode/alerts/configure_alert_template.php, godmode/alerts/alert_templates.php: Fixed field2_recovery and field3_recovery updating. * operation/menu.php, godmode/menu.php: Require functions_menu.php. * include/config_process.php: Updated build version. * include/functions.php: Keep time in a static variable on get_system_time(). * include/functions_db.php: Now a custom operation can be passed to format_array_to_where_clause_sql() if the field key is numeric. * include/functions_reporting.php: Return float value on get_agentmodule_sla(). Added required files. * include/functions_ui.php: Show template name on format_alert_row(). Style correction. * operation/agentes/export_csv.php: Style correction. * operation/events/export_csv.php: Use pandora functions to fetch results. Fixed auth part. Style correction. * operation/reporting/custom_reporting.php: Fixed enterprise include. * operation/reporting/reporting_xml.php: Fixed auth part. * index.php: process_page_head() may looked for uninitialized $config["refr"]. * include/styles/pandora_width.css: Fixed style for ol.steps git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1500 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-03 16:21:13 +01:00
$filter['estado'] = 0;
if ($search != "")
2009-03-03 Esteban Sanchez <estebans@artica.es> * general/main_menu.php: Operation and godmode menus files includes now the dependant files. * godmode/agentes/modificar_agente.php: Removed unnecessary require() * godmode/alerts/alert_list.php: Avoid notice for undefined index when calling max(). Added option to delete the template. * godmode/alerts/configure_alert_template.php, godmode/alerts/alert_templates.php: Fixed field2_recovery and field3_recovery updating. * operation/menu.php, godmode/menu.php: Require functions_menu.php. * include/config_process.php: Updated build version. * include/functions.php: Keep time in a static variable on get_system_time(). * include/functions_db.php: Now a custom operation can be passed to format_array_to_where_clause_sql() if the field key is numeric. * include/functions_reporting.php: Return float value on get_agentmodule_sla(). Added required files. * include/functions_ui.php: Show template name on format_alert_row(). Style correction. * operation/agentes/export_csv.php: Style correction. * operation/events/export_csv.php: Use pandora functions to fetch results. Fixed auth part. Style correction. * operation/reporting/custom_reporting.php: Fixed enterprise include. * operation/reporting/reporting_xml.php: Fixed auth part. * index.php: process_page_head() may looked for uninitialized $config["refr"]. * include/styles/pandora_width.css: Fixed style for ol.steps git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1500 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-03 16:21:13 +01:00
$filter[] = 'evento LIKE "%'.$search.'%"';
if (($event_type != "all") AND ($event_type != 0))
2009-03-03 Esteban Sanchez <estebans@artica.es> * general/main_menu.php: Operation and godmode menus files includes now the dependant files. * godmode/agentes/modificar_agente.php: Removed unnecessary require() * godmode/alerts/alert_list.php: Avoid notice for undefined index when calling max(). Added option to delete the template. * godmode/alerts/configure_alert_template.php, godmode/alerts/alert_templates.php: Fixed field2_recovery and field3_recovery updating. * operation/menu.php, godmode/menu.php: Require functions_menu.php. * include/config_process.php: Updated build version. * include/functions.php: Keep time in a static variable on get_system_time(). * include/functions_db.php: Now a custom operation can be passed to format_array_to_where_clause_sql() if the field key is numeric. * include/functions_reporting.php: Return float value on get_agentmodule_sla(). Added required files. * include/functions_ui.php: Show template name on format_alert_row(). Style correction. * operation/agentes/export_csv.php: Style correction. * operation/events/export_csv.php: Use pandora functions to fetch results. Fixed auth part. Style correction. * operation/reporting/custom_reporting.php: Fixed enterprise include. * operation/reporting/reporting_xml.php: Fixed auth part. * index.php: process_page_head() may looked for uninitialized $config["refr"]. * include/styles/pandora_width.css: Fixed style for ol.steps git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1500 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-03 16:21:13 +01:00
$filter['event_type'] = $event_type;
if ($severity != -1)
2009-03-03 Esteban Sanchez <estebans@artica.es> * general/main_menu.php: Operation and godmode menus files includes now the dependant files. * godmode/agentes/modificar_agente.php: Removed unnecessary require() * godmode/alerts/alert_list.php: Avoid notice for undefined index when calling max(). Added option to delete the template. * godmode/alerts/configure_alert_template.php, godmode/alerts/alert_templates.php: Fixed field2_recovery and field3_recovery updating. * operation/menu.php, godmode/menu.php: Require functions_menu.php. * include/config_process.php: Updated build version. * include/functions.php: Keep time in a static variable on get_system_time(). * include/functions_db.php: Now a custom operation can be passed to format_array_to_where_clause_sql() if the field key is numeric. * include/functions_reporting.php: Return float value on get_agentmodule_sla(). Added required files. * include/functions_ui.php: Show template name on format_alert_row(). Style correction. * operation/agentes/export_csv.php: Style correction. * operation/events/export_csv.php: Use pandora functions to fetch results. Fixed auth part. Style correction. * operation/reporting/custom_reporting.php: Fixed enterprise include. * operation/reporting/reporting_xml.php: Fixed auth part. * index.php: process_page_head() may looked for uninitialized $config["refr"]. * include/styles/pandora_width.css: Fixed style for ol.steps git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1500 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-03 16:21:13 +01:00
$filter[] = 'criticity >= '.$severity;
if ($id_agent != -1)
2009-03-03 Esteban Sanchez <estebans@artica.es> * general/main_menu.php: Operation and godmode menus files includes now the dependant files. * godmode/agentes/modificar_agente.php: Removed unnecessary require() * godmode/alerts/alert_list.php: Avoid notice for undefined index when calling max(). Added option to delete the template. * godmode/alerts/configure_alert_template.php, godmode/alerts/alert_templates.php: Fixed field2_recovery and field3_recovery updating. * operation/menu.php, godmode/menu.php: Require functions_menu.php. * include/config_process.php: Updated build version. * include/functions.php: Keep time in a static variable on get_system_time(). * include/functions_db.php: Now a custom operation can be passed to format_array_to_where_clause_sql() if the field key is numeric. * include/functions_reporting.php: Return float value on get_agentmodule_sla(). Added required files. * include/functions_ui.php: Show template name on format_alert_row(). Style correction. * operation/agentes/export_csv.php: Style correction. * operation/events/export_csv.php: Use pandora functions to fetch results. Fixed auth part. Style correction. * operation/reporting/custom_reporting.php: Fixed enterprise include. * operation/reporting/reporting_xml.php: Fixed auth part. * index.php: process_page_head() may looked for uninitialized $config["refr"]. * include/styles/pandora_width.css: Fixed style for ol.steps git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1500 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-03 16:21:13 +01:00
$filter['id_agente'] = $id_agent;
2009-03-03 Esteban Sanchez <estebans@artica.es> * general/main_menu.php: Operation and godmode menus files includes now the dependant files. * godmode/agentes/modificar_agente.php: Removed unnecessary require() * godmode/alerts/alert_list.php: Avoid notice for undefined index when calling max(). Added option to delete the template. * godmode/alerts/configure_alert_template.php, godmode/alerts/alert_templates.php: Fixed field2_recovery and field3_recovery updating. * operation/menu.php, godmode/menu.php: Require functions_menu.php. * include/config_process.php: Updated build version. * include/functions.php: Keep time in a static variable on get_system_time(). * include/functions_db.php: Now a custom operation can be passed to format_array_to_where_clause_sql() if the field key is numeric. * include/functions_reporting.php: Return float value on get_agentmodule_sla(). Added required files. * include/functions_ui.php: Show template name on format_alert_row(). Style correction. * operation/agentes/export_csv.php: Style correction. * operation/events/export_csv.php: Use pandora functions to fetch results. Fixed auth part. Style correction. * operation/reporting/custom_reporting.php: Fixed enterprise include. * operation/reporting/reporting_xml.php: Fixed auth part. * index.php: process_page_head() may looked for uninitialized $config["refr"]. * include/styles/pandora_width.css: Fixed style for ol.steps git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1500 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-03 16:21:13 +01:00
$filter['order'] = 'timestamp DESC';
$now = date ("Y-m-d");
// Show contentype header
2009-03-03 Esteban Sanchez <estebans@artica.es> * general/main_menu.php: Operation and godmode menus files includes now the dependant files. * godmode/agentes/modificar_agente.php: Removed unnecessary require() * godmode/alerts/alert_list.php: Avoid notice for undefined index when calling max(). Added option to delete the template. * godmode/alerts/configure_alert_template.php, godmode/alerts/alert_templates.php: Fixed field2_recovery and field3_recovery updating. * operation/menu.php, godmode/menu.php: Require functions_menu.php. * include/config_process.php: Updated build version. * include/functions.php: Keep time in a static variable on get_system_time(). * include/functions_db.php: Now a custom operation can be passed to format_array_to_where_clause_sql() if the field key is numeric. * include/functions_reporting.php: Return float value on get_agentmodule_sla(). Added required files. * include/functions_ui.php: Show template name on format_alert_row(). Style correction. * operation/agentes/export_csv.php: Style correction. * operation/events/export_csv.php: Use pandora functions to fetch results. Fixed auth part. Style correction. * operation/reporting/custom_reporting.php: Fixed enterprise include. * operation/reporting/reporting_xml.php: Fixed auth part. * index.php: process_page_head() may looked for uninitialized $config["refr"]. * include/styles/pandora_width.css: Fixed style for ol.steps git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1500 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-03 16:21:13 +01:00
Header ("Content-type: text/txt");
header ('Content-Disposition: attachment; filename="pandora_export_event'.$now.'.txt"');
echo "timestamp, agent, group, event, status, user, event_type, severity";
2009-03-03 Esteban Sanchez <estebans@artica.es> * general/main_menu.php: Operation and godmode menus files includes now the dependant files. * godmode/agentes/modificar_agente.php: Removed unnecessary require() * godmode/alerts/alert_list.php: Avoid notice for undefined index when calling max(). Added option to delete the template. * godmode/alerts/configure_alert_template.php, godmode/alerts/alert_templates.php: Fixed field2_recovery and field3_recovery updating. * operation/menu.php, godmode/menu.php: Require functions_menu.php. * include/config_process.php: Updated build version. * include/functions.php: Keep time in a static variable on get_system_time(). * include/functions_db.php: Now a custom operation can be passed to format_array_to_where_clause_sql() if the field key is numeric. * include/functions_reporting.php: Return float value on get_agentmodule_sla(). Added required files. * include/functions_ui.php: Show template name on format_alert_row(). Style correction. * operation/agentes/export_csv.php: Style correction. * operation/events/export_csv.php: Use pandora functions to fetch results. Fixed auth part. Style correction. * operation/reporting/custom_reporting.php: Fixed enterprise include. * operation/reporting/reporting_xml.php: Fixed auth part. * index.php: process_page_head() may looked for uninitialized $config["refr"]. * include/styles/pandora_width.css: Fixed style for ol.steps git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1500 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-03 16:21:13 +01:00
echo chr (13);
$fields = array ('id_grupo', 'id_agente', 'evento', 'estado', 'id_usuario',
'event_type', 'criticity', 'timestamp');
$events = get_events ($filter, $fields);
if ($events === false)
$events = array ();
foreach ($events as $event) {
if (! give_acl ($config["id_user"], $event["id_grupo"], "AR"))
continue;
echo $event["timestamp"];
echo ",";
echo get_db_value ('nombre', 'tagente', 'id_agente', $event["id_agente"]);
echo ",";
echo get_db_value ('nombre', 'tgrupo', 'id_grupo', $event["id_grupo"]);
echo ",";
echo $event["evento"];
echo ",";
echo $event["estado"];
echo ",";
echo $event["id_usuario"];
echo ",";
echo $event["event_type"];
echo ",";
echo $event["criticity"];
echo chr (13);
}
?>