$timezone) {
if (strpos($timezone, $zone) === false) {
unset($timezones[$timezone_key]);
}
}
echo json_encode($timezones);
}
return;
}
if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user'])) {
db_pandora_audit('ACL Violation', 'Trying to access Setup Management');
include 'general/noaccess.php';
return;
}
// Load enterprise extensions.
enterprise_include_once('include/functions_setup.php');
enterprise_include_once('include/functions_io.php');
enterprise_include_once('godmode/setup/setup.php');
/*
NOTICE FOR DEVELOPERS:
Update operation is done in config_process.php
This is done in that way so the user can see the changes inmediatly.
If you added a new token, please check config_update_config() in functions_config.php
to add it there.
*/
// Gets section to jump to another section.
$section = (string) get_parameter('section', 'general');
$buttons = [];
// Draws header.
$buttons['general'] = [
'active' => false,
'text' => ''.html_print_image('images/gm_setup.png', true, ['title' => __('General')]).'',
];
if (enterprise_installed()) {
$buttons = setup_enterprise_add_Tabs($buttons);
}
$buttons['auth'] = [
'active' => false,
'text' => ''.html_print_image('images/key.png', true, ['title' => __('Authentication')]).'',
];
$buttons['perf'] = [
'active' => false,
'text' => ''.html_print_image('images/performance.png', true, ['title' => __('Performance')]).'',
];
$buttons['vis'] = [
'active' => false,
'text' => ''.html_print_image('images/chart.png', true, ['title' => __('Visual styles')]).'',
];
if (check_acl($config['id_user'], 0, 'AW')) {
if ($config['activate_netflow']) {
$buttons['net'] = [
'active' => false,
'text' => ''.html_print_image('images/op_netflow.png', true, ['title' => __('Netflow')]).'',
];
}
}
$buttons['integria'] = [
'active' => false,
'text' => ''.html_print_image('images/integria.png', true, ['title' => __('Integria IMS')]).'',
];
$buttons['ehorus'] = [
'active' => false,
'text' => ''.html_print_image('images/ehorus/ehorus.png', true, ['title' => __('eHorus')]).'',
];
if (check_acl($config['id_user'], 0, 'PM') && enterprise_installed()) {
$buttons['module_library'] = [
'active' => false,
'text' => ''.html_print_image('images/library.png', true, ['title' => __('Module Library')]).'',
];
}
// FIXME: Not definitive icon
$buttons['notifications'] = [
'active' => false,
'text' => ''.html_print_image('images/alerts_template.png', true, ['title' => __('Notifications')]).'',
];
$buttons['websocket_engine'] = [
'active' => false,
'text' => ''.html_print_image('images/websocket_small.png', true, ['title' => __('Websocket engine')]).'',
];
$buttons['nettools'] = [
'active' => false,
'text' => ''.html_print_image('images/nettool.png', true, ['title' => __('Websocket engine')]).'',
];
if ($config['activate_gis']) {
$buttons['gis'] = [
'active' => false,
'text' => ''.html_print_image('images/gis_tab.png', true, ['title' => __('GIS Map connection')]).'',
];
}
$help_header = '';
if (enterprise_installed()) {
$subpage = setup_enterprise_add_subsection_main($section, $buttons, $help_header);
}
switch ($section) {
case 'general':
$buttons['general']['active'] = true;
$subpage = ' » '.__('General');
$help_header = 'setup_general_tab';
break;
case 'auth':
$buttons['auth']['active'] = true;
$subpage = ' » '.__('Authentication');
break;
case 'perf':
$buttons['perf']['active'] = true;
$subpage = ' » '.__('Performance');
$help_header = '';
break;
case 'vis':
$buttons['vis']['active'] = true;
$subpage = ' » '.__('Visual styles');
break;
case 'net':
$buttons['net']['active'] = true;
$subpage = ' » '.__('Netflow');
$help_header = 'setup_netflow_tab';
break;
case 'ehorus':
$buttons['ehorus']['active'] = true;
$subpage = ' » '.__('eHorus');
$help_header = 'setup_ehorus_tab';
break;
case 'integria':
$buttons['integria']['active'] = true;
$subpage = ' » '.__('Integria IMS');
$help_header = 'setup_integria_tab';
break;
case 'module_library':
$buttons['module_library']['active'] = true;
$subpage = ' » '.__('Module Library');
$help_header = 'setup_module_library_tab';
break;
case 'gis':
$buttons['gis']['active'] = true;
$subpage = ' » '.__('Map conections GIS');
break;
case 'notifications':
$buttons['notifications']['active'] = true;
$subpage = ' » '.__('Notifications');
break;
case 'websocket_engine':
$buttons['websocket_engine']['active'] = true;
$subpage = ' » '.__('Pandora Websocket Engine');
$help_header = 'quickshell_settings';
break;
case 'nettools':
$buttons['nettools']['active'] = true;
$subpage = ' » '.__('Network Tools');
$help_header = 'Network_Tools';
break;
case 'enterprise':
$buttons['enterprise']['active'] = true;
$subpage = ' » '.__('Enterprise');
$help_header = 'setup_enterprise_tab';
break;
default:
// Default.
break;
}
// Header.
ui_print_page_header(
__('Configuration').$subpage,
'',
false,
$help_header,
true,
$buttons
);
if (isset($config['error_config_update_config'])) {
if ($config['error_config_update_config']['correct'] == false) {
ui_print_error_message($config['error_config_update_config']['message']);
} else {
ui_print_success_message(__('Correct update the setup options'));
}
unset($config['error_config_update_config']);
}
switch ($section) {
case 'general':
include_once $config['homedir'].'/godmode/setup/setup_general.php';
break;
case 'auth':
include_once $config['homedir'].'/godmode/setup/setup_auth.php';
break;
case 'perf':
include_once $config['homedir'].'/godmode/setup/performance.php';
break;
case 'net':
include_once $config['homedir'].'/godmode/setup/setup_netflow.php';
break;
case 'vis':
include_once $config['homedir'].'/godmode/setup/setup_visuals.php';
break;
case 'ehorus':
include_once $config['homedir'].'/godmode/setup/setup_ehorus.php';
break;
case 'integria':
include_once $config['homedir'].'/godmode/setup/setup_integria.php';
break;
case 'gis':
include_once $config['homedir'].'/godmode/setup/gis.php';
break;
case 'notifications':
include_once $config['homedir'].'/godmode/setup/setup_notifications.php';
break;
case 'websocket_engine':
include_once $config['homedir'].'/godmode/setup/setup_websocket_engine.php';
break;
case 'nettools':
include_once $config['homedir'].'/godmode/setup/setup_net_tools.php';
break;
default:
enterprise_hook('setup_enterprise_select_tab', [$section]);
break;
}