Update recordings.php
This commit is contained in:
parent
7429453f7e
commit
7153383535
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2016
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2019
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -146,8 +146,8 @@
|
|||
message::add($text['message-uploaded'].": ".htmlentities($recording_filename));
|
||||
|
||||
//set the file name to be inserted as the recording description
|
||||
$recording_description = base64_encode($_FILES['ulfile']['name']);
|
||||
header("Location: recordings.php?rd=".$recording_description);
|
||||
$recording_description = $_FILES['ulfile']['name'];
|
||||
header("Location: recordings.php?rd=".urlencode($recording_description));
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
@ -207,7 +207,7 @@
|
|||
//file not found in db, add it
|
||||
$recording_uuid = uuid();
|
||||
$recording_name = ucwords(str_replace('_', ' ', pathinfo($recording_filename, PATHINFO_FILENAME)));
|
||||
$recording_description = base64_decode($_GET['rd']);
|
||||
$recording_description = $_GET['rd'];
|
||||
//build array
|
||||
$array['recordings'][0]['domain_uuid'] = $domain_uuid;
|
||||
$array['recordings'][0]['recording_uuid'] = $recording_uuid;
|
||||
|
|
@ -278,7 +278,7 @@
|
|||
|
||||
//prepare to page the results
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = "&order_by=".$order_by."&order=".$order;
|
||||
$param = "&order_by=".urlencode($order_by)."&order=".urlencode($order);
|
||||
$page = $_GET['page'];
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page);
|
||||
|
|
@ -363,11 +363,11 @@
|
|||
case "mp3" : $recording_type = "audio/mpeg"; break;
|
||||
case "ogg" : $recording_type = "audio/ogg"; break;
|
||||
}
|
||||
echo "<audio id='recording_audio_".escape($row['recording_uuid'])."' style='display: none;' preload='none' ontimeupdate=\"update_progress('".escape($row['recording_uuid'])."')\" onended=\"recording_reset('".escape($row['recording_uuid'])."');\" src=\"".PROJECT_PATH."/app/recordings/recordings.php?a=download&type=rec&id=".escape($row['recording_uuid'])."\" type='".$recording_type."'></audio>";
|
||||
echo "<audio id='recording_audio_".escape($row['recording_uuid'])."' style='display: none;' preload='none' ontimeupdate=\"update_progress('".escape($row['recording_uuid'])."')\" onended=\"recording_reset('".escape($row['recording_uuid'])."');\" src=\"".PROJECT_PATH."/app/recordings/recordings.php?a=download&type=rec&id=".urlencode($row['recording_uuid'])."\" type='".$recording_type."'></audio>";
|
||||
echo "<span id='recording_button_".escape($row['recording_uuid'])."' onclick=\"recording_play('".escape($row['recording_uuid'])."')\" title='".$text['label-play']." / ".$text['label-pause']."'>".$v_link_label_play."</span>";
|
||||
}
|
||||
if (permission_exists('recording_download')) {
|
||||
echo "<a href=\"".PROJECT_PATH."/app/recordings/recordings.php?a=download&type=rec&t=bin&id=".escape($row['recording_uuid'])."\" title='".$text['label-download']."'>".$v_link_label_download."</a>";
|
||||
echo "<a href=\"".PROJECT_PATH."/app/recordings/recordings.php?a=download&type=rec&t=bin&id=".urlencode($row['recording_uuid'])."\" title='".$text['label-download']."'>".$v_link_label_download."</a>";
|
||||
}
|
||||
echo " </td>\n";
|
||||
}
|
||||
|
|
@ -410,7 +410,7 @@
|
|||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
|
||||
//define the download function
|
||||
function range_download($file) {
|
||||
$fp = @fopen($file, 'rb');
|
||||
|
||||
|
|
@ -488,9 +488,7 @@ function range_download($file) {
|
|||
// Start buffered download
|
||||
$buffer = 1024 * 8;
|
||||
while(!feof($fp) && ($p = ftell($fp)) <= $end) {
|
||||
|
||||
if ($p + $buffer > $end) {
|
||||
|
||||
// In case we're only outputtin a chunk, make sure we don't
|
||||
// read past the length
|
||||
$buffer = $end - $p + 1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue