0) { $sub["godmode/reporting/map_builder"]["refr"] = (int)get_parameter('refr', 0); } else { $sub["godmode/reporting/map_builder"]["refr"] = 60; } $sub2 = array (); $layouts = db_get_all_rows_in_table ('tlayout', 'name'); if ($layouts === false) { $layouts = array (); } $id = (int) get_parameter ('id', -1); $firstLetterNameVisualToShow = array('_', ',', '[', '('); $sub2 = array(); foreach ($layouts as $layout) { if (! check_acl ($config["id_user"], $layout["id_group"], "AR")) { continue; } $name = io_safe_output($layout['name']); if (empty($name)) { $firstLetter = ''; } else { $firstLetter = $name[0]; } if (!in_array($firstLetter, $firstLetterNameVisualToShow)) { continue; } $sub2["operation/visual_console/render_view&id=".$layout["id"]]["text"] = 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']; } elseif (((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; } } $sub["godmode/reporting/map_builder"]["sub2"] = $sub2; $sub["godmode/reporting/graphs"]["text"] = __('Custom graphs'); //Set godomode path $sub["godmode/reporting/graphs"]["subsecs"] = array( "operation/reporting/graph_viewer", "godmode/reporting/graph_builder"); $sub["operation/agentes/exportdata"]["text"] = __('Export data'); $sub["operation/agentes/exportdata"]["subsecs"] = array("operation/agentes/exportdata"); enterprise_hook ('dashboard_menu'); enterprise_hook ('reporting_godmenu'); $menu_operation["reporting"]["sub"] = $sub; //End reporting } // Agent read, Server read if (check_acl ($config['id_user'], 0, "AR")) { //INI GIS Maps if ($config['activate_gis']) { $menu_operation["gismaps"]["text"] = __('GIS Maps'); $menu_operation["gismaps"]["sec2"] = "operation/gis_maps/index"; $menu_operation["gismaps"]["refr"] = 0; $menu_operation["gismaps"]["id"] = "oper-gismaps"; $sub = array (); $gisMaps = db_get_all_rows_in_table ('tgis_map', 'map_name'); if ($gisMaps === false) { $gisMaps = array (); } $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; } $sub["operation/gis_maps/render_view&map_id=".$gisMap["id_tgis_map"]]["text"] = mb_substr (io_safe_output($gisMap["map_name"]), 0, 15); $sub["operation/gis_maps/render_view&map_id=".$gisMap["id_tgis_map"]]["title"] = io_safe_output($gisMap["map_name"]); $sub["operation/gis_maps/render_view&map_id=".$gisMap["id_tgis_map"]]["refr"] = 0; } $menu_operation["gismaps"]["sub"] = $sub; } //END GIS Maps } // Events reading if (check_acl ($config['id_user'], 0, "ER")) { // Events $menu_operation["eventos"]["text"] = __('View events'); $menu_operation["eventos"]["refr"] = 0; $menu_operation["eventos"]["sec2"] = "operation/events/events"; $menu_operation["eventos"]["id"] = "oper-events"; $sub = array (); $sub["operation/events/event_statistics"]["text"] = __('Statistics'); //RSS $pss = get_user_info($config['id_user']); $hashup = md5($config['id_user'].$pss['password']); $sub["operation/events/events_rss.php?user=".$config['id_user']."&hashup=".$hashup."&search=&event_type=&severity=-1&status=3&ev_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&ev_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"; //CSV $sub["operation/events/export_csv.php?search=&event_type=&severity=-1&status=3&ev_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"] = __('CSV File'); $sub["operation/events/export_csv.php?search=&event_type=&severity=-1&status=3&ev_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"]["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]["type"] = "direct"; ?> 0)) { $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]["text"] = __($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; } } } } $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); } ?>