2006-03-27 05:37:27 +02:00
|
|
|
<?php
|
2022-12-29 16:21:36 +01:00
|
|
|
|
2022-06-03 12:26:15 +02:00
|
|
|
/**
|
|
|
|
* Godmode menu.
|
|
|
|
*
|
|
|
|
* @category Menu
|
|
|
|
* @package Pandora FMS
|
|
|
|
* @subpackage Community
|
|
|
|
* @version 1.0.0
|
|
|
|
* @license See below
|
|
|
|
*
|
|
|
|
* ______ ___ _______ _______ ________
|
|
|
|
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
|
|
|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
|
|
|
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
|
|
|
*
|
|
|
|
* ============================================================================
|
|
|
|
* Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
|
|
|
|
* Please see http://pandorafms.org for full contribution list
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation for version 2.
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
* ============================================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
// Begin.
|
2019-01-30 16:18:44 +01:00
|
|
|
require_once 'include/config.php';
|
2022-07-08 13:40:20 +02:00
|
|
|
require_once 'include/functions_menu.php';
|
2007-06-08 17:55:53 +02:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
check_login();
|
2008-10-22 11:08:03 +02:00
|
|
|
|
2022-10-20 09:43:02 +02:00
|
|
|
$access_console_node = is_reporting_console_node() === false;
|
2019-01-30 16:18:44 +01:00
|
|
|
$menu_godmode = [];
|
2012-06-18 17:16:17 +02:00
|
|
|
$menu_godmode['class'] = 'godmode';
|
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
|
|
|
|
2022-10-20 09:43:02 +02:00
|
|
|
$menuGodmode = [];
|
2022-07-08 13:40:20 +02:00
|
|
|
if ($access_console_node === true) {
|
|
|
|
enterprise_include('godmode/menu.php');
|
|
|
|
}
|
|
|
|
|
2022-06-03 12:26:15 +02:00
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'AR') === true
|
|
|
|
|| (bool) check_acl($config['id_user'], 0, 'AW') === true
|
|
|
|
|| (bool) check_acl($config['id_user'], 0, 'RR') === true
|
|
|
|
|| (bool) check_acl($config['id_user'], 0, 'RW') === true
|
|
|
|
|| (bool) check_acl($config['id_user'], 0, 'PM') === true
|
2019-10-09 15:45:02 +02:00
|
|
|
) {
|
2019-02-20 18:24:32 +01:00
|
|
|
$sub = [];
|
2019-11-21 18:21:46 +01:00
|
|
|
$sub['godmode/servers/discovery&wiz=main']['text'] = __('Start');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/servers/discovery&wiz=main']['id'] = 'discovery';
|
2022-07-08 13:40:20 +02:00
|
|
|
|
2019-07-03 11:08:17 +02:00
|
|
|
$sub['godmode/servers/discovery&wiz=tasklist']['text'] = __('Task list');
|
|
|
|
$sub['godmode/servers/discovery&wiz=tasklist']['id'] = 'tasklist';
|
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ($access_console_node === true) {
|
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'AW') === true
|
|
|
|
|| (bool) check_acl($config['id_user'], 0, 'PM') === true
|
|
|
|
) {
|
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
|
|
|
$sub2 = [];
|
|
|
|
$sub2['godmode/servers/discovery&wiz=hd&mode=netscan']['text'] = __('Network scan');
|
|
|
|
enterprise_hook('hostdevices_submenu');
|
|
|
|
$sub2['godmode/servers/discovery&wiz=hd&mode=customnetscan']['text'] = __('Custom network scan');
|
|
|
|
}
|
2019-10-09 15:45:02 +02:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
|
|
|
$sub2['godmode/servers/discovery&wiz=hd&mode=managenetscanscripts']['text'] = __('Manage scan scripts');
|
|
|
|
}
|
2019-10-09 15:45:02 +02:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub['godmode/servers/discovery&wiz=hd']['text'] = __('Host & devices');
|
|
|
|
$sub['godmode/servers/discovery&wiz=hd']['id'] = 'hd';
|
2023-02-13 14:32:02 +01:00
|
|
|
$sub['godmode/servers/discovery&wiz=hd']['type'] = 'direct';
|
|
|
|
$sub['godmode/servers/discovery&wiz=hd']['subtype'] = 'nolink';
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub['godmode/servers/discovery&wiz=hd']['sub2'] = $sub2;
|
|
|
|
}
|
2019-07-11 12:32:48 +02:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
|
|
|
enterprise_hook('applications_menu');
|
|
|
|
enterprise_hook('cloud_menu');
|
|
|
|
enterprise_hook('console_task_menu');
|
|
|
|
}
|
2019-10-09 15:45:02 +02:00
|
|
|
}
|
2019-02-20 18:24:32 +01:00
|
|
|
|
|
|
|
// Add to menu.
|
2019-03-06 18:28:00 +01:00
|
|
|
$menu_godmode['discovery']['text'] = __('Discovery');
|
2021-11-17 17:31:43 +01:00
|
|
|
$menu_godmode['discovery']['sec2'] = '';
|
2019-03-06 18:28:00 +01:00
|
|
|
$menu_godmode['discovery']['id'] = 'god-discovery';
|
|
|
|
$menu_godmode['discovery']['sub'] = $sub;
|
2019-02-20 18:24:32 +01:00
|
|
|
}
|
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ($access_console_node === true) {
|
|
|
|
$sub = [];
|
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'AW') === true || (bool) check_acl($config['id_user'], 0, 'AD') === true) {
|
|
|
|
$sub['godmode/agentes/modificar_agente']['text'] = __('Manage agents');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/agentes/modificar_agente']['id'] = 'Manage_agents';
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub['godmode/agentes/modificar_agente']['subsecs'] = ['godmode/agentes/configurar_agente'];
|
|
|
|
}
|
2019-02-20 18:24:32 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
|
|
|
$sub['godmode/agentes/fields_manager']['text'] = __('Custom fields');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/agentes/fields_manager']['id'] = 'custom_fields';
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub['godmode/modules/manage_nc_groups']['text'] = __('Component groups');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/modules/manage_nc_groups']['id'] = 'component_groups';
|
2022-07-08 13:40:20 +02:00
|
|
|
// Category.
|
|
|
|
$sub['godmode/category/category']['text'] = __('Module categories');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/category/category']['id'] = 'module_categories';
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub['godmode/category/category']['subsecs'] = 'godmode/category/edit_category';
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub['godmode/modules/module_list']['text'] = __('Module types');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/modules/module_list']['id'] = 'module_types';
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub['godmode/groups/modu_group_list']['text'] = __('Module groups');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/groups/modu_group_list']['id'] = 'module_groups';
|
2016-09-08 16:06:12 +02:00
|
|
|
|
2022-08-25 14:01:08 +02:00
|
|
|
$sub['godmode/setup/os']['text'] = __('Operating systems');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/setup/os']['id'] = 'edit_OS';
|
2019-01-30 16:18:44 +01:00
|
|
|
}
|
2016-09-08 16:06:12 +02:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
|
|
|
// Netflow.
|
|
|
|
if ((bool) $config['activate_netflow'] === true) {
|
|
|
|
$sub['godmode/netflow/nf_edit']['text'] = __('Netflow filters');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/netflow/nf_edit']['id'] = 'netflow_filters';
|
2022-07-08 13:40:20 +02:00
|
|
|
}
|
|
|
|
}
|
2009-04-20 16:00:27 +02:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if (empty($sub) === false) {
|
|
|
|
$menu_godmode['gagente']['text'] = __('Resources');
|
|
|
|
$menu_godmode['gagente']['sec2'] = 'godmode/agentes/modificar_agente';
|
|
|
|
$menu_godmode['gagente']['id'] = 'god-resources';
|
|
|
|
$menu_godmode['gagente']['sub'] = $sub;
|
2019-01-30 16:18:44 +01:00
|
|
|
}
|
2016-09-08 16:06:12 +02:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub = [];
|
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
|
|
|
$sub['godmode/groups/group_list']['text'] = __('Manage agents groups');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/groups/group_list']['id'] = 'manage_agents_groups';
|
2022-07-08 13:40:20 +02:00
|
|
|
}
|
2016-09-08 16:06:12 +02:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
|
|
|
// Tag.
|
|
|
|
$sub['godmode/tag/tag']['text'] = __('Module tags');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/tag/tag']['id'] = 'module_tags';
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub['godmode/tag/tag']['subsecs'] = 'godmode/tag/edit_tag';
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
enterprise_hook('enterprise_acl_submenu');
|
|
|
|
}
|
2020-09-01 13:26:10 +02:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'UM') === true) {
|
|
|
|
$sub['godmode/users/user_list']['text'] = __('Users management');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/users/user_list']['id'] = 'Users_management';
|
2022-07-08 13:40:20 +02:00
|
|
|
}
|
2016-09-08 16:06:12 +02:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
|
|
|
$sub['godmode/users/profile_list']['text'] = __('Profile management');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/users/profile_list']['id'] = 'Profile_management';
|
2022-07-08 13:40:20 +02:00
|
|
|
}
|
2010-04-06 18:24:54 +02:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if (empty($sub) === false) {
|
|
|
|
$menu_godmode['gusuarios']['sub'] = $sub;
|
|
|
|
$menu_godmode['gusuarios']['text'] = __('Profiles');
|
|
|
|
$menu_godmode['gusuarios']['sec2'] = 'godmode/users/user_list';
|
|
|
|
$menu_godmode['gusuarios']['id'] = 'god-users';
|
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub = [];
|
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
|
|
|
$sub['templates']['text'] = __('Templates');
|
|
|
|
$sub['templates']['id'] = 'Templates';
|
|
|
|
$sub['templates']['type'] = 'direct';
|
|
|
|
$sub['templates']['subtype'] = 'nolink';
|
|
|
|
$sub2 = [];
|
|
|
|
$sub2['godmode/modules/manage_module_templates']['text'] = __('Module templates');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub2['godmode/modules/manage_module_templates']['id'] = 'module_templates';
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub2['godmode/modules/private_enterprise_numbers']['text'] = __('Private Enterprise Numbers');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub2['godmode/modules/private_enterprise_numbers']['id'] = 'private_Enterprise_Numbers';
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub2['enterprise/godmode/modules/local_components']['text'] = __('Local components');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub2['enterprise/godmode/modules/local_components']['id'] = 'local_components';
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub2['godmode/modules/manage_network_components']['text'] = __('Remote components');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub2['godmode/modules/manage_network_components']['id'] = 'network_components';
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub['templates']['sub2'] = $sub2;
|
|
|
|
|
2022-09-14 18:12:39 +02:00
|
|
|
$sub['godmode/modules/manage_inventory_modules']['text'] = __('Inventory modules');
|
2023-02-17 10:10:47 +01:00
|
|
|
$sub['godmode/modules/manage_inventory_modules']['id'] = 'Inventory_modules';
|
2022-09-14 18:12:39 +02:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
enterprise_hook('autoconfiguration_menu');
|
|
|
|
enterprise_hook('agent_repository_menu');
|
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
|
|
|
enterprise_hook('policies_menu');
|
|
|
|
enterprise_hook('agents_submenu');
|
|
|
|
}
|
2021-10-25 17:01:26 +02:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'NW') === true) {
|
|
|
|
enterprise_hook('agents_ncm_submenu');
|
2019-01-30 16:18:44 +01:00
|
|
|
}
|
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
|
|
|
$sub['gmassive']['text'] = __('Bulk operations');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['gmassive']['id'] = 'Bulk_operations';
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub['gmassive']['type'] = 'direct';
|
|
|
|
$sub['gmassive']['subtype'] = 'nolink';
|
|
|
|
$sub2 = [];
|
2022-12-07 11:25:27 +01:00
|
|
|
$sub2['godmode/massive/massive_operations&tab=massive_agents']['text'] = __('Agents operations');
|
|
|
|
$sub2['godmode/massive/massive_operations&tab=massive_modules']['text'] = __('Modules operations');
|
|
|
|
$sub2['godmode/massive/massive_operations&tab=massive_plugins']['text'] = __('Plugins operations');
|
2022-07-08 13:40:20 +02:00
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'UM') === true) {
|
2022-12-07 11:25:27 +01:00
|
|
|
$sub2['godmode/massive/massive_operations&tab=massive_users']['text'] = __('Users operations');
|
2022-07-08 13:40:20 +02:00
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-12-07 11:25:27 +01:00
|
|
|
$sub2['godmode/massive/massive_operations&tab=massive_alerts']['text'] = __('Alerts operations');
|
2022-07-08 13:40:20 +02:00
|
|
|
enterprise_hook('massivepolicies_submenu');
|
|
|
|
enterprise_hook('massivesnmp_submenu');
|
|
|
|
enterprise_hook('massivesatellite_submenu');
|
2008-07-25 20:37:32 +02:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub['gmassive']['sub2'] = $sub2;
|
|
|
|
$sub2 = [];
|
2019-01-30 16:18:44 +01:00
|
|
|
}
|
2020-12-03 14:48:12 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'PM') === true || (bool) check_acl($config['id_user'], 0, 'UM') === true) {
|
|
|
|
$sub['godmode/groups/group_list&tab=credbox']['text'] = __('Credential store');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/groups/group_list&tab=credbox']['id'] = 'credential_store';
|
2022-07-08 13:40:20 +02:00
|
|
|
}
|
2022-06-03 12:26:15 +02:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
// Manage events.
|
2022-06-03 12:26:15 +02:00
|
|
|
$sub2 = [];
|
2022-07-08 13:40:20 +02:00
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'EW') === true || (bool) check_acl($config['id_user'], 0, 'EM') === true) {
|
|
|
|
// Custom event fields.
|
|
|
|
$sub2['godmode/events/events§ion=filter']['text'] = __('Event filters');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub2['godmode/events/events§ion=filter']['id'] = 'event_filters';
|
2022-07-08 13:40:20 +02:00
|
|
|
}
|
2022-06-03 12:26:15 +02:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
|
|
|
$sub2['godmode/events/events§ion=fields']['text'] = __('Custom columns');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub2['godmode/events/events§ion=fields']['id'] = 'Custom_events';
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub2['godmode/events/events§ion=responses']['text'] = __('Event responses');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub2['godmode/events/events§ion=responses']['id'] = 'Event_responses';
|
2022-07-08 13:40:20 +02:00
|
|
|
}
|
2022-06-03 12:26:15 +02:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if (empty($sub2) === false) {
|
|
|
|
$sub['geventos']['text'] = __('Events');
|
|
|
|
$sub['geventos']['id'] = 'events';
|
|
|
|
$sub['geventos']['sec2'] = 'godmode/events/events§ion=filter';
|
|
|
|
$sub['geventos']['type'] = 'direct';
|
|
|
|
$sub['geventos']['subtype'] = 'nolink';
|
|
|
|
$sub['geventos']['sub2'] = $sub2;
|
|
|
|
}
|
2015-12-14 14:21:13 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if (empty($sub) === false) {
|
|
|
|
$menu_godmode['gmodules']['text'] = __('Configuration');
|
|
|
|
$menu_godmode['gmodules']['sec2'] = 'godmode/modules/manage_network_templates';
|
|
|
|
$menu_godmode['gmodules']['id'] = 'god-configuration';
|
|
|
|
$menu_godmode['gmodules']['sub'] = $sub;
|
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'LW') === true
|
|
|
|
|| (bool) check_acl($config['id_user'], 0, 'LM') === true
|
|
|
|
|| (bool) check_acl($config['id_user'], 0, 'AD') === true
|
|
|
|
) {
|
|
|
|
$menu_godmode['galertas']['text'] = __('Alerts');
|
|
|
|
$menu_godmode['galertas']['sec2'] = 'godmode/alerts/alert_list';
|
|
|
|
$menu_godmode['galertas']['id'] = 'god-alerts';
|
|
|
|
|
|
|
|
$sub = [];
|
|
|
|
$sub['godmode/alerts/alert_list']['text'] = __('List of Alerts');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/alerts/alert_list']['id'] = 'List_of_Alerts';
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub['godmode/alerts/alert_list']['pages'] = ['godmode/alerts/alert_view'];
|
|
|
|
|
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'LM') === true) {
|
|
|
|
$sub['godmode/alerts/alert_templates']['text'] = __('Templates');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/alerts/alert_templates']['id'] = 'templates';
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub['godmode/alerts/alert_templates']['pages'] = ['godmode/alerts/configure_alert_template'];
|
|
|
|
|
|
|
|
$sub['godmode/alerts/alert_actions']['text'] = __('Actions');
|
|
|
|
$sub['godmode/alerts/alert_actions']['id'] = 'Actions';
|
|
|
|
$sub['godmode/alerts/alert_actions']['pages'] = ['godmode/alerts/configure_alert_action'];
|
|
|
|
$sub['godmode/alerts/alert_commands']['text'] = __('Commands');
|
|
|
|
$sub['godmode/alerts/alert_commands']['id'] = 'Commands';
|
|
|
|
$sub['godmode/alerts/alert_commands']['pages'] = ['godmode/alerts/configure_alert_command'];
|
|
|
|
$sub['godmode/alerts/alert_special_days']['text'] = __('Special days list');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/alerts/alert_special_days']['id'] = 'Special_days_list';
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub['godmode/alerts/alert_special_days']['pages'] = ['godmode/alerts/configure_alert_special_days'];
|
|
|
|
|
|
|
|
enterprise_hook('eventalerts_submenu');
|
|
|
|
$sub['godmode/snmpconsole/snmp_alert']['text'] = __('SNMP alerts');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/snmpconsole/snmp_alert']['id'] = 'SNMP_alerts';
|
2022-07-08 13:40:20 +02:00
|
|
|
enterprise_hook('alert_inventory_submenu');
|
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$menu_godmode['galertas']['sub'] = $sub;
|
2019-01-30 16:18:44 +01:00
|
|
|
}
|
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'AW') === true || (bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
|
|
|
// Servers.
|
|
|
|
$menu_godmode['gservers']['text'] = __('Servers');
|
|
|
|
$menu_godmode['gservers']['sec2'] = 'godmode/servers/modificar_server';
|
|
|
|
$menu_godmode['gservers']['id'] = 'god-servers';
|
2009-04-02 Sancho Lerena <slerena@artica.es>
* pandoradb.sql: Final DB changes proposed for closing this month the DB
scheme. tagente-> new server_name field to assign server (old fields will
be removed). talert_templates has two new types (warning, critical).
tevento has "user_comment" new field. Tserver has three new fields,
server_type (so some old fields will be deleted), threads and queued_modules
this last two are for statistical options. Tusuario add language type to
override global language.
* update_manager/main.php: Minor changes for correct ACL usage. Non PM
users could see in what revision it the system, but only that.
* pandoradb_migrate_v2.x_to_v3.0.sql: Updated script for new DB changes.
* general/noaccess.php: Added footer and ending div. Page was very ugly
when showing noaccess errors, nobody see it ???.
* godmode/menu.php: A LOT of ACL fixes on several options.
* godmode/agentes/agent_manager.php: Fixed a crazy floating icon.
* godmode/agentes/manage_config_remote.php: A LOT of changes, rewriting
stuff, because was not working. This also adds a lot of ACL checks.
* godmode/agentes/massive_config.php, massive*: ACL changes.
* godmode/agentes/modificar_agente.php: Fixed ACL problems.
* godmode/agentes/module_manager_editor.php: Fixed bad module categories for
some types (data, plugin and prediction).
* godmode/alerts/alert_list.php: Fixed ACL problem.
* godmode/reporting/graph_builder.php: Added ACl restriction for
non-viewable agents for current user. Seems to be a problem with data
with more than 2 sources.
* godmode/reporting/map_builder.php: ACL checks improved.
* godmode/reporting/reporting_builder.php: ACL checks added (was missing),
some code ported from 2.1, other is new. New fields shown in list.
* include/functions.php: Fixed the annoying bug of "bad counters" in
function human_time_description_raw(). Function used,format_numeric() should
not be used never to calculate nothing, only to print formatted strings.
* include/functions_db.php: Added function user_access_to_agent() to know
if a given user has access to a given agent.
* include/functioins_report.php: get_report() should let admin to watch any
report. Fixed.
* agentes/alerts_status.php: Fixed ACL problem for view alert.
* operation/incidents/incident.php: Bad call for pagination() was giving
problems to pagination call. Somebody changes pagination() interface and
make this broken. Please if you change any interface, be sure that is compatible
with old code or make a post in the list about this !
* godmode/users/user_edit.php: Additional ACL check to do not let anybody
to watch non accesible users. Even for see the username or description.
* reporting/pchart_graph.php:Progress bar shown text in white when > 60%.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1594 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-02 21:16:59 +02:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub = [];
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
|
|
|
$sub['godmode/servers/modificar_server']['text'] = __('Manage servers');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/servers/modificar_server']['id'] = 'Manage_servers';
|
2022-07-08 13:40:20 +02:00
|
|
|
}
|
2019-02-12 14:39:01 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
// This subtabs are only for Pandora Admin.
|
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
|
|
|
enterprise_hook('ha_cluster');
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub['godmode/servers/plugin']['text'] = __('Plugins');
|
|
|
|
$sub['godmode/servers/plugin']['id'] = 'Plugins';
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub['godmode/servers/plugin_registration']['text'] = __('Register Plugin');
|
|
|
|
$sub['godmode/servers/plugin_registration']['id'] = 'register_plugin';
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
enterprise_hook('export_target_submenu');
|
2021-06-15 17:24:03 +02:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
enterprise_hook('manage_satellite_submenu');
|
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$menu_godmode['gservers']['sub'] = $sub;
|
2019-01-30 16:18:44 +01:00
|
|
|
}
|
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
|
|
|
// Setup.
|
|
|
|
$menu_godmode['gsetup']['text'] = __('Setup');
|
|
|
|
$menu_godmode['gsetup']['sec2'] = 'general';
|
|
|
|
$menu_godmode['gsetup']['id'] = 'god-setup';
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub = [];
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
// Options Setup.
|
|
|
|
$sub['general']['text'] = __('Setup');
|
|
|
|
$sub['general']['id'] = 'Setup';
|
|
|
|
$sub['general']['type'] = 'direct';
|
|
|
|
$sub['general']['subtype'] = 'nolink';
|
|
|
|
$sub2 = [];
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub2['godmode/setup/setup§ion=general']['text'] = __('General Setup');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub2['godmode/setup/setup§ion=general']['id'] = 'general_Setup';
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub2['godmode/setup/setup§ion=general']['refr'] = 0;
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
enterprise_hook('password_submenu');
|
|
|
|
enterprise_hook('enterprise_submenu');
|
|
|
|
enterprise_hook('historydb_submenu');
|
|
|
|
enterprise_hook('log_collector_submenu');
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub2['godmode/setup/setup§ion=auth']['text'] = __('Authentication');
|
|
|
|
$sub2['godmode/setup/setup§ion=auth']['refr'] = 0;
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub2['godmode/setup/setup§ion=perf']['text'] = __('Performance');
|
|
|
|
$sub2['godmode/setup/setup§ion=perf']['refr'] = 0;
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub2['godmode/setup/setup§ion=vis']['text'] = __('Visual styles');
|
|
|
|
$sub2['godmode/setup/setup§ion=vis']['refr'] = 0;
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
|
|
|
if ((bool) $config['activate_netflow'] === true) {
|
|
|
|
$sub2['godmode/setup/setup§ion=net']['text'] = __('Netflow');
|
|
|
|
$sub2['godmode/setup/setup§ion=net']['refr'] = 0;
|
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
}
|
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub2['godmode/setup/setup§ion=ehorus']['text'] = __('eHorus');
|
|
|
|
$sub2['godmode/setup/setup§ion=ehorus']['refr'] = 0;
|
2019-09-02 17:01:41 +02:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub2['godmode/setup/setup§ion=integria']['text'] = __('Integria IMS');
|
|
|
|
$sub2['godmode/setup/setup§ion=integria']['refr'] = 0;
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
enterprise_hook('module_library_submenu');
|
2020-02-27 11:20:24 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub2['godmode/setup/setup§ion=notifications']['text'] = __('Notifications');
|
|
|
|
$sub2['godmode/setup/setup§ion=notifications']['refr'] = 0;
|
2019-02-12 13:29:43 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub2['godmode/setup/setup§ion=websocket_engine']['text'] = __('Websocket Engine');
|
|
|
|
$sub2['godmode/setup/setup§ion=websocket_engine']['refr'] = 0;
|
2019-12-13 11:46:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub2['godmode/setup/setup§ion=external_tools']['text'] = __('External Tools');
|
|
|
|
$sub2['godmode/setup/setup§ion=external_tools']['refr'] = 0;
|
2020-12-16 14:09:54 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ((bool) $config['activate_gis'] === true) {
|
|
|
|
$sub2['godmode/setup/setup§ion=gis']['text'] = __('Map conections GIS');
|
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub['general']['sub2'] = $sub2;
|
|
|
|
$sub['godmode/setup/license']['text'] = __('License');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/setup/license']['id'] = 'license';
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
enterprise_hook('skins_submenu');
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$menu_godmode['gsetup']['sub'] = $sub;
|
|
|
|
}
|
2008-08-04 10:15:16 +02:00
|
|
|
}
|
2008-12-19 22:45:20 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
|
2022-06-03 12:26:15 +02:00
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'PM') === true || (bool) check_acl($config['id_user'], 0, 'DM') === true) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$menu_godmode['gextensions']['text'] = __('Admin tools');
|
|
|
|
$menu_godmode['gextensions']['sec2'] = 'godmode/extensions';
|
|
|
|
$menu_godmode['gextensions']['id'] = 'god-extensions';
|
|
|
|
|
|
|
|
$sub = [];
|
|
|
|
|
2022-06-03 12:26:15 +02:00
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
2022-07-08 13:40:20 +02:00
|
|
|
if ($access_console_node === true) {
|
|
|
|
// Audit //meter en extensiones.
|
|
|
|
$sub['godmode/audit_log']['text'] = __('System audit log');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/audit_log']['id'] = 'system_audit_log';
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub['godmode/setup/links']['text'] = __('Links');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/setup/links']['id'] = 'links';
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub['tools/diagnostics']['text'] = __('Diagnostic info');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['tools/diagnostics']['id'] = 'diagnostic_info';
|
2022-07-08 13:40:20 +02:00
|
|
|
enterprise_hook('omnishell');
|
|
|
|
enterprise_hook('ipam_submenu');
|
|
|
|
|
|
|
|
$sub['godmode/setup/news']['text'] = __('Site news');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/setup/news']['id'] = 'site_news';
|
2022-07-08 13:40:20 +02:00
|
|
|
}
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
$sub['godmode/setup/file_manager']['text'] = __('File manager');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/setup/file_manager']['id'] = 'file_manager';
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ($access_console_node === true) {
|
|
|
|
if (is_user_admin($config['id_user']) === true) {
|
|
|
|
$sub['extensions/db_status']['text'] = __('DB Schema Check');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['extensions/db_status']['id'] = 'DB_Schema_Check';
|
2023-01-04 12:14:59 +01:00
|
|
|
$sub['extensions/db_status']['sec'] = 'gextensions';
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub['extensions/dbmanager']['text'] = __('DB Interface');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['extensions/dbmanager']['id'] = 'DB_Interface';
|
2023-01-04 12:14:59 +01:00
|
|
|
$sub['extensions/dbmanager']['sec'] = 'gextensions';
|
2022-07-08 13:40:20 +02:00
|
|
|
enterprise_hook('dbBackupManager');
|
|
|
|
enterprise_hook('elasticsearch_interface_menu');
|
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 08:35:47 +01:00
|
|
|
$sub['godmode/events/configuration_sounds']['text'] = __('Accoustic console setup');
|
|
|
|
$sub['godmode/events/configuration_sounds']['id'] = 'Accoustic console setup';
|
2023-01-30 08:27:03 +01:00
|
|
|
$sub['godmode/events/configuration_sounds']['pages'] = ['godmode/events/configuration_sounds'];
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
$menu_godmode['gextensions']['sub'] = $sub;
|
2008-08-04 10:15:16 +02:00
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ($access_console_node === true) {
|
|
|
|
if (is_array($config['extensions']) === true) {
|
|
|
|
$sub = [];
|
|
|
|
$sub2 = [];
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
foreach ($config['extensions'] as $extension) {
|
|
|
|
// If no godmode_menu is a operation extension.
|
|
|
|
if (empty($extension['godmode_menu']) === true) {
|
|
|
|
continue;
|
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ($extension['godmode_menu']['name'] === 'System Info') {
|
|
|
|
continue;
|
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ($extension['godmode_menu']['name'] !== __('DB Schema check') && $extension['godmode_menu']['name'] !== __('DB interface')) {
|
|
|
|
$extmenu = $extension['godmode_menu'];
|
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
// Check the ACL for this user.
|
|
|
|
if ((bool) check_acl($config['id_user'], 0, $extmenu['acl']) === false) {
|
|
|
|
continue;
|
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
// Check if was displayed inside other menu.
|
|
|
|
if (empty($extension['godmode_menu']['fatherId']) === true) {
|
|
|
|
$sub2[$extmenu['sec2']]['text'] = __($extmenu['name']);
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub2[$extmenu['sec2']]['id'] = str_replace(' ', '_', $extmenu['name']);
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub2[$extmenu['sec2']]['refr'] = 0;
|
|
|
|
} else {
|
|
|
|
if (is_array($extmenu) === true && array_key_exists('fatherId', $extmenu) === true) {
|
|
|
|
if (strlen($extmenu['fatherId']) > 0) {
|
|
|
|
if (array_key_exists('subfatherId', $extmenu) === true) {
|
|
|
|
if (strlen($extmenu['subfatherId']) > 0) {
|
|
|
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['text'] = __($extmenu['name']);
|
2023-02-07 15:22:51 +01:00
|
|
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['id'] = str_replace(' ', '_', $extmenu['name']);
|
2022-07-08 13:40:20 +02:00
|
|
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['refr'] = 0;
|
|
|
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['icon'] = $extmenu['icon'];
|
|
|
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['sec'] = 'extensions';
|
|
|
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['extension'] = true;
|
|
|
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['enterprise'] = $extension['enterprise'];
|
|
|
|
$menu_godmode[$extmenu['fatherId']]['hasExtensions'] = true;
|
|
|
|
} else {
|
|
|
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['text'] = __($extmenu['name']);
|
2023-02-07 15:22:51 +01:00
|
|
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['id'] = str_replace(' ', '_', $extmenu['name']);
|
2022-07-08 13:40:20 +02:00
|
|
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['refr'] = 0;
|
|
|
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['icon'] = $extmenu['icon'];
|
|
|
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['sec'] = $extmenu['fatherId'];
|
|
|
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['extension'] = true;
|
|
|
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['enterprise'] = $extension['enterprise'];
|
|
|
|
$menu_godmode[$extmenu['fatherId']]['hasExtensions'] = true;
|
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
} else {
|
|
|
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['text'] = __($extmenu['name']);
|
2023-02-07 15:22:51 +01:00
|
|
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['id'] = str_replace(' ', '_', $extmenu['name']);
|
2019-01-30 16:18:44 +01:00
|
|
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['refr'] = 0;
|
|
|
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['icon'] = $extmenu['icon'];
|
2022-07-08 13:40:20 +02:00
|
|
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['sec'] = 'gextensions';
|
2019-01-30 16:18:44 +01:00
|
|
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['extension'] = true;
|
|
|
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['enterprise'] = $extension['enterprise'];
|
|
|
|
$menu_godmode[$extmenu['fatherId']]['hasExtensions'] = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
// Complete the submenu.
|
|
|
|
$extension_view = [];
|
2023-02-07 15:22:51 +01:00
|
|
|
$extension_view['godmode/extensions']['id'] = 'extension_manager_view';
|
2022-07-08 13:40:20 +02:00
|
|
|
$extension_view['godmode/extensions']['text'] = __('Extension manager view');
|
|
|
|
$extension_submenu = array_merge($extension_view, $sub2);
|
|
|
|
|
|
|
|
$sub['godmode/extensions']['sub2'] = $extension_submenu;
|
|
|
|
$sub['godmode/extensions']['text'] = __('Extension manager');
|
2023-02-07 15:22:51 +01:00
|
|
|
$sub['godmode/extensions']['id'] = 'extension_manager';
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub['godmode/extensions']['type'] = 'direct';
|
|
|
|
$sub['godmode/extensions']['subtype'] = 'nolink';
|
|
|
|
|
|
|
|
if (is_array($menu_godmode['gextensions']['sub']) === true) {
|
|
|
|
$submenu = array_merge($menu_godmode['gextensions']['sub'], $sub);
|
|
|
|
if ($menu_godmode['gextensions']['sub'] != null) {
|
|
|
|
$menu_godmode['gextensions']['sub'] = $submenu;
|
|
|
|
}
|
2019-06-14 13:20:34 +02:00
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
}
|
2009-03-03 16:21:13 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$menu_godmode['links']['text'] = __('Links');
|
|
|
|
$menu_godmode['links']['sec2'] = '';
|
|
|
|
$menu_godmode['links']['id'] = 'god-links';
|
2015-11-17 12:20:34 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub = [];
|
|
|
|
$rows = db_get_all_rows_in_table('tlink', 'name');
|
|
|
|
foreach ($rows as $row) {
|
|
|
|
// Audit //meter en extensiones.
|
|
|
|
$sub[$row['link']]['text'] = $row['name'];
|
|
|
|
$sub[$row['link']]['id'] = $row['name'];
|
|
|
|
$sub[$row['link']]['type'] = 'direct';
|
|
|
|
$sub[$row['link']]['subtype'] = 'new_blank';
|
|
|
|
}
|
2015-11-17 12:20:34 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$menu_godmode['links']['sub'] = $sub;
|
|
|
|
}
|
2015-11-17 12:20:34 +01:00
|
|
|
|
2022-06-28 16:08:13 +02:00
|
|
|
// Warp Manager.
|
2022-06-03 12:26:15 +02:00
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'PM') === true && (bool) $config['enable_update_manager'] === true) {
|
2022-07-04 13:40:06 +02:00
|
|
|
$menu_godmode['messages']['text'] = __('Warp Update');
|
2019-01-30 16:18:44 +01:00
|
|
|
$menu_godmode['messages']['id'] = 'god-um_messages';
|
2021-11-18 12:25:14 +01:00
|
|
|
$menu_godmode['messages']['sec2'] = '';
|
2019-01-30 16:18:44 +01:00
|
|
|
|
|
|
|
$sub = [];
|
2022-06-10 10:17:23 +02:00
|
|
|
$sub['godmode/update_manager/update_manager&tab=offline']['text'] = __('Update offline');
|
2021-08-11 14:12:49 +02:00
|
|
|
$sub['godmode/update_manager/update_manager&tab=offline']['id'] = 'Offline';
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2022-06-10 10:17:23 +02:00
|
|
|
$sub['godmode/update_manager/update_manager&tab=online']['text'] = __('Update online');
|
2019-01-30 16:18:44 +01:00
|
|
|
$sub['godmode/update_manager/update_manager&tab=online']['id'] = 'Online';
|
2022-03-30 14:41:47 +02:00
|
|
|
|
2022-06-10 10:17:23 +02:00
|
|
|
$sub['godmode/update_manager/update_manager&tab=setup']['text'] = __('Options');
|
2019-01-30 16:18:44 +01:00
|
|
|
$sub['godmode/update_manager/update_manager&tab=setup']['id'] = 'Options';
|
|
|
|
|
2022-06-10 12:56:45 +02:00
|
|
|
$sub['godmode/update_manager/update_manager&tab=history']['text'] = __('Warp journal');
|
2022-03-30 14:41:47 +02:00
|
|
|
$sub['godmode/update_manager/update_manager&tab=history']['id'] = 'Journal';
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
$menu_godmode['messages']['sub'] = $sub;
|
2016-06-09 18:54:59 +02:00
|
|
|
}
|
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
if ($access_console_node === true) {
|
|
|
|
// Module library.
|
|
|
|
if ((bool) check_acl($config['id_user'], 0, 'AR') === true) {
|
|
|
|
$menu_godmode['gmodule_library']['text'] = __('Module library');
|
|
|
|
$menu_godmode['gmodule_library']['id'] = 'god-module_library';
|
2020-02-27 11:20:24 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub = [];
|
|
|
|
$sub['godmode/module_library/module_library_view']['text'] = __('View');
|
|
|
|
$sub['godmode/module_library/module_library_view']['id'] = 'View';
|
2020-02-27 11:20:24 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$sub['godmode/module_library/module_library_view&tab=categories']['text'] = __('Categories');
|
|
|
|
$sub['godmode/module_library/module_library_view&tab=categories']['id'] = 'categories';
|
2020-02-27 11:20:24 +01:00
|
|
|
|
2022-07-08 13:40:20 +02:00
|
|
|
$menu_godmode['gmodule_library']['sub'] = $sub;
|
|
|
|
}
|
2020-02-27 11:20:24 +01:00
|
|
|
}
|
2016-06-13 16:30:54 +02:00
|
|
|
|
2022-12-29 16:21:36 +01:00
|
|
|
if ($access_console_node === true) {
|
|
|
|
// About.
|
|
|
|
$menu_godmode['about']['text'] = __('About');
|
|
|
|
$menu_godmode['about']['id'] = 'about';
|
|
|
|
}
|
|
|
|
|
2022-06-03 12:26:15 +02:00
|
|
|
if ((bool) $config['pure'] === false) {
|
2019-01-30 16:18:44 +01:00
|
|
|
menu_print_menu($menu_godmode);
|
2012-09-27 15:02:16 +02:00
|
|
|
}
|
2022-12-29 16:21:36 +01:00
|
|
|
|
|
|
|
echo '<div id="about-div"></div>';
|