2008-04-23 22:51:37 +02:00
< ? php
2009-06-08 20:17:33 +02:00
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
2008-04-23 22:51:37 +02:00
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
2009-06-08 20:17:33 +02:00
// as published by the Free Software Foundation for version 2.
2008-04-23 22:51:37 +02:00
// 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.
2009-06-08 20:17:33 +02:00
2009-03-05 18:40:40 +01:00
ini_set ( 'display_errors' , 0 ); //Don't display other errors, messes up XML
2009-03-12 19:44:37 +01:00
2009-03-05 18:40:40 +01:00
require_once " ../../include/config.php " ;
require_once " ../../include/functions.php " ;
2008-07-25 20:37:32 +02:00
require_once " ../../include/functions_db.php " ;
2010-01-25 20:47:38 +01:00
require_once " ../../include/functions_api.php " ;
2013-01-18 10:56:46 +01:00
require_once " ../../include/functions_agents.php " ;
require_once " ../../include/functions_users.php " ;
require_once " ../../include/functions_tags.php " ;
require_once " ../../include/functions_groups.php " ;
2010-07-02 14:21:39 +02:00
2010-01-25 20:47:38 +01:00
$ipOrigin = $_SERVER [ 'REMOTE_ADDR' ];
// Uncoment this to activate ACL on RSS Events
2010-09-27 13:24:43 +02:00
if ( ! isInACL ( $ipOrigin )) {
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
exit ;
2010-09-27 13:24:43 +02:00
}
2012-09-19 Miguel de Dios <miguel.dedios@artica.es>
* extensions/resource_registration.php, extensions/system_info.php,
extensions/update_manager/lib/libupdate_manager.php,
godmode/agentes/modificar_agente.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_list.list.php,
godmode/massive/massive_add_profiles.php,
godmode/massive/massive_edit_modules.php,
godmode/servers/manage_recontask.php,
godmode/setup/setup_visuals.php, include/functions_api.php,
include/functions_graph.php, include/functions_messages.php,
include/graphs/functions_flot.php,
include/graphs/flot/pandora.flot.js, operation/tree.php,
operation/agentes/status_events.php,
operation/agentes/ver_agente.php, operation/events/events_list.php,
operation/events/events_marquee.php,
operation/events/events_rss.php: cleaned source code style.
* godmode/reporting/reporting_builder.item_editor.php,
include/functions_ui.php, include/ajax/agent.php: continue to change
to the new function "ui_print_agent_autocomplete_input" to make more
easy (and standar) the autocomplete agent input.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-19 16:45:59 +02:00
2010-09-01 15:34:15 +02:00
// Check user credentials
$user = get_parameter ( 'user' );
$hashup = get_parameter ( 'hashup' );
$pss = get_user_info ( $user );
$hashup2 = md5 ( $user . $pss [ 'password' ]);
2010-11-04 18:41:37 +01:00
if ( $hashup != $hashup2 ) {
2010-09-01 15:34:15 +02:00
exit ;
}
2010-01-25 20:47:38 +01:00
header ( " Content-Type: application/xml; charset=UTF-8 " ); //Send header before starting to output
2008-04-23 22:51:37 +02:00
2009-03-05 18:40:40 +01:00
function rss_error_handler ( $errno , $errstr , $errfile , $errline ) {
2012-02-24 Miguel de Dios <miguel.dedios@artica.es>
* pandora_console/include/functions_ui.php: changed the source code into the
function "ui_get_full_url" for accept false for to return url with the home
url or with any string (as query) return url with the php file.
* pandora_console/include/functions_graph.php,
pandora_console/include/functions_html.php,
pandora_console/include/functions_events.php,
pandora_console/include/functions_reporting.php,
pandora_console/include/functions_api.php,
pandora_console/include/functions.php, pandora_console/index.php,
pandora_console/extensions/system_info.php,
pandora_console/operation/agentes/stat_win.php,
pandora_console/operation/menu.php,
pandora_console/operation/events/events_rss.php,
pandora_console/operation/events/events_marquee.php,
pandora_console/operation/events/events.php: change in more part of source
code to use "ui_get_full_url" instead the hard write method of $_SERVER
vars, now Pandora Console run fine (in all actions I hope) with web servers
in other ports instead the typical 80.
Merged from branch pandora_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5646 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-02-24 14:48:46 +01:00
$url = ui_get_full_url ( false );
2012-09-07 13:04:58 +02:00
$selfurl = ui_get_full_url ( '?' . $_SERVER [ 'QUERY_STRING' ], false , true );
2012-02-24 Miguel de Dios <miguel.dedios@artica.es>
* pandora_console/include/functions_ui.php: changed the source code into the
function "ui_get_full_url" for accept false for to return url with the home
url or with any string (as query) return url with the php file.
* pandora_console/include/functions_graph.php,
pandora_console/include/functions_html.php,
pandora_console/include/functions_events.php,
pandora_console/include/functions_reporting.php,
pandora_console/include/functions_api.php,
pandora_console/include/functions.php, pandora_console/index.php,
pandora_console/extensions/system_info.php,
pandora_console/operation/agentes/stat_win.php,
pandora_console/operation/menu.php,
pandora_console/operation/events/events_rss.php,
pandora_console/operation/events/events_marquee.php,
pandora_console/operation/events/events.php: change in more part of source
code to use "ui_get_full_url" instead the hard write method of $_SERVER
vars, now Pandora Console run fine (in all actions I hope) with web servers
in other ports instead the typical 80.
Merged from branch pandora_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5646 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-02-24 14:48:46 +01:00
2009-03-05 18:40:40 +01:00
$rss_feed = '<?xml version="1.0" encoding="utf-8" ?>' ; //' Fixes certain highlighters freaking out on the PHP closing tag
$rss_feed .= '<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">' ;
$rss_feed .= '<channel><title>Pandora RSS Feed</title><description>Latest events on Pandora</description>' ;
$rss_feed .= '<lastBuildDate>' . date ( DATE_RFC822 , 0 ) . '</lastBuildDate>' ;
$rss_feed .= '<link>' . $url . '</link>' ; //Link back to the main Pandora page
2011-05-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_html.php
include/functions_menu.php
include/graphs/fgraph.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_networkmap.php
include/functions_servers.php
include/functions_network_profiles.php
include/functions_network_components.php
include/functions_visual_map.php
include/ajax/visual_console_builder.ajax.php
include/ajax/agent.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_io.php
include/functions_api.php
include/functions_ui.php
include/fgraph.php
include/functions_incidents.php
include/functions.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
extensions/plugin_registration.php
operation/incidents/incident.incident.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident.download_file.php
operation/incidents/incident.list.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/integria_incidents/incident.incident.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident.download_file.php
operation/integria_incidents/incident.list.php
operation/events/events_rss.php
operation/events/events_list.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/custom_reporting.php
operation/search_reports.php
operation/search_results.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/tactical.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/servers/view_servers.php
general/logon_ok.php
general/header.php
godmode/admin_access_logs.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/menu.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/configure_alert_action.php
godmode/setup/os.list.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_incidents.php, functions_io.php, functions_menu.php, functions_messages.php,
functions_modules.php, functions_network_components.php, functions_network_profiles.php,
functions_networkmap.php, functions_reporting.php, functions_reports.php,
functions_servers.php have "incidents_", "io_", "menu_", "messages_", "modules_",
"network_profiles_", "network_components_", "networkmap_", "reporting_", "reports_",
"servers_" prefixes respectively.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-09 19:30:55 +02:00
$rss_feed .= '<atom:link href="' . io_safe_input ( $selfurl ) . '" rel="self" type="application/rss+xml" />' ; //Alternative for Atom feeds. It's the same.
2012-02-24 Miguel de Dios <miguel.dedios@artica.es>
* pandora_console/include/functions_ui.php: changed the source code into the
function "ui_get_full_url" for accept false for to return url with the home
url or with any string (as query) return url with the php file.
* pandora_console/include/functions_graph.php,
pandora_console/include/functions_html.php,
pandora_console/include/functions_events.php,
pandora_console/include/functions_reporting.php,
pandora_console/include/functions_api.php,
pandora_console/include/functions.php, pandora_console/index.php,
pandora_console/extensions/system_info.php,
pandora_console/operation/agentes/stat_win.php,
pandora_console/operation/menu.php,
pandora_console/operation/events/events_rss.php,
pandora_console/operation/events/events_marquee.php,
pandora_console/operation/events/events.php: change in more part of source
code to use "ui_get_full_url" instead the hard write method of $_SERVER
vars, now Pandora Console run fine (in all actions I hope) with web servers
in other ports instead the typical 80.
Merged from branch pandora_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5646 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-02-24 14:48:46 +01:00
2009-03-05 18:40:40 +01:00
$rss_feed .= '<item><guid>' . $url . '/index.php?sec=eventos&sec2=operation/events/events</guid><title>Error creating feed</title>' ;
$rss_feed .= '<description>There was an error creating the feed: ' . $errno . ' - ' . $errstr . ' in ' . $errfile . ' on line ' . $errline . '</description>' ;
$rss_feed .= '<link>' . $url . '/index.php?sec=eventos&sec2=operation/events/events</link></item>' ;
exit ( $rss_feed ); //Exit by displaying the feed
}
set_error_handler ( 'rss_error_handler' , E_ALL ); //Errors output as RSS
2009-03-12 19:44:37 +01:00
2013-07-17 17:58:15 +02:00
$id_group = get_parameter ( " id_group " , 0 ); // group
2008-09-03 17:47:09 +02:00
$event_type = get_parameter ( " event_type " , '' ); // 0 all
$severity = ( int ) get_parameter ( " severity " , - 1 ); // -1 all
$status = ( int ) get_parameter ( " status " , 0 ); // -1 all, 0 only red, 1 only green
$id_agent = ( int ) get_parameter ( " id_agent " , - 1 );
2013-01-18 10:56:46 +01:00
2008-09-03 17:47:09 +02:00
$id_event = ( int ) get_parameter ( " id_event " , - 1 ); //This will allow to select only 1 event (eg. RSS)
2010-07-02 14:21:39 +02:00
$event_view_hr = ( int ) get_parameter ( " event_view_hr " , 0 );
2013-01-18 10:56:46 +01:00
$id_user_ack = get_parameter ( " id_user_ack " , 0 );
$search = io_safe_output ( preg_replace ( " /&([A-Za-z] { 0,4} \ w { 2,3};|#[0-9] { 2,3};)/ " , " & " , rawurldecode ( get_parameter ( " search " ))));
$text_agent = ( string ) get_parameter ( " text_agent " , __ ( " All " ));
$tag_with_json = base64_decode ( get_parameter ( " tag_with " , '' )) ;
$tag_with_json_clean = io_safe_output ( $tag_with_json );
$tag_with_base64 = base64_encode ( $tag_with_json_clean );
$tag_with = json_decode ( $tag_with_json_clean , true );
if ( empty ( $tag_with )) $tag_with = array ();
$tag_with = array_diff ( $tag_with , array ( 0 => 0 ));
$tag_without_json = base64_decode ( get_parameter ( " tag_without " , '' ));
$tag_without_json_clean = io_safe_output ( $tag_without_json );
$tag_without_base64 = base64_encode ( $tag_without_json_clean );
$tag_without = json_decode ( $tag_without_json_clean , true );
if ( empty ( $tag_without )) $tag_without = array ();
$tag_without = array_diff ( $tag_without , array ( 0 => 0 ));
$filter_only_alert = ( int ) get_parameter ( 'filter_only_alert' , - 1 );
/////////////////////////////////////////////
// Build the condition of the events query
2008-09-03 17:47:09 +02:00
$sql_post = " " ;
2013-01-18 10:56:46 +01:00
$meta = false ;
2010-07-02 14:21:39 +02:00
2013-01-18 10:56:46 +01:00
$id_user = $user ;
2010-09-27 13:24:43 +02:00
2013-01-18 10:56:46 +01:00
require ( 'events.build_query.php' );
2012-07-10 Miguel de Dios <miguel.dedios@artica.es>
* include/constants.php: added more constants into the constants
block of time conversion to seconds.
* godmode/alerts/alert_commands.php, godmode/setup/performance.php,
include/help/en/help_date_format.php, include/functions_netflow.php,
include/functions_tags.php, include/graphs/functions_pchart.php,
include/functions_modules.php, extensions/agents_modules.php,
extensions/update_manager.php, extensions/resource_exportation.php,
extensions/module_groups.php,
extensions/update_manager/lib/libupdate_manager_client.php,
extensions/system_info.php, operation/events/events_rss.php,
operation/events/export_csv.php, mobile/operation/events/events.php,
mobile/include/system.class.php: used the new constants time instead
the magic numbers, and cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6762 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-10 15:31:34 +02:00
2013-01-18 10:56:46 +01:00
// Now $sql_post have all the where condition
/////////////////////////////////////////////
2010-09-27 13:24:43 +02:00
2013-01-18 10:56:46 +01:00
$sql = " SELECT *
FROM tevento
WHERE 1 = 1 " . $sql_post . "
ORDER BY utimestamp DESC " ;
2010-09-27 13:24:43 +02:00
2013-01-18 10:56:46 +01:00
$result = db_get_all_rows_sql ( $sql );
2008-04-23 22:51:37 +02:00
2012-02-24 Miguel de Dios <miguel.dedios@artica.es>
* pandora_console/include/functions_ui.php: changed the source code into the
function "ui_get_full_url" for accept false for to return url with the home
url or with any string (as query) return url with the php file.
* pandora_console/include/functions_graph.php,
pandora_console/include/functions_html.php,
pandora_console/include/functions_events.php,
pandora_console/include/functions_reporting.php,
pandora_console/include/functions_api.php,
pandora_console/include/functions.php, pandora_console/index.php,
pandora_console/extensions/system_info.php,
pandora_console/operation/agentes/stat_win.php,
pandora_console/operation/menu.php,
pandora_console/operation/events/events_rss.php,
pandora_console/operation/events/events_marquee.php,
pandora_console/operation/events/events.php: change in more part of source
code to use "ui_get_full_url" instead the hard write method of $_SERVER
vars, now Pandora Console run fine (in all actions I hope) with web servers
in other ports instead the typical 80.
Merged from branch pandora_4.0
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5646 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-02-24 14:48:46 +01:00
$url = ui_get_full_url ( false );
2012-09-07 13:04:58 +02:00
$selfurl = ui_get_full_url ( '?' . $_SERVER [ 'QUERY_STRING' ], false , true );
2009-03-05 18:40:40 +01:00
if ( empty ( $result )) {
$lastbuild = 0 ; //Last build in 1970
2010-11-04 18:41:37 +01:00
}
else {
2013-01-18 10:56:46 +01:00
$lastbuild = ( int ) $result [ 0 ][ 'utimestamp' ];
2009-03-05 18:40:40 +01:00
}
2008-04-23 22:51:37 +02:00
2011-09-06 14:08:42 +02:00
$rss_feed = '<?xml version="1.0" encoding="utf-8" ?>' . " \n " ; // ' <?php ' -- Fixes highlighters thinking that the closing tag is PHP
$rss_feed .= '<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">' . " \n " ;
$rss_feed .= '<channel>' . " \n " ;
$rss_feed .= '<title>Pandora RSS Feed</title>' . " \n " ;
$rss_feed .= '<description>Latest events on Pandora</description>' . " \n " ;
$rss_feed .= '<lastBuildDate>' . date ( DATE_RFC822 , $lastbuild ) . '</lastBuildDate>' . " \n " ; //Last build date is the last event - that way readers won't mark it as having new posts
$rss_feed .= '<link>' . $url . '</link>' . " \n " ; //Link back to the main Pandora page
$rss_feed .= '<atom:link href="' . io_safe_input ( $selfurl ) . '" rel="self" type="application/rss+xml" />' . " \n " ;; //Alternative for Atom feeds. It's the same.
2008-04-23 22:51:37 +02:00
2009-03-05 18:40:40 +01:00
if ( empty ( $result )) {
2008-09-03 17:47:09 +02:00
$result = array ();
2011-05-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_html.php
include/functions_menu.php
include/graphs/fgraph.php
include/functions_messages.php
include/functions_modules.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_networkmap.php
include/functions_servers.php
include/functions_network_profiles.php
include/functions_network_components.php
include/functions_visual_map.php
include/ajax/visual_console_builder.ajax.php
include/ajax/agent.php
include/ajax/alert_list.ajax.php
include/ajax/module.php
include/functions_io.php
include/functions_api.php
include/functions_ui.php
include/fgraph.php
include/functions_incidents.php
include/functions.php
include/functions_agents.php
include/functions_db.php
include/functions_alerts.php
include/functions_reports.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/agents_modules.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/module_groups.php
extensions/plugin_registration.php
operation/incidents/incident.incident.php
operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident.download_file.php
operation/incidents/incident.list.php
operation/search_modules.php
operation/agentes/status_monitor.php
operation/agentes/export_csv.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/menu.php
operation/search_agents.php
operation/integria_incidents/incident.incident.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident.download_file.php
operation/integria_incidents/incident.list.php
operation/events/events_rss.php
operation/events/events_list.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/custom_reporting.php
operation/search_reports.php
operation/search_results.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/tactical.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/servers/view_servers.php
general/logon_ok.php
general/header.php
godmode/admin_access_logs.php
godmode/db/db_refine.php
godmode/db/db_info.php
godmode/db/db_purge.php
godmode/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager.php
godmode/agentes/configurar_agente.php
godmode/agentes/module_manager_editor.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/menu.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/configure_alert_action.php
godmode/setup/os.list.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_nc_groups_form.php
godmode/modules/manage_network_templates.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Functions in
functions_incidents.php, functions_io.php, functions_menu.php, functions_messages.php,
functions_modules.php, functions_network_components.php, functions_network_profiles.php,
functions_networkmap.php, functions_reporting.php, functions_reports.php,
functions_servers.php have "incidents_", "io_", "menu_", "messages_", "modules_",
"network_profiles_", "network_components_", "networkmap_", "reporting_", "reports_",
"servers_" prefixes respectively.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-09 19:30:55 +02:00
$rss_feed .= '<item><guid>' . io_safe_input ( $url . '/index.php?sec=eventos&sec2=operation/events/events' ) . '</guid><title>No results</title>' ;
2008-09-03 17:47:09 +02:00
$rss_feed .= '<description>There are no results. Click on the link to see all Pending events</description>' ;
2011-09-06 14:08:42 +02:00
$rss_feed .= '<link>' . io_safe_input ( $url . '/index.php?sec=eventos&sec2=operation/events/events' ) . '</link></item>' . " \n " ;
2008-09-03 17:47:09 +02:00
}
2008-04-23 22:51:37 +02:00
2008-09-03 17:47:09 +02:00
foreach ( $result as $row ) {
2013-01-18 10:56:46 +01:00
if ( ! check_acl ( $user , $row [ " id_grupo " ], " ER " )) {
2010-09-01 15:34:15 +02:00
continue ;
}
2010-07-02 14:21:39 +02:00
if ( $row [ " event_type " ] == " system " ) {
$agent_name = __ ( 'System' );
}
2013-01-18 10:56:46 +01:00
elseif ( $row [ " id_agente " ] > 0 ) {
2010-07-02 14:21:39 +02:00
// Agent name
2013-01-18 10:56:46 +01:00
$agent_name = agents_get_name ( $row [ " id_agente " ]);
2010-07-02 14:21:39 +02:00
}
else {
$agent_name = __ ( 'Alert' ) . __ ( 'SNMP' );
}
2008-04-23 22:51:37 +02:00
//This is mandatory
$rss_feed .= '<item><guid>' ;
2013-01-18 10:56:46 +01:00
$rss_feed .= io_safe_input ( $url . " /index.php?sec=eventos&sec2=operation/events/events&id_event= " . $row [ 'id_evento' ]);
2008-04-23 22:51:37 +02:00
$rss_feed .= '</guid><title>' ;
2010-07-02 14:21:39 +02:00
$rss_feed .= $agent_name ;
2008-04-23 22:51:37 +02:00
$rss_feed .= '</title><description>' ;
2013-01-18 10:56:46 +01:00
$rss_feed .= $row [ 'evento' ];
if ( $row [ 'estado' ] == 1 ) {
$rss_feed .= io_safe_input ( '<br /><br />' . 'Validated by ' . $row [ 'id_usuario' ]);
2008-09-03 17:47:09 +02:00
}
2008-04-23 22:51:37 +02:00
$rss_feed .= '</description><link>' ;
2013-01-18 10:56:46 +01:00
$rss_feed .= io_safe_input ( $url . " /index.php?sec=eventos&sec2=operation/events/events&id_event= " . $row [ " id_evento " ]);
2008-04-23 22:51:37 +02:00
$rss_feed .= '</link>' ;
2008-09-03 17:47:09 +02:00
2008-04-23 22:51:37 +02:00
//The rest is optional
2013-01-18 10:56:46 +01:00
$rss_feed .= '<pubDate>' . date ( DATE_RFC822 , $row [ 'utimestamp' ]) . '</pubDate>' ;
2008-04-23 22:51:37 +02:00
//This is mandatory again
2011-09-06 14:08:42 +02:00
$rss_feed .= '</item>' . " \n " ;
2008-04-23 22:51:37 +02:00
}
2011-09-06 14:08:42 +02:00
$rss_feed .= " </channel> \n </rss> \n " ;
2008-04-23 22:51:37 +02:00
echo $rss_feed ;
2009-06-08 20:17:33 +02:00
?>