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->db = $db; $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 (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']++; } } } //add doughnut chart ?>
"; if (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"; ?>