Email Logs, CDR: Minor adjustments.

This commit is contained in:
Nate
2019-11-27 11:00:16 -07:00
parent 0a05f9d4ba
commit 2a0a1d1e12
2 changed files with 4 additions and 47 deletions

View File

@@ -79,49 +79,6 @@
}
}
//resend email (previous method)
/*
if ($_REQUEST['a'] == 'resend' && permission_exists('email_log_resend')) {
$email_log_uuid = $_REQUEST["id"];
$resend = true;
$msg_found = false;
if (is_uuid($email_log_uuid)) {
$sql = "select email from v_email_logs ";
$sql .= "where email_log_uuid = :email_log_uuid ";
if (!permission_exists('email_log_all') || $_REQUEST['showall'] != 'true') {
$sql .= "and domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $domain_uuid;
}
$parameters['email_log_uuid'] = $email_log_uuid;
$database = new database;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row) && @sizeof($row) != 0) {
$email = $row['email'];
$msg_found = true;
}
unset($sql, $parameters, $row);
}
if ($msg_found) {
$msg = $email;
require_once "secure/v_mailto.php";
if ($mailer_error == '') {
message::add($text['message-message_resent']);
header("Location: email_log_delete.php?id=".$email_log_uuid.(permission_exists('email_log_all') && $_REQUEST['showall'] == 'true' ? "&showall=true" : null));
}
else {
message::add($text['message-resend_failed'].": ".$mailer_error, 'negative', 4000);
header("Location: email_logs.php".(permission_exists('email_log_all') && $_REQUEST['showall'] == 'true' ? "?showall=true" : null));
}
}
exit;
}
*/
//get order and order by and sanatize the values
$order_by = $_GET["order_by"];
$order = $_GET["order"];

View File

@@ -475,12 +475,12 @@
$param = substr($param, 0, strrpos($param, '&order_by=')); //remove trailing order by
//show the results
$col_count = 0;
echo "<form id='form_list' method='post'>\n";
echo "<input type='hidden' id='action' name='action' value=''>\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
$col_count = 0;
if (permission_exists('xml_cdr_delete')) {
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' ".($result ?: "style='visibility: hidden;'").">\n";
@@ -631,7 +631,7 @@
//recording playback
if (permission_exists('xml_cdr_recording_play') && $record_path != '') {
$content .= "<tr class='list-row' id='recording_progress_bar_".$row['xml_cdr_uuid']."' style='display: none;'><td class='playback_progress_bar_background' style='padding: 0; border-bottom: none; overflow: hidden;' colspan='".$col_count."'><span class='playback_progress_bar' id='recording_progress_".$row['xml_cdr_uuid']."'></span></td></tr>\n";
$content .= "<tr class='list-row' style='display: none;'><td></td></tr>\n"; // dummy table row to maintain alternating background color
$content .= "<tr class='list-row' style='display: none;'><td></td></tr>\n"; // dummy row to maintain alternating background color
}
if (permission_exists('xml_cdr_details')) {
$list_row_url = "xml_cdr_details.php?id=".urlencode($row['xml_cdr_uuid']).($_REQUEST['show'] ? "&show=all" : null);
@@ -763,10 +763,10 @@
$content .= " <td class='middle button center no-link no-wrap'>";
if (permission_exists('xml_cdr_recording_play')) {
$content .= "<audio id='recording_audio_".escape($row['xml_cdr_uuid'])."' style='display: none;' preload='none' ontimeupdate=\"update_progress('".escape($row['xml_cdr_uuid'])."')\" onended=\"recording_reset('".escape($row['xml_cdr_uuid'])."');\" src=\"download.php?id=".escape($row['xml_cdr_uuid'])."&t=record\" type='".escape($record_type)."'></audio>";
$content .= button::create(['type'=>'button','label'=>$text['button-label'],'icon'=>$_SESSION['theme']['button_icon_play'],'id'=>'recording_button_'.escape($row['xml_cdr_uuid']),'onclick'=>"recording_play('".escape($row['xml_cdr_uuid'])."')",'title'=>$text['label-play'].' / '.$text['label-pause']]);
$content .= button::create(['type'=>'button','title'=>$text['label-play'].' / '.$text['label-pause'],'icon'=>$_SESSION['theme']['button_icon_play'],'id'=>'recording_button_'.escape($row['xml_cdr_uuid']),'onclick'=>"recording_play('".escape($row['xml_cdr_uuid'])."')"]);
}
if (permission_exists('xml_cdr_recording_download')) {
$content .= button::create(['type'=>'button','title'=>$text['button-download'],'icon'=>$_SESSION['theme']['button_icon_download'],'link'=>"download.php?id=".urlencode($row['xml_cdr_uuid'])."&t=bin"]);
$content .= button::create(['type'=>'button','title'=>$text['label-download'],'icon'=>$_SESSION['theme']['button_icon_download'],'link'=>"download.php?id=".urlencode($row['xml_cdr_uuid'])."&t=bin"]);
}
$content .= "</td>\n";
}