get($_SESSION['domain']['language']['code'], 'core/user_settings'); //used for missed and recent calls $theme_image_path = $_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/"; //voicemail echo "
\n"; //required class require_once "app/voicemails/resources/classes/voicemail.php"; //get the voicemail $vm = new voicemail; $vm->domain_uuid = $_SESSION['domain_uuid']; $vm->order_by = $order_by ?? null; $vm->order = $order ?? null; $voicemails = $vm->messages(); //sum total and new $messages['total'] = 0; $messages['new'] = 0; if (!empty($voicemails) && sizeof($voicemails) > 0) { foreach($voicemails as $field) { $messages[$field['voicemail_uuid']]['ext'] = $field['voicemail_id']; $messages[$field['voicemail_uuid']]['total'] = 0; $messages[$field['voicemail_uuid']]['new'] = 0; foreach ($field['messages'] as $row) { if ($row['message_status'] == '') { $messages[$field['voicemail_uuid']]['new']++; $messages['new']++; } $messages[$field['voicemail_uuid']]['total']++; $messages['total']++; } } } echo "
\n"; echo " ".$text['label-new_messages'].""; if (isset($dashboard_chart_type) && $dashboard_chart_type == "doughnut") { //add doughnut chart ?>
".$messages['new'].""; } //dashboard icon if (!isset($dashboard_chart_type) || $dashboard_chart_type == "icon") { echo "\n"; echo "
\n"; echo " \n"; echo " ".$messages['new']."\n"; echo "
\n"; echo "
"; } echo "
\n"; if ($dashboard_details_state != 'disabled') { echo "
"; if (!empty($voicemails) && sizeof($voicemails) > 0) { echo ""; echo ""; echo " "; echo " "; echo " "; echo ""; $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; foreach ($messages as $voicemail_uuid => $row) { if (is_uuid($voicemail_uuid)) { $tr_link = "href='".PROJECT_PATH."/app/voicemails/voicemail_messages.php?id=".(permission_exists('voicemail_view') ? $voicemail_uuid : $row['ext'])."'"; echo ""; echo " "; echo " "; echo " "; echo ""; $c = ($c) ? 0 : 1; } } echo "
".$text['label-voicemail']."".$text['label-new']."".$text['label-total']."
".$row['ext']."".$row['new']."".$row['total']."
"; } else { echo "
".$text['label-no_voicemail_assigned']; } echo "
"; //$n++; echo ""; } echo "
\n"; ?>