Added header link to UM messages

This commit is contained in:
fermin831 2016-05-26 15:53:31 +02:00
parent fb9010675f
commit 62aab34c8f
1 changed files with 15 additions and 0 deletions

View File

@ -72,6 +72,21 @@ config_check();
$table->styleTable = 'margin: auto; margin-top: 0px;'; $table->styleTable = 'margin: auto; margin-top: 0px;';
$table->rowclass[0] = ''; $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'] = '<a href="index.php?sec=gsetup&amp;sec2=godmode/update_manager/update_manager&amp;tab=messages">' . $um_messages . "</a>";
}
}
// Search bar // Search bar
$search_bar = '<form method="get" style="display: inline;" name="quicksearch" action="">'; $search_bar = '<form method="get" style="display: inline;" name="quicksearch" action="">';
if (!isset($config['search_keywords'])) { if (!isset($config['search_keywords'])) {