VM Greetings, VMs: Integrated HTML5 playback button. Misc fixes with other integrations.
This commit is contained in:
parent
e495987223
commit
44bed664ae
|
|
@ -345,7 +345,7 @@ if ($_GET['act'] == "del" && permission_exists('music_on_hold_delete')) {
|
|||
$row_uuid = uuid();
|
||||
echo " <td valign='top' class='".$row_style["2"]." tr_link_void'>";
|
||||
$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;
|
||||
|
|
|
|||
|
|
@ -1,80 +0,0 @@
|
|||
<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is FusionPBX
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
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'];
|
||||
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
|
||||
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td align='center'>
|
||||
<b>file: <?php echo $file_name ?></b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align='center'>
|
||||
<?php
|
||||
$file_ext = substr($file_name, -3);
|
||||
if ($file_ext == "wav") {
|
||||
//HTML5 method
|
||||
echo "<audio src=\"http://localhost:8000/mod/music_on_hold/music_on_hold.php?a=download&category=".$category_dir."&sampling_rate=".$sampling_rate_dir."&type=".$type."&file_name=".base64_encode($file_name)."\" autoplay=\"autoplay\">";
|
||||
echo "</audio>";
|
||||
|
||||
echo "<embed src=\"music_on_hold.php?a=download&category=".$category_dir."&sampling_rate=".$sampling_rate_dir."&type=".$type."&file_name=".base64_encode($file_name)."\" autostart=\"true\" width=\"200\" height=\"40\" name=\"sound_".$file_name."\" enablejavascript=\"true\">\n";
|
||||
}
|
||||
if ($file_ext == "mp3") {
|
||||
echo "<object type=\"application/x-shockwave-flash\" width=\"400\" height=\"17\" data=\"slim.swf?autoplay=true&song_title=".urlencode($file_name)."&song_url=music_on_hold.php?a=download&category=".$category_dir."&sampling_rate=".$sampling_rate_dir."&type=".$type."&file_name=".base64_encode($file_name)."\">\n";
|
||||
echo "<param name=\"movie\" value=\"slim.swf?autoplay=true&song_url=music_on_hold.php?a=download&category=".$category_dir."&sampling_rate=".$sampling_rate_dir."&type=".$type."&file_name=".base64_encode($file_name)."\" />\n";
|
||||
echo "<param name=\"quality\" value=\"high\"/>\n";
|
||||
echo "<param name=\"bgcolor\" value=\"#E6E6E6\"/>\n";
|
||||
echo "</object>\n";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,84 +0,0 @@
|
|||
<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is FusionPBX
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
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
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
|
||||
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td align='center'>
|
||||
<b>file: <?php echo $filename ?></b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align='center'>
|
||||
<?php
|
||||
// detect browser
|
||||
$user_agent = http_user_agent();
|
||||
$browser_name = $user_agent['name'];
|
||||
|
||||
$file_ext = substr($filename, -3);
|
||||
if ($file_ext == "wav") {
|
||||
//HTML5 method
|
||||
if ($browser_name == "Google Chrome" || $browser_name == "Mozilla Firefox") {
|
||||
echo "<audio src=\"recordings.php?a=download&type=".$type."&filename=".base64_encode($filename)."\" autoplay=\"true\" ></audio>";
|
||||
}
|
||||
else {
|
||||
echo "<audio src=\"http://localhost:8000/mod/recordings/recordings.php?a=download&type=".$type."&filename=".base64_encode($filename)."\" autoplay=\"autoplay\"></audio>";
|
||||
echo "<embed src=\"recordings.php?a=download&type=".$type."&filename=".base64_encode($filename)."\" autostart=\"true\" width=\"300\" height=\"90\" name=\"sound_".$filename."\" enablejavascript=\"true\">\n";
|
||||
}
|
||||
}
|
||||
if ($file_ext == "mp3") {
|
||||
echo "<object type=\"application/x-shockwave-flash\" width=\"400\" height=\"17\" data=\"slim.swf?autoplay=true&song_title=".urlencode($filename)."&song_url=recordings.php?a=download&type=".$type."&filename=".base64_encode($filename)."\">\n";
|
||||
echo "<param name=\"movie\" value=\"slim.swf?autoplay=true&song_url=recordings.php?a=download&type=".$type."&filename=".base64_encode($filename)."\" />\n";
|
||||
echo "<param name=\"quality\" value=\"high\"/>\n";
|
||||
echo "<param name=\"bgcolor\" value=\"#E6E6E6\"/>\n";
|
||||
echo "</object>\n";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -243,7 +243,7 @@ require_once "resources/check_auth.php";
|
|||
if (strlen($row['recording_filename']) > 0) {
|
||||
echo " <td valign='top' class='".$row_style["2"]." tr_link_void'>";
|
||||
$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;
|
||||
|
|
|
|||
|
|
@ -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)";
|
||||
|
|
|
|||
|
|
@ -1,76 +0,0 @@
|
|||
<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is FusionPBX
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
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
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
|
||||
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td align='center'>
|
||||
<b>file: <?php echo $filename ?></b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align='center'>
|
||||
<?php
|
||||
$file_ext = substr($filename, -3);
|
||||
if ($file_ext == "wav") {
|
||||
//HTML5 method
|
||||
echo "<audio src=\"".PROJECT_PATH."/app/recordings/recordings.php?a=download&type=".$type."&filename=".base64_encode($filename)."\" autoplay=\"autoplay\">";
|
||||
echo "</audio>";
|
||||
echo "<embed src=\"".PROJECT_PATH."/app/recordings/recordings.php?a=download&type=".$type."&filename=".base64_encode($filename)."\" autostart=\"true\" width=\"300\" height=\"90\" name=\"sound_".$filename."\" enablejavascript=\"true\">\n";
|
||||
}
|
||||
if ($file_ext == "mp3") {
|
||||
echo "<object type=\"application/x-shockwave-flash\" width=\"400\" height=\"17\" data=\"".PROJECT_PATH."/app/recordings/slim.swf?autoplay=true&song_title=".urlencode($filename)."&song_url=".PROJECT_PATH."/app/recordings/recordings.php?a=download&type=".$type."&filename=".base64_encode($filename)."\">\n";
|
||||
echo "<param name=\"movie\" value=\"".PROJECT_PATH."/app/recordings/slim.swf?autoplay=true&song_url=recordings.php?a=download&type=".$type."&filename=".base64_encode($filename)."\" />\n";
|
||||
echo "<param name=\"quality\" value=\"high\"/>\n";
|
||||
echo "<param name=\"bgcolor\" value=\"#E6E6E6\"/>\n";
|
||||
echo "</object>\n";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -291,13 +291,16 @@ else {
|
|||
$c = 0;
|
||||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
$row_style["2"] = "row_style2";
|
||||
|
||||
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<th>".$text['table-choose']."</th>\n";
|
||||
echo th_order_by('greeting_name', $text['table-name'], $order_by, $order);
|
||||
echo "<th align='right'>".$text['label-tools']."</th>\n";
|
||||
echo "<th width=\"50px\" class=\"listhdr\" nowrap=\"nowrap\">".$text['table-size']."</th>\n";
|
||||
if (permission_exists('voicemail_greeting_download')) {
|
||||
echo "<th>".$text['label-tools']."</th>\n";
|
||||
}
|
||||
echo "<th class=\"listhdr\" style='text-align: right;' nowrap=\"nowrap\">".$text['table-size']."</th>\n";
|
||||
echo th_order_by('greeting_description', $text['table-description'], $order_by, $order);
|
||||
echo "<td align='right' width='21'>\n";
|
||||
//if (permission_exists('voicemail_greeting_add')) {
|
||||
|
|
@ -321,18 +324,28 @@ else {
|
|||
}
|
||||
echo " </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['greeting_name']."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
|
||||
if (permission_exists('voicemail_greeting_download')) {
|
||||
echo " <a href=\"voicemail_greetings.php?id=$voicemail_id&a=download&type=rec&t=bin&filename=".base64_encode($row['greeting_name'])."\">".$text['table-download']."</a>";
|
||||
if (strlen($row['greeting_name']) > 0) {
|
||||
echo " <td valign='top' class='".$row_style["2"]." tr_link_void'>";
|
||||
$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 "<audio id='recording_audio_".$row['voicemail_greeting_uuid']."' style='display: none;' preload='none' onended=\"recording_reset('".$row['voicemail_greeting_uuid']."');\" src=\"voicemail_greetings.php?id=".$voicemail_id."&a=download&type=rec&filename=".base64_encode($recording_file_path)."\" type='".$recording_type."'></audio>";
|
||||
echo "<span id='recording_button_".$row['voicemail_greeting_uuid']."' onclick=\"recording_play('".$row['voicemail_greeting_uuid']."')\" title='".$text['label-play']." / ".$text['label-pause']."'>".$v_link_label_play."</span>";
|
||||
echo "<a href=\"voicemail_greetings.php?id=".$voicemail_id."&a=download&type=rec&t=bin&filename=".base64_encode($recording_file_path)."\" title='".$text['label-download']."'>".$v_link_label_download."</a>";
|
||||
}
|
||||
else {
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
echo " ";
|
||||
}
|
||||
echo " </td>\n";
|
||||
}
|
||||
//echo " \n";
|
||||
//echo "<a href=\"javascript:void(0);\" onclick=\"window.open('voicemail_greeting_play.php?id=$voicemail_id&a=download&type=rec&filename=".base64_encode($row['greeting_name'])."', 'play',' width=420,height=40,menubar=no,status=no,toolbar=no')\">\n";
|
||||
//echo "play";
|
||||
//echo "</a>";
|
||||
|
||||
echo " </td>\n";
|
||||
echo " <td class='".$row_style[$c]."' nowrap>".$tmp_filesize."</td>\n";
|
||||
echo " <td class='".$row_style[$c]."' style='text-align: right;' nowrap>".$tmp_filesize."</td>\n";
|
||||
echo " <td valign='top' class='row_stylebg'>".$row['greeting_description']." </td>\n";
|
||||
echo " <td class='list_control_icons'>\n";
|
||||
if (permission_exists('voicemail_greeting_edit')) {
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -1,118 +0,0 @@
|
|||
<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is FusionPBX
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
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 = "<div align='center'>".$text['confirm-socket']."<br /></div>";
|
||||
}
|
||||
|
||||
//show the error message or show the content
|
||||
if (strlen($msg) > 0) {
|
||||
require_once "resources/header.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo " <table width='40%'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <th align='left'>".$text['label-message']."</th>\n";
|
||||
echo " </tr>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td class='row_style1'><strong>$msg</strong></td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
|
||||
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td align='center'>
|
||||
<b>voicemail: <?php echo $desc ?></b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align='center'>
|
||||
<?php
|
||||
//mark voicemail as read
|
||||
$cmd = "api vm_read " .$id."@".$domain_name." read ".$uuid;
|
||||
$response = trim(event_socket_request($fp, $cmd));
|
||||
if (strcmp($response,"+OK")==0) {
|
||||
$msg = "Complete";
|
||||
}
|
||||
else {
|
||||
$msg = "Failed";
|
||||
}
|
||||
//embed html tag to play the wav file
|
||||
if ($file_ext == "wav") {
|
||||
echo "<embed src=\"voicemail_msgs.php?a=download&type=".$type."&uuid=".$uuid."\" autostart=true width=200 height=40 name=\"sound".$uuid."\" enablejavascript=\"true\">\n";
|
||||
}
|
||||
//object html tag to add flash player that can play the mp3 file
|
||||
if ($file_ext == "mp3") {
|
||||
echo "<object type=\"application/x-shockwave-flash\" width=\"400\" height=\"17\" data=\"slim.swf?autoplay=true&song_title=".urlencode($uuid)."&song_url=".urlencode(PROJECT_PATH."/voicemail_msgs.php?a=download&type=".$type."&uuid=".$uuid)."\">\n";
|
||||
echo "<param name=\"movie\" value=\"slim.swf?autoplay=true&song_url=".urlencode(PROJECT_PATH."/voicemail_msgs.php?a=download&type=".$type."&uuid=".$uuid)."\" />\n";
|
||||
echo "<param name=\"quality\" value=\"high\"/>\n";
|
||||
echo "<param name=\"bgcolor\" value=\"#E6E6E6\"/>\n";
|
||||
echo "</object>\n";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -103,6 +103,7 @@ else {
|
|||
$c = 0;
|
||||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
$row_style["2"] = "row_style2";
|
||||
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\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 .= "<th>".$text['label-message_size']."</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 style='text-align: right;'>".$text['label-message_size']."</th>\n";
|
||||
//$table_header .= th_order_by('message_priority', $text['label-message_priority'], $order_by, $order);
|
||||
$table_header .= "<td align='right' width='21'>\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 "<td valign='top' class='".$row_style[$c]."' $style nowrap=\"nowrap\">";
|
||||
if ($row['message_status'] == '') { $style = "font-weight: bold;"; } else { $style = ''; }
|
||||
echo "<td valign='top' class='".$row_style[$c]."' style=\"".$style."\" nowrap=\"nowrap\">";
|
||||
echo " ".$row['created_date'];
|
||||
echo "</td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['read_epoch']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."' $style>".$row['caller_id_name']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."' $style>".$row['caller_id_number']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."' $style>".$row['message_length_label']." </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."' $style>".$row['message_status']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."' $style>".$row['file_size_label']."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."' $style>\n";
|
||||
//echo " <a href=\"javascript:void(0);\" onclick=\"window.open('voicemail_msgs_play.php?action=download&type=vm&uuid=".$row['voicemail_message_uuid']."&id=".$row['voicemail_id']."&ext=".$row['file_ext']."&desc=".urlencode($row['cid_name']." ".$row['cid_number'])."', 'play',' width=420,height=40,menubar=no,status=no,toolbar=no')\">\n";
|
||||
//echo " ".$text['label-play']."\n";
|
||||
//echo " </a>\n";
|
||||
echo " \n";
|
||||
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']."\">\n";
|
||||
echo " ".$text['label-download']."\n";
|
||||
echo " </a>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."' style=\"".$style."\">".$row['caller_id_name']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."' style=\"".$style."\">".$row['caller_id_number']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style["2"]." tr_link_void'>";
|
||||
$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 "<audio id='recording_audio_".$row['voicemail_message_uuid']."' style='display: none;' preload='none' onended=\"recording_reset('".$row['voicemail_message_uuid']."');\" src=\"voicemail_messages.php?action=download&type=vm&id=".$row['voicemail_id']."&voicemail_uuid=".$row['voicemail_uuid']."&uuid=".$row['voicemail_message_uuid']."\" type='".$recording_type."'></audio>";
|
||||
echo "<span id='recording_button_".$row['voicemail_message_uuid']."' onclick=\"recording_play('".$row['voicemail_message_uuid']."')\" title='".$text['label-play']." / ".$text['label-pause']."'>".$v_link_label_play."</span>";
|
||||
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 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."\">".$row['message_status']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."' style=\"".$style." text-align: right;\">".$row['file_size_label']."</td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['message_priority']." </td>\n";
|
||||
echo " <td class='list_control_icon'>\n";
|
||||
if (permission_exists('voicemail_message_delete')) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue