diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index d868827229..e1f24ea701 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -72,6 +72,21 @@ config_check(); $table->styleTable = 'margin: auto; margin-top: 0px;'; $table->rowclass[0] = ''; + //UM messages + if (is_user_admin ($config['id_user'])) { + include_once ("include/functions_update_manager.php"); + $sql = 'SELECT COUNT(*) FROM tupdate WHERE data_rollback LIKE \'%"' . $config['id_user'] . '":1%\''; + $number_read_messages = (int) db_get_sql ($sql); + $sql = 'SELECT COUNT(*) FROM tupdate'; + $number_total_messages = (int) db_get_sql ($sql); + $number_unread_messages = $number_total_messages - $number_read_messages; + if ($number_unread_messages > 0) { + $um_messages = html_print_image("images/header_email.png", true, + array("alt" => 'cross', "class" => 'bot', 'title' => __('UM messages').': ' . $number_unread_messages . '/' . $number_total_messages)); + $table->data[0]['um'] = '' . $um_messages . ""; + } + } + // Search bar $search_bar = '