Browse Source

Merge branch 'master' of https://github.com/fusionpbx/fusionpbx

markjcrane 9 years ago
parent
commit
6519e6f191

+ 141 - 0
core/user_settings/app_languages.php

@@ -281,6 +281,34 @@ $text['label-used']['ro'] = "Folosit";
 $text['label-used']['fa'] = "";
 $text['label-used']['fa'] = "";
 $text['label-used']['ar-eg'] = "مستعمل";
 $text['label-used']['ar-eg'] = "مستعمل";
 
 
+$text['label-total_extensions']['en-us'] = "Total Extensions";
+$text['label-total_extensions']['es-cl'] = "Las extensiones totales";
+$text['label-total_extensions']['pt-pt'] = "total de extensões";
+$text['label-total_extensions']['fr-fr'] = "total des extensions";
+$text['label-total_extensions']['pt-br'] = "total de extensões";
+$text['label-total_extensions']['pl'] = "Wszystkich Rozszerzenia";
+$text['label-total_extensions']['he'] = "רוזן רחב";
+$text['label-total_extensions']['uk'] = "всього розширень";
+$text['label-total_extensions']['sv-se'] = "Totalt Extensions";
+$text['label-total_extensions']['de-at'] = "insgesamt Extensions";
+$text['label-total_extensions']['ro'] = "Extensii totale";
+$text['label-total_extensions']['fa'] = "";
+$text['label-total_extensions']['ar-eg'] = "مجموع الإضافات";
+
+$text['label-total_destinations']['en-us'] = "Total Destinations";
+$text['label-total_destinations']['es-cl'] = "destinos totales";
+$text['label-total_destinations']['pt-pt'] = "total de Destino";
+$text['label-total_destinations']['fr-fr'] = "total des destinations";
+$text['label-total_destinations']['pt-br'] = "total de Destino";
+$text['label-total_destinations']['pl'] = "Wszystkich Kierunki";
+$text['label-total_destinations']['he'] = "רוזן יעד";
+$text['label-total_destinations']['uk'] = "всього Напрями";
+$text['label-total_destinations']['sv-se'] = "Totalt resmål";
+$text['label-total_destinations']['de-at'] = "insgesamt Reiseziele";
+$text['label-total_destinations']['ro'] = "Destinații totale";
+$text['label-total_destinations']['fa'] = "";
+$text['label-total_destinations']['ar-eg'] = "مجموع ظبي";
+
 $text['label-total']['en-us'] = "Total";
 $text['label-total']['en-us'] = "Total";
 $text['label-total']['es-cl'] = "Total";
 $text['label-total']['es-cl'] = "Total";
 $text['label-total']['pt-pt'] = "Total";
 $text['label-total']['pt-pt'] = "Total";
@@ -382,6 +410,17 @@ $text['label-status']['ro'] = "Stare";
 $text['label-status']['fa'] = "";
 $text['label-status']['fa'] = "";
 $text['label-status']['ar-eg'] = "الحالة";
 $text['label-status']['ar-eg'] = "الحالة";
 
 
+$text['label-ring_groups']['en-us'] = "Ring Groups";
+$text['label-ring_groups']['es-cl'] = "Grupo de llamado";
+$text['label-ring_groups']['fr-fr'] = "Groupes de Sonnerie";
+$text['label-ring_groups']['pt-pt'] = "Grupos";
+$text['label-ring_groups']['pt-br'] = "Configurações da Conta";
+$text['label-ring_groups']['pl'] = "Grupy odbiorców rozmów";
+$text['label-ring_groups']['sv-se'] = "Ringgrupper";
+$text['label-ring_groups']['uk'] = "Групи";
+$text['label-ring_groups']['de-at'] = "Rufgruppen";
+$text['label-ring_groups']['he'] = "קבוצות חיוג";
+
 $text['label-reset_password']['en-us'] = "Reset Password";
 $text['label-reset_password']['en-us'] = "Reset Password";
 $text['label-reset_password']['es-cl'] = "Restablecer contraseña";
 $text['label-reset_password']['es-cl'] = "Restablecer contraseña";
 $text['label-reset_password']['pt-pt'] = "Reset Password";
 $text['label-reset_password']['pt-pt'] = "Reset Password";
@@ -512,6 +551,20 @@ $text['label-new_password']['ro'] = "Parolă nouă";
 $text['label-new_password']['fa'] = "";
 $text['label-new_password']['fa'] = "";
 $text['label-new_password']['ar-eg'] = "كلمة سر جديدة";
 $text['label-new_password']['ar-eg'] = "كلمة سر جديدة";
 
 
+$text['label-new_messages']['en-us'] = "New Messages";
+$text['label-new_messages']['es-cl'] = "Nuevos mensajes";
+$text['label-new_messages']['pt-pt'] = "Novas mensagens";
+$text['label-new_messages']['fr-fr'] = "Nouveaux messages";
+$text['label-new_messages']['pt-br'] = "Novas mensagens";
+$text['label-new_messages']['pl'] = "Nowe wiadomości";
+$text['label-new_messages']['he'] = "הודעות חדשות";
+$text['label-new_messages']['uk'] = "нові повідомлення";
+$text['label-new_messages']['sv-se'] = "нові повідомлення";
+$text['label-new_messages']['de-at'] = "Neue Nachrichten";
+$text['label-new_messages']['ro'] = "Mesaje noi";
+$text['label-new_messages']['fa'] = "";
+$text['label-new_messages']['ar-eg'] = "رسائل جديدة";
+
 $text['label-new']['en-us'] = "New";
 $text['label-new']['en-us'] = "New";
 $text['label-new']['es-cl'] = "Nueva";
 $text['label-new']['es-cl'] = "Nueva";
 $text['label-new']['pt-pt'] = "Nova";
 $text['label-new']['pt-pt'] = "Nova";
@@ -545,6 +598,19 @@ $text['label-missed']['de-at'] = "Verpasst";
 $text['label-missed']['ar-eg'] = "";
 $text['label-missed']['ar-eg'] = "";
 $text['label-missed']['he'] = "שיחה שלא נענתה";
 $text['label-missed']['he'] = "שיחה שלא נענתה";
 
 
+$text['label-messages']['en-us'] = "Messages";
+$text['label-messages']['es-cl'] = "Mensajes";
+$text['label-messages']['pt-pt'] = "mensagens";
+$text['label-messages']['fr-fr'] = "Messages";
+$text['label-messages']['pt-br'] = "mensagens";
+$text['label-messages']['pl'] = "Wiadomości";
+$text['label-messages']['uk'] = "повідомлення";
+$text['label-messages']['sv-se'] = "meddelanden";
+$text['label-messages']['ro'] = "mesaje";
+$text['label-messages']['de-at'] = "Nachrichten";
+$text['label-messages']['ar-eg'] = "رسائل";
+$text['label-messages']['he'] = "הודעות";
+
 $text['label-memory_usage']['en-us'] = "Memory Usage";
 $text['label-memory_usage']['en-us'] = "Memory Usage";
 $text['label-memory_usage']['es-cl'] = "Uso de memoria";
 $text['label-memory_usage']['es-cl'] = "Uso de memoria";
 $text['label-memory_usage']['pt-pt'] = "Uso de memória";
 $text['label-memory_usage']['pt-pt'] = "Uso de memória";
@@ -570,6 +636,29 @@ $text['label-local']['uk'] = "Локальний";
 $text['label-local']['de-at'] = "Lokal";
 $text['label-local']['de-at'] = "Lokal";
 $text['label-local']['he'] = "מקומי";
 $text['label-local']['he'] = "מקומי";
 
 
+$text['label-last_24_hours']['en-us'] = "Last 24 Hours";
+$text['label-last_24_hours']['es-cl'] = "Últimas 24 horas";
+$text['label-last_24_hours']['pt-pt'] = "Nas últimas 24 horas";
+$text['label-last_24_hours']['fr-fr'] = "Dernières 24 heures";
+$text['label-last_24_hours']['pt-br'] = "Nas últimas 24 horas";
+$text['label-last_24_hours']['pl'] = "Ostatnie 24 godziny";
+$text['label-last_24_hours']['he'] = "לאחרונה עשרים וארבע שעות";
+$text['label-last_24_hours']['uk'] = "Останні 24 годин";
+$text['label-last_24_hours']['sv-se'] = "Senaste 24 timmarna";
+$text['label-last_24_hours']['de-at'] = "Die letzten 24 Stunden";
+$text['label-last_24_hours']['ro'] = "Ultimele 24 de ore";
+$text['label-last_24_hours']['fa'] = "";
+$text['label-last_24_hours']['ar-eg'] = "الماضي أربع وعشرين ساعة";
+
+$text['label-ivr_menus']['en-us'] = "IVR Menus";
+$text['label-ivr_menus']['es-cl'] = "Menus IVR";
+$text['label-ivr_menus']['pt-pt'] = "Menus de IVR";
+$text['label-ivr_menus']['fr-fr'] = "Menus SVI";
+$text['label-ivr_menus']['pt-br'] = "Menus de IVR";
+$text['label-ivr_menus']['pl'] = "Menu zapowiedzi głosowych (IVR)";
+$text['label-ivr_menus']['sv-se'] = "IVR Menyer";
+$text['label-ivr_menus']['de-at'] = "Automatische Vermittlungen";
+
 $text['label-inbound']['en-us'] = "Inbound";
 $text['label-inbound']['en-us'] = "Inbound";
 $text['label-inbound']['es-cl'] = "Entrada";
 $text['label-inbound']['es-cl'] = "Entrada";
 $text['label-inbound']['pt-pt'] = "Entrada";
 $text['label-inbound']['pt-pt'] = "Entrada";
@@ -909,6 +998,16 @@ $text['label-callforward']['ro'] = "Redirecționare apel";
 $text['label-callforward']['fa'] = "";
 $text['label-callforward']['fa'] = "";
 $text['label-callforward']['ar-eg'] = "تحويل المكالمات";
 $text['label-callforward']['ar-eg'] = "تحويل المكالمات";
 
 
+$text['label-call_center_queues']['en-us'] = "CC Queues";
+$text['label-call_center_queues']['es-cl'] = "Colas de Centro de Llamados";
+$text['label-call_center_queues']['pt-pt'] = "Filas de Call Center";
+$text['label-call_center_queues']['fr-fr'] = "Queues du Centre d'appels";
+$text['label-call_center_queues']['pt-br'] = "Filas de call center";
+$text['label-call_center_queues']['pl'] = "Kolejki w Call Center ";
+$text['label-call_center_queues']['sv-se'] = "Call Center Kö:er";
+$text['label-call_center_queues']['uk'] = "Черги кол-центра";
+$text['label-call_center_queues']['de-at'] = "Callcenter Warteschlangen";
+
 $text['label-answered']['en-us'] = "Answered";
 $text['label-answered']['en-us'] = "Answered";
 $text['label-answered']['es-cl'] = "Respondido";
 $text['label-answered']['es-cl'] = "Respondido";
 $text['label-answered']['pt-pt'] = "Atendidas";
 $text['label-answered']['pt-pt'] = "Atendidas";
@@ -923,6 +1022,48 @@ $text['label-answered']['ro'] = "Răspuns";
 $text['label-answered']['fa'] = "";
 $text['label-answered']['fa'] = "";
 $text['label-answered']['ar-eg'] = "تم الرد";
 $text['label-answered']['ar-eg'] = "تم الرد";
 
 
+$text['label-active_users']['en-us'] = "Active Users";
+$text['label-active_users']['es-cl'] = "Los usuarios activos";
+$text['label-active_users']['pt-pt'] = "Usuários ativos";
+$text['label-active_users']['fr-fr'] = "Usuários ativos...";
+$text['label-active_users']['pt-br'] = "Usuários ativos";
+$text['label-active_users']['pl'] = "Aktywni użytkownicy";
+$text['label-active_users']['he'] = "משתמשים פעילים";
+$text['label-active_users']['uk'] = "активні користувачі";
+$text['label-active_users']['sv-se'] = "aktiva användare";
+$text['label-active_users']['de-at'] = "Aktive Benutzer";
+$text['label-active_users']['ro'] = "Utilizatori activi";
+$text['label-active_users']['fa'] = "";
+$text['label-active_users']['ar-eg'] = "الأعضاء النشيطين";
+
+$text['label-active_extensions']['en-us'] = "Active Extensions";
+$text['label-active_extensions']['es-cl'] = "Extensiones de activos";
+$text['label-active_extensions']['pt-pt'] = "Extensões de ativos";
+$text['label-active_extensions']['fr-fr'] = "Extensions actives";
+$text['label-active_extensions']['pt-br'] = "Extensões de ativos";
+$text['label-active_extensions']['pl'] = "Całość Rozszerzenia";
+$text['label-active_extensions']['he'] = "הרחבות בשידור חי";
+$text['label-active_extensions']['uk'] = "активні Розширення";
+$text['label-active_extensions']['sv-se'] = "aktiva Extensions";
+$text['label-active_extensions']['de-at'] = "Aktive Erweiterungen";
+$text['label-active_extensions']['ro'] = "Extensii active";
+$text['label-active_extensions']['fa'] = "";
+$text['label-active_extensions']['ar-eg'] = "الامتدادات النشطة";
+
+$text['label-active_domains']['en-us'] = "Active Domains";
+$text['label-active_domains']['es-cl'] = "Los dominios activos";
+$text['label-active_domains']['pt-pt'] = "Domínios ativos";
+$text['label-active_domains']['fr-fr'] = "domaines active";
+$text['label-active_domains']['pt-br'] = "Domínios ativos";
+$text['label-active_domains']['pl'] = "aktywne Domeny";
+$text['label-active_domains']['he'] = "תחומים פעילים";
+$text['label-active_domains']['uk'] = "активні домени";
+$text['label-active_domains']['sv-se'] = "aktiva domäner";
+$text['label-active_domains']['de-at'] = "Aktive Domains";
+$text['label-active_domains']['ro'] = "Domenii active";
+$text['label-active_domains']['fa'] = "";
+$text['label-active_domains']['ar-eg'] = "مجالات حية";
+
 $text['header-user_dashboard']['en-us'] = "User Dashboard";
 $text['header-user_dashboard']['en-us'] = "User Dashboard";
 $text['header-user_dashboard']['es-cl'] = "Dashboard Usuario";
 $text['header-user_dashboard']['es-cl'] = "Dashboard Usuario";
 $text['header-user_dashboard']['pt-pt'] = "Painel de Controle do Usuário";
 $text['header-user_dashboard']['pt-pt'] = "Painel de Controle do Usuário";

+ 308 - 125
core/user_settings/user_dashboard.php

@@ -221,38 +221,105 @@
 
 
 		//call center queues
 		//call center queues
 			if (permission_exists('call_center_active_view')) {
 			if (permission_exists('call_center_active_view')) {
-				$sql = "select domain_uuid from v_call_center_queues where domain_uuid = '".$_SESSION['domain_uuid']."'";
+				$stats['system']['call_center_queues']['total'] = 0;
+				$stats['system']['call_center_queues']['disabled'] = 0;
+				$stats['domain']['call_center_queues']['total'] = 0;
+				$stats['domain']['call_center_queues']['disabled'] = 0;
+				$sql = "select domain_uuid from v_call_center_queues";
 				$prep_statement = $db->prepare(check_sql($sql));
 				$prep_statement = $db->prepare(check_sql($sql));
 				$prep_statement->execute();
 				$prep_statement->execute();
 				$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
 				$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
-				$stats['domain']['call_center_queues']['total'] = count($result);
+				$stats['system']['call_center_queues']['total'] = count($result);
+				foreach ($result as $row) {
+					//$stats['system']['call_center_queues']['disabled'] += ($row['queue_enabled'] != 'true') ? 1 : 0;
+					if ($row['domain_uuid'] == $_SESSION['domain_uuid']) {
+						$stats['domain']['call_center_queues']['total']++;
+						//$stats['domain']['call_center_queues']['disabled'] += ($row['queue_enabled'] != 'true') ? 1 : 0;
+					}
+				}
 				unset ($sql, $prep_statement, $result);
 				unset ($sql, $prep_statement, $result);
 			}
 			}
 
 
 		//ivr menus
 		//ivr menus
 			if (permission_exists('ivr_menu_view')) {
 			if (permission_exists('ivr_menu_view')) {
+				$stats['system']['ivr_menus']['total'] = 0;
+				$stats['system']['ivr_menus']['disabled'] = 0;
+				$stats['domain']['ivr_menus']['total'] = 0;
 				$stats['domain']['ivr_menus']['disabled'] = 0;
 				$stats['domain']['ivr_menus']['disabled'] = 0;
-				$sql = "select domain_uuid, ivr_menu_enabled from v_ivr_menus where domain_uuid = '".$_SESSION['domain_uuid']."'";
+				$sql = "select domain_uuid, ivr_menu_enabled from v_ivr_menus";
 				$prep_statement = $db->prepare(check_sql($sql));
 				$prep_statement = $db->prepare(check_sql($sql));
 				$prep_statement->execute();
 				$prep_statement->execute();
 				$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
 				$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
-				$stats['domain']['ivr_menus']['total'] = count($result);
+				$stats['system']['ivr_menus']['total'] = count($result);
 				foreach ($result as $row) {
 				foreach ($result as $row) {
-					$stats['domain']['ivr_menus']['disabled'] += ($row['ivr_menu_enabled'] != 'true') ? 1 : 0;
+					$stats['system']['ivr_menus']['disabled'] += ($row['ivr_menu_enabled'] != 'true') ? 1 : 0;
+					if ($row['domain_uuid'] == $_SESSION['domain_uuid']) {
+						$stats['domain']['ivr_menus']['total']++;
+						$stats['domain']['ivr_menus']['disabled'] += ($row['ivr_menu_enabled'] != 'true') ? 1 : 0;
+					}
 				}
 				}
 				unset ($sql, $prep_statement, $result);
 				unset ($sql, $prep_statement, $result);
 			}
 			}
 
 
 		//ring groups
 		//ring groups
 			if (permission_exists('ring_group_view')) {
 			if (permission_exists('ring_group_view')) {
+				$stats['system']['ring_groups']['total'] = 0;
+				$stats['system']['ring_groups']['disabled'] = 0;
+				$stats['domain']['ring_groups']['total'] = 0;
 				$stats['domain']['ring_groups']['disabled'] = 0;
 				$stats['domain']['ring_groups']['disabled'] = 0;
-				$sql = "select domain_uuid, ring_group_enabled from v_ring_groups where domain_uuid = '".$_SESSION['domain_uuid']."'";
+				$sql = "select domain_uuid, ring_group_enabled from v_ring_groups";
+				$prep_statement = $db->prepare(check_sql($sql));
+				$prep_statement->execute();
+				$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
+				$stats['system']['ring_groups']['total'] = count($result);
+				foreach ($result as $row) {
+					$stats['system']['ring_groups']['disabled'] += ($row['ring_group_enabled'] != 'true') ? 1 : 0;
+					if ($row['domain_uuid'] == $_SESSION['domain_uuid']) {
+						$stats['domain']['ring_groups']['total']++;
+						$stats['domain']['ring_groups']['disabled'] += ($row['ring_group_enabled'] != 'true') ? 1 : 0;
+					}
+				}
+				unset ($sql, $prep_statement, $result);
+			}
+
+		//voicemails
+			if (permission_exists('voicemail_view')) {
+				$stats['system']['voicemails']['total'] = 0;
+				$stats['system']['voicemails']['disabled'] = 0;
+				$stats['domain']['voicemails']['total'] = 0;
+				$stats['domain']['voicemails']['disabled'] = 0;
+				$sql = "select domain_uuid, voicemail_enabled from v_voicemails";
+				$prep_statement = $db->prepare(check_sql($sql));
+				$prep_statement->execute();
+				$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
+				$stats['system']['voicemails']['total'] = count($result);
+				foreach ($result as $row) {
+					$stats['system']['voicemails']['disabled'] += ($row['voicemail_enabled'] != 'true') ? 1 : 0;
+					if ($row['domain_uuid'] == $_SESSION['domain_uuid']) {
+						$stats['domain']['voicemails']['total']++;
+						$stats['domain']['voicemails']['disabled'] += ($row['voicemail_enabled'] != 'true') ? 1 : 0;
+					}
+				}
+				unset ($sql, $prep_statement, $result);
+			}
+
+		//voicemail messages
+			if (permission_exists('voicemail_message_view')) {
+				$stats['system']['messages']['total'] = 0;
+				$stats['system']['messages']['new'] = 0;
+				$stats['domain']['messages']['total'] = 0;
+				$stats['domain']['messages']['new'] = 0;
+				$sql = "select domain_uuid, message_status from v_voicemail_messages";
 				$prep_statement = $db->prepare(check_sql($sql));
 				$prep_statement = $db->prepare(check_sql($sql));
 				$prep_statement->execute();
 				$prep_statement->execute();
 				$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
 				$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
-				$stats['domain']['ring_groups']['total'] = count($result);
+				$stats['system']['messages']['total'] = count($result);
 				foreach ($result as $row) {
 				foreach ($result as $row) {
-					$stats['domain']['ring_groups']['disabled'] += ($row['ring_group_enabled'] != 'true') ? 1 : 0;
+					$stats['system']['messages']['new'] += ($row['message_status'] != 'saved') ? 1 : 0;
+					if ($row['domain_uuid'] == $_SESSION['domain_uuid']) {
+						$stats['domain']['messages']['total']++;
+						$stats['domain']['messages']['new'] += ($row['message_status'] != 'saved') ? 1 : 0;
+					}
 				}
 				}
 				unset ($sql, $prep_statement, $result);
 				unset ($sql, $prep_statement, $result);
 			}
 			}
@@ -295,8 +362,8 @@
 					}
 					}
 				}
 				}
 
 
-				$hud[$n]['html'] .= "<span class='hud_voicemail_total' onclick=\"document.location.href='".PROJECT_PATH."/app/voicemails/voicemail_messages.php'\"><sup class='hud_voicemail_new'>&nbsp;</sup>".$messages['total']."<sup class='hud_voicemail_new'>".$messages['new']."</sup></span>\n";
-				$hud[$n]['html'] .= "<br><br>";
+				$onclick = "onclick=\"document.location.href='".PROJECT_PATH."/app/voicemails/voicemail_messages.php'\"";
+				$hud[$n]['html'] .= "<span class='hud_stat' ".$onclick.">".$messages['new']."<br><span class='hud_stat_title' ".$onclick.">".$text['label-new_messages']."</span></span>\n";
 
 
 				if (sizeof($voicemails) > 0) {
 				if (sizeof($voicemails) > 0) {
 					$hud[$n]['html'] .= "<table class='tr_hover' cellpadding='2' cellspacing='0' border='0' width='100%'>";
 					$hud[$n]['html'] .= "<table class='tr_hover' cellpadding='2' cellspacing='0' border='0' width='100%'>";
@@ -314,7 +381,7 @@
 						if (is_uuid($voicemail_uuid)) {
 						if (is_uuid($voicemail_uuid)) {
 							$tr_link = "href='".PROJECT_PATH."/app/voicemails/voicemail_messages.php?id=".$voicemail_uuid."'";
 							$tr_link = "href='".PROJECT_PATH."/app/voicemails/voicemail_messages.php?id=".$voicemail_uuid."'";
 							$hud[$n]['html'] .= "<tr ".$tr_link." style='cursor: pointer;'>";
 							$hud[$n]['html'] .= "<tr ".$tr_link." style='cursor: pointer;'>";
-							$hud[$n]['html'] .= "	<td class='".$row_style[$c]." hud_text'><a href='javascript:void(0);'>".$row['ext']."</td>";
+							$hud[$n]['html'] .= "	<td class='".$row_style[$c]." hud_text'><a href='".PROJECT_PATH."/app/voicemails/voicemail_messages.php?id=".$voicemail_uuid."'>".$row['ext']."</td>";
 							$hud[$n]['html'] .= "	<td class='".$row_style[$c]." hud_text' style='text-align: center;'>".$row['new']."</td>";
 							$hud[$n]['html'] .= "	<td class='".$row_style[$c]." hud_text' style='text-align: center;'>".$row['new']."</td>";
 							$hud[$n]['html'] .= "	<td class='".$row_style[$c]." hud_text' style='text-align: center;'>".$row['total']."</td>";
 							$hud[$n]['html'] .= "	<td class='".$row_style[$c]." hud_text' style='text-align: center;'>".$row['total']."</td>";
 							$hud[$n]['html'] .= "</tr>";
 							$hud[$n]['html'] .= "</tr>";
@@ -340,7 +407,7 @@
 			}
 			}
 
 
 			//if also viewing system status, show more recent calls (more room avaialble)
 			//if also viewing system status, show more recent calls (more room avaialble)
-			$missed_limit = (in_array('system', $selected_blocks)) ? 8 : 5;
+			$missed_limit = (in_array('counts', $selected_blocks)) ? 10 : 5;
 
 
 			$sql = "
 			$sql = "
 				select
 				select
@@ -369,10 +436,9 @@
 					}
 					}
 					$sql .= "
 					$sql .= "
 					)
 					)
+					and start_epoch > ".(time() - 86400)."
 				order by
 				order by
-					start_epoch desc
-				limit ".$missed_limit."
-				offset 0";
+					start_epoch desc";
 			$prep_statement = $db->prepare(check_sql($sql));
 			$prep_statement = $db->prepare(check_sql($sql));
 			$prep_statement->execute();
 			$prep_statement->execute();
 			$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
 			$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
@@ -383,6 +449,9 @@
 			$row_style["0"] = "row_style0";
 			$row_style["0"] = "row_style0";
 			$row_style["1"] = "row_style1";
 			$row_style["1"] = "row_style1";
 
 
+			$onclick = "onclick=\"document.location.href='".PROJECT_PATH."/app/xml_cdr/xml_cdr.php?call_result=missed'\"";
+			$hud[$n]['html'] .= "<span class='hud_stat' ".$onclick.">".$result_count."<br><span class='hud_stat_title' ".$onclick.">".$text['label-last_24_hours']."</span></span>\n";
+
 			$hud[$n]['html'] .= "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0' style='margin-bottom: 8px;'>\n";
 			$hud[$n]['html'] .= "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0' style='margin-bottom: 8px;'>\n";
 			$hud[$n]['html'] .= "<tr>\n";
 			$hud[$n]['html'] .= "<tr>\n";
 			$hud[$n]['html'] .= "<th class='hud_heading'>&nbsp;</th>\n";
 			$hud[$n]['html'] .= "<th class='hud_heading'>&nbsp;</th>\n";
@@ -400,6 +469,7 @@
 					) ? true : false;
 					) ? true : false;
 
 
 				foreach($result as $index => $row) {
 				foreach($result as $index => $row) {
+					if ($index + 1 > $missed_limit) { break; } //only show limit
 					$tmp_year = date("Y", strtotime($row['start_stamp']));
 					$tmp_year = date("Y", strtotime($row['start_stamp']));
 					$tmp_month = date("M", strtotime($row['start_stamp']));
 					$tmp_month = date("M", strtotime($row['start_stamp']));
 					$tmp_day = date("d", strtotime($row['start_stamp']));
 					$tmp_day = date("d", strtotime($row['start_stamp']));
@@ -449,7 +519,7 @@
 			}
 			}
 
 
 			//if also viewing system status, show more recent calls (more room avaialble)
 			//if also viewing system status, show more recent calls (more room avaialble)
-			$recent_limit = (in_array('system', $selected_blocks)) ? 8 : 5;
+			$recent_limit = (in_array('counts', $selected_blocks)) ? 10 : 5;
 
 
 			$sql = "
 			$sql = "
 				select
 				select
@@ -477,10 +547,9 @@
 					}
 					}
 					$sql .= "
 					$sql .= "
 					)
 					)
+					and start_epoch > ".(time() - 86400)."
 				order by
 				order by
-					start_epoch desc
-				limit ".$recent_limit."
-				offset 0";
+					start_epoch desc";
 			$prep_statement = $db->prepare(check_sql($sql));
 			$prep_statement = $db->prepare(check_sql($sql));
 			$prep_statement->execute();
 			$prep_statement->execute();
 			$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
 			$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
@@ -491,6 +560,9 @@
 			$row_style["0"] = "row_style0";
 			$row_style["0"] = "row_style0";
 			$row_style["1"] = "row_style1";
 			$row_style["1"] = "row_style1";
 
 
+			$onclick = "onclick=\"document.location.href='".PROJECT_PATH."/app/xml_cdr/xml_cdr.php'\"";
+			$hud[$n]['html'] .= "<span class='hud_stat' ".$onclick.">".$result_count."<br><span class='hud_stat_title' ".$onclick.">".$text['label-last_24_hours']."</span></span>\n";
+
 			$hud[$n]['html'] .= "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0' style='margin-bottom: 8px;'>\n";
 			$hud[$n]['html'] .= "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0' style='margin-bottom: 8px;'>\n";
 			$hud[$n]['html'] .= "<tr>\n";
 			$hud[$n]['html'] .= "<tr>\n";
 			$hud[$n]['html'] .= "<th class='hud_heading'>&nbsp;</th>\n";
 			$hud[$n]['html'] .= "<th class='hud_heading'>&nbsp;</th>\n";
@@ -515,6 +587,7 @@
 					) ? true : false;
 					) ? true : false;
 
 
 				foreach($result as $index => $row) {
 				foreach($result as $index => $row) {
+					if ($index + 1 > $recent_limit) { break; } //only show limit
 					$tmp_year = date("Y", strtotime($row['start_stamp']));
 					$tmp_year = date("Y", strtotime($row['start_stamp']));
 					$tmp_month = date("M", strtotime($row['start_stamp']));
 					$tmp_month = date("M", strtotime($row['start_stamp']));
 					$tmp_day = date("d", strtotime($row['start_stamp']));
 					$tmp_day = date("d", strtotime($row['start_stamp']));
@@ -584,6 +657,89 @@
 		}
 		}
 
 
 
 
+	//domain limits
+		if (in_array('limits', $selected_blocks) && is_array($_SESSION['limit']) && sizeof($_SESSION['limit']) > 0) {
+			$hud[$n]['title'] = $text['label-domain_limits'];
+
+			$c = 0;
+			$row_style["0"] = "row_style0";
+			$row_style["1"] = "row_style1";
+
+			$show_stat = true;
+			if (permission_exists('extension_view')) {
+				$onclick = "onclick=\"document.location.href='".PROJECT_PATH."/app/extensions/extensions.php'\"";
+				$hud_stat = $stats['domain']['extensions']['total'];
+				$hud_stat_title = $text['label-total_extensions'];
+			}
+			else if (permission_exists('destination_view')) {
+				$onclick = "onclick=\"document.location.href='".PROJECT_PATH."/app/destinations/destinations.php'\"";
+				$hud_stat = $stats['domain']['destinations']['total'];
+				$hud_stat_title = $text['label-total_destinations'];
+			}
+			else {
+				$show_stat = false;
+			}
+			if ($show_stat) {
+				$hud[$n]['html'] .= "<span class='hud_stat' ".$onclick.">".$hud_stat."<br><span class='hud_stat_title' ".$onclick.">".$hud_stat_title."</span></span>\n";
+			}
+
+			$hud[$n]['html'] .= "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0' style='margin-bottom: 8px;'>\n";
+			$hud[$n]['html'] .= "<tr>\n";
+			$hud[$n]['html'] .= "<th class='hud_heading' width='50%'>".$text['label-feature']."</th>\n";
+			$hud[$n]['html'] .= "<th class='hud_heading' width='50%' style='text-align: center;'>".$text['label-used']."</th>\n";
+			$hud[$n]['html'] .= "<th class='hud_heading' style='text-align: center;'>".$text['label-total']."</th>\n";
+			$hud[$n]['html'] .= "</tr>\n";
+
+			foreach ($_SESSION['limit'] as $category => $value) {
+				$limit = $value['numeric'];
+				switch ($category) {
+					case 'users':
+						if (!permission_exists('user_view')) { continue 2; }
+						$url = '/core/users/index.php';
+						break;
+					case 'call_center_queues':
+						if (!permission_exists('call_center_active_view')) { continue 2; }
+						$url = '/app/call_centers/call_center_queues.php';
+						break;
+					case 'destinations':
+						if (!permission_exists('destination_view')) { continue 2; }
+						$url = '/app/destinations/destinations.php';
+						break;
+					case 'devices':
+						if (!permission_exists('device_view')) { continue 2; }
+						$url = '/app/devices/devices.php';
+						break;
+					case 'extensions':
+						if (!permission_exists('extension_view')) { continue 2; }
+						$url = '/app/extensions/extensions.php';
+						break;
+					case 'gateways':
+						if (!permission_exists('gateway_view')) { continue 2; }
+						$url = '/app/gateways/gateways.php';
+						break;
+					case 'ivr_menus':
+						if (!permission_exists('ivr_menu_view')) { continue 2; }
+						$url = '/app/ivr_menus/ivr_menus.php';
+						break;
+					case 'ring_groups':
+						if (!permission_exists('ring_group_view')) { continue 2; }
+						$url = '/app/ring_groups/ring_groups.php';
+						break;
+				}
+				$tr_link = "href='".PROJECT_PATH.$url."'";
+				$hud[$n]['html'] .= "<tr ".$tr_link." style='cursor: pointer;'>\n";
+				$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text'><a ".$tr_link.">".$text['label-'.$category]."</a></td>\n";
+				$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: center;'>".$stats['domain'][$category]['total']."</td>\n";
+				$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: center;'>".$limit."</td>\n";
+				$hud[$n]['html'] .= "</tr>\n";
+				$c = ($c) ? 0 : 1;
+			}
+
+			$hud[$n]['html'] .= "</table>\n";
+			$n++;
+		}
+
+
 	//system counts
 	//system counts
 		if (in_array('counts', $selected_blocks) && permission_exists('xml_cdr_view')) {
 		if (in_array('counts', $selected_blocks) && permission_exists('xml_cdr_view')) {
 			$hud[$n]['title'] = $text['label-system_counts'];
 			$hud[$n]['title'] = $text['label-system_counts'];
@@ -592,7 +748,30 @@
 			$row_style["0"] = "row_style0";
 			$row_style["0"] = "row_style0";
 			$row_style["1"] = "row_style1";
 			$row_style["1"] = "row_style1";
 
 
-			$hud[$n]['html'] .= "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
+			$show_stat = true;
+			if (permission_exists('domain_view')) {
+				$onclick = "onclick=\"document.location.href='".PROJECT_PATH."/core/domain_settings/domains.php'\"";
+				$hud_stat = $stats['system']['domains']['total'] - $stats['system']['domains']['disabled'];
+				$hud_stat_title = $text['label-active_domains'];
+			}
+			else if (permission_exists('extension_view') && file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/extensions/")) {
+				$onclick = "onclick=\"document.location.href='".PROJECT_PATH."/app/extensions/extensions.php'\"";
+				$hud_stat = $stats['system']['extensions']['total'] - $stats['system']['extensions']['disabled'];
+				$hud_stat_title = $text['label-active_extensions'];
+			}
+			else if ((permission_exists('user_view') || if_group("superadmin")) && file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/core/users/")) {
+				$onclick = "onclick=\"document.location.href='".PROJECT_PATH."/core/users/index.php'\"";
+				$hud_stat = $stats['system']['users']['total'] - $stats['system']['users']['disabled'];
+				$hud_stat_title = $text['label-active_users'];
+			}
+			else {
+				$show_stat = false;
+			}
+			if ($show_stat) {
+				$hud[$n]['html'] .= "<span class='hud_stat' ".$onclick.">".$hud_stat."<br><span class='hud_stat_title' ".$onclick.">".$hud_stat_title."</span></span>\n";
+			}
+
+			$hud[$n]['html'] .= "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0' style='margin-bottom: 8px;'>\n";
 			$hud[$n]['html'] .= "<tr>\n";
 			$hud[$n]['html'] .= "<tr>\n";
 			$hud[$n]['html'] .= "<th class='hud_heading' width='50%'>".$text['label-item']."</th>\n";
 			$hud[$n]['html'] .= "<th class='hud_heading' width='50%'>".$text['label-item']."</th>\n";
 			$hud[$n]['html'] .= "<th class='hud_heading' width='50%' style='text-align: center;'>".$text['label-disabled']."</th>\n";
 			$hud[$n]['html'] .= "<th class='hud_heading' width='50%' style='text-align: center;'>".$text['label-disabled']."</th>\n";
@@ -665,74 +844,66 @@
 					$c = ($c) ? 0 : 1;
 					$c = ($c) ? 0 : 1;
 				}
 				}
 
 
-			$hud[$n]['html'] .= "</table>\n";
-			$n++;
-		}
+			//call center queues
+				if (permission_exists('call_center_active_view') && file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/call_centers/")) {
+					$tr_link = "href='".PROJECT_PATH."/app/call_centers/call_center_queues.php'";
+					$hud[$n]['html'] .= "<tr ".$tr_link." style='cursor: pointer;'>\n";
+					$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text'><a ".$tr_link.">".$text['label-call_center_queues']."</a></td>\n";
+					$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: center;'>".$stats['system']['call_center_queues']['disabled']."</td>\n";
+					$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: center;'>".$stats['system']['call_center_queues']['total']."</td>\n";
+					$hud[$n]['html'] .= "</tr>\n";
+					$c = ($c) ? 0 : 1;
+				}
 
 
+			//ivr menus
+				if (permission_exists('ivr_menu_view') && file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/ivr_menus/")) {
+					$tr_link = "href='".PROJECT_PATH."/app/ivr_menus/ivr_menus.php'";
+					$hud[$n]['html'] .= "<tr ".$tr_link." style='cursor: pointer;'>\n";
+					$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text'><a ".$tr_link.">".$text['label-ivr_menus']."</a></td>\n";
+					$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: center;'>".$stats['system']['ivr_menus']['disabled']."</td>\n";
+					$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: center;'>".$stats['system']['ivr_menus']['total']."</td>\n";
+					$hud[$n]['html'] .= "</tr>\n";
+					$c = ($c) ? 0 : 1;
+				}
 
 
-	//domain limits
-		if (in_array('limits', $selected_blocks) && is_array($_SESSION['limit']) && sizeof($_SESSION['limit']) > 0) {
-			$hud[$n]['title'] = $text['label-domain_limits'];
+			//ring groups
+				if (permission_exists('ring_group_view') && file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/ring_groups/")) {
+					$tr_link = "href='".PROJECT_PATH."/app/ring_groups/ring_groups.php'";
+					$hud[$n]['html'] .= "<tr ".$tr_link." style='cursor: pointer;'>\n";
+					$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text'><a ".$tr_link.">".$text['label-ring_groups']."</a></td>\n";
+					$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: center;'>".$stats['system']['ring_groups']['disabled']."</td>\n";
+					$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: center;'>".$stats['system']['ring_groups']['total']."</td>\n";
+					$hud[$n]['html'] .= "</tr>\n";
+					$c = ($c) ? 0 : 1;
+				}
 
 
-			$c = 0;
-			$row_style["0"] = "row_style0";
-			$row_style["1"] = "row_style1";
+			//voicemails
+				if (permission_exists('voicemail_view') && file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/voicemails/")) {
+					$tr_link = "href='".PROJECT_PATH."/app/voicemails/voicemails.php'";
+					$hud[$n]['html'] .= "<tr ".$tr_link." style='cursor: pointer;'>\n";
+					$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text'><a ".$tr_link.">".$text['label-voicemail']."</a></td>\n";
+					$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: center;'>".$stats['system']['voicemails']['disabled']."</td>\n";
+					$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: center;'>".$stats['system']['voicemails']['total']."</td>\n";
+					$hud[$n]['html'] .= "</tr>\n";
+					$c = ($c) ? 0 : 1;
+				}
 
 
-			$hud[$n]['html'] .= "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
-			$hud[$n]['html'] .= "<tr>\n";
-			$hud[$n]['html'] .= "<th class='hud_heading' width='50%'>".$text['label-feature']."</th>\n";
-			$hud[$n]['html'] .= "<th class='hud_heading' width='50%' style='text-align: center;'>".$text['label-used']."</th>\n";
-			$hud[$n]['html'] .= "<th class='hud_heading' style='text-align: center;'>".$text['label-total']."</th>\n";
-			$hud[$n]['html'] .= "</tr>\n";
+			//messages
+				if (permission_exists('voicemail_message_view') && file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/voicemails/")) {
+					$hud[$n]['html'] .= "<tr>\n";
+					$hud[$n]['html'] .= "<th class='hud_heading' width='50%'>".$text['label-item']."</th>\n";
+					$hud[$n]['html'] .= "<th class='hud_heading' width='50%' style='text-align: center;'>".$text['label-new']."</th>\n";
+					$hud[$n]['html'] .= "<th class='hud_heading' style='text-align: center;'>".$text['label-total']."</th>\n";
+					$hud[$n]['html'] .= "</tr>\n";
 
 
-			foreach ($_SESSION['limit'] as $category => $value) {
-				$category_raw = $category;
-				$category = str_replace('_', ' ', $category);
-				$category = ucwords($category);
-				$category = str_replace('Ivr', 'IVR', $category);
-				$limit = $value['numeric'];
-				switch ($category_raw) {
-					case 'users':
-						if (!permission_exists('user_view')) { continue 2; }
-						$url = '/core/users/index.php';
-						break;
-					case 'call_center_queues':
-						if (!permission_exists('call_center_active_view')) { continue 2; }
-						$url = '/app/call_centers/call_center_queues.php';
-						break;
-					case 'destinations':
-						if (!permission_exists('destination_view')) { continue 2; }
-						$url = '/app/destinations/destinations.php';
-						break;
-					case 'devices':
-						if (!permission_exists('device_view')) { continue 2; }
-						$url = '/app/devices/devices.php';
-						break;
-					case 'extensions':
-						if (!permission_exists('extension_view')) { continue 2; }
-						$url = '/app/extensions/extensions.php';
-						break;
-					case 'gateways':
-						if (!permission_exists('gateway_view')) { continue 2; }
-						$url = '/app/gateways/gateways.php';
-						break;
-					case 'ivr_menus':
-						if (!permission_exists('ivr_menu_view')) { continue 2; }
-						$url = '/app/ivr_menus/ivr_menus.php';
-						break;
-					case 'ring_groups':
-						if (!permission_exists('ring_group_view')) { continue 2; }
-						$url = '/app/ring_groups/ring_groups.php';
-						break;
+					$tr_link = "href='".PROJECT_PATH."/app/voicemails/voicemails.php'";
+					$hud[$n]['html'] .= "<tr ".$tr_link." style='cursor: pointer;'>\n";
+					$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text'><a ".$tr_link.">".$text['label-messages']."</a></td>\n";
+					$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: center;'>".$stats['system']['messages']['new']."</td>\n";
+					$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: center;'>".$stats['system']['messages']['total']."</td>\n";
+					$hud[$n]['html'] .= "</tr>\n";
+					$c = ($c) ? 0 : 1;
 				}
 				}
-				$tr_link = "href='".PROJECT_PATH.$url."'";
-				$hud[$n]['html'] .= "<tr ".$tr_link." style='cursor: pointer;'>\n";
-				$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text'><a ".$tr_link.">".$category."</a></td>\n";
-				$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: center;'>".$stats['domain'][$category_raw]['total']."</td>\n";
-				$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: center;'>".$limit."</td>\n";
-				$hud[$n]['html'] .= "</tr>\n";
-				$c = ($c) ? 0 : 1;
-			}
 
 
 			$hud[$n]['html'] .= "</table>\n";
 			$hud[$n]['html'] .= "</table>\n";
 			$n++;
 			$n++;
@@ -747,7 +918,21 @@
 			$row_style["0"] = "row_style0";
 			$row_style["0"] = "row_style0";
 			$row_style["1"] = "row_style1";
 			$row_style["1"] = "row_style1";
 
 
-			$hud[$n]['html'] .= "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
+			//disk usage
+			if (stristr(PHP_OS, 'Linux')) {
+				$tmp = shell_exec("df /home");
+				$tmp = explode("\n", $tmp);
+				$tmp = preg_replace('!\s+!', ' ', $tmp[1]); // multiple > single space
+				$tmp = explode(' ', $tmp);
+				foreach ($tmp as $stat) {
+					if (substr_count($stat, '%') > 0) { $percent = rtrim($stat,'%'); break; }
+				}
+				if ($percent != '') {
+					$hud[$n]['html'] .= "<span class='hud_stat' style='cursor: default;'>".$percent."<br><span class='hud_stat_title' style='cursor: default;'>".$text['label-disk_usage']." (%)</span></span>\n";
+				}
+			}
+
+			$hud[$n]['html'] .= "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0' style='margin-bottom: 8px;'>\n";
 			$hud[$n]['html'] .= "<tr>\n";
 			$hud[$n]['html'] .= "<tr>\n";
 			$hud[$n]['html'] .= "<th class='hud_heading' width='100%'>".$text['label-item']."</th>\n";
 			$hud[$n]['html'] .= "<th class='hud_heading' width='100%'>".$text['label-item']."</th>\n";
 			$hud[$n]['html'] .= "<th class='hud_heading' style='text-align: right;'>".$text['label-value']."</th>\n";
 			$hud[$n]['html'] .= "<th class='hud_heading' style='text-align: right;'>".$text['label-value']."</th>\n";
@@ -831,17 +1016,11 @@
 
 
 			//disk usage
 			//disk usage
 				if (stristr(PHP_OS, 'Linux')) {
 				if (stristr(PHP_OS, 'Linux')) {
-					$tmp =  shell_exec("df /home");
-					$tmp = explode("\n", $tmp);
-					$tmp = preg_replace('!\s+!', ' ', $tmp[1]); // multiple > single space
-					$tmp = explode(' ', $tmp);
-					foreach ($tmp as $stat) {
-						if (substr_count($stat, '%') > 0) { $percent = $stat; break; }
-					}
+					//calculated above
 					if ($percent != '') {
 					if ($percent != '') {
 						$hud[$n]['html'] .= "<tr>\n";
 						$hud[$n]['html'] .= "<tr>\n";
 						$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text'>".$text['label-disk_usage']."</td>\n";
 						$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text'>".$text['label-disk_usage']."</td>\n";
-						$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: right; white-space: nowrap;'>".$percent."</td>\n";
+						$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: right; white-space: nowrap;'>".$percent."%</td>\n";
 						$hud[$n]['html'] .= "</tr>\n";
 						$hud[$n]['html'] .= "</tr>\n";
 						$c = ($c) ? 0 : 1;
 						$c = ($c) ? 0 : 1;
 					}
 					}
@@ -916,8 +1095,8 @@
 					$registrations = (is_numeric($registrations)) ? $registrations : 0;
 					$registrations = (is_numeric($registrations)) ? $registrations : 0;
 					$tr_link = "href='".PROJECT_PATH."/app/registrations/status_registrations.php'";
 					$tr_link = "href='".PROJECT_PATH."/app/registrations/status_registrations.php'";
 					$hud[$n]['html'] .= "<tr ".$tr_link." style='cursor: pointer;'>\n";
 					$hud[$n]['html'] .= "<tr ".$tr_link." style='cursor: pointer;'>\n";
-					$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text' style='border-bottom: none;'><a href='javascript:void(0);'>".$text['label-registrations']."</a></td>\n";
-					$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text' style='border-bottom: none; text-align: right; white-space: nowrap;'>".$registrations."</td>\n";
+					$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text'><a href='javascript:void(0);'>".$text['label-registrations']."</a></td>\n";
+					$hud[$n]['html'] .= "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: right; white-space: nowrap;'>".$registrations."</td>\n";
 					$hud[$n]['html'] .= "</tr>\n";
 					$hud[$n]['html'] .= "</tr>\n";
 					$c = ($c) ? 0 : 1;
 					$c = ($c) ? 0 : 1;
 				}
 				}
@@ -950,7 +1129,10 @@
 		echo "<table cellpadding='0' cellspacing='0' border='0' width='100%' style='margin-bottom: 30px;'>\n";
 		echo "<table cellpadding='0' cellspacing='0' border='0' width='100%' style='margin-bottom: 30px;'>\n";
 		echo "<tr>\n";
 		echo "<tr>\n";
 		foreach ($hud as $index => $block) {
 		foreach ($hud as $index => $block) {
-			echo "<td class='hud_box' style='padding: 10px 1px 1px 1px; width: ".(round((100 / sizeof($hud)), 2))."%;'><b class='hud_title'>".$block['title']."</b><br><br>".$block['html']."</td>\n";
+			echo "<td class='hud_box' style='width: ".(round((100 / sizeof($hud)), 2))."%;'>";
+			echo "	<span class='hud_title'>".$block['title']."</span>";
+			echo "	".$block['html'];
+			echo "</td>\n";
 			if ($index+1 < sizeof($hud)) { echo "<td style='white-space: nowrap;'>&nbsp;&nbsp;&nbsp;&nbsp;</td>"; }
 			if ($index+1 < sizeof($hud)) { echo "<td style='white-space: nowrap;'>&nbsp;&nbsp;&nbsp;&nbsp;</td>"; }
 		}
 		}
 		echo "</tr>";
 		echo "</tr>";
@@ -958,40 +1140,41 @@
 		unset($hud);
 		unset($hud);
 	}
 	}
 
 
-
-//call routing
-	if (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/calls/calls.php")) {
-		if (permission_exists('follow_me') || permission_exists('call_forward') || permission_exists('do_not_disturb')) {
-			$is_included = "true";
-			echo "<table cellpadding='0' cellspacing='0' border='0' width='100%'>\n";
-			echo "	<tr>\n";
-			echo "		<td valign='top'><b>".$text['header-call_routing']."</b><br><br></td>\n";
-			echo "		<td valign='top' style='text-align: right;'><input id='btn_viewall_callrouting' type='button' class='btn' style='display: none;' value='".$text['button-view_all']."' onclick=\"document.location.href='".PROJECT_PATH."/app/calls/calls.php';\"></td>\n";
-			echo "	</tr>\n";
-			echo "</table>\n";
-			require_once "app/calls/calls.php";
-			echo "<br>\n";
+if (!is_array($selected_blocks) || in_array('forwarding', $selected_blocks)) {
+	//call routing
+		if (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/calls/calls.php")) {
+			if (permission_exists('follow_me') || permission_exists('call_forward') || permission_exists('do_not_disturb')) {
+				$is_included = "true";
+				echo "<table cellpadding='0' cellspacing='0' border='0' width='100%'>\n";
+				echo "	<tr>\n";
+				echo "		<td valign='top'><b>".$text['header-call_routing']."</b><br><br></td>\n";
+				echo "		<td valign='top' style='text-align: right;'><input id='btn_viewall_callrouting' type='button' class='btn' style='display: none;' value='".$text['button-view_all']."' onclick=\"document.location.href='".PROJECT_PATH."/app/calls/calls.php';\"></td>\n";
+				echo "	</tr>\n";
+				echo "</table>\n";
+				require_once "app/calls/calls.php";
+				echo "<br>\n";
+			}
 		}
 		}
-	}
-
-//reload language values
-	$language = new text;
-	$text = $language->get();
 
 
-//ring group forward
-	if (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/ring_groups/ring_group_forward.php")) {
-		if (permission_exists('ring_group_forward')) {
-			$is_included = "true";
-			echo "<table cellpadding='0' cellspacing='0' border='0' width='100%'>\n";
-			echo "	<tr>\n";
-			echo "		<td valign='top'><b>".$text['header-ring_groups']."</b><br><br></td>\n";
-			echo "		<td valign='top' style='text-align: right;'><input id='btn_viewall_ringgroups' type='button' class='btn' style='display: none;' value='".$text['button-view_all']."' onclick=\"document.location.href='".PROJECT_PATH."/app/ring_groups/ring_group_forward.php';\"></td>\n";
-			echo "	</tr>\n";
-			echo "</table>\n";
-			require_once "app/ring_groups/ring_group_forward.php";
-			echo "<br>\n";
+	//reload language values
+		$language = new text;
+		$text = $language->get();
+
+	//ring group forward
+		if (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/ring_groups/ring_group_forward.php")) {
+			if (permission_exists('ring_group_forward')) {
+				$is_included = "true";
+				echo "<table cellpadding='0' cellspacing='0' border='0' width='100%'>\n";
+				echo "	<tr>\n";
+				echo "		<td valign='top'><b>".$text['header-ring_groups']."</b><br><br></td>\n";
+				echo "		<td valign='top' style='text-align: right;'><input id='btn_viewall_ringgroups' type='button' class='btn' style='display: none;' value='".$text['button-view_all']."' onclick=\"document.location.href='".PROJECT_PATH."/app/ring_groups/ring_group_forward.php';\"></td>\n";
+				echo "	</tr>\n";
+				echo "</table>\n";
+				require_once "app/ring_groups/ring_group_forward.php";
+				echo "<br>\n";
+			}
 		}
 		}
-	}
+}
 
 
 //show the footer
 //show the footer
 	require_once "resources/footer.php";
 	require_once "resources/footer.php";

+ 49 - 20
themes/accessible/template.php

@@ -451,36 +451,65 @@ table tr:last-child td:last-child {
 	td.hud_box {
 	td.hud_box {
 		height: auto;
 		height: auto;
 		vertical-align: top;
 		vertical-align: top;
-		padding: 15px;
-		background-color: #f5f7fa;
-		border: 1px solid #c6d4e8;
-		-webkit-border-radius: 6px;
-		-moz-border-radius: 6px;
-		border-radius: 6px;
+		-webkit-border-radius: 4px;
+		-moz-border-radius: 4px;
+		border-radius: 4px;
 		text-align: center;
 		text-align: center;
+		background-image: url('<?php echo PROJECT_PATH?>/themes/accessible/images/menu_background.jpg');
+		background-repeat: repeat-x;
+		background-position: top center;
 		}
 		}
 
 
-	b.hud_title {
-		color: #a4aebf;
+	span.hud_title {
+		display: block;
+		font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
+		text-shadow: 0px 1px 2px #000;
+		letter-spacing: -0.02em;
+		font-size: 12pt;
+		color: #fff;
+		width: 100%;
+		height: 40px;
+		cursor: default;
+		text-align: center;
+		line-height: 40px;
+		background-color: #4f66b6;
+		-webkit-border-radius: 4px 4px 0 0;
+		-moz-border-radius: 4px 4px 0 0;
+		border-radius: 4px 4px 0 0;
+		border-top: 3px solid #000e41;
+		border-bottom: 1px solid #000;
 		}
 		}
 
 
-	span.hud_voicemail_total {
+	span.hud_stat {
+		display: block;
 		cursor: pointer;
 		cursor: pointer;
-		color: #004083;
-		font-size: 60px;
-		line-hight: 20px;
-		font-weight: bold;
+		text-align: center;
+		text-shadow: 0px 2px 2px #aaa;
+		width: 100%;
+		height: 130px;
+		color: #000;
+		font-size: 75px;
+		font-weight: normal;
+		padding-top: 10px;
+		margin-bottom: 6px;
 		}
 		}
 
 
-	span.hud_voicemail_total:hover {
-		opacity: 0.7;
+	span.hud_stat_title {
+		display: block;
+		width: 100%;
+		height: 30px;
+		cursor: pointer;
+		text-align: center;
+		text-shadow: 0px 1px 1px #aaa;
+		color: #000;
+		font-size: 14px;
+		font-weight: normal;
+		font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
 		}
 		}
 
 
-	sup.hud_voicemail_new {
-		font-weight: normal;
-		color: #03920a;
-		font-size: 30px;
-		line-hight: 10px;
+	span.hud_stat:hover {
+		opacity: 0.9;
+		cursor: pointer;
 		}
 		}
 
 
 	th.hud_heading {
 	th.hud_heading {

+ 55 - 20
themes/enhanced/template.php

@@ -1213,36 +1213,71 @@ legend {
 	td.hud_box {
 	td.hud_box {
 		height: auto;
 		height: auto;
 		vertical-align: top;
 		vertical-align: top;
-		padding: 15px;
-		background-color: #f5f7fa;
-		border: 1px solid #c6d4e8;
-		-webkit-border-radius: 6px;
-		-moz-border-radius: 6px;
-		border-radius: 6px;
+		-webkit-border-radius: 4px;
+		-moz-border-radius: 4px;
+		border-radius: 4px;
 		text-align: center;
 		text-align: center;
+		background-color: #f5f7fa;
+		background-image: -ms-linear-gradient(left, #edf1f7 0%, #f9fbfe 30%, #f9fbfe 70%, #edf1f7 100%);
+		background-image: -moz-linear-gradient(left, #edf1f7 0%, #f9fbfe 30%, #f9fbfe 70%, #edf1f7 100%);
+		background-image: -o-linear-gradient(left, #edf1f7 0%, #f9fbfe 30%, #f9fbfe 70%, #edf1f7 100%);
+		background-image: -webkit-gradient(linear, left, right, color-stop(0, #edf1f7), color-stop(0.30, #f9fbfe), color-stop(0.70, #f9fbfe), color-stop(1, #edf1f7));
+		background-image: -webkit-linear-gradient(left, #edf1f7 0%, #f9fbfe 30%, #f9fbfe 70%, #edf1f7 100%);
+		background-image: linear-gradient(to right, #edf1f7 0%, #f9fbfe 30%, #f9fbfe 70%, #edf1f7 100%);
 		}
 		}
 
 
-	b.hud_title {
-		color: #a4aebf;
+	span.hud_title {
+		display: block;
+		font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
+		text-shadow: 0px 1px 2px #000;
+		letter-spacing: -0.02em;
+		font-size: 12pt;
+		color: #fff;
+		width: 100%;
+		height: 40px;
+		cursor: default;
+		text-align: center;
+		line-height: 40px;
+		background-color: #8e96a5;
+		-webkit-border-radius: 4px 4px 0 0;
+		-moz-border-radius: 4px 4px 0 0;
+		border-radius: 4px 4px 0 0;
+		border-bottom: 1px solid #737983;
 		}
 		}
 
 
-	span.hud_voicemail_total {
+	span.hud_stat {
+		display: block;
 		cursor: pointer;
 		cursor: pointer;
-		color: #004083;
-		font-size: 60px;
-		line-hight: 20px;
-		font-weight: bold;
+		text-align: center;
+		text-shadow: 0px 2px 2px #737983;
+		width: 100%;
+		height: 130px;
+		color: #fff;
+		font-size: 75px;
+		font-weight: normal;
+		background-color: #a4aebf;
+		border-top: 1px solid #c5d1e5;
+		border-bottom: 1px solid #909aa8;
+		padding-top: 10px;
+		margin-bottom: 6px;
 		}
 		}
 
 
-	span.hud_voicemail_total:hover {
-		opacity: 0.7;
+	span.hud_stat_title {
+		display: block;
+		width: 100%;
+		height: 30px;
+		cursor: pointer;
+		text-align: center;
+		text-shadow: 0px 1px 1px #737983;
+		color: #fff;
+		font-size: 14px;
+		font-weight: normal;
+		font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
 		}
 		}
 
 
-	sup.hud_voicemail_new {
-		font-weight: normal;
-		color: #03920a;
-		font-size: 30px;
-		line-hight: 10px;
+	span.hud_stat:hover {
+		opacity: 0.9;
+		cursor: pointer;
 		}
 		}
 
 
 	th.hud_heading {
 	th.hud_heading {

+ 48 - 19
themes/minimized/template.php

@@ -1216,11 +1216,9 @@ legend {
 	td.hud_box {
 	td.hud_box {
 		height: auto;
 		height: auto;
 		vertical-align: top;
 		vertical-align: top;
-		padding: 15px;
-		border: 1px solid #c6d4e8;
-		-webkit-border-radius: 6px;
-		-moz-border-radius: 6px;
-		border-radius: 6px;
+		-webkit-border-radius: 4px;
+		-moz-border-radius: 4px;
+		border-radius: 4px;
 		text-align: center;
 		text-align: center;
 		background-color: #f5f7fa;
 		background-color: #f5f7fa;
 		background-image: -ms-linear-gradient(left, #edf1f7 0%, #f9fbfe 30%, #f9fbfe 70%, #edf1f7 100%);
 		background-image: -ms-linear-gradient(left, #edf1f7 0%, #f9fbfe 30%, #f9fbfe 70%, #edf1f7 100%);
@@ -1231,27 +1229,58 @@ legend {
 		background-image: linear-gradient(to right, #edf1f7 0%, #f9fbfe 30%, #f9fbfe 70%, #edf1f7 100%);
 		background-image: linear-gradient(to right, #edf1f7 0%, #f9fbfe 30%, #f9fbfe 70%, #edf1f7 100%);
 		}
 		}
 
 
-	b.hud_title {
-		color: #a4aebf;
+	span.hud_title {
+		display: block;
+		font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
+		text-shadow: 0px 1px 2px #000;
+		letter-spacing: -0.02em;
+		font-size: 12pt;
+		color: #fff;
+		width: 100%;
+		height: 40px;
+		cursor: default;
+		text-align: center;
+		line-height: 40px;
+		background-color: #8e96a5;
+		-webkit-border-radius: 4px 4px 0 0;
+		-moz-border-radius: 4px 4px 0 0;
+		border-radius: 4px 4px 0 0;
+		border-bottom: 1px solid #737983;
 		}
 		}
 
 
-	span.hud_voicemail_total {
+	span.hud_stat {
+		display: block;
 		cursor: pointer;
 		cursor: pointer;
-		color: #004083;
-		font-size: 60px;
-		line-hight: 20px;
-		font-weight: bold;
+		text-align: center;
+		text-shadow: 0px 2px 2px #737983;
+		width: 100%;
+		height: 130px;
+		color: #fff;
+		font-size: 75px;
+		font-weight: normal;
+		background-color: #a4aebf;
+		border-top: 1px solid #c5d1e5;
+		border-bottom: 1px solid #909aa8;
+		padding-top: 10px;
+		margin-bottom: 6px;
 		}
 		}
 
 
-	span.hud_voicemail_total:hover {
-		opacity: 0.7;
+	span.hud_stat_title {
+		display: block;
+		width: 100%;
+		height: 30px;
+		cursor: pointer;
+		text-align: center;
+		text-shadow: 0px 1px 1px #737983;
+		color: #fff;
+		font-size: 14px;
+		font-weight: normal;
+		font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
 		}
 		}
 
 
-	sup.hud_voicemail_new {
-		font-weight: normal;
-		color: #03920a;
-		font-size: 30px;
-		line-hight: 10px;
+	span.hud_stat:hover {
+		opacity: 0.9;
+		cursor: pointer;
 		}
 		}
 
 
 	th.hud_heading {
 	th.hud_heading {