Call Recordings: Adjustments.
This commit is contained in:
parent
463ce371d6
commit
72feb7df7b
|
|
@ -117,16 +117,13 @@
|
|||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['title-call_recordings']." (".$num_rows.")</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
if (permission_exists('call_recording_add')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'link'=>'call_recording_edit.php']);
|
||||
}
|
||||
if (permission_exists('call_recording_delete') && $call_recordings) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'onclick'=>"if (confirm('".$text['confirm-delete']."')) { list_action_set('delete'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'collapse'=>'hide-xs','onclick'=>"if (confirm('".$text['confirm-delete']."')) { list_action_set('delete'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
}
|
||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown='list_search_reset();'>";
|
||||
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search','style'=>($search != '' ? 'display: none;' : null)]);
|
||||
echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'call_recordings.php','style'=>($search == '' ? 'display: none;' : null)]);
|
||||
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search','style'=>($search != '' ? 'display: none;' : null),'collapse'=>'hide-xs']);
|
||||
echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'call_recordings.php','style'=>($search == '' ? 'display: none;' : null),'collapse'=>'hide-xs']);
|
||||
if ($paging_controls_mini != '') {
|
||||
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>\n";
|
||||
}
|
||||
|
|
@ -153,10 +150,10 @@
|
|||
}
|
||||
echo th_order_by('call_recording_name', $text['label-call_recording_name'], $order_by, $order, null, "class='pct-40'");
|
||||
if (permission_exists('call_recording_play') || permission_exists('call_recording_download')) {
|
||||
echo "<th class='center'>".$text['label-recording']."</th>\n";
|
||||
echo "<th class='shrink center'>".$text['label-recording']."</th>\n";
|
||||
$col_count++;
|
||||
}
|
||||
echo th_order_by('call_recording_length', $text['label-call_recording_length'], $order_by, $order);
|
||||
echo th_order_by('call_recording_length', $text['label-call_recording_length'], $order_by, $order, null, "class='right'");
|
||||
echo th_order_by('call_recording_date', $text['label-call_recording_date'], $order_by, $order);
|
||||
echo th_order_by('call_direction', $text['label-call_direction'], $order_by, $order);
|
||||
if (permission_exists('xml_cdr_details')) {
|
||||
|
|
@ -182,14 +179,7 @@
|
|||
echo " <input type='hidden' name='call_recordings[$x][uuid]' value='".escape($row['call_recording_uuid'])."' />\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
echo " <td class='overflow'>\n";
|
||||
if (permission_exists('xml_cdr_details')) {
|
||||
echo " <a href='".$list_row_url."' title=\"".$text['button-view']."\">".escape($row['call_recording_name'])."</a>\n";
|
||||
}
|
||||
else {
|
||||
echo " ".escape($row['call_recording_name']);
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " <td class='overflow'>".escape($row['call_recording_name'])."</td>\n";
|
||||
if (permission_exists('call_recording_play') || permission_exists('call_recording_download')) {
|
||||
echo " <td class='middle button center no-link no-wrap'>";
|
||||
if (file_exists($row['call_recording_path'].'/'.$row['call_recording_name'])) {
|
||||
|
|
@ -204,12 +194,12 @@
|
|||
echo button::create(['type'=>'button','title'=>$text['label-play'].' / '.$text['label-pause'],'icon'=>$_SESSION['theme']['button_icon_play'],'id'=>'recording_button_'.escape($row['call_recording_uuid']),'onclick'=>"recording_play('".escape($row['call_recording_uuid'])."')"]);
|
||||
}
|
||||
if (permission_exists('call_recording_download')) {
|
||||
echo button::create(['type'=>'button','title'=>$text['label-download'],'icon'=>$_SESSION['theme']['button_icon_download'],'link'=>'download.php?id='.urlencode($row['call_recording_uuid']).'&t=bin']);
|
||||
echo button::create(['type'=>'button','title'=>$text['label-download'],'icon'=>$_SESSION['theme']['button_icon_download'],'link'=>'download.php?id='.urlencode($row['call_recording_uuid']).'&binary']);
|
||||
}
|
||||
}
|
||||
echo " </td>\n";
|
||||
}
|
||||
echo " <td>".($row['call_recording_length'] <= 59 ? '0:' : null).escape(str_pad($row['call_recording_length'], 2, '0', STR_PAD_LEFT))."</td>\n";
|
||||
echo " <td class='right'>".($row['call_recording_length'] <= 59 ? '0:' : null).escape(str_pad($row['call_recording_length'], 2, '0', STR_PAD_LEFT))."</td>\n";
|
||||
$call_recording_date = explode(' ', $row['call_recording_date']);
|
||||
echo " <td class='no-wrap'>".escape($call_recording_date['0'])." <span class='hide-sm-dn'>".escape($call_recording_date[1])."</span></td>\n";
|
||||
echo " <td>".($row['call_direction'] != '' ? escape($text['label-'.$row['call_direction']]) : null)."</td>\n";
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
//check permisions
|
||||
require_once "resources/check_auth.php";
|
||||
if (permission_exists('call_recording_view')) {
|
||||
if (permission_exists('call_recording_play') || permission_exists('call_recording_download')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
|
|
@ -39,7 +39,11 @@
|
|||
}
|
||||
|
||||
//download
|
||||
$obj = new call_recordings;
|
||||
$obj->download();
|
||||
if (is_uuid($_GET['id'])) {
|
||||
$obj = new call_recordings;
|
||||
$obj->recording_uuid = $_GET['id'];
|
||||
$obj->binary = isset($_GET['binary']) ? true : false;
|
||||
$obj->download();
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
@ -17,6 +17,8 @@ if (!class_exists('call_recordings')) {
|
|||
private $table;
|
||||
private $description_field;
|
||||
private $location;
|
||||
public $recording_uuid;
|
||||
public $binary;
|
||||
|
||||
/**
|
||||
* called when the object is created
|
||||
|
|
@ -96,16 +98,12 @@ if (!class_exists('call_recordings')) {
|
|||
public function download() {
|
||||
if (permission_exists('call_recording_play') || permission_exists('call_recording_download')) {
|
||||
|
||||
//cache limiter
|
||||
session_cache_limiter('public');
|
||||
|
||||
//get call recording from database
|
||||
$call_recording_uuid = $_GET['id'];
|
||||
if (is_uuid($call_recording_uuid)) {
|
||||
if (is_uuid($this->recording_uuid)) {
|
||||
$sql = "select call_recording_name, call_recording_path, call_recording_base64 ";
|
||||
$sql .= "from v_call_recordings ";
|
||||
$sql .= "where call_recording_uuid = :call_recording_uuid ";
|
||||
$parameters['call_recording_uuid'] = $call_recording_uuid;
|
||||
$parameters['call_recording_uuid'] = $this->recording_uuid;
|
||||
$database = new database;
|
||||
$row = $database->select($sql, $parameters, 'row');
|
||||
if (is_array($row) && @sizeof($row) != 0) {
|
||||
|
|
@ -132,7 +130,7 @@ if (!class_exists('call_recordings')) {
|
|||
//}
|
||||
ob_clean();
|
||||
$fd = fopen($full_recording_path, "rb");
|
||||
if ($_GET['t'] == "bin") {
|
||||
if ($this->binary) {
|
||||
header("Content-Type: application/force-download");
|
||||
header("Content-Type: application/octet-stream");
|
||||
header("Content-Type: application/download");
|
||||
|
|
|
|||
|
|
@ -3345,26 +3345,45 @@ $text['label-greeting']['ru-ru'] = "Приветствие";
|
|||
$text['label-greeting']['sv-se'] = "Hälsning";
|
||||
$text['label-greeting']['uk-ua'] = "ID привітання";
|
||||
|
||||
$text['label-play']['en-us'] = 'Play';
|
||||
$text['label-play']['ar-eg'] = '';
|
||||
$text['label-play']['de-at'] = '';
|
||||
$text['label-play']['de-ch'] = '';
|
||||
$text['label-play']['de-de'] = '';
|
||||
$text['label-play']['el-gr'] = 'Αναπαραγωγή';
|
||||
$text['label-play']['es-cl'] = '';
|
||||
$text['label-play']['es-mx'] = '';
|
||||
$text['label-play']['fr-ca'] = '';
|
||||
$text['label-play']['fr-fr'] = '';
|
||||
$text['label-play']['he-il'] = '';
|
||||
$text['label-play']['it-it'] = '';
|
||||
$text['label-play']['nl-nl'] = '';
|
||||
$text['label-play']['pl-pl'] = '';
|
||||
$text['label-play']['pt-br'] = 'Tocar';
|
||||
$text['label-play']['pt-pt'] = '';
|
||||
$text['label-play']['ro-ro'] = '';
|
||||
$text['label-play']['ru-ru'] = '';
|
||||
$text['label-play']['sv-se'] = '';
|
||||
$text['label-play']['uk-ua'] = '';
|
||||
$text['label-play']['en-us'] = "Play";
|
||||
$text['label-play']['ar-eg'] = "";
|
||||
$text['label-play']['de-at'] = "Play"; //copied from de-de
|
||||
$text['label-play']['de-ch'] = "Play"; //copied from de-de
|
||||
$text['label-play']['de-de'] = "Play";
|
||||
$text['label-play']['es-cl'] = "Reproducir";
|
||||
$text['label-play']['es-mx'] = "Reproducir"; //copied from es-cl
|
||||
$text['label-play']['fr-ca'] = "Lire"; //copied from fr-fr
|
||||
$text['label-play']['fr-fr'] = "Lire";
|
||||
$text['label-play']['he-il'] = "נגן";
|
||||
$text['label-play']['it-it'] = "Suona";
|
||||
$text['label-play']['nl-nl'] = "Spelen";
|
||||
$text['label-play']['pl-pl'] = "Odtwórz";
|
||||
$text['label-play']['pt-br'] = "Tocar"; //copied from pt-pt
|
||||
$text['label-play']['pt-pt'] = "Tocar";
|
||||
$text['label-play']['ro-ro'] = "";
|
||||
$text['label-play']['ru-ru'] = "Проиграть";
|
||||
$text['label-play']['sv-se'] = "Spela Upp";
|
||||
$text['label-play']['uk-ua'] = "Відтворити";
|
||||
|
||||
$text['label-pause']['en-us'] = "Pause";
|
||||
$text['label-pause']['ar-eg'] = "";
|
||||
$text['label-pause']['de-at'] = "Pause"; //copied from de-de
|
||||
$text['label-pause']['de-ch'] = "Pause"; //copied from de-de
|
||||
$text['label-pause']['de-de'] = "Pause";
|
||||
$text['label-pause']['es-cl'] = "Pausa";
|
||||
$text['label-pause']['es-mx'] = "Pausa"; //copied from es-cl
|
||||
$text['label-pause']['fr-ca'] = "Pause"; //copied from fr-fr
|
||||
$text['label-pause']['fr-fr'] = "Pause";
|
||||
$text['label-pause']['he-il'] = "השהייה";
|
||||
$text['label-pause']['it-it'] = "Pausa";
|
||||
$text['label-pause']['nl-nl'] = "Pause";
|
||||
$text['label-pause']['pl-pl'] = "Pauza";
|
||||
$text['label-pause']['pt-br'] = "Pausado";
|
||||
$text['label-pause']['pt-pt'] = "Pausa";
|
||||
$text['label-pause']['ro-ro'] = "";
|
||||
$text['label-pause']['ru-ru'] = "Пауза";
|
||||
$text['label-pause']['sv-se'] = "Paus";
|
||||
$text['label-pause']['uk-ua'] = "Призупинити";
|
||||
|
||||
$text['label-caller_id_number']['en-us'] = "Caller ID Number";
|
||||
$text['label-caller_id_number']['ar-eg'] = "";
|
||||
|
|
|
|||
Loading…
Reference in New Issue