mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-03 10:23:50 +00:00
Update voicemail_messages.php
This commit is contained in:
@@ -284,17 +284,19 @@
|
||||
if (is_array($field['messages']) && @sizeof($field['messages']) > 0) {
|
||||
foreach ($field['messages'] as $row) {
|
||||
//responsive date
|
||||
$array = explode(' ', $row['created_date']);
|
||||
if ($array[0].' '.$array[1].' '.$array[2] == date('j M Y')) { //today
|
||||
$created_date = escape($array[3].' '.$array[4]); //only show time
|
||||
}
|
||||
else {
|
||||
$created_date = escape($array[0].' '.$array[1].' '.$array[2])." <span class='hide-xs' title=\"".escape($array[3].' '.$array[4])."\">".escape($array[3].' '.$array[4])."</span>";
|
||||
}
|
||||
$array = explode(' ', $row['created_date']);
|
||||
if ($array[0].' '.$array[1].' '.$array[2] == date('j M Y')) { //today
|
||||
$created_date = escape($array[3].' '.$array[4]); //only show time
|
||||
}
|
||||
else {
|
||||
$created_date = escape($array[0].' '.$array[1].' '.$array[2])." <span class='hide-xs' title=\"".escape($array[3].' '.$array[4])."\">".escape($array[3].' '.$array[4])."</span>";
|
||||
}
|
||||
|
||||
//playback progress bar
|
||||
echo "<tr class='list-row' id='recording_progress_bar_".escape($row['voicemail_message_uuid'])."' style='display: none;'><td class='playback_progress_bar_background' style='padding: 0; border: none;' colspan='".$col_count."'><span class='playback_progress_bar' id='recording_progress_".escape($row['voicemail_message_uuid'])."'></span></td></tr>\n";
|
||||
echo "<tr style='display: none;'><td></td></tr>\n"; // dummy row to maintain alternating background color
|
||||
$style = ($row['message_status'] == '' && $_REQUEST["uuid"] != $row['voicemail_message_uuid']) ? "style='font-weight: bold;'" : null;
|
||||
echo "<tr class='list-row' id='recording_progress_bar_".escape($row['voicemail_message_uuid'])."' style='display: none;'><td class='playback_progress_bar_background' style='padding: 0; border: none;' colspan='".$col_count."'><span class='playback_progress_bar' id='recording_progress_".escape($row['voicemail_message_uuid'])."'></span></td></tr>\n";
|
||||
echo "<tr style='display: none;'><td></td></tr>\n"; // dummy row to maintain alternating background color
|
||||
|
||||
$bold = ($row['message_status'] == '' && $_REQUEST["uuid"] != $row['voicemail_message_uuid']) ? "style='font-weight: bold;'" : null;
|
||||
$list_row_url = "javascript:recording_play('".escape($row['voicemail_message_uuid'])."');";
|
||||
echo "<tr class='list-row' href=\"".$list_row_url."\">\n";
|
||||
echo " <td class='checkbox'>\n";
|
||||
@@ -302,20 +304,20 @@
|
||||
echo " <input type='hidden' name='voicemail_messages[$x][uuid]' value='".escape($row['voicemail_message_uuid'])."' />\n";
|
||||
echo " <input type='hidden' name='voicemail_messages[$x][voicemail_uuid]' value='".escape($row['voicemail_uuid'])."' />\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class='no-wrap' ".$style.">".$created_date."</td>\n";
|
||||
echo " <td class='overflow' ".$style.">".escape($row['caller_id_name'])." </td>\n";
|
||||
echo " <td class='hide-xs' ".$style.">".escape($row['caller_id_number'])." </td>\n";
|
||||
echo " <td class='no-wrap' style='".$bold."'>".$created_date."</td>\n";
|
||||
echo " <td class='overflow' style='".$bold."'>".escape($row['caller_id_name'])." </td>\n";
|
||||
echo " <td class='hide-xs' style='".$bold."'>".escape($row['caller_id_number'])." </td>\n";
|
||||
echo " <td class='button center no-link no-wrap'>";
|
||||
echo "<audio id='recording_audio_".escape($row['voicemail_message_uuid'])."' style='display: none;' preload='none' ontimeupdate=\"update_progress('".escape($row['voicemail_message_uuid'])."')\" onended=\"recording_reset('".escape($row['voicemail_message_uuid'])."');\" src='voicemail_messages.php?action=download&id=".urlencode($row['voicemail_id'])."&voicemail_uuid=".urlencode($row['voicemail_uuid'])."&uuid=".urlencode($row['voicemail_message_uuid'])."&r=".uuid()."'></audio>";
|
||||
echo button::create(['type'=>'button','title'=>$text['label-play'].' / '.$text['label-pause'],'icon'=>$_SESSION['theme']['button_icon_play'],'id'=>'recording_button_'.escape($row['voicemail_message_uuid']),'onclick'=>"recording_play('".escape($row['voicemail_message_uuid'])."');"]);
|
||||
echo button::create(['type'=>'button','title'=>$text['label-download'],'icon'=>$_SESSION['theme']['button_icon_download'],'link'=>"voicemail_messages.php?action=download&id=".urlencode($row['voicemail_id'])."&voicemail_uuid=".escape($row['voicemail_uuid'])."&uuid=".escape($row['voicemail_message_uuid'])."&t=bin&r=".uuid(),'onclick'=>"$(this).closest('tr').children('td').css('font-weight','normal');"]);
|
||||
echo " </td>\n";
|
||||
echo " <td class='right no-wrap hide-xs' ".$style.">".escape($row['message_length_label'])."</td>\n";
|
||||
echo " <td class='right no-wrap hide-xs' style='".$bold."'>".escape($row['message_length_label'])."</td>\n";
|
||||
if ($_SESSION['voicemail']['storage_type']['text'] != 'base64') {
|
||||
echo " <td class='right no-wrap hide-sm-dn' ".$style.">".escape($row['file_size_label'])."</td>\n";
|
||||
echo " <td class='right no-wrap hide-sm-dn' style='".$bold."'>".escape($row['file_size_label'])."</td>\n";
|
||||
}
|
||||
if ($_SESSION['voicemail']['transcribe_enabled']['boolean'] == 'true') {
|
||||
echo " <td ".$style.">".escape($row['message_transcription'])."</td>\n";
|
||||
echo " <td class='hide-sm-dn' style='".$bold."'>".escape($row['message_transcription'])."</td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
$x++;
|
||||
@@ -361,4 +363,4 @@
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user