From 4bd2639fcf2a7303495f31467fc96b6c90865f3e Mon Sep 17 00:00:00 2001 From: reliberate Date: Sun, 20 Mar 2016 03:22:29 -0600 Subject: [PATCH] Dashboard: Enhance with priority numbers and additional System Count items. Devices: Fix missing translation. Voicemails: Fix missing translation. --- app/devices/app_languages.php | 4694 ++++++++++++------------- app/voicemails/app_languages.php | 20 +- core/user_settings/app_languages.php | 141 + core/user_settings/user_dashboard.php | 441 ++- themes/accessible/template.php | 75 +- themes/enhanced/template.php | 81 +- themes/minimized/template.php | 73 +- 7 files changed, 2971 insertions(+), 2554 deletions(-) diff --git a/app/devices/app_languages.php b/app/devices/app_languages.php index a1c3c43b3b..5da21fc234 100644 --- a/app/devices/app_languages.php +++ b/app/devices/app_languages.php @@ -1,2348 +1,2348 @@ - \ No newline at end of file diff --git a/app/voicemails/app_languages.php b/app/voicemails/app_languages.php index 46af366760..6df923eb75 100644 --- a/app/voicemails/app_languages.php +++ b/app/voicemails/app_languages.php @@ -265,17 +265,17 @@ $text['label-option']['de-at'] = "Option"; $text['label-option']['he'] = "אופציה"; $text['label-messages']['en-us'] = "Messages"; -$text['label-messages']['es-cl'] = "Messages"; -$text['label-messages']['pt-pt'] = "Messages"; +$text['label-messages']['es-cl'] = "Mensajes"; +$text['label-messages']['pt-pt'] = "mensagens"; $text['label-messages']['fr-fr'] = "Messages"; -$text['label-messages']['pt-br'] = "Messages"; -$text['label-messages']['pl'] = "Messages"; -$text['label-messages']['uk'] = "Messages"; -$text['label-messages']['sv-se'] = "Messages"; -$text['label-messages']['ro'] = "Messages"; -$text['label-messages']['de-at'] = "Messages"; -$text['label-messages']['ar-eg'] = "Messages"; -$text['label-messages']['he'] = "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-message_status']['en-us'] = "Status"; $text['label-message_status']['es-cl'] = "Estado"; diff --git a/core/user_settings/app_languages.php b/core/user_settings/app_languages.php index cc4aa6c6dc..979a2c29ab 100644 --- a/core/user_settings/app_languages.php +++ b/core/user_settings/app_languages.php @@ -281,6 +281,34 @@ $text['label-used']['ro'] = "Folosit"; $text['label-used']['fa'] = ""; $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']['es-cl'] = "Total"; $text['label-total']['pt-pt'] = "Total"; @@ -382,6 +410,17 @@ $text['label-status']['ro'] = "Stare"; $text['label-status']['fa'] = ""; $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']['es-cl'] = "Restablecer contraseña"; $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']['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']['es-cl'] = "Nueva"; $text['label-new']['pt-pt'] = "Nova"; @@ -545,6 +598,19 @@ $text['label-missed']['de-at'] = "Verpasst"; $text['label-missed']['ar-eg'] = ""; $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']['es-cl'] = "Uso de memoria"; $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']['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']['es-cl'] = "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']['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']['es-cl'] = "Respondido"; $text['label-answered']['pt-pt'] = "Atendidas"; @@ -923,6 +1022,48 @@ $text['label-answered']['ro'] = "Răspuns"; $text['label-answered']['fa'] = ""; $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']['es-cl'] = "Dashboard Usuario"; $text['header-user_dashboard']['pt-pt'] = "Painel de Controle do Usuário"; diff --git a/core/user_settings/user_dashboard.php b/core/user_settings/user_dashboard.php index ac35674d6f..101fbdc7b6 100644 --- a/core/user_settings/user_dashboard.php +++ b/core/user_settings/user_dashboard.php @@ -221,38 +221,105 @@ //call center queues 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->execute(); $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); } //ivr menus 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; - $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->execute(); $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) { - $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); } //ring groups 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; - $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['domain']['ring_groups']['total'] = count($result); + $stats['system']['ring_groups']['total'] = count($result); foreach ($result as $row) { - $stats['domain']['ring_groups']['disabled'] += ($row['ring_group_enabled'] != 'true') ? 1 : 0; + $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->execute(); + $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); + $stats['system']['messages']['total'] = count($result); + foreach ($result as $row) { + $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); } @@ -295,8 +362,8 @@ } } - $hud[$n]['html'] .= " ".$messages['total']."".$messages['new']."\n"; - $hud[$n]['html'] .= "

"; + $onclick = "onclick=\"document.location.href='".PROJECT_PATH."/app/voicemails/voicemail_messages.php'\""; + $hud[$n]['html'] .= "".$messages['new']."
".$text['label-new_messages']."
\n"; if (sizeof($voicemails) > 0) { $hud[$n]['html'] .= ""; @@ -314,7 +381,7 @@ if (is_uuid($voicemail_uuid)) { $tr_link = "href='".PROJECT_PATH."/app/voicemails/voicemail_messages.php?id=".$voicemail_uuid."'"; $hud[$n]['html'] .= ""; - $hud[$n]['html'] .= " "; + $hud[$n]['html'] .= " "; $hud[$n]['html'] .= " "; $hud[$n]['html'] .= " "; $hud[$n]['html'] .= ""; @@ -340,7 +407,7 @@ } //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 = " select @@ -369,10 +436,9 @@ } $sql .= " ) + and start_epoch > ".(time() - 86400)." order by - start_epoch desc - limit ".$missed_limit." - offset 0"; + start_epoch desc"; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_ASSOC); @@ -383,6 +449,9 @@ $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; + $onclick = "onclick=\"document.location.href='".PROJECT_PATH."/app/xml_cdr/xml_cdr.php?call_result=missed'\""; + $hud[$n]['html'] .= "".$result_count."
".$text['label-last_24_hours']."
\n"; + $hud[$n]['html'] .= "
".$row['ext']."".$row['ext']."".$row['new']."".$row['total']."
\n"; $hud[$n]['html'] .= "\n"; $hud[$n]['html'] .= "\n"; @@ -400,6 +469,7 @@ ) ? true : false; foreach($result as $index => $row) { + if ($index + 1 > $missed_limit) { break; } //only show limit $tmp_year = date("Y", strtotime($row['start_stamp'])); $tmp_month = date("M", 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) - $recent_limit = (in_array('system', $selected_blocks)) ? 8 : 5; + $recent_limit = (in_array('counts', $selected_blocks)) ? 10 : 5; $sql = " select @@ -477,10 +547,9 @@ } $sql .= " ) + and start_epoch > ".(time() - 86400)." order by - start_epoch desc - limit ".$recent_limit." - offset 0"; + start_epoch desc"; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_ASSOC); @@ -491,6 +560,9 @@ $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; + $onclick = "onclick=\"document.location.href='".PROJECT_PATH."/app/xml_cdr/xml_cdr.php'\""; + $hud[$n]['html'] .= "".$result_count."
".$text['label-last_24_hours']."
\n"; + $hud[$n]['html'] .= "
 
\n"; $hud[$n]['html'] .= "\n"; $hud[$n]['html'] .= "\n"; @@ -515,6 +587,7 @@ ) ? true : false; foreach($result as $index => $row) { + if ($index + 1 > $recent_limit) { break; } //only show limit $tmp_year = date("Y", strtotime($row['start_stamp'])); $tmp_month = date("M", 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'] .= "".$hud_stat."
".$hud_stat_title."
\n"; + } + + $hud[$n]['html'] .= "
 
\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\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'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $c = ($c) ? 0 : 1; + } + + $hud[$n]['html'] .= "
".$text['label-feature']."".$text['label-used']."".$text['label-total']."
".$text['label-'.$category]."".$stats['domain'][$category]['total']."".$limit."
\n"; + $n++; + } + + //system counts if (in_array('counts', $selected_blocks) && permission_exists('xml_cdr_view')) { $hud[$n]['title'] = $text['label-system_counts']; @@ -592,7 +748,30 @@ $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; - $hud[$n]['html'] .= "\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'] .= "".$hud_stat."
".$hud_stat_title."
\n"; + } + + $hud[$n]['html'] .= "
\n"; $hud[$n]['html'] .= "\n"; $hud[$n]['html'] .= "\n"; $hud[$n]['html'] .= "\n"; @@ -665,74 +844,66 @@ $c = ($c) ? 0 : 1; } - $hud[$n]['html'] .= "
".$text['label-item']."".$text['label-disabled']."
\n"; - $n++; - } - - - //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"; - - $hud[$n]['html'] .= "\n"; - $hud[$n]['html'] .= "\n"; - $hud[$n]['html'] .= "\n"; - $hud[$n]['html'] .= "\n"; - $hud[$n]['html'] .= "\n"; - $hud[$n]['html'] .= "\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; + //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'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\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'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $c = ($c) ? 0 : 1; + } + + //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'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $c = ($c) ? 0 : 1; + } + + //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'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $c = ($c) ? 0 : 1; + } + + //messages + if (permission_exists('voicemail_message_view') && file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/voicemails/")) { + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + + $tr_link = "href='".PROJECT_PATH."/app/voicemails/voicemails.php'"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $c = ($c) ? 0 : 1; } - $tr_link = "href='".PROJECT_PATH.$url."'"; - $hud[$n]['html'] .= "\n"; - $hud[$n]['html'] .= "\n"; - $hud[$n]['html'] .= "\n"; - $hud[$n]['html'] .= "\n"; - $hud[$n]['html'] .= "\n"; - $c = ($c) ? 0 : 1; - } $hud[$n]['html'] .= "
".$text['label-feature']."".$text['label-used']."".$text['label-total']."
".$text['label-call_center_queues']."".$stats['system']['call_center_queues']['disabled']."".$stats['system']['call_center_queues']['total']."
".$text['label-ivr_menus']."".$stats['system']['ivr_menus']['disabled']."".$stats['system']['ivr_menus']['total']."
".$text['label-ring_groups']."".$stats['system']['ring_groups']['disabled']."".$stats['system']['ring_groups']['total']."
".$text['label-voicemail']."".$stats['system']['voicemails']['disabled']."".$stats['system']['voicemails']['total']."
".$text['label-item']."".$text['label-new']."".$text['label-total']."
".$text['label-messages']."".$stats['system']['messages']['new']."".$stats['system']['messages']['total']."
".$category."".$stats['domain'][$category_raw]['total']."".$limit."
\n"; $n++; @@ -747,7 +918,21 @@ $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; - $hud[$n]['html'] .= "\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'] .= "".$percent."
".$text['label-disk_usage']." (%)
\n"; + } + } + + $hud[$n]['html'] .= "
\n"; $hud[$n]['html'] .= "\n"; $hud[$n]['html'] .= "\n"; $hud[$n]['html'] .= "\n"; @@ -831,17 +1016,11 @@ //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 = $stat; break; } - } + //calculated above if ($percent != '') { $hud[$n]['html'] .= "\n"; $hud[$n]['html'] .= "\n"; - $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; $hud[$n]['html'] .= "\n"; $c = ($c) ? 0 : 1; } @@ -916,8 +1095,8 @@ $registrations = (is_numeric($registrations)) ? $registrations : 0; $tr_link = "href='".PROJECT_PATH."/app/registrations/status_registrations.php'"; $hud[$n]['html'] .= "\n"; - $hud[$n]['html'] .= "\n"; - $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; + $hud[$n]['html'] .= "\n"; $hud[$n]['html'] .= "\n"; $c = ($c) ? 0 : 1; } @@ -950,7 +1129,10 @@ echo "
".$text['label-item']."".$text['label-value']."
".$text['label-disk_usage']."".$percent."".$percent."%
".$text['label-registrations']."".$registrations."".$text['label-registrations']."".$registrations."
\n"; echo "\n"; foreach ($hud as $index => $block) { - echo "\n"; + echo "\n"; if ($index+1 < sizeof($hud)) { echo ""; } } echo ""; @@ -958,40 +1140,41 @@ 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 "
".$block['title']."

".$block['html']."
"; + echo " ".$block['title'].""; + echo " ".$block['html']; + echo "    
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
".$text['header-call_routing']."

\n"; - require_once "app/calls/calls.php"; - echo "
\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 "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
".$text['header-call_routing']."

\n"; + require_once "app/calls/calls.php"; + echo "
\n"; + } } - } -//reload language values - $language = new text; - $text = $language->get(); + //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 "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
".$text['header-ring_groups']."

\n"; - require_once "app/ring_groups/ring_group_forward.php"; - echo "
\n"; + //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 "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
".$text['header-ring_groups']."

\n"; + require_once "app/ring_groups/ring_group_forward.php"; + echo "
\n"; + } } - } +} //show the footer require_once "resources/footer.php"; diff --git a/themes/accessible/template.php b/themes/accessible/template.php index 047262e6f6..0ad6b79cd8 100644 --- a/themes/accessible/template.php +++ b/themes/accessible/template.php @@ -451,36 +451,65 @@ table tr:last-child td:last-child { td.hud_box { height: auto; 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; + background-image: url('/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; - color: #004083; - font-size: 60px; - line-hight: 20px; - font-weight: bold; - } - - span.hud_voicemail_total:hover { - opacity: 0.7; - } - - sup.hud_voicemail_new { + text-align: center; + text-shadow: 0px 2px 2px #aaa; + width: 100%; + height: 130px; + color: #000; + font-size: 75px; font-weight: normal; - color: #03920a; - font-size: 30px; - line-hight: 10px; + padding-top: 10px; + margin-bottom: 6px; + } + + 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; + } + + span.hud_stat:hover { + opacity: 0.9; + cursor: pointer; } th.hud_heading { diff --git a/themes/enhanced/template.php b/themes/enhanced/template.php index 9067dd00fb..e93d2b9fd3 100644 --- a/themes/enhanced/template.php +++ b/themes/enhanced/template.php @@ -1213,36 +1213,71 @@ legend { td.hud_box { height: auto; 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; + 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; - color: #004083; - font-size: 60px; - line-hight: 20px; - font-weight: bold; - } - - span.hud_voicemail_total:hover { - opacity: 0.7; - } - - sup.hud_voicemail_new { + text-align: center; + text-shadow: 0px 2px 2px #737983; + width: 100%; + height: 130px; + color: #fff; + font-size: 75px; font-weight: normal; - color: #03920a; - font-size: 30px; - line-hight: 10px; + background-color: #a4aebf; + border-top: 1px solid #c5d1e5; + border-bottom: 1px solid #909aa8; + padding-top: 10px; + margin-bottom: 6px; + } + + 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; + } + + span.hud_stat:hover { + opacity: 0.9; + cursor: pointer; } th.hud_heading { diff --git a/themes/minimized/template.php b/themes/minimized/template.php index 1c1828399a..e1e690a563 100644 --- a/themes/minimized/template.php +++ b/themes/minimized/template.php @@ -1216,11 +1216,9 @@ legend { td.hud_box { height: auto; 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; background-color: #f5f7fa; 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%); } - 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; - color: #004083; - font-size: 60px; - line-hight: 20px; - font-weight: bold; - } - - span.hud_voicemail_total:hover { - opacity: 0.7; - } - - sup.hud_voicemail_new { + text-align: center; + text-shadow: 0px 2px 2px #737983; + width: 100%; + height: 130px; + color: #fff; + font-size: 75px; font-weight: normal; - color: #03920a; - font-size: 30px; - line-hight: 10px; + background-color: #a4aebf; + border-top: 1px solid #c5d1e5; + border-bottom: 1px solid #909aa8; + padding-top: 10px; + margin-bottom: 6px; + } + + 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; + } + + span.hud_stat:hover { + opacity: 0.9; + cursor: pointer; } th.hud_heading {