pandorafms/pandora_console/include/functions_menu.php

497 lines
15 KiB
PHP
Raw Normal View History

2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; version 2
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01: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-08-24 Miguel de Dios <miguel.dedios@artica.es> * include/functions_menu.php, include/functions_html.php, include/functions_events.php, include/functions_messages.php, include/functions_modules.php, include/functions_exportserver.php, include/functions_reporting.php, include/functions_filemanager.php, include/pchart_graph.php, include/pandora_graph.php, include/auth/dev.php, include/auth/ldap.php, include/auth/mysql.php, include/config.inc.php, include/functions_networkmap.php, include/functions_servers.php, include/FusionCharts/FusionCharts_Gen.php, include/FusionCharts/FusionCharts.php, include/functions_network_profiles.php, include/gettext.php, include/functions_network_components.php, include/functions_visual_map.php, include/fgraph2.php, include/Image/image_functions.php, include/functions_config.php, include/help/en/help_plugin_parameters.php, include/help/en/help_snmpcommunity.php, include/help/en/help_wmiquery.php, include/help/en/help_postprocess.php, include/help/en/help_prediction_source_module.php, include/help/en/help_date_format.php, include/help/en/help_recontask.php, include/help/en/help_alert-matches.php, include/help/en/help_tcp_send.php, include/help/en/help_wmifield.php, include/help/en/help_duplicateconfig.php, include/help/en/help_agent_status.php, include/help/en/help_manage_alerts.php, include/help/en/help_wmikey.php, include/help/en/help_alert_type.php, include/help/en/help_network_component.php, include/help/en/help_time_stamp-comparation.php, include/help/en/help_eventview.php, include/help/en/help_timesource.php, include/help/en/help_alert_validation.php, include/help/en/help_map_builder.php, include/help/en/help_alert_recovery.php, include/help/en/help_module_type.php, include/help/en/help_planned_downtime.php, include/help/en/help_serverlag.php, include/help/en/help_alerts.php, include/help/en/help_snmpwalk.php, include/help/en/help_module_definition.php, include/help/en/help_plugin_definition.php, include/help/en/help_wminamespace.php, include/help/en/help_snmpoid.php include/help/en/help_manageconfig.php, include/help/es/help_alert_validation.php, include/help/es/help_plugin_parameters.php, include/help/es/help_snmpcommunity.php, include/help/es/help_wmiquery.php, include/help/es/help_map_builder.php, include/help/es/help_postprocess.php, include/help/es/help_date_format.php, include/help/es/help_alert_recovery.php, include/help/es/help_prediction_source_module.php, include/help/es/help_module_type.php, include/help/es/help_planned_downtime.php, include/help/es/help_alert-matches.php, include/help/es/help_recontask.php, include/help/es/help_alerts.php, include/help/es/help_serverlag.php, include/help/es/help_snmpwalk.php, include/help/es/help_module_definition.php, include/help/es/help_tcp_send.php, include/help/es/help_duplicateconfig.php, include/help/es/help_wmifield.php, include/help/es/help_manage_alerts.php, include/help/es/help_wmikey.php, include/help/es/help_plugin_definition.php, include/help/es/help_alert_type.php, include/help/es/help_snmpoid.php, include/help/es/help_wminamespace.php, include/help/es/help_network_component.php, include/help/es/help_time_stamp-comparation.php, include/help/es/help_manageconfig.php, include/help/es/help_timesource.php, include/config_process.php, include/functions_ui.php, include/htmlawed.php, include/functions_custom_graphs.php, include/fgraph.php, include/functions_incidents.php, include/functions.php, include/functions_agents.php, include/functions_db.php, include/functions_themes.php, include/streams.php, include/functions_fsgraph.php, include/functions_alerts.php, include/functions_reports.php, include/functions_extensions.php, include/functions_ui_renders.php: change comments blocks for delete the warnings to construct phpDoc Files, give a struct and order in the phpDoc files. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-25 19:39:28 +02:00
/**
* @package Include
* @subpackage Menu
2009-08-24 Miguel de Dios <miguel.dedios@artica.es> * include/functions_menu.php, include/functions_html.php, include/functions_events.php, include/functions_messages.php, include/functions_modules.php, include/functions_exportserver.php, include/functions_reporting.php, include/functions_filemanager.php, include/pchart_graph.php, include/pandora_graph.php, include/auth/dev.php, include/auth/ldap.php, include/auth/mysql.php, include/config.inc.php, include/functions_networkmap.php, include/functions_servers.php, include/FusionCharts/FusionCharts_Gen.php, include/FusionCharts/FusionCharts.php, include/functions_network_profiles.php, include/gettext.php, include/functions_network_components.php, include/functions_visual_map.php, include/fgraph2.php, include/Image/image_functions.php, include/functions_config.php, include/help/en/help_plugin_parameters.php, include/help/en/help_snmpcommunity.php, include/help/en/help_wmiquery.php, include/help/en/help_postprocess.php, include/help/en/help_prediction_source_module.php, include/help/en/help_date_format.php, include/help/en/help_recontask.php, include/help/en/help_alert-matches.php, include/help/en/help_tcp_send.php, include/help/en/help_wmifield.php, include/help/en/help_duplicateconfig.php, include/help/en/help_agent_status.php, include/help/en/help_manage_alerts.php, include/help/en/help_wmikey.php, include/help/en/help_alert_type.php, include/help/en/help_network_component.php, include/help/en/help_time_stamp-comparation.php, include/help/en/help_eventview.php, include/help/en/help_timesource.php, include/help/en/help_alert_validation.php, include/help/en/help_map_builder.php, include/help/en/help_alert_recovery.php, include/help/en/help_module_type.php, include/help/en/help_planned_downtime.php, include/help/en/help_serverlag.php, include/help/en/help_alerts.php, include/help/en/help_snmpwalk.php, include/help/en/help_module_definition.php, include/help/en/help_plugin_definition.php, include/help/en/help_wminamespace.php, include/help/en/help_snmpoid.php include/help/en/help_manageconfig.php, include/help/es/help_alert_validation.php, include/help/es/help_plugin_parameters.php, include/help/es/help_snmpcommunity.php, include/help/es/help_wmiquery.php, include/help/es/help_map_builder.php, include/help/es/help_postprocess.php, include/help/es/help_date_format.php, include/help/es/help_alert_recovery.php, include/help/es/help_prediction_source_module.php, include/help/es/help_module_type.php, include/help/es/help_planned_downtime.php, include/help/es/help_alert-matches.php, include/help/es/help_recontask.php, include/help/es/help_alerts.php, include/help/es/help_serverlag.php, include/help/es/help_snmpwalk.php, include/help/es/help_module_definition.php, include/help/es/help_tcp_send.php, include/help/es/help_duplicateconfig.php, include/help/es/help_wmifield.php, include/help/es/help_manage_alerts.php, include/help/es/help_wmikey.php, include/help/es/help_plugin_definition.php, include/help/es/help_alert_type.php, include/help/es/help_snmpoid.php, include/help/es/help_wminamespace.php, include/help/es/help_network_component.php, include/help/es/help_time_stamp-comparation.php, include/help/es/help_manageconfig.php, include/help/es/help_timesource.php, include/config_process.php, include/functions_ui.php, include/htmlawed.php, include/functions_custom_graphs.php, include/fgraph.php, include/functions_incidents.php, include/functions.php, include/functions_agents.php, include/functions_db.php, include/functions_themes.php, include/streams.php, include/functions_fsgraph.php, include/functions_alerts.php, include/functions_reports.php, include/functions_extensions.php, include/functions_ui_renders.php: change comments blocks for delete the warnings to construct phpDoc Files, give a struct and order in the phpDoc files. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-25 19:39:28 +02:00
*/
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
/**
* Prints a complete menu structure.
*
* @param array Menu structure to print.
*/
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
function menu_print_menu (&$menu) {
global $config;
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
static $idcounter = 0;
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
echo '<div class="menu">';
$sec = (string) get_parameter ('sec');
$sec2 = (string) get_parameter ('sec2');
$allsec2 = explode('sec2=', $_SERVER['REQUEST_URI']);
if(isset($allsec2[1])) {
$allsec2 = $allsec2[1];
}
else {
$allsec2 = $sec2;
}
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
echo '<ul'.(isset ($menu['class']) ? ' class="'.$menu['class'].'"' : '').'>';
foreach ($menu as $mainsec => $main) {
$extensionInMenuParameter = (string) get_parameter ('extension_in_menu','');
$showSubsection = true;
if ($extensionInMenuParameter != '') {
if ($extensionInMenuParameter == $mainsec)
$showSubsection = true;
else
$showSubsection = false;
}
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
if ($mainsec == 'class')
continue;
if (! isset ($main['id'])) {
$id = 'menu_'.++$idcounter;
}
else {
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
$id = $main['id'];
}
$submenu = false;
$classes = array ('menu_icon');
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
if (isset ($main["sub"])) {
$classes[] = 'has_submenu';
$submenu = true;
}
if (!isset ($main["refr"]))
$main["refr"] = 0;
if (($sec == $mainsec) && ($showSubsection)) {
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
$classes[] = 'selected';
}
else {
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
$classes[] = 'not_selected';
if ($extensionInMenuParameter == $mainsec)
$classes[] = 'selected';
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
}
$output = '';
if (! $submenu) {
$main["sub"] = array (); //Empty array won't go through foreach
}
$submenu_output = '';
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
foreach ($main["sub"] as $subsec2 => $sub) {
//Init some variables
$visible = false;
$selected = false;
$subsec2 = io_safe_output($subsec2);
// Choose valid suboptions (sec2)
2011-05-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es> * include/functions_graph.php include/functions_users.php include/functions_html.php include/functions_menu.php include/functions_messages.php include/functions_modules.php include/functions_reporting.php include/functions_groups.php include/functions_gis.php include/auth/ldap.php include/auth/mysql.php include/functions_networkmap.php include/functions_network_components.php include/functions_visual_map.php include/functions_profile.php include/ajax/visual_console_builder.ajax.php include/ajax/alert_list.ajax.php include/ajax/module.php include/functions_config.php include/functions_api.php include/functions_ui.php include/functions_custom_graphs.php include/fgraph.php include/functions_agents.php include/functions_db.php include/functions_alerts.php include/functions_reports.php index.php extensions/insert_data.php extensions/agents_modules.php extensions/resource_registration.php extensions/resource_exportation.php extensions/module_groups.php operation/incidents/incident_detail.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/alerts_status.php operation/agentes/estado_generalagente.php operation/agentes/estado_agente.php operation/agentes/sla_view.php operation/agentes/exportdata.php operation/agentes/gis_view.php operation/agentes/estado_monitores.php operation/agentes/ver_agente.php operation/agentes/graphs.php operation/agentes/group_view.php operation/search_agents.php operation/snmpconsole/snmp_view.php operation/users/user_edit.php operation/integria_incidents/incident_detail.php operation/gis_maps/render_view.php operation/gis_maps/ajax.php operation/events/events_rss.php operation/events/export_csv.php operation/events/events_list.php operation/events/events_marquee.php operation/events/events.php operation/search_alerts.php operation/messages/message.php operation/search_users.php mobile/operation/agents/monitor_status.php mobile/operation/agents/view_agents.php mobile/operation/agents/view_alerts.php mobile/operation/agents/group_view.php mobile/operation/events/events.php ajax.php general/ui/agents_list.php godmode/groups/configure_group.php godmode/groups/group_list.php godmode/db/db_refine.php godmode/db/db_info.php godmode/db/db_purge.php godmode/agentes/module_manager_editor_common.php godmode/agentes/module_manager_editor_network.php godmode/agentes/module_manager_editor_wmi.php godmode/agentes/module_manager_editor_plugin.php godmode/agentes/module_manager_editor_prediction.php godmode/agentes/agent_conf_gis.php godmode/agentes/module_manager.php godmode/agentes/modificar_agente.php godmode/agentes/configurar_agente.php godmode/agentes/module_manager_editor.php godmode/agentes/planned_downtime.php godmode/agentes/manage_config_remote.php godmode/agentes/agent_manager.php godmode/servers/manage_recontask_form.php godmode/alerts/alert_list.list.php godmode/alerts/configure_alert_compound.php godmode/alerts/alert_compounds.php godmode/alerts/alert_list.php godmode/alerts/configure_alert_template.php godmode/alerts/alert_templates.php godmode/alerts/configure_alert_action.php godmode/alerts/alert_actions.php godmode/alerts/alert_list.builder.php godmode/setup/setup_auth.php godmode/users/user_list.php godmode/users/configure_user.php godmode/users/configure_profile.php godmode/massive/massive_add_alerts.php godmode/massive/massive_copy_modules.php godmode/massive/massive_delete_agents.php godmode/massive/massive_enable_disable_alerts.php godmode/massive/massive_delete_profiles.php godmode/massive/massive_edit_agents.php godmode/massive/massive_delete_action_alerts.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/massive/massive_standby_alerts.php godmode/massive/massive_add_action_alerts.php godmode/reporting/visual_console_builder.wizard.php godmode/reporting/reporting_builder.list_items.php godmode/reporting/visual_console_builder.php godmode/reporting/reporting_builder.main.php godmode/reporting/visual_console_builder.data.php godmode/reporting/visual_console_builder.elements.php godmode/reporting/graph_builder.graph_editor.php godmode/reporting/reporting_builder.php godmode/reporting/reporting_builder.item_editor.php: Functions in functions_profile.php, functions_agents.php, functions_users.php, functions_massive_policies.php, functions_audit.php, functions_backup.php, functions_collection.php, functions_skins.php, functions_enterprise.php, functions_groups.php, functions_local_components.php, functions_metaconsole.php, functions_policies.php, functions_reporting.php, functions_reporting_csv.php, functions_reporting_pdf2.php, functions_services.php have their own prefixes. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4333 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-10 20:51:09 +02:00
if (enterprise_hook ('enterprise_acl', array ($config['id_user'], $mainsec, $subsec2)) == false){
continue;
}
$class = '';
$selected_submenu2 = false;
//Look for submenus in level2!
if(isset($sub['sub2'])) {
$class .= 'has_submenu ';
//This hacks avoid empty delimiter error when sec2 is not provided.
if (!$sec2) {
$sec2=" ";
}
//Check if some submenu was selected to mark this (the parent) as selected
foreach (array_keys($sub['sub2']) as $key) {
if (strpos($key, $sec2) !== false) {
$selected_submenu2 = true;
break;
}
}
}
//Create godmode option if submenu has godmode on
if (isset($sub['subsecs'])) {
//Sometimes you need to add all paths because in the
//same dir are code from visual console and reports
//for example
if (is_array($sub['subsecs'])) {
//Compare each string
foreach ($sub['subsecs'] as $god_path) {
if (strpos($sec2, $god_path) !== false) {
$selected_submenu2=true;
break;
}
}
}
else {
//If there is only a string just compare
if (strpos($sec2, $sub['subsecs']) !== false) {
$selected_submenu2=true;
}
}
}
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
//Set class
if (($sec2 == $subsec2 || $allsec2 == $subsec2 ||
$selected_submenu2) && isset ($sub[$subsec2]["options"])
&& (
get_parameter_get ($sub[$subsec2]["options"]["name"]) == $sub[$subsec2]["options"]["value"])
) {
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
//If the subclass is selected and there are options and that options value is true
$class .= 'submenu_selected selected';
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
$selected = true;
$visible = true;
}
elseif (($sec2 == $subsec2 || $allsec2 == $subsec2|| $selected_submenu2) && !isset ($sub[$subsec2]["options"])) {
$class .= 'submenu_selected selected';
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
$selected = true;
$hasExtensions = (array_key_exists('hasExtensions',$main)) ? $main['hasExtensions'] : false;
if (($extensionInMenuParameter != '') && ($hasExtensions))
$visible = true;
else
$visible = false;
}
else {
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
//Else it's not selected
$class .= 'submenu_not_selected';
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
}
if (! isset ($sub["refr"])) {
$sub["refr"] = 0;
}
if (isset ($sub["type"]) && $sub["type"] == "direct") {
//This is an external link
$submenu_output .= '<li class="'.$class.'"><a href="'.$subsec2.'">'.$sub["text"]."</a>";
if(isset($sub['sub2']) || $selected) {
$submenu_output .= html_print_image("include/styles/images/toggle.png", true, array("class" => "toggle", "alt" => "toogle"));
}
}
else {
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
//This is an internal link
if (isset ($sub[$subsec2]["options"])) {
$link_add = "&amp;".$sub[$subsec2]["options"]["name"]."=".$sub[$subsec2]["options"]["value"];
}
else {
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
$link_add = "";
}
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
$submenu_output .= '<li'.($class ? ' class="'.$class.'"' : '').'>';
//Ini Add icon extension
$secExtension = null;
if (array_key_exists('extension',$sub)) $secExtensionBool = $sub["extension"];
else $secExtensionBool = false;
if ($secExtensionBool) {
$imageIconDefault = 'images/extensions.png';
if (strlen($sub["icon"]) > 0) {
$icon_enterprise = false;
if (isset($sub['enterprise'])) {
$icon_enterprise = (bool)$sub['enterprise'];
}
if ($icon_enterprise) {
$imageIcon ='enterprise/extensions/'.$sub["icon"];
}
else {
$imageIcon ='extensions/'.$sub["icon"];
}
if (!file_exists(realpath($imageIcon)))
$imageIcon = $imageIconDefault;
}
else {
$imageIcon = $imageIconDefault;
}
//Delete extension Icon before the was a style with background: url('.$imageIcon.') no-repeat;
$submenu_output .= '<div style="width: 16px; height: 16px; float: left; margin: 5px 0px 0px 3px;">&nbsp;</div>';
}
$secExtension = null;
if (array_key_exists('sec',$sub))
$secExtension = $sub["sec"];
if (strlen($secExtension) > 0) {
$secUrl = $secExtension;
$extensionInMenu = 'extension_in_menu='.$mainsec.'&amp;';
}
else {
$secUrl = $mainsec;
$extensionInMenu = '';
}
if (isset ($sub["text"]) || $selected) {
$title = ' title="' . $sub["text"] . ' "';
}
else {
$title = '';
}
$submenu_output .= '<a href="index.php?'.$extensionInMenu.'sec='.$secUrl.'&amp;sec2='.$subsec2.($sub["refr"] ? '&amp;refr=' . $sub["refr"] : '').$link_add.'"' . $title . '>'.$sub["text"].'</a>';
if (isset($sub['sub2'])) {
$submenu_output .= html_print_image("include/styles/images/toggle.png", true, array("class" => "toggle", "alt" => "toogle"));
}
}
//Print second level submenu
if (isset($sub['sub2'])) {
//Display if father is selected
$display = "style='display:none'";
if ($selected) {
$display = "";
}
$submenu2_list = '';
foreach ($sub['sub2'] as $key => $sub2) {
$link = "index.php?sec=".$sec."&sec2=".$key;
//Display if one submenu2 was selected!
if (strpos($key, $sec2) !== false) {
$display = "";
}
$class = "submenu2";
$submenu2_list .= '<li class="'.$class.'" style="font-weight: normal;">';
$submenu2_list .= '<a style="font-weight:normal;" href="'.$link.'">'.$sub2["text"].'</a></li>';
}
//Add submenu2 to submenu string
$submenu_output .= "<ul class=submenu2 $display>";
$submenu_output .= $submenu2_list;
$submenu_output .= "</ul>";
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
}
//Submenu close list!
$submenu_output .= '</li>';
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
}
// Choose valid section (sec)
2011-05-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es> * include/functions_graph.php include/functions_users.php include/functions_html.php include/functions_menu.php include/functions_messages.php include/functions_modules.php include/functions_reporting.php include/functions_groups.php include/functions_gis.php include/auth/ldap.php include/auth/mysql.php include/functions_networkmap.php include/functions_network_components.php include/functions_visual_map.php include/functions_profile.php include/ajax/visual_console_builder.ajax.php include/ajax/alert_list.ajax.php include/ajax/module.php include/functions_config.php include/functions_api.php include/functions_ui.php include/functions_custom_graphs.php include/fgraph.php include/functions_agents.php include/functions_db.php include/functions_alerts.php include/functions_reports.php index.php extensions/insert_data.php extensions/agents_modules.php extensions/resource_registration.php extensions/resource_exportation.php extensions/module_groups.php operation/incidents/incident_detail.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/alerts_status.php operation/agentes/estado_generalagente.php operation/agentes/estado_agente.php operation/agentes/sla_view.php operation/agentes/exportdata.php operation/agentes/gis_view.php operation/agentes/estado_monitores.php operation/agentes/ver_agente.php operation/agentes/graphs.php operation/agentes/group_view.php operation/search_agents.php operation/snmpconsole/snmp_view.php operation/users/user_edit.php operation/integria_incidents/incident_detail.php operation/gis_maps/render_view.php operation/gis_maps/ajax.php operation/events/events_rss.php operation/events/export_csv.php operation/events/events_list.php operation/events/events_marquee.php operation/events/events.php operation/search_alerts.php operation/messages/message.php operation/search_users.php mobile/operation/agents/monitor_status.php mobile/operation/agents/view_agents.php mobile/operation/agents/view_alerts.php mobile/operation/agents/group_view.php mobile/operation/events/events.php ajax.php general/ui/agents_list.php godmode/groups/configure_group.php godmode/groups/group_list.php godmode/db/db_refine.php godmode/db/db_info.php godmode/db/db_purge.php godmode/agentes/module_manager_editor_common.php godmode/agentes/module_manager_editor_network.php godmode/agentes/module_manager_editor_wmi.php godmode/agentes/module_manager_editor_plugin.php godmode/agentes/module_manager_editor_prediction.php godmode/agentes/agent_conf_gis.php godmode/agentes/module_manager.php godmode/agentes/modificar_agente.php godmode/agentes/configurar_agente.php godmode/agentes/module_manager_editor.php godmode/agentes/planned_downtime.php godmode/agentes/manage_config_remote.php godmode/agentes/agent_manager.php godmode/servers/manage_recontask_form.php godmode/alerts/alert_list.list.php godmode/alerts/configure_alert_compound.php godmode/alerts/alert_compounds.php godmode/alerts/alert_list.php godmode/alerts/configure_alert_template.php godmode/alerts/alert_templates.php godmode/alerts/configure_alert_action.php godmode/alerts/alert_actions.php godmode/alerts/alert_list.builder.php godmode/setup/setup_auth.php godmode/users/user_list.php godmode/users/configure_user.php godmode/users/configure_profile.php godmode/massive/massive_add_alerts.php godmode/massive/massive_copy_modules.php godmode/massive/massive_delete_agents.php godmode/massive/massive_enable_disable_alerts.php godmode/massive/massive_delete_profiles.php godmode/massive/massive_edit_agents.php godmode/massive/massive_delete_action_alerts.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/massive/massive_standby_alerts.php godmode/massive/massive_add_action_alerts.php godmode/reporting/visual_console_builder.wizard.php godmode/reporting/reporting_builder.list_items.php godmode/reporting/visual_console_builder.php godmode/reporting/reporting_builder.main.php godmode/reporting/visual_console_builder.data.php godmode/reporting/visual_console_builder.elements.php godmode/reporting/graph_builder.graph_editor.php godmode/reporting/reporting_builder.php godmode/reporting/reporting_builder.item_editor.php: Functions in functions_profile.php, functions_agents.php, functions_users.php, functions_massive_policies.php, functions_audit.php, functions_backup.php, functions_collection.php, functions_skins.php, functions_enterprise.php, functions_groups.php, functions_local_components.php, functions_metaconsole.php, functions_policies.php, functions_reporting.php, functions_reporting_csv.php, functions_reporting_pdf2.php, functions_services.php have their own prefixes. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4333 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-05-10 20:51:09 +02:00
if (enterprise_hook ('enterprise_acl', array ($config['id_user'], $mainsec, $main["sec2"])) == false){
continue;
}
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
//Print out the first level
$output .= '<li class="'.implode (" ", $classes).'" id="icon_'.$id.'">';
2011-04-27 Juan Manuel Ramon <juanmanuel.ramon@artica.es> * include/functions_graph.php include/functions_users.php include/functions_events.php include/functions_html.php include/functions_menu.php include/styles/pandora.css include/graphs/functions_pchart.php include/functions_messages.php include/functions_exportserver.php include/functions_modules.php include/functions_reporting.php include/functions_filemanager.php include/functions_groups.php include/functions_gis.php include/functions_networkmap.php include/functions_servers.php include/functions_network_components.php include/functions_visual_map.php include/ajax/skins.ajax.php include/ajax/visual_console_builder.ajax.php include/help/en/help_gis_map_builder.php include/help/en/help_agent_status.php include/help/en/help_eventview.php include/help/en/help_configure_gis_map.php include/help/en/help_cascade_protection.php include/help/en/help_setup_gis_index.php include/help/es/help_gis_map_builder.php include/help/es/help_agent_status.php include/help/es/help_eventview.php include/help/es/help_configure_gis_map.php include/help/es/help_cascade_protection.php include/help/ja/help_gis_map_builder.php include/help/ja/help_agent_status.php include/help/ja/help_eventview.php include/help/ja/help_configure_gis_map.php include/help/ja/help_cascade_protection.php include/help/ja/help_setup_gis_index.php include/functions_ui.php include/functions_incidents.php include/functions.php include/functions_agents.php include/functions_db.php include/functions_fsgraph.php include/functions_extensions.php include/functions_ui_renders.php extensions/insert_data.php extensions/system_info.php extensions/extension_uploader.php extensions/agents_modules.php extensions/dbmanager.php extensions/resource_registration.php extensions/resource_exportation.php extensions/users_connected.php extensions/module_groups.php extensions/update_manager/settings.php extensions/update_manager/main.php operation/incidents/incident.incident.php operation/incidents/incident.php operation/incidents/incident.files.php operation/incidents/incident.tracking.php operation/incidents/incident_detail.php operation/incidents/incident.workunits.php operation/incidents/incident.list.php operation/search_modules.php operation/extensions.php operation/visual_console/render_view.php operation/visual_console/index.php operation/agentes/status_monitor.php operation/agentes/estado_ultimopaquete.php operation/agentes/datos_agente.php operation/agentes/alerts_status.php operation/agentes/estado_generalagente.php operation/agentes/custom_fields.php operation/agentes/estado_agente.php operation/agentes/networkmap.topology.php operation/agentes/alerts_status.functions.php operation/agentes/networkmap.groups.php operation/agentes/sla_view.php operation/agentes/exportdata.php operation/agentes/gis_view.php operation/agentes/estado_monitores.php operation/agentes/ver_agente.php operation/agentes/graphs.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/search_agents.php operation/search_graphs.php operation/snmpconsole/snmp_view.php operation/users/user_edit.php operation/integria_incidents/incident.incident.php operation/integria_incidents/incident.php operation/integria_incidents/incident.files.php operation/integria_incidents/incident.tracking.php operation/integria_incidents/incident_detail.php operation/integria_incidents/incident.workunits.php operation/integria_incidents/incident.list.php operation/gis_maps/render_view.php operation/gis_maps/ajax.php operation/gis_maps/index.php operation/events/export_csv.php operation/events/sound_events.php operation/events/events_validate.php operation/events/events_list.php operation/events/events.php operation/search_alerts.php operation/messages/message.php operation/reporting/reporting_xml.php operation/reporting/reporting_viewer.php operation/reporting/graph_viewer.php operation/reporting/custom_reporting.php operation/search_reports.php operation/search_maps.php operation/search_results.php operation/search_users.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/events/events.php mobile/operation/servers/view_servers.php mobile/include/user.class.php general/pandora_help.php general/noaccess.php general/login_page.php general/logon_ok.php general/logoff.php general/ui/agents_list.php general/header.php godmode/groups/modu_group_list.php godmode/groups/configure_group.php godmode/groups/configure_modu_group.php godmode/groups/group_list.php godmode/admin_access_logs.php godmode/extensions.php godmode/db/db_sanity.php godmode/db/db_refine.php godmode/db/db_info.php godmode/db/db_event.php godmode/db/db_purge.php godmode/agentes/agent_template.php godmode/agentes/module_manager_editor_common.php godmode/agentes/module_manager_editor_network.php godmode/agentes/fields_manager.php godmode/agentes/module_manager_editor_wmi.php godmode/agentes/module_manager_editor_plugin.php godmode/agentes/agent_conf_gis.php godmode/agentes/module_manager_editor_prediction.php godmode/agentes/module_manager.php godmode/agentes/modificar_agente.php godmode/agentes/configurar_agente.php godmode/agentes/configure_field.php godmode/agentes/module_manager_editor.php godmode/agentes/planned_downtime.php godmode/agentes/manage_config_remote.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/servers/manage_recontask_form.php godmode/alerts/alert_list.list.php godmode/alerts/configure_alert_compound.php godmode/alerts/alert_compounds.php godmode/alerts/alert_list.php godmode/alerts/configure_alert_template.php godmode/alerts/alert_templates.php godmode/alerts/configure_alert_action.php godmode/alerts/configure_alert_command.php godmode/alerts/alert_actions.php godmode/alerts/alert_list.builder.php godmode/alerts/alert_commands.php godmode/snmpconsole/snmp_alert.php godmode/snmpconsole/snmp_filters.php godmode/setup/file_manager.php godmode/setup/os.list.php godmode/setup/news.php godmode/setup/gis_step_2.php godmode/setup/links.php godmode/setup/setup.php godmode/setup/os.php godmode/setup/performance.php godmode/setup/setup_auth.php godmode/setup/gis.php godmode/setup/os.builder.php godmode/setup/setup_visuals.php godmode/users/user_list.php godmode/users/configure_user.php godmode/users/configure_profile.php godmode/gis_maps/configure_gis_map.php godmode/gis_maps/index.php godmode/massive/massive_add_alerts.php godmode/massive/massive_copy_modules.php godmode/massive/massive_delete_agents.php godmode/massive/massive_enable_disable_alerts.php godmode/massive/massive_operations.php godmode/massive/massive_delete_profiles.php godmode/massive/massive_edit_agents.php godmode/massive/massive_delete_action_alerts.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/massive/massive_standby_alerts.php godmode/massive/massive_add_action_alerts.php godmode/modules/manage_network_components_form.php godmode/modules/manage_nc_groups_form.php godmode/modules/manage_network_templates.php godmode/modules/module_list.php godmode/modules/manage_network_components_form_common.php godmode/modules/manage_network_components_form_network.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/modules/manage_network_components_form_plugin.php godmode/reporting/reporting_builder.list_items.php godmode/reporting/graph_builder.main.php godmode/reporting/visual_console_builder.wizard.php godmode/reporting/visual_console_builder.php godmode/reporting/reporting_builder.preview.php godmode/reporting/reporting_builder.main.php godmode/reporting/visual_console_builder.data.php godmode/reporting/visual_console_builder.elements.php godmode/reporting/graph_builder.php godmode/reporting/graph_builder.graph_editor.php godmode/reporting/reporting_builder.php godmode/reporting/visual_console_builder.editor.php godmode/reporting/reporting_builder.item_editor.php godmode/reporting/map_builder.php godmode/reporting/graphs.php godmode/reporting/graph_builder.preview.php: Now functions on functions_html.php, functions_gis.php, functions_filemanager.php, functions_exportserver.php have "html_", "gis_", "filemanager_" and "exportserver_" prefix respectively. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4281 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-04-27 15:43:31 +02:00
$output .= '<a href="index.php?sec='.$mainsec.'&amp;sec2='.$main["sec2"].($main["refr"] ? '&amp;refr='.$main["refr"] : '').'">'.$main["text"].'</a>' . html_print_image("include/styles/images/toggle.png", true, array("class" => "toggle", "alt" => "toogle"));
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
if ($submenu_output != '') {
//WARNING: IN ORDER TO MODIFY THE VISIBILITY OF MENU'S AND SUBMENU'S (eg. with cookies) YOU HAVE TO ADD TO THIS ELSEIF. DON'T MODIFY THE CSS
if ($visible || in_array ("selected", $classes)) {
$visible = true;
}
if (!$showSubsection) {
$visible = false;
}
2009-03-02 Esteban Sanchez <estebans@artica.es> * include/functions_menu.php: Added to repository. Functions for menu. * operation/menu.php, godmode/menu.php: Added class to menu due to changes in print_menu(). * general/main_menu.php: temp_print_menu() moved to functions_menu.php * include/functions_themes.php: Added to repository. Implement functions relative to themes (only CSS themes list at this moment). * include/styles/pandora.css, include/styles/pandora_black.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: Added author, name and description comments to adopt to new get_themes() interface. * include/styles/pandora_width.css: Improved and make lighter by simply rewrite some classes. * include/functions.php: Added is_ajax(). * godmode/agentes/module_manager_editor.php, godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, godmode/alerts/alert_templates.php, godmode/groups/group_list.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/events/events.php, operation/messages/message.php: Use is_ajax() * godmode/setup/setup.php: Use enterprise_include() instead of manual checking. Use get_css_themes() to show the theme list. * include/styles/common.css: Added to repository. Minimal styles to make pandora works and common with all the CSS themes. * include/functions_ui.php: Added common.css file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1496 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-02 14:43:15 +01:00
$output .= '<ul class="submenu'.($visible ? '' : ' invisible').'">';
$output .= $submenu_output;
$output .= '</ul>';
}
$output .= '</li>';
echo $output;
}
echo '</ul>';
//Invisible UL for adding border-top
echo '<ul style="height: 0px;"><li>&nbsp;</li></ul></div>';
}
/**
* Get all the data structure of menu. Operation and Godmode
*
* @return array Menu structure.
*/
function menu_get_full_sec() {
global $menu_operation;
global $menu_godmode;
if($menu_godmode == null || $menu_operation == null) {
return array();
}
else {
$menu = $menu_operation + $menu_godmode;
}
unset($menu['class']);
menu_add_extras($menu);
return $menu;
}
/**
* Build an extra access pages array and merge it with menu
*
* @param menu array (pass by reference)
*
*/
function menu_add_extras(&$menu) {
$menu_extra = array();
$menu_extra['gusuarios']['sub']['godmode/users/configure_user']['text'] = __('Configure user');
$menu_extra['gusuarios']['sub']['godmode/users/configure_profile']['text'] = __('Configure profile');
$menu_extra['gservers']['sub']['godmode/servers/manage_recontask_form']['text'] = __('Manage recontask');
$menu_extra['gmodules']['sub']['godmode/modules/manage_network_templates_form']['text'] = __('Module templates management');
$menu_extra['gmodules']['sub']['enterprise/godmode/modules/manage_inventory_modules_form']['text'] = __('Inventory modules management');
$menu_extra['gmodules']['sub']['godmode/tag/edit_tag']['text'] = __('Tags management');
$menu_extra['gagente']['sub']['godmode/agentes/configurar_agente']['text'] = __('Agents management');
$menu_extra['estado']['sub']['operation/agentes/ver_agente']['text'] = __('View agent');
$menu_extra['galertas']['sub']['godmode/alerts/configure_alert_template']['text'] = __('Configure alert template');
$menu_extra['network']['sub']['operation/agentes/networkmap']['text'] = __('Manage network map');
$menu_extra['reporting']['sub']['operation/reporting/reporting_viewer']['text'] = __('View reporting');
$menu_extra['reporting']['sub']['operation/visual_console/render_view']['text'] = __('View visual console');
$menu_extra['reporting']['sub']['godmode/reporting/graph_builder']['text'] = __('Manage custom graphs');
$menu_extra['reporting']['sub']['enterprise/dashboard/dashboard_replicate']['text'] = __('Copy dashboard');
$menu_extra['godgismaps']['sub']['godmode/gis_maps/configure_gis_map']['text'] = __('Manage GIS Maps');
$menu_extra['workspace']['sub']['operation/incidents/incident_statistics']['text'] = __('Incidents statistics');
$menu_extra['workspace']['sub']['operation/messages/message_edit']['text'] = __('Manage messages');
$menu_extra['gagente']['sub']['godmode/groups/configure_group']['text'] = __('Manage groups');
$menu_extra['gagente']['sub']['godmode/groups/configure_modu_group']['text'] = __('Manage module groups');
$menu_extra['gagente']['sub']['godmode/agentes/configure_field']['text'] = __('Manage custom field');
$menu_extra['galertas']['sub']['godmode/alerts/configure_alert_action']['text'] = __('Manage alert actions');
$menu_extra['galertas']['sub']['godmode/alerts/configure_alert_command']['text'] = __('Manage commands');
$menu_extra['galertas']['sub']['godmode/alerts/configure_alert_compound']['text'] = __('Manage compound alerts');
$menu_extra['galertas']['sub']['enterprise/godmode/alerts/alert_events']['text'] = __('Manage event alerts');
$menu_extra['gservers']['sub']['enterprise/godmode/servers/manage_export_form']['text'] = __('Manage export targets');
// Duplicate extensions as sec=extension to check it from url
foreach ($menu as $k => $m) {
if(!isset($m['sub'])) {
continue;
}
foreach($m['sub'] as $kk => $mm) {
if(isset($mm['sec'])) {
$menu_extra[$mm['sec']]['sub'][$kk]['text'] = $mm['text'];
}
}
}
$menu = array_merge_recursive($menu, $menu_extra);
}
/**
* Get the sec list built in menu
*
* @param bool If true, the array returned will have the structure
* to combo categories (optgroup)
*
* @return array Sections list
*/
function menu_get_sec($with_categories = false) {
$menu = menu_get_full_sec();
unset($menu['class']);
$in_godmode = false;
foreach($menu as $k => $v) {
if ($with_categories) {
if (!$in_godmode && $k[0] == 'g') {
// Hack to dont confuse with gis activated because godmode
// sec starts with g (like gismaps)
if($k != 'gismaps') {
$in_godmode = true;
}
}
if ($in_godmode) {
$category = __('Administration');
}
else {
$category = __('Operation');
}
$sec_array[$k]['optgroup'] = $category;
$sec_array[$k]['name'] = $v['text'];
}
else {
$sec_array[$k] = $v['text'];
}
}
return $sec_array;
}
/**
* Get the pages in a section
*
* @param string sec code
* @param string menu hash. All the menu structure (For example
* returned by menu_get_full_sec(), json encoded and after that
* base64 encoded. If this value is false this data is obtained from
* menu_get_full_sec();
*
* @return array Sections list
*/
function menu_get_sec_pages($sec,$menu_hash = false) {
if ($menu_hash === false) {
$menu = menu_get_full_sec();
}
else {
$menu = json_decode(base64_decode($menu_hash),true);
}
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
// Get the sec2 of the main section
$sec2_array[$menu[$sec]['sec2']] = $menu[$sec]['text'];
// Get the sec2 of the subsections
foreach ($menu[$sec]['sub'] as $k => $v) {
// Avoid special cases of standalone windows
if(preg_match('/^javascript:/',$k) || preg_match('/\.php/',$k)) {
continue;
}
// If this value has various parameters, we only get the first
$k = explode('&',$k);
$k = $k[0];
$sec2_array[$k] = $v['text'];
}
return $sec2_array;
}
/**
* Check if a page (sec2) is in a section (sec)
*
* @param string section (sec) code
* @param string page (sec2)code
*
* @return true if the page is in section, false otherwise
*/
function menu_sec2_in_sec($sec,$sec2) {
$sec2_array = menu_get_sec_pages($sec);
// If this value has various parameters, we only get the first
$sec2 = explode('&',$sec2);
$sec2 = $sec2[0];
if ($sec2_array != null && in_array($sec2,array_keys($sec2_array))) {
return true;
}
return false;
}
?>