diff --git a/app/music_on_hold/music_on_hold.php b/app/music_on_hold/music_on_hold.php
index 68d229b9c0..789c9e6d62 100644
--- a/app/music_on_hold/music_on_hold.php
+++ b/app/music_on_hold/music_on_hold.php
@@ -345,7 +345,7 @@ if ($_GET['act'] == "del" && permission_exists('music_on_hold_delete')) {
$row_uuid = uuid();
echo "
";
$recording_file_path = $file;
- $recording_file_name = strtolower(pathinfo($row['recording_filename'], PATHINFO_BASENAME));
+ $recording_file_name = strtolower(pathinfo($recording_file_path, PATHINFO_BASENAME));
$recording_file_ext = pathinfo($recording_file_name, PATHINFO_EXTENSION);
switch ($recording_file_ext) {
case "wav" : $recording_type = "audio/wav"; break;
diff --git a/app/music_on_hold/music_on_hold_play.php b/app/music_on_hold/music_on_hold_play.php
deleted file mode 100644
index 9777ee973b..0000000000
--- a/app/music_on_hold/music_on_hold_play.php
+++ /dev/null
@@ -1,80 +0,0 @@
-
- Portions created by the Initial Developer are Copyright (C) 2008-2012
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Mark J Crane
-*/
-
-include "root.php";
-require_once "resources/require.php";
-require_once "resources/check_auth.php";
-if (permission_exists('music_on_hold_view')) {
- //access granted
-}
-else {
- echo "access denied";
- exit;
-}
-
-$file_name = base64_decode($_GET['file_name']);
-$type = $_GET['type']; //moh //rec
-$category_dir = $_GET['category'];
-$sampling_rate_dir = $_GET['sampling_rate'];
-
-
-?>
-
-
-
-
-
-
-
- |
- file:
- |
-
-
- |
- ";
- echo "";
-
- echo " |
-
-
-
-
-
diff --git a/app/recordings/recording_play.php b/app/recordings/recording_play.php
deleted file mode 100644
index 71e4b525ec..0000000000
--- a/app/recordings/recording_play.php
+++ /dev/null
@@ -1,84 +0,0 @@
-
- Portions created by the Initial Developer are Copyright (C) 2008-2012
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Mark J Crane
-*/
-
-include "root.php";
-require_once "resources/require.php";
-require_once "resources/check_auth.php";
-if (permission_exists('recording_play')) {
- //access granted
-}
-else {
- echo "access denied";
- exit;
-}
-
-$filename = base64_decode($_GET['filename']);
-$type = $_GET['type']; //moh //rec
-
-?>
-
-
-
-
-
-
-
- |
- file:
- |
-
-
- |
- ";
- }
- else {
- echo "";
- echo " |
-
-
-
-
-
diff --git a/app/recordings/recordings.php b/app/recordings/recordings.php
index 4ad1bc0e90..3ac4b12f8b 100644
--- a/app/recordings/recordings.php
+++ b/app/recordings/recordings.php
@@ -243,7 +243,7 @@ require_once "resources/check_auth.php";
if (strlen($row['recording_filename']) > 0) {
echo " ";
$recording_file_path = $row['recording_filename'];
- $recording_file_name = strtolower(pathinfo($row['recording_filename'], PATHINFO_BASENAME));
+ $recording_file_name = strtolower(pathinfo($recording_file_path, PATHINFO_BASENAME));
$recording_file_ext = pathinfo($recording_file_name, PATHINFO_EXTENSION);
switch ($recording_file_ext) {
case "wav" : $recording_type = "audio/wav"; break;
diff --git a/app/voicemail_greetings/app_languages.php b/app/voicemail_greetings/app_languages.php
index 4df11a35f6..48087b11f2 100644
--- a/app/voicemail_greetings/app_languages.php
+++ b/app/voicemail_greetings/app_languages.php
@@ -56,6 +56,21 @@
$text['label-tools']['pt-pt'] = "Ferramentas";
$text['label-tools']['fr-fr'] = "Outils";
+ $text['label-download']['en-us'] = "Download";
+ $text['label-download']['es-cl'] = "Descargar";
+ $text['label-download']['pt-pt'] = "Descarregar";
+ $text['label-download']['fr-fr'] = "Télécharger";
+
+ $text['label-play']['en-us'] = "Play";
+ $text['label-play']['es-cl'] = "Reproducir";
+ $text['label-play']['pt-pt'] = "Tocar";
+ $text['label-play']['fr-fr'] = "Jouer";
+
+ $text['label-pause']['en-us'] = "Pause";
+ $text['label-pause']['es-cl'] = "Pausa";
+ $text['label-pause']['pt-pt'] = "Pausa";
+ $text['label-pause']['fr-fr'] = "Pause";
+
//voicemail_greeting_edit
$text['confirm-name']['en-us'] = "Please provide: Greeting Name (play)";
$text['confirm-name']['es-cl'] = "Por favor indique: Nombre de Bienvenida (reproducir)";
diff --git a/app/voicemail_greetings/voicemail_greeting_play.php b/app/voicemail_greetings/voicemail_greeting_play.php
deleted file mode 100644
index 343a6e5002..0000000000
--- a/app/voicemail_greetings/voicemail_greeting_play.php
+++ /dev/null
@@ -1,76 +0,0 @@
-
- Portions created by the Initial Developer are Copyright (C) 2008-2012
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Mark J Crane
-*/
-
-include "root.php";
-require_once "resources/require.php";
-require_once "resources/check_auth.php";
-if (permission_exists('voicemail_greeting_play')) {
- //access granted
-}
-else {
- echo "access denied";
- exit;
-}
-
-$filename = base64_decode($_GET['filename']);
-$type = $_GET['type']; //moh //rec
-
-?>
-
-
-
-
-
-
-
- |
- file:
- |
-
-
- |
- ";
- echo "";
- echo " |
-
-
-
-
-
diff --git a/app/voicemail_greetings/voicemail_greetings.php b/app/voicemail_greetings/voicemail_greetings.php
index aaba9800d2..6d4c0b31bf 100644
--- a/app/voicemail_greetings/voicemail_greetings.php
+++ b/app/voicemail_greetings/voicemail_greetings.php
@@ -291,13 +291,16 @@ else {
$c = 0;
$row_style["0"] = "row_style0";
$row_style["1"] = "row_style1";
+ $row_style["2"] = "row_style2";
echo "\n";
echo "\n";
echo "| ".$text['table-choose']." | \n";
echo th_order_by('greeting_name', $text['table-name'], $order_by, $order);
- echo "".$text['label-tools']." | \n";
- echo "".$text['table-size']." | \n";
+ if (permission_exists('voicemail_greeting_download')) {
+ echo "".$text['label-tools']." | \n";
+ }
+ echo "".$text['table-size']." | \n";
echo th_order_by('greeting_description', $text['table-description'], $order_by, $order);
echo "\n";
//if (permission_exists('voicemail_greeting_add')) {
@@ -321,18 +324,28 @@ else {
}
echo " | \n";
echo " ".$row['greeting_name']." | \n";
- echo " ";
-
if (permission_exists('voicemail_greeting_download')) {
- echo " ".$text['table-download']."";
+ if (strlen($row['greeting_name']) > 0) {
+ echo " | ";
+ $recording_file_path = $row['greeting_name'];
+ $recording_file_name = strtolower(pathinfo($recording_file_path, PATHINFO_BASENAME));
+ $recording_file_ext = pathinfo($recording_file_name, PATHINFO_EXTENSION);
+ switch ($recording_file_ext) {
+ case "wav" : $recording_type = "audio/wav"; break;
+ case "mp3" : $recording_type = "audio/mpeg"; break;
+ case "ogg" : $recording_type = "audio/ogg"; break;
+ }
+ echo "";
+ echo "".$v_link_label_play."";
+ echo "".$v_link_label_download."";
+ }
+ else {
+ echo " | ";
+ echo " ";
+ }
+ echo " | \n";
}
- //echo " \n";
- //echo "\n";
- //echo "play";
- //echo "";
-
- echo " \n";
- echo " ".$tmp_filesize." | \n";
+ echo " ".$tmp_filesize." | \n";
echo " ".$row['greeting_description']." | \n";
echo " \n";
if (permission_exists('voicemail_greeting_edit')) {
diff --git a/app/voicemails/app_languages.php b/app/voicemails/app_languages.php
index 3d01ffafc4..8bc4349e71 100644
--- a/app/voicemails/app_languages.php
+++ b/app/voicemails/app_languages.php
@@ -121,15 +121,20 @@
$text['label-message_size']['pt-pt'] = "Tamanho";
$text['label-message_size']['fr-fr'] = "Taille";
+ $text['label-download']['en-us'] = "Download";
+ $text['label-download']['es-cl'] = "Descargar";
+ $text['label-download']['pt-pt'] = "Descarregar";
+ $text['label-download']['fr-fr'] = "Télécharger";
+
$text['label-play']['en-us'] = "Play";
$text['label-play']['es-cl'] = "Reproducir";
$text['label-play']['pt-pt'] = "Tocar";
$text['label-play']['fr-fr'] = "Jouer";
- $text['label-download']['en-us'] = "Download";
- $text['label-download']['es-cl'] = "Descargar";
- $text['label-download']['pt-pt'] = "Descarregar";
- $text['label-download']['fr-fr'] = "Télécharger";
+ $text['label-pause']['en-us'] = "Pause";
+ $text['label-pause']['es-cl'] = "Pausa";
+ $text['label-pause']['pt-pt'] = "Pausa";
+ $text['label-pause']['fr-fr'] = "Pause";
$text['label-view']['en-us'] = "View";
$text['label-view']['es-cl'] = "Ver";
diff --git a/app/voicemails/resources/classes/voicemail.php b/app/voicemails/resources/classes/voicemail.php
index e42f832dfc..deb8d00d0a 100644
--- a/app/voicemails/resources/classes/voicemail.php
+++ b/app/voicemails/resources/classes/voicemail.php
@@ -124,7 +124,7 @@
$sql .= "and (";
$x = 0;
foreach($this->voicemail_id as $row) {
- if ($x > 0) {
+ if ($x > 0) {
$sql .= "or ";
}
$sql .= "v.voicemail_id = '".$row['voicemail_id']."' ";
@@ -283,16 +283,16 @@
header("Content-Description: File Transfer");
$file_ext = substr($file_path, -3);
if ($file_ext == "wav") {
- header('Content-Disposition: attachment; filename="voicemail.wav"');
+ header('Content-Disposition: attachment; filename="msg_'.$this->voicemail_message_uuid.'.wav"');
}
if ($file_ext == "mp3") {
- header('Content-Disposition: attachment; filename="voicemail.mp3"');
+ header('Content-Disposition: attachment; filename="msg_'.$this->voicemail_message_uuid.'.mp3"');
}
}
else {
$file_ext = substr($file_path, -3);
if ($file_ext == "wav") {
- header("Content-Type: audio/x-wav");
+ header("Content-Type: audio/wav");
}
if ($file_ext == "mp3") {
header("Content-Type: audio/mp3");
diff --git a/app/voicemails/voicemail_message_play.php b/app/voicemails/voicemail_message_play.php
deleted file mode 100644
index 0d4a26194c..0000000000
--- a/app/voicemails/voicemail_message_play.php
+++ /dev/null
@@ -1,118 +0,0 @@
-
- Portions created by the Initial Developer are Copyright (C) 2008-2012
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Mark J Crane
-*/
-
-include "root.php";
-require_once "resources/require.php";
-require_once "resources/check_auth.php";
-if (permission_exists('voicemail_view')) {
- //access granted
-}
-else {
- echo "access denied";
- exit;
-}
-
-//add multi-lingual support
- require_once "app_languages.php";
- foreach($text as $key => $value) {
- $text[$key] = $value[$_SESSION['domain']['language']['code']];
- }
-
-//get the http get values
- $uuid = $_GET['uuid'];
- $file_ext = $_GET['ext'];
- $type = $_GET['type']; //vm
- $desc = $_GET['desc'];
- $id = $_GET['id'];
-
-//get the domain from the domains array
- $domain_name = $_SESSION['domains'][$domain_uuid]['domain_name'];
-
-//create the event socket connection
- $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
- if (!$fp) {
- $msg = " ".$text['confirm-socket']."
";
- }
-
-//show the error message or show the content
- if (strlen($msg) > 0) {
- require_once "resources/header.php";
- echo "\n";
- echo " \n";
- echo " \n";
- echo " | ".$text['label-message']." | \n";
- echo " \n";
- echo " \n";
- echo " | $msg | \n";
- echo " \n";
- echo " \n";
- echo " \n";
- require_once "resources/footer.php";
- return;
- }
-
-?>
-
-
-
-
-
-
-
- |
- voicemail:
- |
-
-
- |
- \n";
- }
- //object html tag to add flash player that can play the mp3 file
- if ($file_ext == "mp3") {
- echo "\n";
- }
- ?>
- |
-
-
-
-
\ No newline at end of file
diff --git a/app/voicemails/voicemail_messages.php b/app/voicemails/voicemail_messages.php
index b055151992..91f937f278 100644
--- a/app/voicemails/voicemail_messages.php
+++ b/app/voicemails/voicemail_messages.php
@@ -103,6 +103,7 @@ else {
$c = 0;
$row_style["0"] = "row_style0";
$row_style["1"] = "row_style1";
+ $row_style["2"] = "row_style2";
echo "\n";
echo " \n";
@@ -113,9 +114,9 @@ else {
//$table_header .= th_order_by('read_epoch', $text['label-read_epoch'], $order_by, $order);
$table_header .= th_order_by('caller_id_name', $text['label-caller_id_name'], $order_by, $order);
$table_header .= th_order_by('caller_id_number', $text['label-caller_id_number'], $order_by, $order);
- $table_header .= th_order_by('message_length', $text['label-message_length'], $order_by, $order);
- $table_header .= "| ".$text['label-message_size']." | \n";
$table_header .= "".$text['label-tools']." | \n";
+ $table_header .= th_order_by('message_length', $text['label-message_length'], $order_by, $order, null, "style='text-align: right;'");
+ $table_header .= "".$text['label-message_size']." | \n";
//$table_header .= th_order_by('message_priority', $text['label-message_priority'], $order_by, $order);
$table_header .= "\n";
$table_header .= " \n";
@@ -146,25 +147,29 @@ else {
}
foreach($field['messages'] as &$row) {
- if ($row['message_status'] == '') { $style = "style=\"font-weight:bold;\""; } else { $style = ''; }
- echo " | ";
+ if ($row['message_status'] == '') { $style = "font-weight: bold;"; } else { $style = ''; }
+ echo " | ";
echo " ".$row['created_date'];
echo " | \n";
//echo " ".$row['read_epoch']." | \n";
- echo " ".$row['caller_id_name']." | \n";
- echo " ".$row['caller_id_number']." | \n";
- echo " ".$row['message_length_label']." | \n";
- //echo " ".$row['message_status']." | \n";
- echo " ".$row['file_size_label']." | \n";
- echo " \n";
- //echo " \n";
- //echo " ".$text['label-play']."\n";
- //echo " \n";
- echo " \n";
- echo " \n";
- echo " ".$text['label-download']."\n";
- echo " \n";
+ echo " | ".$row['caller_id_name']." | \n";
+ echo " ".$row['caller_id_number']." | \n";
+ echo " ";
+ $recording_file_path = $file;
+ $recording_file_name = strtolower(pathinfo($recording_file_path, PATHINFO_BASENAME));
+ $recording_file_ext = pathinfo($recording_file_name, PATHINFO_EXTENSION);
+ switch ($recording_file_ext) {
+ case "wav" : $recording_type = "audio/wav"; break;
+ case "mp3" : $recording_type = "audio/mpeg"; break;
+ case "ogg" : $recording_type = "audio/ogg"; break;
+ }
+ echo "";
+ echo "".$v_link_label_play."";
+ echo "".$v_link_label_download."";
echo " | \n";
+ echo " ".$row['message_length_label']." | \n";
+ //echo " ".$row['message_status']." | \n";
+ echo " ".$row['file_size_label']." | \n";
//echo " ".$row['message_priority']." | \n";
echo " \n";
if (permission_exists('voicemail_message_delete')) {
| | | |