2012-02-08 14:04:18 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
// Pandora FMS - http://pandorafms.com
|
|
|
|
// ==================================================
|
|
|
|
// Copyright (c) 2005-2010 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.
|
|
|
|
|
|
|
|
// Load global vars
|
|
|
|
global $config;
|
|
|
|
|
|
|
|
check_login ();
|
|
|
|
|
2015-03-06 12:28:05 +01:00
|
|
|
enterprise_hook('open_meta_frame');
|
|
|
|
|
2016-09-08 16:06:12 +02:00
|
|
|
if (!check_acl ($config["id_user"], 0, "EW") && !check_acl ($config["id_user"], 0, "EM") && ! check_acl ($config["id_user"], 0, "PM")) {
|
2012-02-08 14:04:18 +01:00
|
|
|
db_pandora_audit("ACL Violation",
|
|
|
|
"Trying to access event manage");
|
|
|
|
require ("general/noaccess.php");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Gets section to jump to another section
|
|
|
|
$section = (string) get_parameter ("section", "filter");
|
|
|
|
|
|
|
|
// Draws header
|
2016-09-08 16:06:12 +02:00
|
|
|
if (check_acl ($config["id_user"], 0, "EW") || check_acl ($config["id_user"], 0, "EM")) {
|
|
|
|
$buttons['view'] = array('active' => false,
|
|
|
|
'text' => '<a href="index.php?sec=eventos&sec2=operation/events/events&pure='.$config['pure'].'">' .
|
|
|
|
html_print_image("images/events_list.png", true, array("title" => __('Event list'))) . '</a>',
|
|
|
|
'operation' => true);
|
2013-04-10 09:57:54 +02:00
|
|
|
|
2016-09-08 16:06:12 +02:00
|
|
|
$buttons['filter'] = array('active' => false,
|
|
|
|
'text' => '<a href="index.php?sec=eventos&sec2=godmode/events/events&section=filter&pure='.$config['pure'].'">' .
|
|
|
|
html_print_image("images/filter_mc.png", true, array ("title" => __('Filter list'))) . '</a>');
|
|
|
|
}
|
2012-12-28 18:06:17 +01:00
|
|
|
|
|
|
|
if (check_acl ($config["id_user"], 0, "PM")) {
|
2013-05-17 13:08:28 +02:00
|
|
|
$buttons['responses'] = array('active' => false,
|
2016-09-08 16:06:12 +02:00
|
|
|
'text' => '<a href="index.php?sec=eventos&sec2=godmode/events/events&section=responses&pure='.$config['pure'].'">' .
|
|
|
|
html_print_image("images/event_responses.png", true, array ("title" => __('Event responses'))) . '</a>');
|
2013-05-17 13:08:28 +02:00
|
|
|
|
2016-09-08 16:06:12 +02:00
|
|
|
if (!is_metaconsole()) {
|
2013-05-17 13:08:28 +02:00
|
|
|
$buttons['fields'] = array('active' => false,
|
2016-09-08 16:06:12 +02:00
|
|
|
'text' => '<a href="index.php?sec=eventos&sec2=godmode/events/events&section=fields&pure='.$config['pure'].'">' .
|
|
|
|
html_print_image("images/custom_columns.png", true, array ("title" => __('Custom fields'))) . '</a>');
|
2013-05-17 13:08:28 +02:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
$buttons['fields'] = array('active' => false,
|
2016-09-08 16:06:12 +02:00
|
|
|
'text' => '<a href="index.php?sec=eventos&sec2=event/custom_events&section=fields&pure='.$config['pure'].'">' .
|
|
|
|
html_print_image("images/custom_columns.png", true, array ("title" => __('Custom fields'))) . '</a>');
|
2013-05-17 13:08:28 +02:00
|
|
|
}
|
2012-12-28 18:06:17 +01:00
|
|
|
}
|
2012-07-10 Miguel de Dios <miguel.dedios@artica.es>
* install.php, operation/reporting/reporting_xml.php,
operation/netflow/nf_live_view.php, operation/netflow/nf_view.php,
operation/tree.php, operation/agentes/gis_view.php,
operation/agentes/estado_monitores.php,
operation/agentes/networkmap.php,
operation/agentes/datos_agente.php,
operation/agentes/alerts_status.php, operation/menu.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
godmode/groups/configure_group.php,
godmode/groups/configure_modu_group.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/servers/manage_recontask.php,
godmode/alerts/alert_compounds.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_special_days.php, godmode/setup/links.php,
godmode/setup/os.php, godmode/users/configure_profile.php,
godmode/events/events.php,
godmode/massive/massive_delete_modules.php,
godmode/massive/massive_edit_modules.php,
godmode/massive/massive_standby_alerts.php,
godmode/massive/massive_add_action_alerts.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_operations.php,
godmode/massive/massive_delete_profiles.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/graph_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_menu.php, include/functions_visual_map.php,
include/functions_db.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6759 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-10 12:38:02 +02:00
|
|
|
|
|
|
|
switch ($section) {
|
|
|
|
case 'filter':
|
|
|
|
$buttons['filter']['active'] = true;
|
|
|
|
$subpage = ' - ' . __('Filters');
|
|
|
|
break;
|
|
|
|
case 'fields':
|
|
|
|
$buttons['fields']['active'] = true;
|
|
|
|
$subpage = ' - ' . __('Custom fields');
|
|
|
|
break;
|
2012-10-09 18:05:32 +02:00
|
|
|
case 'responses':
|
|
|
|
$buttons['responses']['active'] = true;
|
|
|
|
$subpage = ' - ' . __('Responses');
|
|
|
|
break;
|
2012-07-10 Miguel de Dios <miguel.dedios@artica.es>
* install.php, operation/reporting/reporting_xml.php,
operation/netflow/nf_live_view.php, operation/netflow/nf_view.php,
operation/tree.php, operation/agentes/gis_view.php,
operation/agentes/estado_monitores.php,
operation/agentes/networkmap.php,
operation/agentes/datos_agente.php,
operation/agentes/alerts_status.php, operation/menu.php,
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
godmode/groups/configure_group.php,
godmode/groups/configure_modu_group.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/servers/manage_recontask.php,
godmode/alerts/alert_compounds.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_special_days.php, godmode/setup/links.php,
godmode/setup/os.php, godmode/users/configure_profile.php,
godmode/events/events.php,
godmode/massive/massive_delete_modules.php,
godmode/massive/massive_edit_modules.php,
godmode/massive/massive_standby_alerts.php,
godmode/massive/massive_add_action_alerts.php,
godmode/massive/massive_enable_disable_alerts.php,
godmode/massive/massive_operations.php,
godmode/massive/massive_delete_profiles.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/graph_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
include/functions_menu.php, include/functions_visual_map.php,
include/functions_db.php: cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6759 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-10 12:38:02 +02:00
|
|
|
case 'view':
|
|
|
|
$buttons['view']['active'] = true;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
$buttons['filter']['active'] = true;
|
|
|
|
$subpage = ' - ' . __('Filters');
|
|
|
|
break;
|
|
|
|
}
|
2012-02-08 14:04:18 +01:00
|
|
|
|
2012-12-18 12:54:22 +01:00
|
|
|
if (! defined ('METACONSOLE')) {
|
2013-04-10 09:57:54 +02:00
|
|
|
ui_print_page_header (__("Manage events") . $subpage, "images/gm_events.png", false, "", true, $buttons);
|
2012-12-18 12:54:22 +01:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
ui_meta_print_header(__("Manage events") . $subpage, "", $buttons);
|
|
|
|
}
|
2012-02-08 14:04:18 +01:00
|
|
|
|
2012-12-18 12:54:22 +01:00
|
|
|
include_once($config["homedir"] . '/include/functions_events.php');
|
2012-02-08 14:04:18 +01:00
|
|
|
|
2013-06-10 18:15:36 +02:00
|
|
|
|
2012-02-08 14:04:18 +01:00
|
|
|
switch($section) {
|
2012-12-20 19:00:00 +01:00
|
|
|
case 'edit_filter':
|
|
|
|
require_once($config["homedir"] . '/godmode/events/event_edit_filter.php');
|
|
|
|
break;
|
2012-02-08 14:04:18 +01:00
|
|
|
case 'filter':
|
2012-12-18 12:54:22 +01:00
|
|
|
require_once($config["homedir"] . '/godmode/events/event_filter.php');
|
2012-02-08 14:04:18 +01:00
|
|
|
break;
|
|
|
|
case 'fields':
|
2012-12-18 12:54:22 +01:00
|
|
|
require_once($config["homedir"] . '/godmode/events/custom_events.php');
|
2012-02-08 14:04:18 +01:00
|
|
|
break;
|
2012-10-09 18:05:32 +02:00
|
|
|
case 'responses':
|
2012-12-18 12:54:22 +01:00
|
|
|
require_once($config["homedir"] . '/godmode/events/event_responses.php');
|
2012-10-09 18:05:32 +02:00
|
|
|
break;
|
2012-02-08 14:04:18 +01:00
|
|
|
}
|
|
|
|
|
2013-06-20 11:00:44 +02:00
|
|
|
enterprise_hook('close_meta_frame');
|
2012-10-09 18:05:32 +02:00
|
|
|
?>
|