diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index 3117ddb490..a093596b2b 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -143,6 +143,57 @@ if ($config['menu_type'] == 'classic') { $_GET['sec2'] = ''; } + if ($_GET['sec'] == 'main' || !isset($_GET['sec'])) { + // home screen chosen by the user + $home_page = ''; + if (isset($config['id_user'])) { + $user_info = users_get_user_by_id($config['id_user']); + $home_page = io_safe_output($user_info['section']); + $home_url = $user_info['data_section']; + } + + if ($home_page != '') { + switch ($home_page) { + case 'Event list': + $_GET['sec2'] = 'operation/events/events'; + break; + + case 'Group view': + $_GET['sec2'] = 'operation/agentes/group_view'; + break; + + case 'Alert detail': + $_GET['sec2'] = 'operation/agentes/alerts_status'; + break; + + case 'Tactical view': + $_GET['sec2'] = 'operation/agentes/tactical'; + break; + + case 'Default': + $_GET['sec2'] = 'general/logon_ok'; + break; + + case 'Dashboard': + $_GET['sec2'] = 'enterprise/dashboard/main_dashboard'; + break; + + case 'Visual console': + $_GET['sec2'] = 'operation/visual_console/render_view'; + break; + + case 'Other': + $home_url = io_safe_output($home_url); + $url_array = parse_url($home_url); + parse_str($url_array['query'], $res); + foreach ($res as $key => $param) { + $_GET[$key] = $param; + } + break; + } + } + } + if (!isset($_GET['refr'])) { $_GET['refr'] = null; } @@ -212,14 +263,21 @@ if ($config['menu_type'] == 'classic') { ); $autorefresh_additional .= ''; unset($values); - - $autorefresh_link_open_img = ''; + if ($home_page != '') { + $autorefresh_link_open_img = ''; + } else { + $autorefresh_link_open_img = ''; + } if ($_GET['refr'] || ((isset($select[0]['time_autorefresh']) === true) && $select[0]['time_autorefresh'] !== 0) ) { - $autorefresh_link_open_txt = ''; + if ($home_page != '') { + $autorefresh_link_open_txt = ''; + } else { + $autorefresh_link_open_txt = ''; + } } else { $autorefresh_link_open_txt = ''; } @@ -614,7 +672,7 @@ if ($config['menu_type'] == 'classic') { if ($_GET['refr'] || $do_refresh === true) { ?> $("#header_autorefresh").css('padding-right', '5px'); - var refr_time = ; + var refr_time = ; var t = new Date(); t.setTime (t.getTime () + parseInt()); $("#refrcounter").countdown ({