$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( AUDIT_LOG_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/setup.png', true, [ 'title' => __('General'), 'class' => 'invert_filter', ] ).'', ]; if (enterprise_installed()) { $buttons = setup_enterprise_add_Tabs($buttons); } $buttons['auth'] = [ 'active' => false, 'text' => ''.html_print_image( 'images/key.png', true, [ 'title' => __('Authentication'), 'class' => 'invert_filter', ] ).'', ]; $buttons['perf'] = [ 'active' => false, 'text' => ''.html_print_image( 'images/performance.png', true, [ 'title' => __('Performance'), 'class' => 'invert_filter', ] ).'', ]; $buttons['vis'] = [ 'active' => false, 'text' => ''.html_print_image( 'images/chart.png', true, [ 'title' => __('Visual styles'), 'class' => 'invert_filter', ] ).'', ]; 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'), 'class' => 'invert_filter', ] ).'', ]; } } $buttons['integria'] = [ 'active' => false, 'text' => ''.html_print_image( 'images/integria.png', true, [ 'title' => __('Integria IMS'), 'class' => 'invert_filter', ] ).'', ]; $buttons['ehorus'] = [ 'active' => false, 'text' => ''.html_print_image( 'images/ehorus/ehorus.png', true, [ 'title' => __('eHorus'), 'class' => 'invert_filter', ] ).'', ]; 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'), 'class' => 'invert_filter', ] ).'', ]; } // FIXME: Not definitive icon $buttons['notifications'] = [ 'active' => false, 'text' => ''.html_print_image( 'images/alerts_template.png', true, [ 'title' => __('Notifications'), 'class' => 'invert_filter', ] ).'', ]; $buttons['websocket_engine'] = [ 'active' => false, 'text' => ''.html_print_image( 'images/websocket_small.png', true, [ 'title' => __('Websocket engine'), 'class' => 'invert_filter', ] ).'', ]; $buttons['external_tools'] = [ 'active' => false, 'text' => ''.html_print_image('images/nettool.png', true, ['title' => __('External Tools'), 'class' => 'invert_filter']).'', ]; if ($config['activate_gis']) { $buttons['gis'] = [ 'active' => false, 'text' => ''.html_print_image( 'images/gis_tab.png', true, [ 'title' => __('GIS Map connection'), 'class' => 'invert_filter', ] ).'', ]; } $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 'external_tools': $buttons['external_tools']['active'] = true; $subpage = ' » '.__('External Tools'); $help_header = ''; break; case 'enterprise': $buttons['enterprise']['active'] = true; $subpage = ' » '.__('Enterprise'); $help_header = 'setup_enterprise_tab'; break; default: // Default. break; } // Put header inside div for special sizing.(No right margin). echo '