__('Network'), 'id' => 'Network', 'type' => 'direct', 'subtype' => 'nolink', 'refr' => 0, ]; // Initialize the submenu. $netflow_sub = []; if ($config['activate_netflow']) { $netflow_sub = array_merge( $netflow_sub, [ 'operation/netflow/netflow_explorer' => [ 'text' => __('Netflow explorer'), 'id' => 'Netflow explorer', ], 'operation/netflow/nf_live_view' => [ 'text' => __('Netflow Live View'), 'id' => 'Netflow Live View', ], ] ); } if ($config['activate_nta']) { $netflow_sub = array_merge( $netflow_sub, [ 'operation/network/network_explorer' => [ 'text' => __('Network explorer'), 'id' => 'Network explorer', ], ] ); } if ($config['activate_nta'] || $config['activate_netflow']) { $netflow_sub = array_merge( $netflow_sub, [ 'operation/network/network_usage_map' => [ 'text' => __('Network usage map'), 'id' => 'Network usage map', ], ] ); } $sub['network']['sub2'] = $netflow_sub; } if ($config['log_collector'] == 1) { enterprise_hook('log_collector_menu'); } // End of view agents. } // SNMP Console. $sub2 = []; if (check_acl($config['id_user'], 0, 'AR') || check_acl($config['id_user'], 0, 'AW')) { $sub2['operation/snmpconsole/snmp_view']['text'] = __('SNMP console'); $sub2['operation/snmpconsole/snmp_browser']['text'] = __('SNMP browser'); enterprise_hook('snmpconsole_submenu'); } if (check_acl($config['id_user'], 0, 'PM')) { $sub2['operation/snmpconsole/snmp_mib_uploader']['text'] = __('MIB uploader'); } if (check_acl($config['id_user'], 0, 'LW') || check_acl($config['id_user'], 0, 'LM')) { $sub2['godmode/snmpconsole/snmp_filters']['text'] = __('SNMP filters'); $sub2['godmode/snmpconsole/snmp_trap_generator']['text'] = __('SNMP trap generator'); } if (!empty($sub2)) { $sub['snmpconsole']['sub2'] = $sub2; $sub['snmpconsole']['text'] = __('SNMP'); $sub['snmpconsole']['id'] = 'SNMP'; $sub['snmpconsole']['refr'] = 0; $sub['snmpconsole']['type'] = 'direct'; $sub['snmpconsole']['subtype'] = 'nolink'; } enterprise_hook('cluster_menu'); enterprise_hook('aws_menu'); if (!empty($sub)) { $menu_operation['estado']['text'] = __('Monitoring'); $menu_operation['estado']['sec2'] = 'operation/agentes/tactical'; $menu_operation['estado']['refr'] = 0; $menu_operation['estado']['id'] = 'oper-agents'; $menu_operation['estado']['sub'] = $sub; } // Start network view. $sub = []; if (check_acl($config['id_user'], 0, 'MR') || check_acl($config['id_user'], 0, 'MW') || check_acl($config['id_user'], 0, 'MM')) { // Network enterprise. $sub['operation/agentes/pandora_networkmap']['text'] = __('Network map'); $sub['operation/agentes/pandora_networkmap']['id'] = 'Network map'; $sub['operation/agentes/pandora_networkmap']['refr'] = 0; enterprise_hook('transmap_console'); } enterprise_hook('services_menu'); if (check_acl($config['id_user'], 0, 'VR') || check_acl($config['id_user'], 0, 'VW') || check_acl($config['id_user'], 0, 'VM')) { if (!isset($config['vc_favourite_view']) || $config['vc_favourite_view'] == 0) { // Visual console. $sub['godmode/reporting/map_builder']['text'] = __('Visual console'); $sub['godmode/reporting/map_builder']['id'] = 'Visual console'; } else { // Visual console favorite. $sub['godmode/reporting/visual_console_favorite']['text'] = __('Visual console'); $sub['godmode/reporting/visual_console_favorite']['id'] = 'Visual console'; } if ($config['vc_menu_items'] != 0) { // Set godomode path. if (!isset($config['vc_favourite_view']) || $config['vc_favourite_view'] == 0) { $sub['godmode/reporting/map_builder']['subsecs'] = [ 'godmode/reporting/map_builder', 'godmode/reporting/visual_console_builder', ]; } else { $sub['godmode/reporting/visual_console_favorite']['subsecs'] = [ 'godmode/reporting/map_builder', 'godmode/reporting/visual_console_builder', ]; } // $layouts = db_get_all_rows_in_table ('tlayout', 'name'); $own_info = get_user_info($config['id_user']); $returnAllGroups = 0; if ($own_info['is_admin']) { $returnAllGroups = 1; } $layouts = visual_map_get_user_layouts($config['id_user'], false, false, $returnAllGroups, true); $sub2 = []; if ($layouts === false) { $layouts = []; } else { $id = (int) get_parameter('id', -1); $break_max_console = false; $max = $config['vc_menu_items']; $i = 0; foreach ($layouts as $layout) { $i++; if ($i > $max) { $break_max_console = true; break; } $name = io_safe_output($layout['name']); $sub2['operation/visual_console/render_view&id='.$layout['id']]['text'] = mb_substr($name, 0, 19); $sub2['operation/visual_console/render_view&id='.$layout['id']]['id'] = mb_substr($name, 0, 19); $sub2['operation/visual_console/render_view&id='.$layout['id']]['title'] = $name; if (!empty($config['vc_refr'])) { $sub2['operation/visual_console/render_view&id='.$layout['id']]['refr'] = $config['vc_refr']; } else if (((int) get_parameter('refr', 0)) > 0) { $sub2['operation/visual_console/render_view&id='.$layout['id']]['refr'] = (int) get_parameter('refr', 0); } else { $sub2['operation/visual_console/render_view&id='.$layout['id']]['refr'] = 0; } } if ($break_max_console) { $sub2['godmode/reporting/visual_console_favorite']['text'] = __('Show more').' >'; $sub2['godmode/reporting/visual_console_favorite']['id'] = 'visual_favourite_console'; $sub2['godmode/reporting/visual_console_favorite']['title'] = 'show_more'; $sub2['godmode/reporting/visual_console_favorite']['refr'] = 0; } if (!empty($sub2)) { if (!isset($config['vc_favourite_view']) || $config['vc_favourite_view'] == 0) { $sub['godmode/reporting/map_builder']['sub2'] = $sub2; } else { $sub['godmode/reporting/visual_console_favorite']['sub2'] = $sub2; } } } } } if (check_acl($config['id_user'], 0, 'MR') || check_acl($config['id_user'], 0, 'MW') || check_acl($config['id_user'], 0, 'MM')) { // INI GIS Maps. if ($config['activate_gis']) { $sub['gismaps']['text'] = __('GIS Maps'); $sub['gismaps']['id'] = 'GIS Maps'; $sub['gismaps']['type'] = 'direct'; $sub['gismaps']['subtype'] = 'nolink'; $sub2 = []; $sub2['operation/gis_maps/gis_map']['text'] = __('List of Gis maps'); $sub2['operation/gis_maps/gis_map']['id'] = 'List of Gis maps'; $gisMaps = db_get_all_rows_in_table('tgis_map', 'map_name'); if ($gisMaps === false) { $gisMaps = []; } $id = (int) get_parameter('id', -1); $own_info = get_user_info($config['id_user']); if ($own_info['is_admin'] || check_acl($config['id_user'], 0, 'PM')) { $own_groups = array_keys(users_get_groups($config['id_user'], 'IR')); } else { $own_groups = array_keys(users_get_groups($config['id_user'], 'IR', false)); } foreach ($gisMaps as $gisMap) { $is_in_group = in_array($gisMap['group_id'], $own_groups); if (!$is_in_group) { continue; } if (! check_acl($config['id_user'], $gisMap['group_id'], 'IR')) { continue; } $sub2['operation/gis_maps/render_view&map_id='.$gisMap['id_tgis_map']]['text'] = mb_substr(io_safe_output($gisMap['map_name']), 0, 15); $sub2['operation/gis_maps/render_view&map_id='.$gisMap['id_tgis_map']]['id'] = mb_substr(io_safe_output($gisMap['map_name']), 0, 15); $sub2['operation/gis_maps/render_view&map_id='.$gisMap['id_tgis_map']]['title'] = io_safe_output($gisMap['map_name']); $sub2['operation/gis_maps/render_view&map_id='.$gisMap['id_tgis_map']]['refr'] = 0; } $sub['gismaps']['sub2'] = $sub2; } // END GIS Maps. } if (!empty($sub)) { $menu_operation['network']['text'] = __('Topology maps'); $menu_operation['network']['sec2'] = 'operation/agentes/networkmap_list'; $menu_operation['network']['refr'] = 0; $menu_operation['network']['id'] = 'oper-networkconsole'; $menu_operation['network']['sub'] = $sub; } // End networkview. // Reports read. if (check_acl($config['id_user'], 0, 'RR') || check_acl($config['id_user'], 0, 'RW') || check_acl($config['id_user'], 0, 'RM')) { // Reporting. $menu_operation['reporting']['text'] = __('Reporting'); $menu_operation['reporting']['sec2'] = 'godmode/reporting/reporting_builder'; $menu_operation['reporting']['id'] = 'oper-reporting'; $menu_operation['reporting']['refr'] = 300; $sub = []; $sub['godmode/reporting/reporting_builder']['text'] = __('Custom reporting'); $sub['godmode/reporting/reporting_builder']['id'] = 'Custom reporting'; // Set godomode path. $sub['godmode/reporting/reporting_builder']['subsecs'] = [ 'godmode/reporting/reporting_builder', 'operation/reporting/reporting_viewer', ]; $sub['godmode/reporting/graphs']['text'] = __('Custom graphs'); $sub['godmode/reporting/graphs']['id'] = 'Custom graphs'; // Set godomode path. $sub['godmode/reporting/graphs']['subsecs'] = [ 'operation/reporting/graph_viewer', 'godmode/reporting/graph_builder', ]; enterprise_hook('dashboard_menu'); enterprise_hook('reporting_godmenu'); $menu_operation['reporting']['sub'] = $sub; // End reporting. } // Events reading. if (check_acl($config['id_user'], 0, 'ER') || check_acl($config['id_user'], 0, 'EW') || check_acl($config['id_user'], 0, 'EM') ) { // Events. $menu_operation['eventos']['text'] = __('Events'); $menu_operation['eventos']['refr'] = 0; $menu_operation['eventos']['sec2'] = 'operation/events/events'; $menu_operation['eventos']['id'] = 'oper-events'; $sub = []; $sub['operation/events/events']['text'] = __('View events'); $sub['operation/events/events']['id'] = 'View events'; $sub['operation/events/events']['pages'] = ['godmode/events/events']; $sub['operation/events/event_statistics']['text'] = __('Statistics'); $sub['operation/events/event_statistics']['id'] = 'Statistics'; // If ip doesn't is in list of allowed IP, isn't show this options. include_once 'include/functions_api.php'; if (isInACL($_SERVER['REMOTE_ADDR'])) { $pss = get_user_info($config['id_user']); $hashup = md5($config['id_user'].$pss['password']); // RSS. $sub['operation/events/events_rss.php?user='.$config['id_user'].'&hashup='.$hashup.'&search=&event_type=&severity=-1&status=3&id_group=0&refr=0&id_agent=0&pagination=20&group_rep=1&event_view_hr=8&id_user_ack=0&tag_with=&tag_without=&filter_only_alert-1&offset=0&toogle_filter=no&filter_id=0&id_name=&id_group=0&history=0§ion=list&open_filter=0&pure=']['text'] = __('RSS'); $sub['operation/events/events_rss.php?user='.$config['id_user'].'&hashup='.$hashup.'&search=&event_type=&severity=-1&status=3&id_group=0&refr=0&id_agent=0&pagination=20&group_rep=1&event_view_hr=8&id_user_ack=0&tag_with=&tag_without=&filter_only_alert-1&offset=0&toogle_filter=no&filter_id=0&id_name=&id_group=0&history=0§ion=list&open_filter=0&pure=']['id'] = 'RSS'; $sub['operation/events/events_rss.php?user='.$config['id_user'].'&hashup='.$hashup.'&search=&event_type=&severity=-1&status=3&id_group=0&refr=0&id_agent=0&pagination=20&group_rep=1&event_view_hr=8&id_user_ack=0&tag_with=&tag_without=&filter_only_alert-1&offset=0&toogle_filter=no&filter_id=0&id_name=&id_group=0&history=0§ion=list&open_filter=0&pure=']['type'] = 'direct'; // Marquee. $sub['operation/events/events_marquee.php']['text'] = __('Marquee'); $sub['operation/events/events_marquee.php']['id'] = 'Marquee'; $sub['operation/events/events_marquee.php']['type'] = 'direct'; } // Sound Events. $javascript = "javascript: window.open('operation/events/sound_events.php');"; $javascript = 'javascript: alert(111);'; $javascript = 'javascript: openSoundEventWindow();'; $sub[$javascript]['text'] = __('Sound Events'); $sub[$javascript]['id'] = 'Sound Events'; $sub[$javascript]['type'] = 'direct'; ?> 0)) { if (array_key_exists('subfatherId', $extension_menu)) { if ((strlen($extension_menu['subfatherId']) > 0)) { $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]['text'] = __($extension_menu['name']); $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]['id'] = $extension_menu['name']; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]['refr'] = 0; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]['icon'] = $extension_menu['icon']; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]['sec'] = 'extensions'; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]['extension'] = true; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]['enterprise'] = $extension['enterprise']; $menu_operation[$extension_menu['fatherId']]['hasExtensions'] = true; } else { $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['text'] = __($extension_menu['name']); $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['id'] = $extension_menu['name']; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['refr'] = 0; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['icon'] = $extension_menu['icon']; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['sec'] = 'extensions'; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['extension'] = true; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['enterprise'] = $extension['enterprise']; $menu_operation[$extension_menu['fatherId']]['hasExtensions'] = true; } } else { $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['text'] = __($extension_menu['name']); $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['id'] = $extension_menu['name']; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['refr'] = 0; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['icon'] = $extension_menu['icon']; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['sec'] = 'extensions'; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['extension'] = true; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['enterprise'] = $extension['enterprise']; $menu_operation[$extension_menu['fatherId']]['hasExtensions'] = true; } } } } } if (!empty($sub)) { $menu_operation['extensions']['text'] = __('Tools'); $menu_operation['extensions']['sec2'] = 'operation/extensions'; $menu_operation['extensions']['id'] = 'oper-extensions'; $menu_operation['extensions']['sub'] = $sub; } } // ~ } // Save operation menu array to use in operation/extensions.php view $operation_menu_array = $menu_operation; if (!$config['pure']) { menu_print_menu($menu_operation, true); }