diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 4627fca030..9b38b3b722 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2014-03-13 Miguel de Dios + + * general/shortcut_bar.php, include/functions_ui.php: fixed the + PHP warnings. + 2014-03-13 Miguel de Dios * godmode/reporting/reporting_builder.main.php, diff --git a/pandora_console/general/shortcut_bar.php b/pandora_console/general/shortcut_bar.php index 31ad1d65ef..71ce023454 100644 --- a/pandora_console/general/shortcut_bar.php +++ b/pandora_console/general/shortcut_bar.php @@ -19,8 +19,9 @@ global $config; // Login check check_login (); +require_once("include/functions_reporting.php"); + if (is_ajax()) { - require_once("include/functions_reporting.php"); $save_item_shorcut = get_parameter("save_item_shorcut", 0); @@ -112,6 +113,8 @@ if (is_ajax()) { return; } + + $shortcut_state = db_get_value_filter('shortcut', 'tusuario', array('id_user' => $config['id_user'])); // If shortcut bar is disabled return to index.php diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index ccf7f1ced9..972b9a86d1 100644 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1197,31 +1197,41 @@ function ui_process_page_head ($string, $bitfield) { $output = ''; + $config_refr = -1; + if (isset($config["refr"])) + $config_refr = $config["refr"]; + // If user is logged or displayed view is the public view of visual console - if ($config["refr"] > 0 && (isset($config['id_user']) || $vc_public_view == 1)) { - if ($config['enable_refr'] || $GET['sec2'] == "operation/agentes/estado_agente" || $GET['sec2'] == "operation/agentes/tactical"|| - $_GET['sec2'] == "operation/agentes/group_view" || $_GET['sec2'] == 'operation/events/events' || - $_GET['sec2'] == "enterprise/dashboard/main_dashboard") { + if ($config_refr > 0 && + (isset($config['id_user']) || $vc_public_view == 1)) { + + if ($config['enable_refr'] || + $_GET['sec2'] == "operation/agentes/estado_agente" || + $_GET['sec2'] == "operation/agentes/tactical"|| + $_GET['sec2'] == "operation/agentes/group_view" || + $_GET['sec2'] == 'operation/events/events' || + $_GET['sec2'] == "enterprise/dashboard/main_dashboard") { $query = ui_get_url_refresh (false); - $output .= ''; + $output .= ''; } } $output .= "\n\t"; $output .= 'Pandora FMS - '.__('the Flexible Monitoring System').' - - - - - - - - - - - - '; + + + + + + + + + + + + '; if ($config["language"] != "en") { //Load translated strings - load them last so they overload all the objects @@ -1287,7 +1297,7 @@ function ui_process_page_head ($string, $bitfield) { $config['css'] = array_merge (array ( "common" => "include/styles/common.css", "menu" => "include/styles/menu.css", - $config['style'] => "include/styles/".$config['style'].".css"), $config['css']); + $config['style'] => "include/styles/" . $config['style'] . ".css"), $config['css']); } // Add the jquery UI styles CSS @@ -1631,31 +1641,30 @@ function ui_pagination ($count, $url = false, $offset = 0, $pagination = 0, $ret */ function ui_print_session_action_icon ($action, $return = false) { $key_icon = array( - 'acl' => 'images/delete.png', - 'agent' => 'images/agent.png', - 'module' => 'images/module.png', - 'alert' => 'images/bell.png', - 'incident' => 'images/default_list.png', - 'logon' => 'images/house.png', - 'logoff' => 'images/house.png', - 'massive' => 'images/config.png', - 'hack' => 'images/application_edit.png', - 'event' => 'images/lightning_go.png', - 'policy' => 'images/policies.png', - 'report' => 'images/reporting.png', - 'file collection' => 'images/collection_col.png', - 'user' => 'images/user_green.png', - 'password' => 'images/lock.png', - 'session' => 'images/heart_col.png', - 'snmp' => 'images/snmp.png', - 'command' => 'images/bell.png', - 'category' => 'images/category_col.png', - 'dashboard' => 'images/dashboard_col.png', - 'api' => 'images/eye.png', - 'db' => 'images/database.png', - 'setup' => 'images/cog.png' - ); - + 'acl' => 'images/delete.png', + 'agent' => 'images/agent.png', + 'module' => 'images/module.png', + 'alert' => 'images/bell.png', + 'incident' => 'images/default_list.png', + 'logon' => 'images/house.png', + 'logoff' => 'images/house.png', + 'massive' => 'images/config.png', + 'hack' => 'images/application_edit.png', + 'event' => 'images/lightning_go.png', + 'policy' => 'images/policies.png', + 'report' => 'images/reporting.png', + 'file collection' => 'images/collection_col.png', + 'user' => 'images/user_green.png', + 'password' => 'images/lock.png', + 'session' => 'images/heart_col.png', + 'snmp' => 'images/snmp.png', + 'command' => 'images/bell.png', + 'category' => 'images/category_col.png', + 'dashboard' => 'images/dashboard_col.png', + 'api' => 'images/eye.png', + 'db' => 'images/database.png', + 'setup' => 'images/cog.png'); + $output = ''; foreach($key_icon as $key => $icon) { if (stristr($action, $key) !== false) {