Recordings / Voicemail Messages: Hide file size column if storing as base64 in db.
This commit is contained in:
@@ -147,7 +147,7 @@ require_once "resources/check_auth.php";
|
|||||||
require_once "resources/header.php";
|
require_once "resources/header.php";
|
||||||
|
|
||||||
//begin the content
|
//begin the content
|
||||||
echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td align='left'>\n";
|
echo " <td align='left'>\n";
|
||||||
echo " <b>".$text['title']."</b>";
|
echo " <b>".$text['title']."</b>";
|
||||||
@@ -162,11 +162,11 @@ require_once "resources/check_auth.php";
|
|||||||
if (permission_exists('recording_upload')) {
|
if (permission_exists('recording_upload')) {
|
||||||
echo "<b>".$text['header']."</b>";
|
echo "<b>".$text['header']."</b>";
|
||||||
echo "<br><br>";
|
echo "<br><br>";
|
||||||
echo "<form action=\"\" method=\"POST\" enctype=\"multipart/form-data\" name=\"frmUpload\" onSubmit=\"\">\n";
|
echo "<form action='' method='post' enctype='multipart/form-data' name='frmUpload'>\n";
|
||||||
echo "<input name=\"type\" type=\"hidden\" value=\"rec\">\n";
|
echo "<input name='type' type='hidden' value='rec'>\n";
|
||||||
echo "".$text['label-upload']."\n";
|
echo "".$text['label-upload']."\n";
|
||||||
echo "<input name=\"ulfile\" type=\"file\" class=\"formfld fileinput\" style=\"width: 260px;\" id=\"ulfile\">\n";
|
echo "<input name='ulfile' type='file' class='formfld fileinput' style='width: 260px;' id='ulfile'>\n";
|
||||||
echo "<input name=\"submit\" type=\"submit\" class=\"btn\" id=\"upload\" value=\"".$text['button-upload']."\">\n";
|
echo "<input name='submit' type='submit' class='btn' id='upload' value=\"".$text['button-upload']."\">\n";
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
echo "<br><br>\n";
|
echo "<br><br>\n";
|
||||||
}
|
}
|
||||||
@@ -206,16 +206,20 @@ require_once "resources/check_auth.php";
|
|||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo th_order_by('recording_name', $text['label-recording_name'], $order_by, $order);
|
echo th_order_by('recording_name', $text['label-recording_name'], $order_by, $order);
|
||||||
echo th_order_by('recording_filename', $text['label-file_name'], $order_by, $order);
|
echo th_order_by('recording_filename', $text['label-file_name'], $order_by, $order);
|
||||||
echo "<th class=\"listhdr\" nowrap>".$text['label-tools']."</th>\n";
|
echo "<th class='listhdr' nowrap>".$text['label-tools']."</th>\n";
|
||||||
echo "<th class=\"listhdr\" style='text-align: center;' nowrap>".$text['label-file-size']."</th>\n";
|
if ($_SESSION['recordings']['storage_type']['text'] != 'base64') {
|
||||||
|
echo "<th class='listhdr' style='text-align: center;' nowrap>".$text['label-file-size']."</th>\n";
|
||||||
|
}
|
||||||
echo th_order_by('recording_description', $text['label-description'], $order_by, $order);
|
echo th_order_by('recording_description', $text['label-description'], $order_by, $order);
|
||||||
echo "<td class='list_control_icons'> </td>\n";
|
echo "<td class='list_control_icons'> </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
if ($result_count > 0) {
|
if ($result_count > 0) {
|
||||||
foreach($result as $row) {
|
foreach($result as $row) {
|
||||||
$tmp_filesize = filesize($_SESSION['switch']['recordings']['dir'].'/'.$row['recording_filename']);
|
if ($_SESSION['recordings']['storage_type']['text'] != 'base64') {
|
||||||
$tmp_filesize = byte_convert($tmp_filesize);
|
$tmp_filesize = filesize($_SESSION['switch']['recordings']['dir'].'/'.$row['recording_filename']);
|
||||||
|
$tmp_filesize = byte_convert($tmp_filesize);
|
||||||
|
}
|
||||||
|
|
||||||
//playback progress bar
|
//playback progress bar
|
||||||
echo "<tr id='recording_progress_bar_".$row['recording_uuid']."' style='display: none;'><td colspan='5'><span class='playback_progress_bar' id='recording_progress_".$row['recording_uuid']."'></span></td></tr>\n";
|
echo "<tr id='recording_progress_bar_".$row['recording_uuid']."' style='display: none;'><td colspan='5'><span class='playback_progress_bar' id='recording_progress_".$row['recording_uuid']."'></span></td></tr>\n";
|
||||||
@@ -249,7 +253,9 @@ require_once "resources/check_auth.php";
|
|||||||
echo " ";
|
echo " ";
|
||||||
}
|
}
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td class='".$row_style[$c]."' style='text-align: center;'>".$tmp_filesize."</td>\n";
|
if ($_SESSION['recordings']['storage_type']['text'] != 'base64') {
|
||||||
|
echo " <td class='".$row_style[$c]."' style='text-align: center;'>".$tmp_filesize."</td>\n";
|
||||||
|
}
|
||||||
echo " <td valign='top' class='row_stylebg' width='30%'>".$row['recording_description']." </td>\n";
|
echo " <td valign='top' class='row_stylebg' width='30%'>".$row['recording_description']." </td>\n";
|
||||||
echo " <td class='list_control_icons'>";
|
echo " <td class='list_control_icons'>";
|
||||||
if (permission_exists('recording_edit')) {
|
if (permission_exists('recording_edit')) {
|
||||||
|
|||||||
@@ -107,7 +107,9 @@ if (!(check_str($_REQUEST["action"]) == "download" && check_str($_REQUEST["src"]
|
|||||||
$table_header .= th_order_by('caller_id_number', $text['label-caller_id_number'], $order_by, $order);
|
$table_header .= th_order_by('caller_id_number', $text['label-caller_id_number'], $order_by, $order);
|
||||||
$table_header .= "<th>".$text['label-tools']."</th>\n";
|
$table_header .= "<th>".$text['label-tools']."</th>\n";
|
||||||
$table_header .= th_order_by('message_length', $text['label-message_length'], $order_by, $order, null, "style='text-align: right;'");
|
$table_header .= th_order_by('message_length', $text['label-message_length'], $order_by, $order, null, "style='text-align: right;'");
|
||||||
$table_header .= "<th style='text-align: right;'>".$text['label-message_size']."</th>\n";
|
if ($_SESSION['voicemail']['storage_type']['text'] != 'base64') {
|
||||||
|
$table_header .= "<th style='text-align: right;'>".$text['label-message_size']."</th>\n";
|
||||||
|
}
|
||||||
$table_header .= "<td style='width: 25px;'> </td>";
|
$table_header .= "<td style='width: 25px;'> </td>";
|
||||||
$table_header .= "</tr>\n";
|
$table_header .= "</tr>\n";
|
||||||
|
|
||||||
@@ -121,14 +123,15 @@ if (!(check_str($_REQUEST["action"]) == "download" && check_str($_REQUEST["src"]
|
|||||||
echo " <td colspan='3' align='left' valign='top'>\n";
|
echo " <td colspan='3' align='left' valign='top'>\n";
|
||||||
echo " <b>".$text['label-mailbox'].": ".$field['voicemail_id']." </b><br /> \n";
|
echo " <b>".$text['label-mailbox'].": ".$field['voicemail_id']." </b><br /> \n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td colspan='3' valign='bottom' align='right'>\n";
|
echo " <td colspan='".(($_SESSION['voicemail']['storage_type']['text'] != 'base64') ? 3 : 2)."' valign='bottom' align='right'>\n";
|
||||||
if (permission_exists('voicemail_greeting_view')) {
|
if (permission_exists('voicemail_greeting_view')) {
|
||||||
echo " <input type='button' class='btn' name='' alt='greetings' onclick=\"window.location='".PROJECT_PATH."/app/voicemail_greetings/voicemail_greetings.php?id=".$field['voicemail_id']."'\" value='".$text['button-greetings']."'>\n";
|
echo " <input type='button' class='btn' name='' alt='greetings' onclick=\"window.location='".PROJECT_PATH."/app/voicemail_greetings/voicemail_greetings.php?id=".$field['voicemail_id']."'\" value='".$text['button-greetings']."'>\n";
|
||||||
}
|
}
|
||||||
if (permission_exists('voicemail_edit')) {
|
if (permission_exists('voicemail_edit')) {
|
||||||
echo " <input type='button' class='btn' name='' alt='settings' onclick=\"window.location='".PROJECT_PATH."/app/voicemails/voicemail_edit.php?id=".$field['voicemail_uuid']."'\" value='".$text['button-settings']."'>\n";
|
echo " <input type='button' class='btn' name='' alt='settings' onclick=\"window.location='".PROJECT_PATH."/app/voicemails/voicemail_edit.php?id=".$field['voicemail_uuid']."'\" value='".$text['button-settings']."'>\n";
|
||||||
}
|
}
|
||||||
echo " <br /><br /></td>\n";
|
echo " <br /><br />";
|
||||||
|
echo " </td>\n";
|
||||||
echo " <td> </td>\n";
|
echo " <td> </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
if (count($field['messages']) > 0) {
|
if (count($field['messages']) > 0) {
|
||||||
@@ -161,7 +164,9 @@ if (!(check_str($_REQUEST["action"]) == "download" && check_str($_REQUEST["src"]
|
|||||||
echo "<a href=\"voicemail_messages.php?action=download&type=vm&t=bin&id=".$row['voicemail_id']."&voicemail_uuid=".$row['voicemail_uuid']."&uuid=".$row['voicemail_message_uuid']."\" title='".$text['label-download']."'>".$v_link_label_download."</a>";
|
echo "<a href=\"voicemail_messages.php?action=download&type=vm&t=bin&id=".$row['voicemail_id']."&voicemail_uuid=".$row['voicemail_uuid']."&uuid=".$row['voicemail_message_uuid']."\" title='".$text['label-download']."'>".$v_link_label_download."</a>";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]."' style=\"".$style." text-align: right;\">".$row['message_length_label']." </td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."' style=\"".$style." text-align: right;\">".$row['message_length_label']." </td>\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]."' style=\"".$style." text-align: right;\" nowrap='nowrap'>".$row['file_size_label']."</td>\n";
|
if ($_SESSION['voicemail']['storage_type']['text'] != 'base64') {
|
||||||
|
echo " <td valign='top' class='".$row_style[$c]."' style=\"".$style." text-align: right;\" nowrap='nowrap'>".$row['file_size_label']."</td>\n";
|
||||||
|
}
|
||||||
echo " <td class='list_control_icon' style='width: 25px;'>";
|
echo " <td class='list_control_icon' style='width: 25px;'>";
|
||||||
if (permission_exists('voicemail_message_delete')) {
|
if (permission_exists('voicemail_message_delete')) {
|
||||||
echo "<a href='voicemail_message_delete.php?voicemail_uuid=".$row['voicemail_uuid']."&id=".$row['voicemail_message_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
echo "<a href='voicemail_message_delete.php?voicemail_uuid=".$row['voicemail_uuid']."&id=".$row['voicemail_message_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
||||||
|
|||||||
Reference in New Issue
Block a user