From 4734d666bf0f79c3c0fdbf8398ccee83224947ec Mon Sep 17 00:00:00 2001
From: fermin831 <fermin.hernandez@artica.es>
Date: Wed, 15 Jun 2016 15:34:30 +0200
Subject: [PATCH] Solved download messages at first time and other visual
 changes

---
 pandora_console/general/header.php                    | 11 -----------
 .../general/login_identification_wizard.php           |  2 +-
 pandora_console/general/login_required.php            |  8 +++++---
 pandora_console/include/functions_update_manager.php  |  4 ++--
 4 files changed, 8 insertions(+), 17 deletions(-)

diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php
index 603cbe26d3..bd2e0afe7c 100644
--- a/pandora_console/general/header.php
+++ b/pandora_console/general/header.php
@@ -72,17 +72,6 @@ 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");
-					$number_unread_messages = update_manager_get_unread_messages ();
-					if ($number_unread_messages > 0) {
-						$um_messages = html_print_image("images/header_email.png", true, 
-											array("alt" => 'cross', "class" => 'bot', 'title' => __('UM unread messages').': ' . $number_unread_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 = '<form method="get" style="display: inline;" name="quicksearch" action="">';
 				if (!isset($config['search_keywords'])) {
diff --git a/pandora_console/general/login_identification_wizard.php b/pandora_console/general/login_identification_wizard.php
index 7ffb3c74d1..ae56db98fa 100644
--- a/pandora_console/general/login_identification_wizard.php
+++ b/pandora_console/general/login_identification_wizard.php
@@ -162,7 +162,7 @@ echo '<div id="login_accept_register" title="' .
 			echo "<br>";
 			echo '<div id="email_container">';
 				echo '&nbsp;<span id="label-email-newsletter"style="font-size: 12px; display: none">' .__("Email") . ': </span>';
-				html_print_input_text_extended ('email-newsletter', $email, 'text-email-newsletter', '', 30, 255, false, '', array ("style" => "display:none; ")); echo '&nbsp;<span id="label-email-newsletter"style="font-size: 12px; display: none">' .__("Email") . ': </span>';
+				html_print_input_text_extended ('email-newsletter', $email, 'text-email-newsletter', '', 30, 255, false, '', array ("style" => "display:none; width: 180px;")); echo '&nbsp;<span id="label-email-newsletter"style="font-size: 12px; display: none">' .__("Email") . ': </span>';
 				echo '&nbsp;<span id="required-email-newsletter">*'.__("Required") .' </span>';
 			echo '</div>';
 		echo '</div>';
diff --git a/pandora_console/general/login_required.php b/pandora_console/general/login_required.php
index 6dc94e2eff..be1bc081c2 100644
--- a/pandora_console/general/login_required.php
+++ b/pandora_console/general/login_required.php
@@ -51,7 +51,7 @@ echo '<div id="login_id_dialog" title="' .
 	__('Pandora FMS instance identification wizard') . '" style="display: none;">';
 	
 	echo '<div style="font-size: 10pt; margin: 20px;">';
-	echo __('Pandora FMS requires an identification of each administrator. Please, fill next information:');
+	echo __('Please fill the following information in order to configure your Pandora FMS instance successfully') . '.';
 	echo '</div>';
 	
 	echo '<div style="">';
@@ -85,7 +85,8 @@ echo '<div id="login_id_dialog" title="' .
 		$timezones = timezone_identifiers_list();
 		foreach ($timezones as $timezone) {
 			if (strpos($timezone, $zone_selected) !== false) { 
-				$timezone_n[$timezone] = $timezone;
+				$timezone_country = preg_replace('/^.*\//', '', $timezone);
+				$timezone_n[$timezone] = $timezone_country;
 			}
 		}			
 		
@@ -130,7 +131,8 @@ function show_timezone () {
 			$("#timezone").empty();
 			jQuery.each (data, function (id, value) {
 				timezone = value;
-				$("select[name='timezone']").append($("<option>").val(timezone).html(timezone));
+				var timezone_country = timezone.replace (/^.*\//g, "");
+				$("select[name='timezone']").append($("<option>").val(timezone).html(timezone_country));
 			});
 		}
 	});
diff --git a/pandora_console/include/functions_update_manager.php b/pandora_console/include/functions_update_manager.php
index 79871b097d..3ef4cdff98 100755
--- a/pandora_console/include/functions_update_manager.php
+++ b/pandora_console/include/functions_update_manager.php
@@ -526,13 +526,13 @@ function update_manager_register_instance () {
 function update_manager_download_messages () {
 	global $config;
 	
+	if (!isset ($config['pandora_uid'])) return;
 	//Do not ask in next 2 hours
 	$future = time() + 2 * SECONDS_1HOUR;
 	config_update_value ('last_um_check', $future);
-	if (!isset ($config['pandora_uid'])) return;
 
 	// Delete old messages
-	db_get_sql('DELETE FROM tupdate WHERE UNIX_TIMESTAMP(filename) < UNIX_TIMESTAMP(NOW())');
+	//db_get_sql('DELETE FROM tupdate WHERE UNIX_TIMESTAMP(filename) < UNIX_TIMESTAMP(NOW())');
 	
 	// Build the curl request
 	$params = array(