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
|
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
|
|
|
/**
|
2019-03-27 14:39:02 +01:00
|
|
|
* Auxiliary functions to manage menu.
|
|
|
|
*
|
|
|
|
* @category Include
|
|
|
|
* @package Pandora FMS
|
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/ldap.php,
include/auth/mysql.php, include/config.inc.php,
include/functions_networkmap.php, include/functions_servers.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/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 or add the subpackage in phpdoc
comment blocks for to organize more the result phpdoc files. Start to
document undocument functions.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1882 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-26 17:37:47 +02:00
|
|
|
* @subpackage Menu
|
2019-03-27 14:39:02 +01:00
|
|
|
* @version 1.0.0
|
|
|
|
* @license See below
|
|
|
|
*
|
|
|
|
* ______ ___ _______ _______ ________
|
|
|
|
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
|
|
|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
|
|
|
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
|
|
|
*
|
|
|
|
* ============================================================================
|
2020-11-27 13:52:35 +01:00
|
|
|
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
2019-03-27 14:39:02 +01:00
|
|
|
* Please see http://pandorafms.org for full contribution list
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation for version 2.
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
* ============================================================================
|
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
|
|
|
*/
|
|
|
|
|
2019-03-27 14:39:02 +01:00
|
|
|
// Begin.
|
|
|
|
global $config;
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2019-03-27 14:39:02 +01:00
|
|
|
// Set variable to store menu type (classic or collapsed).
|
2021-06-16 15:29:28 +02:00
|
|
|
if (is_ajax() === true && empty(get_parameter('menuType')) === false) {
|
2019-03-26 19:29:48 +01:00
|
|
|
$_SESSION['menu_type'] = get_parameter('menuType', 'classic');
|
2019-03-27 14:39:02 +01:00
|
|
|
return;
|
2019-03-26 19:29:48 +01:00
|
|
|
}
|
|
|
|
|
2019-01-30 16:18:44 +01: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.
|
|
|
|
*
|
2021-08-19 08:18:06 +02:00
|
|
|
* @param array $menu Menu structure to print.
|
|
|
|
*
|
|
|
|
* @return void
|
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
|
|
|
*/
|
2019-01-30 16:18:44 +01:00
|
|
|
function menu_print_menu(&$menu)
|
|
|
|
{
|
|
|
|
global $config;
|
2021-08-19 08:18:06 +02:00
|
|
|
global $menuTypeClass;
|
2022-11-24 09:36:18 +01:00
|
|
|
global $tab_active;
|
2023-02-02 13:28:48 +01:00
|
|
|
global $menu1_selected;
|
|
|
|
global $menu2_selected;
|
2019-01-30 16:18:44 +01:00
|
|
|
static $idcounter = 0;
|
|
|
|
|
|
|
|
echo '<div class="menu">';
|
|
|
|
|
|
|
|
$sec = (string) get_parameter('sec');
|
|
|
|
$sec2 = (string) get_parameter('sec2');
|
2022-10-20 09:43:02 +02:00
|
|
|
if ($sec2 === 'operation/agentes/ver_agente') {
|
2019-05-29 11:34:23 +02:00
|
|
|
$sec2 = 'godmode/agentes/configurar_agente';
|
2022-10-20 09:43:02 +02:00
|
|
|
} else if ($sec2 === 'godmode/servers/discovery') {
|
2019-07-03 11:08:17 +02:00
|
|
|
$wiz = (string) get_parameter('wiz');
|
|
|
|
$sec2 = 'godmode/servers/discovery&wiz='.$wiz;
|
2023-02-13 14:32:02 +01:00
|
|
|
$mode = (string) get_parameter('mode', '');
|
|
|
|
if (empty($mode) === false) {
|
|
|
|
$sec2 .= '&mode='.$mode;
|
|
|
|
}
|
2022-10-20 09:43:02 +02:00
|
|
|
} else if ($sec2 === 'godmode/groups/group_list') {
|
2020-12-03 14:48:12 +01:00
|
|
|
$tab = (string) get_parameter('tab');
|
|
|
|
if ($tab === 'credbox') {
|
|
|
|
$sec2 = 'godmode/groups/group_list&tab='.$tab;
|
|
|
|
}
|
2023-02-07 15:22:51 +01:00
|
|
|
} else if ($sec2 === 'godmode/setup/setup') {
|
|
|
|
$section = (string) get_parameter('section');
|
|
|
|
$sec2 = 'godmode/setup/setup§ion='.$section;
|
|
|
|
} else if ($sec2 === 'godmode/massive/massive_operations') {
|
|
|
|
$tab = (string) get_parameter('tab');
|
|
|
|
$sec2 = 'godmode/massive/massive_operations&tab='.$tab;
|
|
|
|
} else if ($sec2 === 'godmode/events/events') {
|
|
|
|
$section = (string) get_parameter('section');
|
|
|
|
$sec2 = 'godmode/events/events§ion='.$section;
|
2019-05-29 11:34:23 +02:00
|
|
|
} else {
|
|
|
|
$sec2 = (string) get_parameter('sec2');
|
|
|
|
}
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
$menu_selected = false;
|
|
|
|
|
|
|
|
$allsec2 = explode('sec2=', $_SERVER['REQUEST_URI']);
|
2022-10-20 09:43:02 +02:00
|
|
|
if (isset($allsec2[1]) === true) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$allsec2 = $allsec2[1];
|
|
|
|
} else {
|
|
|
|
$allsec2 = $sec2;
|
|
|
|
}
|
|
|
|
|
2019-03-21 13:15:21 +01:00
|
|
|
// Open list of menu.
|
2022-10-20 09:43:02 +02:00
|
|
|
echo '<ul'.((isset($menu['class']) === true) ? ' class="'.$menu['class'].'"' : '').'>';
|
2019-01-30 16:18:44 +01:00
|
|
|
|
|
|
|
// Use $config because a global var is required because normal
|
2019-03-21 13:15:21 +01:00
|
|
|
// and godmode menu are painted separately.
|
2022-10-20 09:43:02 +02:00
|
|
|
if (isset($config['count_main_menu']) === false) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$config['count_main_menu'] = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach ($menu as $mainsec => $main) {
|
2022-10-20 09:43:02 +02:00
|
|
|
$extensionInMenuParameter = (string) get_parameter('extension_in_menu');
|
2019-01-30 16:18:44 +01:00
|
|
|
|
|
|
|
$showSubsection = true;
|
2022-10-20 09:43:02 +02:00
|
|
|
if (empty($extensionInMenuParameter) === false) {
|
|
|
|
$showSubsection = ($extensionInMenuParameter === $mainsec);
|
2019-01-30 16:18:44 +01:00
|
|
|
}
|
|
|
|
|
2022-10-20 09:43:02 +02:00
|
|
|
if ($mainsec === 'class') {
|
2019-01-30 16:18:44 +01:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2022-10-20 09:43:02 +02:00
|
|
|
$id = (isset($main['id']) === false) ? 'menu_'.(++$idcounter) : $main['id'];
|
2019-01-30 16:18:44 +01:00
|
|
|
$submenu = false;
|
2022-10-20 09:43:02 +02:00
|
|
|
$classes = [
|
|
|
|
'menu_icon',
|
|
|
|
($menuTypeClass === 'classic') ? 'no_hidden_menu' : 'menu_icon_collapsed',
|
|
|
|
];
|
2019-03-25 19:37:45 +01:00
|
|
|
|
2021-08-19 08:18:06 +02:00
|
|
|
if (isset($main['sub']) === true) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$classes[] = '';
|
|
|
|
$submenu = true;
|
|
|
|
}
|
|
|
|
|
2021-08-19 08:18:06 +02:00
|
|
|
if (isset($main['refr']) === false) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$main['refr'] = 0;
|
|
|
|
}
|
|
|
|
|
2022-10-20 09:43:02 +02:00
|
|
|
if (($sec === $mainsec) && ((bool) $showSubsection === true)) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$classes[] = '';
|
|
|
|
} else {
|
|
|
|
$classes[] = '';
|
2022-10-20 09:43:02 +02:00
|
|
|
if ($extensionInMenuParameter === $mainsec) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$classes[] = '';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$output = '';
|
|
|
|
|
|
|
|
if (! $submenu) {
|
|
|
|
$main['sub'] = [];
|
2019-03-21 13:15:21 +01:00
|
|
|
// Empty array won't go through foreach.
|
2019-01-30 16:18:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
$submenu_output = '';
|
|
|
|
|
|
|
|
$count_sub = 0;
|
|
|
|
$count_sub_access = 0;
|
|
|
|
$first_sub_sec2 = '';
|
|
|
|
|
|
|
|
foreach ($main['sub'] as $subsec2 => $sub) {
|
|
|
|
$count_sub++;
|
|
|
|
|
2019-03-21 13:15:21 +01:00
|
|
|
// Init some variables.
|
2019-01-30 16:18:44 +01:00
|
|
|
$visible = false;
|
|
|
|
$selected = false;
|
|
|
|
|
|
|
|
$subsec2 = io_safe_output($subsec2);
|
2019-03-21 13:15:21 +01:00
|
|
|
// Choose valid suboptions (sec2).
|
2019-01-30 16:18:44 +01:00
|
|
|
$check_2 = true;
|
|
|
|
if (isset($sub['sub2'])) {
|
|
|
|
$check_2 = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (enterprise_hook('enterprise_acl', [$config['id_user'], $mainsec, $subsec2, $check_2]) == false) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2019-03-21 13:15:21 +01:00
|
|
|
// We store the first subsection to use it if the main section has not access.
|
2019-01-30 16:18:44 +01:00
|
|
|
if ($count_sub_access == 0) {
|
|
|
|
$first_sub_sec2 = $subsec2;
|
|
|
|
}
|
|
|
|
|
|
|
|
$count_sub_access++;
|
|
|
|
|
|
|
|
$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 = ' ';
|
|
|
|
}
|
|
|
|
|
2019-03-21 13:15:21 +01:00
|
|
|
// Check if some submenu was selected to mark this (the parent) as selected.
|
2019-01-30 16:18:44 +01:00
|
|
|
foreach (array_keys($sub['sub2']) as $key) {
|
|
|
|
if (strpos($key, $sec2) !== false) {
|
|
|
|
$selected_submenu2 = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-21 13:15:21 +01:00
|
|
|
// Create godmode option if submenu has godmode on.
|
2019-01-30 16:18:44 +01:00
|
|
|
if (isset($sub['subsecs'])) {
|
|
|
|
// Sometimes you need to add all paths because in the
|
|
|
|
// same dir are code from visual console and reports
|
2019-03-21 13:15:21 +01:00
|
|
|
// for example.
|
2019-01-30 16:18:44 +01:00
|
|
|
if (is_array($sub['subsecs'])) {
|
2019-03-21 13:15:21 +01:00
|
|
|
// Compare each string.
|
2019-01-30 16:18:44 +01:00
|
|
|
foreach ($sub['subsecs'] as $god_path) {
|
|
|
|
if (strpos($sec2, $god_path) !== false) {
|
|
|
|
$selected_submenu2 = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
2019-03-21 13:15:21 +01:00
|
|
|
// If there is only a string just compare.
|
2019-01-30 16:18:44 +01:00
|
|
|
if (strpos($sec2, $sub['subsecs']) !== false) {
|
|
|
|
$selected_submenu2 = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-21 13:15:21 +01:00
|
|
|
// Set class.
|
2019-01-30 16:18:44 +01:00
|
|
|
if (($sec2 == $subsec2 || $allsec2 == $subsec2
|
|
|
|
|| $selected_submenu2) && isset($sub[$subsec2]['options'])
|
2022-11-24 09:36:18 +01:00
|
|
|
&& (get_parameter_get($sub[$subsec2]['options']['name']) == $sub[$subsec2]['options']['value'])
|
2019-01-30 16:18:44 +01:00
|
|
|
) {
|
2019-03-21 13:15:21 +01:00
|
|
|
// If the subclass is selected and there are options and that options value is true.
|
2019-01-30 16:18:44 +01:00
|
|
|
$class .= 'submenu_selected selected';
|
|
|
|
$menu_selected = true;
|
2023-02-07 15:22:51 +01:00
|
|
|
$menu2_selected = $sub['id'];
|
2019-01-30 16:18:44 +01:00
|
|
|
$selected = true;
|
|
|
|
$visible = true;
|
2022-06-03 12:26:15 +02:00
|
|
|
} else if (($sec2 === $subsec2 || $allsec2 === $subsec2 || $selected_submenu2 === true) && isset($sub[$subsec2]['options']) === false) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$class .= 'submenu_selected selected';
|
|
|
|
$selected = true;
|
|
|
|
$menu_selected = true;
|
2023-02-07 15:22:51 +01:00
|
|
|
$menu2_selected = $sub['id'];
|
2022-06-03 12:26:15 +02:00
|
|
|
$hasExtensions = (array_key_exists('hasExtensions', $main) === true) ? $main['hasExtensions'] : false;
|
|
|
|
if ((empty($extensionInMenuParameter) === false) && ((bool) $hasExtensions === true)) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$visible = true;
|
|
|
|
} else {
|
|
|
|
$visible = false;
|
|
|
|
}
|
|
|
|
} else {
|
2019-03-21 13:15:21 +01:00
|
|
|
// Else it's not selected.
|
2019-01-30 16:18:44 +01:00
|
|
|
$class .= 'submenu_not_selected';
|
|
|
|
}
|
|
|
|
|
2022-06-03 12:26:15 +02:00
|
|
|
if (isset($sub['refr']) === false) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$sub['refr'] = 0;
|
|
|
|
}
|
|
|
|
|
2019-03-21 13:15:21 +01:00
|
|
|
// Define submenu class to draw tree image.
|
2022-11-24 09:36:18 +01:00
|
|
|
$sub_tree_class = 'submenu_text';
|
2019-01-30 16:18:44 +01:00
|
|
|
|
|
|
|
if (isset($sub['type']) && $sub['type'] == 'direct') {
|
2019-03-21 13:15:21 +01:00
|
|
|
// This is an external link.
|
2019-01-30 16:18:44 +01:00
|
|
|
$submenu_output .= '<li title="'.$sub['id'].'" id="'.str_replace(' ', '_', $sub['id']).'" class="'.$class.'">';
|
|
|
|
|
|
|
|
if (isset($sub['subtype']) && $sub['subtype'] == 'nolink') {
|
2023-02-13 09:31:33 +01:00
|
|
|
$submenu_output .= '<div class=" SubNoLink '.$sub_tree_class.'"><span class="w70p span_has_menu_text">'.$sub['text'].'</span><div class="w29p arrow_menu_down"></div></div>';
|
2019-01-30 16:18:44 +01:00
|
|
|
} else if (isset($sub['subtype']) && $sub['subtype'] == 'new_blank') {
|
2023-02-13 14:32:02 +01:00
|
|
|
$submenu_output .= '<a href="'.$subsec2.'" target="_blank"><div class="'.$sub_tree_class.'">'.$sub['text'].'</div></a>';
|
2019-01-30 16:18:44 +01:00
|
|
|
} else {
|
|
|
|
$submenu_output .= '<a href="'.$subsec2.'"><div class="'.$sub_tree_class.'">'.$sub['text'].'</div></a>';
|
|
|
|
}
|
|
|
|
} else {
|
2019-03-21 13:15:21 +01:00
|
|
|
// This is an internal link.
|
2019-01-30 16:18:44 +01:00
|
|
|
if (isset($sub[$subsec2]['options'])) {
|
|
|
|
$link_add = '&'.$sub[$subsec2]['options']['name'].'='.$sub[$subsec2]['options']['value'];
|
|
|
|
} else {
|
|
|
|
$link_add = '';
|
|
|
|
}
|
|
|
|
|
|
|
|
$submenu_output .= '<li id="'.str_replace(' ', '_', $sub['id']).'" '.($class ? ' class="'.$class.'"' : '').'>';
|
|
|
|
|
2019-03-21 13:15:21 +01:00
|
|
|
// Ini Add icon extension.
|
2019-01-30 16:18:44 +01:00
|
|
|
$secExtension = null;
|
|
|
|
if (array_key_exists('extension', $sub)) {
|
|
|
|
$secExtensionBool = $sub['extension'];
|
|
|
|
} else {
|
|
|
|
$secExtensionBool = false;
|
|
|
|
}
|
|
|
|
|
2019-03-21 13:15:21 +01:00
|
|
|
// DISABLE SUBMENU IMAGES.
|
2019-01-30 16:18:44 +01:00
|
|
|
$secExtensionBool = false;
|
|
|
|
|
|
|
|
if ($secExtensionBool) {
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
// $submenu_output .= '<div style="background: url('.$imageIcon.') no-repeat; width: 16px; height: 16px; float: left; margin: 5px 0px 0px 3px;"> </div>';
|
|
|
|
}
|
|
|
|
|
|
|
|
$secExtension = null;
|
|
|
|
if (array_key_exists('sec', $sub)) {
|
|
|
|
$secExtension = $sub['sec'];
|
|
|
|
}
|
|
|
|
|
|
|
|
if (strlen($secExtension) > 0) {
|
|
|
|
$secUrl = $secExtension;
|
|
|
|
$extensionInMenu = 'extension_in_menu='.$mainsec.'&';
|
|
|
|
} else {
|
|
|
|
$secUrl = $mainsec;
|
|
|
|
$extensionInMenu = '';
|
|
|
|
}
|
|
|
|
|
|
|
|
if (isset($sub['text']) || $selected) {
|
|
|
|
$title = ' title="'.$sub['text'].' "';
|
|
|
|
} else {
|
|
|
|
$title = '';
|
|
|
|
}
|
|
|
|
|
|
|
|
$submenu_output .= '<a href="index.php?'.$extensionInMenu.'sec='.$secUrl.'&'.'sec2='.$subsec2.($sub['refr'] ? '&refr='.$sub['refr'] : '').$link_add.'"'.$title.'>'.'<div class="'.$sub_tree_class.'">'.$sub['text'].'</div>'.'</a>';
|
|
|
|
}
|
|
|
|
|
2019-03-21 13:15:21 +01:00
|
|
|
// Print second level submenu.
|
2019-01-30 16:18:44 +01:00
|
|
|
if (isset($sub['sub2'])) {
|
|
|
|
$submenu2_list = '';
|
|
|
|
|
|
|
|
$count_sub2 = 0;
|
|
|
|
foreach ($sub['sub2'] as $key => $sub2) {
|
|
|
|
if (enterprise_hook('enterprise_acl', [$config['id_user'], $mainsec, $subsec2, false, $key]) == false) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
$count_sub2++;
|
|
|
|
|
|
|
|
if (isset($sub2['type']) && $sub2['type'] == 'direct') {
|
|
|
|
if (isset($sub2['subtype']) && $sub2['subtype'] == 'new_blank') {
|
|
|
|
$link = $key.'"'.'target = \'_blank\'';
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
$link = 'index.php?sec='.$subsec2.'&sec2='.$key;
|
|
|
|
}
|
|
|
|
|
|
|
|
$class = 'sub_subMenu';
|
|
|
|
|
|
|
|
if ($key == $sec2) {
|
|
|
|
$class .= ' selected';
|
|
|
|
}
|
|
|
|
|
2019-03-21 13:15:21 +01:00
|
|
|
// Define submenu2 class to draw tree image.
|
2019-01-30 16:18:44 +01:00
|
|
|
if ($count_sub2 >= count($sub['sub2'])) {
|
|
|
|
$sub_tree_class = 'submenu_text submenu2_text_last';
|
|
|
|
} else {
|
|
|
|
$sub_tree_class = 'submenu_text submenu2_text_middle';
|
|
|
|
}
|
|
|
|
|
|
|
|
if (isset($sub2['title'])) {
|
|
|
|
$sub_title = $sub2['title'];
|
|
|
|
} else {
|
2021-10-27 19:39:18 +02:00
|
|
|
$sub_title = $sub2['text'];
|
2019-01-30 16:18:44 +01:00
|
|
|
}
|
|
|
|
|
2021-03-11 15:40:23 +01:00
|
|
|
$submenu2_list .= '<li class="'.$class.'" >';
|
2021-10-27 19:39:18 +02:00
|
|
|
$submenu2_list .= '<a href="'.$link.'"><div class="'.$sub_tree_class.'" title="'.$sub_title.'" >'.$sub2['text'].'</div></a></li>';
|
2019-01-30 16:18:44 +01:00
|
|
|
$sub_title = '';
|
|
|
|
}
|
|
|
|
|
2019-03-21 13:15:21 +01:00
|
|
|
// Add submenu2 to submenu string.
|
2019-03-05 12:54:11 +01:00
|
|
|
$submenu_output .= '<ul id="sub'.str_replace(' ', '_', $sub['id']).'" class="submenu2">';
|
2019-01-30 16:18:44 +01:00
|
|
|
$submenu_output .= $submenu2_list;
|
|
|
|
$submenu_output .= '</ul>';
|
|
|
|
}
|
|
|
|
|
|
|
|
// Submenu close list!
|
|
|
|
$submenu_output .= '</li>';
|
|
|
|
}
|
|
|
|
|
2019-03-21 13:15:21 +01:00
|
|
|
// Choose valid section (sec).
|
2022-01-11 12:08:41 +01:00
|
|
|
if ((bool) enterprise_hook(
|
|
|
|
'enterprise_acl',
|
|
|
|
[
|
|
|
|
$config['id_user'],
|
|
|
|
$mainsec,
|
|
|
|
($main['sec2'] ?? null),
|
|
|
|
]
|
|
|
|
) === false
|
|
|
|
) {
|
2019-01-30 16:18:44 +01:00
|
|
|
if ($count_sub_access > 0) {
|
|
|
|
// If any susection have access but main section not, we change main link to first subsection found
|
|
|
|
$main['sec2'] = $first_sub_sec2;
|
|
|
|
} else {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($menu_selected) {
|
|
|
|
$seleccionado = 'selected';
|
2023-02-02 13:28:48 +01:00
|
|
|
$menu1_selected = $id;
|
2022-11-24 09:36:18 +01:00
|
|
|
if ($menu['class'] === 'operation') {
|
|
|
|
$tab_active = 'display';
|
|
|
|
} else {
|
|
|
|
$tab_active = 'management';
|
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
} else {
|
|
|
|
$seleccionado = '';
|
|
|
|
}
|
|
|
|
|
2019-03-21 13:15:21 +01:00
|
|
|
// Print out the first level.
|
2022-11-24 09:36:18 +01:00
|
|
|
$output .= '<li title="'.$main['text'].'" class="'.implode(' ', $classes).' '.$seleccionado.' flex_li" id="icon_'.$id.'">';
|
2023-02-10 11:48:32 +01:00
|
|
|
if ($menuTypeClass === 'collapsed') {
|
|
|
|
$div = '<div class="icon_'.$id.' w100p"></div><span class="w55p" style="display: none">'.$main['text'].'</span><div class="arrow_menu_down w30p" style="display: none"></div>';
|
|
|
|
} else {
|
2023-02-13 09:31:33 +01:00
|
|
|
if ($id === 'about') {
|
2023-02-13 12:43:30 +01:00
|
|
|
$div = '<div class="icon_'.$id.' w15p"></div><span class="w55p">'.$main['text'].'</span>';
|
2023-02-13 09:31:33 +01:00
|
|
|
} else {
|
|
|
|
$div = '<div class="icon_'.$id.' w15p"></div><span class="w55p">'.$main['text'].'</span><div class="arrow_menu_down w30p"></div>';
|
|
|
|
}
|
2023-02-10 11:48:32 +01:00
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2023-02-10 11:48:32 +01:00
|
|
|
$output .= sprintf('<div id="title_menu" class="title_menu_classic">%s</div>', $div);
|
2019-03-25 19:37:45 +01:00
|
|
|
|
2021-08-19 08:18:06 +02:00
|
|
|
// Add the notification ball if defined.
|
|
|
|
if (isset($main['notification']) === true) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$output .= '<div class="notification_ball">'.$main['notification'].'</div>';
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($submenu_output != '') {
|
2019-03-21 13:15:21 +01:00
|
|
|
// 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.
|
2019-01-30 16:18:44 +01:00
|
|
|
if ($visible || in_array('selected', $classes)) {
|
|
|
|
$visible = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!$showSubsection) {
|
|
|
|
$visible = false;
|
|
|
|
}
|
|
|
|
|
2021-08-19 08:18:06 +02:00
|
|
|
$output .= sprintf('<ul id="subicon_%s" class="submenu">%s</ul>', $id, $submenu_output);
|
2019-01-30 16:18:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
$config['count_main_menu']++;
|
|
|
|
$output .= '</li>';
|
|
|
|
echo $output;
|
|
|
|
$menu_selected = false;
|
|
|
|
}
|
|
|
|
|
2019-03-21 13:15:21 +01:00
|
|
|
// Finish menu.
|
2019-01-30 16:18:44 +01:00
|
|
|
echo '</ul>';
|
2019-03-21 13:15:21 +01:00
|
|
|
// Invisible UL for adding border-top.
|
2019-01-30 16:18:44 +01:00
|
|
|
echo '</div>';
|
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
|
|
|
}
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2012-06-18 17:16:17 +02:00
|
|
|
/**
|
|
|
|
* Get all the data structure of menu. Operation and Godmode
|
|
|
|
*
|
|
|
|
* @return array Menu structure.
|
|
|
|
*/
|
2019-01-30 16:18:44 +01:00
|
|
|
function menu_get_full_sec()
|
|
|
|
{
|
|
|
|
global $menu_operation;
|
|
|
|
global $menu_godmode;
|
|
|
|
|
|
|
|
if ($menu_godmode == null || $menu_operation == null) {
|
|
|
|
return [];
|
|
|
|
} else {
|
|
|
|
$menu = ($menu_operation + $menu_godmode);
|
|
|
|
}
|
|
|
|
|
|
|
|
unset($menu['class']);
|
|
|
|
|
|
|
|
menu_add_extras($menu);
|
|
|
|
|
|
|
|
return $menu;
|
2012-06-18 17:16:17 +02:00
|
|
|
}
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2012-09-26 18:54:25 +02:00
|
|
|
/**
|
|
|
|
* Build an extra access pages array and merge it with menu
|
|
|
|
*
|
|
|
|
* @param menu array (pass by reference)
|
|
|
|
*/
|
2019-01-30 16:18:44 +01:00
|
|
|
function menu_add_extras(&$menu)
|
|
|
|
{
|
|
|
|
global $config;
|
|
|
|
|
|
|
|
$menu_extra = [];
|
|
|
|
$menu_extra['gusuarios']['sub']['godmode/users/configure_user']['text'] = __('Configure user');
|
|
|
|
$menu_extra['gusuarios']['sub']['godmode/users/configure_profile']['text'] = __('Configure profile');
|
|
|
|
|
|
|
|
$menu_extra['gmodules']['sub']['godmode/modules/manage_network_templates_form']['text'] = __('Module templates management');
|
2022-09-14 18:12:39 +02:00
|
|
|
$menu_extra['gmodules']['sub']['godmode/modules/manage_inventory_modules_form']['text'] = __('Inventory modules management');
|
2019-01-30 16:18:44 +01:00
|
|
|
|
|
|
|
$menu_extra['gagente']['sub']['godmode/agentes/configurar_agente']['text'] = __('Agents management');
|
|
|
|
|
|
|
|
$menu_extra['galertas']['sub']['godmode/alerts/configure_alert_template']['text'] = __('Configure alert template');
|
|
|
|
|
|
|
|
$menu_extra['network']['sub']['operation/visual_console/render_view']['text'] = __('View visual console');
|
|
|
|
$menu_extra['network']['sub']['godmode/reporting/visual_console_builder']['text'] = __('Builder visual console');
|
|
|
|
|
|
|
|
$menu_extra['reporting']['sub']['operation/reporting/reporting_viewer']['text'] = __('View reporting');
|
|
|
|
$menu_extra['reporting']['sub']['operation/reporting/graph_viewer']['text'] = __('Graph viewer');
|
|
|
|
|
|
|
|
$menu_extra['reporting']['sub']['godmode/reporting/graph_builder']['text'] = __('Manage custom graphs');
|
|
|
|
$menu_extra['reporting']['sub']['godmode/reporting/graph_container']['text'] = __('View graph containers');
|
|
|
|
$menu_extra['reporting']['sub']['godmode/reporting/create_container']['text'] = __('Manage graph containers');
|
|
|
|
$menu_extra['reporting']['sub']['enterprise/godmode/reporting/graph_template_list']['text'] = __('View graph templates');
|
|
|
|
$menu_extra['reporting']['sub']['enterprise/godmode/reporting/graph_template_editor']['text'] = __('Manage graph templates');
|
|
|
|
$menu_extra['reporting']['sub']['enterprise/godmode/reporting/graph_template_item_editor']['text'] = __('Graph template items');
|
|
|
|
$menu_extra['reporting']['sub']['enterprise/godmode/reporting/graph_template_wizard']['text'] = __('Graph template wizard');
|
2021-08-13 15:57:01 +02:00
|
|
|
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&tab=wizard&action=wizard']['text'] = __('Templates wizard');
|
|
|
|
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&tab=template&action=list_template']['text'] = __('Templates');
|
2023-01-30 17:00:57 +01:00
|
|
|
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&action=edit']['text'] = __('Edit custom reports');
|
|
|
|
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&tab=list_items&action=edit']['text'] = __('List items');
|
|
|
|
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&tab=item_editor&action=new']['text'] = __('Edit item');
|
|
|
|
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&tab=wizard&action=edit']['text'] = __('Wizard');
|
|
|
|
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&tab=wizard_sla&action=edit']['text'] = __('Wizard sla');
|
|
|
|
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&tab=global&action=edit']['text'] = __('Global custom reports');
|
|
|
|
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&tab=advanced&action=edit']['text'] = __('Avanced options');
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
if ($config['activate_gis']) {
|
|
|
|
$menu_extra['godgismaps']['sub']['godmode/gis_maps/configure_gis_map']['text'] = __('Manage GIS Maps');
|
|
|
|
}
|
|
|
|
|
|
|
|
$menu_extra['workspace']['sub']['operation/messages/message_edit']['text'] = __('Manage messages');
|
|
|
|
|
|
|
|
$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['gservers']['sub']['enterprise/godmode/servers/manage_export_form']['text'] = __('Manage export targets');
|
|
|
|
|
2019-09-10 12:18:17 +02:00
|
|
|
$menu_extra['estado']['sub']['snmpconsole']['sub2']['godmode/snmpconsole/snmp_trap_generator']['text'] = __('SNMP trap generator');
|
|
|
|
$menu_extra['estado']['sub']['snmpconsole']['sub2']['operation/snmpconsole/snmp_view']['text'] = __('SNMP console');
|
2019-01-30 16:18:44 +01:00
|
|
|
|
|
|
|
$menu_extra['workspace']['sub']['operation/incidents/incident_detail']['text'] = __('Manage incident');
|
|
|
|
|
2021-08-13 15:57:01 +02:00
|
|
|
$menu_extra['gusuarios']['sub']['godmode/groups/configure_group']['text'] = __('Manage groups');
|
|
|
|
$menu_extra['gusuarios']['sub']['godmode/tag/edit_tag']['text'] = __('Tags management');
|
|
|
|
|
2019-03-21 13:15:21 +01:00
|
|
|
// Duplicate extensions as sec=extension to check it from url.
|
2019-01-30 16:18:44 +01:00
|
|
|
foreach ($menu as $k => $m) {
|
|
|
|
if (!isset($m['sub'])) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach ($m['sub'] as $kk => $mm) {
|
|
|
|
if (isset($mm['sec'])) {
|
2021-09-02 15:43:20 +02:00
|
|
|
if (empty($menu[$mm['sec']]['sub'][$kk]['text']) === true) {
|
|
|
|
$menu_extra[$mm['sec']]['sub'][$kk]['text'] = $mm['text'];
|
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$menu = array_merge_recursive($menu, $menu_extra);
|
|
|
|
|
|
|
|
// Remove the duplicate the text entries.
|
|
|
|
foreach ($menu as $k => $m) {
|
|
|
|
if (!empty($m['text'])) {
|
|
|
|
if (is_array($m['text'])) {
|
|
|
|
$menu[$k]['text'] = reset($m['text']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2012-09-26 18:54:25 +02:00
|
|
|
}
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2012-06-18 17:16:17 +02:00
|
|
|
/**
|
|
|
|
* Get the sec list built in menu
|
|
|
|
*
|
2012-06-18 18:51:32 +02:00
|
|
|
* @param bool If true, the array returned will have the structure
|
2012-10-25 18:46:52 +02:00
|
|
|
* to combo categories (optgroup)
|
2019-01-30 16:18:44 +01:00
|
|
|
*
|
2012-06-18 17:16:17 +02:00
|
|
|
* @return array Sections list
|
|
|
|
*/
|
2019-01-30 16:18:44 +01:00
|
|
|
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
|
2019-03-21 13:15:21 +01:00
|
|
|
// sec starts with g (like gismaps).
|
2019-01-30 16:18:44 +01:00
|
|
|
if ($k != 'gismaps') {
|
|
|
|
$in_godmode = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-30 13:49:22 +02:00
|
|
|
if ($k === 'discovery') {
|
|
|
|
$in_godmode = true;
|
|
|
|
}
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
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;
|
2012-06-18 17:16:17 +02:00
|
|
|
}
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2015-10-19 15:08:44 +02:00
|
|
|
/**
|
|
|
|
* Get the sec list built in menu
|
|
|
|
*
|
|
|
|
* @param bool If true, the array returned will have the structure
|
|
|
|
* to combo categories (optgroup)
|
2019-01-30 16:18:44 +01:00
|
|
|
*
|
2015-10-19 15:08:44 +02:00
|
|
|
* @return array Sections list
|
|
|
|
*/
|
2019-01-30 16:18:44 +01:00
|
|
|
function get_sec($sec=false)
|
|
|
|
{
|
|
|
|
$menu = menu_get_full_sec();
|
|
|
|
unset($menu['class']);
|
|
|
|
|
|
|
|
$in_godmode = false;
|
|
|
|
foreach ($menu as $k => $v) {
|
|
|
|
if (isset($v['sub'][$sec])) {
|
|
|
|
return $k;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
2015-10-19 15:08:44 +02:00
|
|
|
}
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2012-06-18 17:16:17 +02:00
|
|
|
/**
|
|
|
|
* Get the pages in a section
|
|
|
|
*
|
|
|
|
* @param string sec code
|
|
|
|
* @param string menu hash. All the menu structure (For example
|
2019-01-30 16:18:44 +01:00
|
|
|
* 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();
|
|
|
|
*
|
2012-06-18 17:16:17 +02:00
|
|
|
* @return array Sections list
|
|
|
|
*/
|
2019-01-30 16:18:44 +01:00
|
|
|
function menu_get_sec_pages($sec, $menu_hash=false)
|
|
|
|
{
|
|
|
|
if (!$menu_hash) {
|
|
|
|
$menu = menu_get_full_sec();
|
|
|
|
} else {
|
|
|
|
$menu = json_decode(base64_decode($menu_hash), true);
|
|
|
|
}
|
|
|
|
|
|
|
|
$sec2_array = [];
|
|
|
|
|
|
|
|
if (isset($sec)) {
|
2019-03-21 13:15:21 +01:00
|
|
|
// Get the sec2 of the main section.
|
2019-01-30 16:18:44 +01:00
|
|
|
$sec2_array[$menu[$sec]['sec2']] = $menu[$sec]['text'];
|
|
|
|
|
2019-03-21 13:15:21 +01:00
|
|
|
// Get the sec2 of the subsections.
|
2019-01-30 16:18:44 +01:00
|
|
|
foreach ($menu[$sec]['sub'] as $k => $v) {
|
2019-03-21 13:15:21 +01:00
|
|
|
// Avoid special cases of standalone windows.
|
2019-01-30 16:18:44 +01:00
|
|
|
if (preg_match('/^javascript:/', $k) || preg_match('/\.php/', $k)) {
|
2022-09-07 11:27:07 +02:00
|
|
|
if ($sec !== 'links' && $sec !== 'eventos') {
|
2021-08-06 10:29:38 +02:00
|
|
|
continue;
|
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
$sec2_array[$k] = $v['text'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-21 13:15:21 +01:00
|
|
|
$sec2_array = array_unique($sec2_array);
|
2019-01-30 16:18:44 +01:00
|
|
|
return $sec2_array;
|
2012-06-18 17:16:17 +02:00
|
|
|
}
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2015-10-19 15:08:44 +02:00
|
|
|
/**
|
|
|
|
* Get the pages in a section2
|
2019-02-26 09:40:04 +01:00
|
|
|
* $menu
|
2015-10-19 15:08:44 +02:00
|
|
|
*
|
|
|
|
* @param string sec code
|
|
|
|
* @param string menu hash. All the menu structure (For example
|
2019-01-30 16:18:44 +01:00
|
|
|
* 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();
|
|
|
|
*
|
2015-10-19 15:08:44 +02:00
|
|
|
* @return array Sections list
|
|
|
|
*/
|
2019-01-30 16:18:44 +01:00
|
|
|
function menu_get_sec2_pages($sec, $sec2, $menu_hash=false)
|
|
|
|
{
|
|
|
|
if ($menu_hash === false) {
|
|
|
|
$menu = menu_get_full_sec();
|
|
|
|
} else {
|
|
|
|
$menu = json_decode(base64_decode($menu_hash), true);
|
|
|
|
}
|
|
|
|
|
|
|
|
$sec3_array = [];
|
2021-08-06 10:29:38 +02:00
|
|
|
$sec2 = io_safe_output($sec2);
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2019-03-21 13:15:21 +01:00
|
|
|
if (isset($menu[$sec]['sub']) && isset($menu[$sec]['sub'][$sec2]['sub2'])) {
|
|
|
|
// Get the sec2 of the subsections.
|
2019-01-30 16:18:44 +01:00
|
|
|
foreach ($menu[$sec]['sub'][$sec2]['sub2'] as $k => $v) {
|
|
|
|
$sec3_array[$k] = $v['text'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return $sec3_array;
|
2015-10-19 15:08:44 +02:00
|
|
|
}
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2012-06-18 17:16:17 +02:00
|
|
|
/**
|
|
|
|
* Check if a page (sec2) is in a section (sec)
|
|
|
|
*
|
|
|
|
* @param string section (sec) code
|
|
|
|
* @param string page (sec2)code
|
2019-01-30 16:18:44 +01:00
|
|
|
*
|
2012-06-18 17:16:17 +02:00
|
|
|
* @return true if the page is in section, false otherwise
|
|
|
|
*/
|
2019-01-30 16:18:44 +01:00
|
|
|
function menu_sec2_in_sec($sec, $sec2)
|
|
|
|
{
|
|
|
|
$sec2_array = menu_get_sec_pages($sec);
|
|
|
|
|
|
|
|
if ($sec2_array != null && in_array($sec2, array_keys($sec2_array))) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
2012-06-18 17:16:17 +02:00
|
|
|
}
|
2015-12-03 13:11:35 +01:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
|
|
|
|
function menu_sec3_in_sec2($sec, $sec2, $sec3)
|
|
|
|
{
|
|
|
|
$sec3_array = menu_get_sec2_pages($sec, $sec2, $menu_hash = false);
|
|
|
|
|
|
|
|
if ($sec3_array != null && in_array($sec3, array_keys($sec3_array))) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
2015-12-03 13:11:35 +01:00
|
|
|
}
|
2021-08-06 10:29:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Prepare menu data for enterprise acl conf.
|
|
|
|
*
|
|
|
|
* @param array $pages
|
|
|
|
* @param string $sec
|
|
|
|
* @return string $pages
|
|
|
|
*/
|
|
|
|
function menu_pepare_acl_select_data($pages, $sec)
|
|
|
|
{
|
2021-07-30 13:49:22 +02:00
|
|
|
$exclude_pages = [
|
|
|
|
'estado' => 'operation/agentes/tactical',
|
|
|
|
'network' => 'operation/agentes/networkmap_list',
|
|
|
|
'extensions' => [
|
|
|
|
'operation/extensions',
|
|
|
|
'enterprise/extensions/vmware',
|
|
|
|
'extensions/users_connected',
|
|
|
|
],
|
|
|
|
'gmodules' => 'godmode/modules/manage_network_templates',
|
|
|
|
'geventos' => 'godmode/events/events&section=filter',
|
|
|
|
'gsetup' => 'godmode/setup/setup§ion=general',
|
|
|
|
];
|
2021-08-06 10:29:38 +02:00
|
|
|
|
|
|
|
foreach ($exclude_pages as $exclude_sec => $sec2) {
|
|
|
|
if ($sec === $exclude_sec) {
|
|
|
|
if (is_array($sec2) === true) {
|
|
|
|
foreach ($sec2 as $value) {
|
|
|
|
unset($pages[$value]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
unset($pages[$sec2]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return $pages;
|
|
|
|
}
|
2022-12-29 16:21:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
if (is_ajax()) {
|
|
|
|
$about = (bool) get_parameter('about');
|
|
|
|
if ($about) {
|
|
|
|
global $config;
|
|
|
|
global $pandora_version;
|
|
|
|
global $build_version;
|
|
|
|
$product_name = io_safe_output(get_product_name());
|
|
|
|
|
|
|
|
include_once $config['homedir'].'/include/class/Diagnostics.class.php';
|
|
|
|
$d = new Diagnostics;
|
|
|
|
$db_health = json_decode($d->getDatabaseHealthStatus());
|
|
|
|
$db_info = json_decode($d->getDatabaseStatusInfo());
|
|
|
|
$db_fragmentation = json_decode($d->getTablesFragmentation());
|
|
|
|
$sys_info = json_decode($d->getSystemInfo());
|
|
|
|
$php_sys = json_decode($d->getPHPSetup());
|
|
|
|
|
|
|
|
$fragmentation_status = '';
|
|
|
|
if ($db_fragmentation->data->tablesFragmentationStatus->status === 1) {
|
|
|
|
$fragmentation_status = html_print_image(
|
|
|
|
'images/exito.png',
|
|
|
|
true,
|
|
|
|
[
|
|
|
|
'title' => __('Successfully'),
|
|
|
|
'style' => 'width:15px;',
|
|
|
|
]
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
$fragmentation_status = html_print_image(
|
|
|
|
'images/error_1.png',
|
|
|
|
true,
|
|
|
|
[
|
|
|
|
'title' => __('Error'),
|
|
|
|
'style' => 'width:15px;',
|
|
|
|
]
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2023-01-24 12:34:04 +01:00
|
|
|
$image_about = ui_get_full_url('/images/custom_logo/logo-default-pandorafms.png', false, false, false);
|
|
|
|
if (enterprise_installed() === false) {
|
|
|
|
if ($config['style'] === 'pandora_black') {
|
|
|
|
$image_about = 'images/custom_logo/'.HEADER_LOGO_BLACK_CLASSIC;
|
|
|
|
} else if ($config['style'] === 'pandora') {
|
|
|
|
$image_about = 'images/custom_logo/'.HEADER_LOGO_DEFAULT_CLASSIC;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if ($config['style'] === 'pandora_black' && $config['custom_logo'] === HEADER_LOGO_DEFAULT_CLASSIC) {
|
|
|
|
$config['custom_logo'] = HEADER_LOGO_BLACK_CLASSIC;
|
|
|
|
} else if ($config['style'] === 'pandora' && $config['custom_logo'] === HEADER_LOGO_BLACK_CLASSIC) {
|
|
|
|
$config['custom_logo'] = HEADER_LOGO_DEFAULT_CLASSIC;
|
|
|
|
}
|
|
|
|
|
|
|
|
$image_about = 'images/custom_logo/'.$config['custom_logo'];
|
|
|
|
|
|
|
|
if (file_exists(ENTERPRISE_DIR.'/'.$image_about) === true) {
|
|
|
|
$image_about = ENTERPRISE_DIR.'/'.$image_about;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-12-29 16:21:36 +01:00
|
|
|
$dialog = '
|
|
|
|
<div id="about-tabs" class="invisible overflow-hidden">
|
|
|
|
<ul>
|
|
|
|
<li><a href="#tab-general-view">'.__('Information').'</a></li>
|
|
|
|
<li><a href="#tab-database">'.__('Database').'</a></li>
|
|
|
|
<li><a href="#tab-system-info">'.__('System Info').'</a></li>
|
|
|
|
<li><a href="#tab-php-system">'.__('PHP System').'</a></li>
|
|
|
|
<li class="ui-tabs-close-button" style="float:right!important;">
|
|
|
|
<img id="about-close" style="cursor: pointer;" src="'.ui_get_full_url('/include/styles/images/dialog-titlebar-close.png', false, false, false).'" alt="'.__('Close').'" title="'.__('Close').'" width="25px">
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<div id="tab-general-view">
|
|
|
|
<table class="table-about">
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<th style="width: 40%;">
|
2023-01-24 12:34:04 +01:00
|
|
|
<img src="'.$image_about.'" alt="logo" width="70%">
|
2022-12-29 16:21:36 +01:00
|
|
|
</th>
|
|
|
|
<th style="width: 60%; text-align: left;">
|
|
|
|
<h1>'.$product_name.'</h1>
|
|
|
|
<p><span>'.__('Version').' '.$pandora_version.' - '.(enterprise_installed() ? 'Enterprise' : 'Community').'</span></p>
|
|
|
|
<p><span>'.__('MR version').'</span> MR'.$config['MR'].'</p>
|
|
|
|
<p><span>'.__('Build').'</span> '.$build_version.'</p>
|
|
|
|
<p style="margin-bottom: 20px!important;"><span>'.__('Support expires').'</span> 2023/04/26</p>';
|
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
2023-02-17 14:44:26 +01:00
|
|
|
$dialogButtons = [];
|
|
|
|
|
|
|
|
$dialogButtons[] = html_print_button(
|
|
|
|
__('Update manager'),
|
|
|
|
'update_manager',
|
|
|
|
false,
|
|
|
|
'location.href=\''.ui_get_full_url('/index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=history', false, false, false).'\'',
|
|
|
|
[
|
|
|
|
'icon' => 'cog',
|
|
|
|
'mode' => 'mini secondary',
|
|
|
|
],
|
|
|
|
true
|
|
|
|
);
|
|
|
|
|
|
|
|
$dialogButtons[] = html_print_button(
|
|
|
|
__('System report'),
|
|
|
|
'system_report',
|
|
|
|
false,
|
|
|
|
'location.href=\''.ui_get_full_url('/index.php?sec=gextensions&sec2=tools/diagnostics', false, false, false).'\'',
|
|
|
|
[
|
|
|
|
'icon' => 'info',
|
|
|
|
'mode' => 'mini secondary',
|
|
|
|
],
|
|
|
|
true
|
|
|
|
);
|
|
|
|
|
|
|
|
$dialog .= html_print_div(
|
|
|
|
[
|
|
|
|
'style' => 'flex-direction: row;',
|
|
|
|
'class' => 'action-buttons',
|
|
|
|
'content' => implode('', $dialogButtons),
|
|
|
|
],
|
|
|
|
true
|
|
|
|
);
|
2022-12-29 16:21:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
$dialog .= '</th>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<p class="trademark-copyright">Trademark and copyright 2004 - '.date('Y').' Pandora FMS. All rights reserved</p>
|
|
|
|
</div>
|
|
|
|
<div id="tab-database" class="div-scroll">
|
|
|
|
<table class="table-about">
|
|
|
|
<tbody style="text-align: left;">
|
|
|
|
<tr>
|
|
|
|
<th colspan="2">
|
|
|
|
<h2><span> - </span>'.__('Database health status').'</h2>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th style="width: 50%;">
|
|
|
|
<p><span>'.$db_health->data->unknownAgents->name.'</span></p>
|
|
|
|
</th>
|
|
|
|
<th style="width: 50%;">
|
|
|
|
<p>'.$db_health->data->unknownAgents->value.'</p>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th style="width: 50%;">
|
|
|
|
<p><span>'.$db_health->data->notInitAgents->name.'</span></p>
|
|
|
|
</th>
|
|
|
|
<th style="width: 50%;">
|
|
|
|
<p>'.$db_health->data->notInitAgents->value.'</p>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr class="about-last-tr">
|
|
|
|
<th style="width: 50%;">
|
|
|
|
<p class="about-last-p"><span>'.$db_health->data->pandoraDbLastRun->name.'</span></p>
|
|
|
|
</th>
|
|
|
|
<th style="width: 50%;">
|
|
|
|
<p class="about-last-p">'.$db_health->data->pandoraDbLastRun->value.'</p>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<th colspan="2">
|
|
|
|
<h2><span> - </span>'.__('Database status info').'</h2>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th style="width: 50%;">
|
|
|
|
<p><span>'.$db_info->data->dbSchemeFirstVersion->name.'</span></p>
|
|
|
|
</th>
|
|
|
|
<th style="width: 50%;">
|
|
|
|
<p>'.$db_info->data->dbSchemeFirstVersion->value.'</p>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th style="width: 50%;">
|
|
|
|
<p><span>'.$db_info->data->dbSchemeVersion->name.'</span></p>
|
|
|
|
</th>
|
|
|
|
<th style="width: 50%;">
|
|
|
|
<p>'.$db_info->data->dbSchemeVersion->value.'</p>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th style="width: 50%;">
|
|
|
|
<p><span>'.$db_info->data->dbSchemeBuild->name.'</span></p>
|
|
|
|
</th>
|
|
|
|
<th style="width: 50%;">
|
|
|
|
<p>'.$db_info->data->dbSchemeBuild->value.'</p>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr class="about-last-tr">
|
|
|
|
<th style="width: 50%;">
|
|
|
|
<p class="about-last-p"><span>'.$db_info->data->dbSize->name.'</span></p>
|
|
|
|
</th>
|
|
|
|
<th style="width: 50%;">
|
|
|
|
<p class="about-last-p">'.$db_info->data->dbSize->value.'</p>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<th colspan="2">
|
|
|
|
<h2><span> - </span>'.__('Tables fragmentation in the %s database', $product_name).'</h2>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th style="width: 50%;">
|
|
|
|
<p><span>'.$db_fragmentation->data->tablesFragmentationMax->name.'</span></p>
|
|
|
|
</th>
|
|
|
|
<th style="width: 50%;">
|
|
|
|
<p>'.$db_fragmentation->data->tablesFragmentationMax->value.'</p>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th style="width: 50%;">
|
|
|
|
<p><span>'.$db_fragmentation->data->tablesFragmentationValue->name.'</span></p>
|
|
|
|
</th>
|
|
|
|
<th style="width: 50%;">
|
|
|
|
<p>'.$db_fragmentation->data->tablesFragmentationValue->value.'</p>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th style="width: 50%;">
|
|
|
|
<p><span>'.$db_fragmentation->data->tablesFragmentationStatus->name.'</span></p>
|
|
|
|
</th>
|
|
|
|
<th style="width: 50%;">
|
|
|
|
<p>'.$fragmentation_status.'</p>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<div id="tab-system-info">
|
|
|
|
<table class="table-about">
|
|
|
|
<tbody style="text-align: left;">
|
|
|
|
<tr>
|
|
|
|
<th colspan="2">
|
|
|
|
<h2><span> - </span>'.__('System Info').'</h2>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th style="width: 15%;">
|
|
|
|
<p><span>'.$sys_info->data->cpuInfo->name.'</span></p>
|
|
|
|
</th>
|
|
|
|
<th style="width: 85%;">
|
|
|
|
<p>'.$sys_info->data->cpuInfo->value.'</p>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th style="width: 15%;">
|
|
|
|
<p><span>'.$sys_info->data->ramInfo->name.'</span></p>
|
|
|
|
</th>
|
|
|
|
<th style="width: 85%;">
|
|
|
|
<p>'.$sys_info->data->ramInfo->value.'</p>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th style="width: 15%;">
|
|
|
|
<p><span>'.$sys_info->data->osInfo->name.'</span></p>
|
|
|
|
</th>
|
|
|
|
<th style="width: 85%;">
|
|
|
|
<p>'.$sys_info->data->osInfo->value.'</p>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th style="width: 15%;">
|
|
|
|
<p><span>'.$sys_info->data->hostnameInfo->name.'</span></p>
|
|
|
|
</th>
|
|
|
|
<th style="width: 85%;">
|
|
|
|
<p>'.$sys_info->data->hostnameInfo->value.'</p>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th style="width: 15%;">
|
|
|
|
<p><span>'.$sys_info->data->ipInfo->name.'</span></p>
|
|
|
|
</th>
|
|
|
|
<th style="width: 85%;">
|
|
|
|
<p>'.$sys_info->data->ipInfo->value.'</p>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<div id="tab-php-system">
|
|
|
|
<table class="table-about">
|
|
|
|
<tbody style="text-align: left;">
|
|
|
|
<tr>
|
|
|
|
<th colspan="2">
|
|
|
|
<h2><span> - </span>'.__('PHP system').'</h2>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th style="width: 35%;">
|
|
|
|
<p><span>'.$php_sys->data->phpVersion->name.'</span></p>
|
|
|
|
</th>
|
|
|
|
<th style="width: 65%;">
|
|
|
|
<p>'.$php_sys->data->phpVersion->value.'</p>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th style="width: 35%;">
|
|
|
|
<p><span>'.$php_sys->data->maxExecutionTime->name.'</span></p>
|
|
|
|
</th>
|
|
|
|
<th style="width: 65%;">
|
|
|
|
<p>'.$php_sys->data->maxExecutionTime->value.'</p>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th style="width: 35%;">
|
|
|
|
<p><span>'.$php_sys->data->maxInputTime->name.'</span></p>
|
|
|
|
</th>
|
|
|
|
<th style="width: 65%;">
|
|
|
|
<p>'.$php_sys->data->maxInputTime->value.'</p>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th style="width: 35%;">
|
|
|
|
<p><span>'.$php_sys->data->memoryLimit->name.'</span></p>
|
|
|
|
</th>
|
|
|
|
<th style="width: 65%;">
|
|
|
|
<p>'.$php_sys->data->memoryLimit->value.'</p>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th style="width: 35%;">
|
|
|
|
<p><span>'.$php_sys->data->sessionLifetime->name.'</span></p>
|
|
|
|
</th>
|
|
|
|
<th style="width: 65%;">
|
|
|
|
<p>'.$php_sys->data->sessionLifetime->value.'</p>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
';
|
|
|
|
|
|
|
|
echo $dialog;
|
|
|
|
}
|
|
|
|
}
|