root/modules/branches/2.7/recordings/popup.php

Revision 6479, 1.8 kB (checked in by p_lindheimer, 5 years ago)

fixes #3108 remove refernce to popup.css, style has been moved inline to the html page

Line 
1 <?php
2
3 /**
4  * @file
5  * popup window for playing recording
6  */
7
8 include_once("crypt.php");
9
10 ?>
11
12 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
13 <html xmlns="http://www.w3.org/1999/xhtml">
14     <head>
15         <TITLE>FreePBX Recording Review</TITLE>
16             <style type="text/css">
17                 .popup_download {
18                     color: #105D90;
19                     margin: 5px;
20                     font-size: 12px;
21                     text-align: left;
22                 }
23             </style>
24         <meta http-equiv="content-type" content="text/html; charset=UTF-8">
25     </head>
26     <body>
27
28 <?php
29
30
31   $crypt = new Crypt();
32
33     $REC_CRYPT_PASSWORD = (isset($amp_conf['AMPPLAYKEY']) && trim($amp_conf['AMPPLAYKEY']) != "")?trim($amp_conf['AMPPLAYKEY']):'moufdsuu3nma0';
34
35   $path = $crypt->decrypt($_REQUEST['recordingpath'],$REC_CRYPT_PASSWORD).$_REQUEST['recording'];
36
37   // strip ".." from path for security
38   $path = preg_replace('/\.\./','',$path);
39     $ufile = basename($path);
40  
41   // See if the file exists, otherwise check for extensions
42   if (is_file("$path.wav")) { $path="$path.wav"; }
43   elseif (is_file("$path.Wav")) { $path="$path.Wav"; }
44   elseif (is_file("$path.WAV")) { $path="$path.WAV"; }
45   elseif (is_file("$path.mp3")) { $path="$path.mp3"; }
46   elseif (is_file("$path.gsm")) { $path="$path.gsm"; }
47   else {
48         echo("<br /><h1 class='popup_download'>".sprintf(_("No compatible wav, mp3 or gsm format found to play:<br /><br />%s"),$ufile)."</h1><br>");
49         exit;
50     }
51
52   $file = urlencode($crypt->encrypt($path,$REC_CRYPT_PASSWORD));
53
54   if (isset($file)) {
55     echo("<br>");
56     echo("<embed src='".$_SERVER['PHP_SELF']."?display=recordings&action=audio&recording=$file' width=300, height=20 autoplay=true loop=false></embed><br>");
57     echo("<br><h1 class='popup_download'>playing: $ufile</h1><br>");
58   }
59 ?>
60   </body>
61 </html>
62
63
Note: See TracBrowser for help on using the browser.