Changeset 4898
- Timestamp:
- 08/18/07 21:53:32 (1 year ago)
- Files:
-
- modules/branches/2.3/recordings/audio.php (modified) (2 diffs)
- modules/branches/2.3/recordings/module.xml (modified) (2 diffs)
- modules/branches/2.3/recordings/page.recordings.php (modified) (2 diffs)
- modules/branches/2.3/recordings/popup.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.3/recordings/audio.php
r4767 r4898 6 6 */ 7 7 8 9 10 8 if (isset($_GET['recording'])) { 11 9 12 chdir("..");13 10 include_once("crypt.php"); 14 11 15 //$REC_CRYPT_PASSWORD="moufdsuu3nma0"; 16 $REC_CRYPT_PASSWORD = (isset($amp_conf['AMPPLAYKEY']) && trim($amp_conf['AMPPLAYKEY']) != "")?trim($amp_conf['AMPPLAYKEY]']):'moufdsuu3nma0'; 17 18 12 $REC_CRYPT_PASSWORD = (isset($_REQUEST['cryptpass']) && trim($_REQUEST['cryptpass']) != "")?trim($_REQUEST['cryptpass']):'moufdsuu3nma0'; 19 13 20 14 $crypt = new Crypt(); 21 15 22 16 $opath = $_GET['recording']; 23 $path = $crypt->decrypt($opath, $REC_CRYPT_PASSWORD);17 $path = $crypt->decrypt($opath,urldecode($REC_CRYPT_PASSWORD)); 24 18 $path=$opath; 25 19 … … 33 27 elseif (is_file("$path.mp3")) { $path=$path.mp3; } 34 28 elseif (is_file("$path.gsm")) { $path="$path.gsm"; } 35 elseif (!is_file($path)) { die _freepbx("<b>404 File not found!: $opath </b>"); }29 elseif (!is_file($path)) { die("<b>404 File not found!: $opath </b>"); } 36 30 37 31 // Gather relevent info about file modules/branches/2.3/recordings/module.xml
r4833 r4898 2 2 <rawname>recordings</rawname> 3 3 <name>Recordings</name> 4 <version>3.3.5. 1</version>4 <version>3.3.5.2</version> 5 5 <candisable>no</candisable> 6 6 <canuninstall>no</canuninstall> … … 9 9 <description>Creates and manages system recordings, used by many other modules (eg, IVR).</description> 10 10 <changelog> 11 *3.3.5.2* #2016 allow amportal.conf AMPLAYKEY override hardcoded crypt key 11 12 *3.3.5.1* bump for rc1 12 13 *3.3.5* #2092 can't cannot save/read file fix some errors, better messages modules/branches/2.3/recordings/page.recordings.php
r4574 r4898 382 382 383 383 function recordings_display_sndfile($item, $count, $max, $astpath) { 384 global $amp_conf; 384 385 // Note that when using this, it needs a <table> definition around it. 385 386 $astsnd = isset($asterisk_conf['astvarlibdir'])?$asterisk_conf['astvarlibdir']:'/var/lib/asterisk'; … … 394 395 395 396 echo "<td>"; 396 $audio=$astpath.$item;397 397 $audio=$astpath; 398 $recurl="modules/recordings/popup.php?recording=".$audio; 398 399 $REC_CRYPT_PASSWORD = urlencode((isset($amp_conf['AMPPLAYKEY']) && trim($amp_conf['AMPPLAYKEY']) != "")?trim($amp_conf['AMPPLAYKEY']):'moufdsuu3nma0'); 400 $recurl="modules/recordings/popup.php?cryptpass=$REC_CRYPT_PASSWORD&recording=$audio"; 401 399 402 echo "<a href='#' type='submit' onClick=\"javascript:popUp('$recurl',document.prompt.sysrec$count); return false;\" input='foo' >"; 400 403 echo "<img border='0' width='20' height='20' src='images/play.png' title='Click here to play this recording' />"; modules/branches/2.3/recordings/popup.php
r4213 r4898 6 6 */ 7 7 8 chdir("..");9 8 include_once("crypt.php"); 10 9 … … 22 21 <?php 23 22 24 25 global $amp_conf; 26 27 28 //$REC_CRYPT_PASSWORD="moufdsuu3nma0"; 29 $REC_CRYPT_PASSWORD= (isset($amp_conf['AMPPLAYKEY']) && trim($amp_conf['AMPPLAYKEY']) != "")?trim($amp_conf['AMPPLAYKEY]']):'moufdsuu3nma0'; 30 23 $REC_CRYPT_PASSWORD = urlencode((isset($_REQUEST['cryptpass']) && trim($_REQUEST['cryptpass']) != "")?trim($_REQUEST['cryptpass']):'moufdsuu3nma0'); 31 24 32 25 $crypt = new Crypt(); 33 26 34 $file = $crypt->encrypt($_ GET['recording'],$REC_CRYPT_PASSWORD);35 $ufile = $_ GET['recording'];36 $file = $_ GET['recording'];27 $file = $crypt->encrypt($_REQUEST['recording'],$REC_CRYPT_PASSWORD); 28 $ufile = $_REQUEST['recording']; 29 $file = $_REQUEST['recording']; 37 30 38 //echo("<text>$file</text>");39 31 if (isset($file)) { 40 32 echo("<br>"); 41 echo("<embed src='audio.php? recording=" . $file . "' width=300, height=20 autoplay=true loop=false></embed><br>");42 echo("<br><a class='popup_download' href= /admin/modules/recordings/audio.php?recording=" . $ufile . ">" . _("download: $ufile") . "</a><br>");33 echo("<embed src='audio.php?cryptpass=$REC_CRYPT_PASSWORD&recording=$file' width=300, height=20 autoplay=true loop=false></embed><br>"); 34 echo("<br><a class='popup_download' href=".dirname(__FILE__)."/audio.php?cryptpass=$REC_CRYPT_PASSWORD&recording=$ufile>" . _("download: $ufile") . "</a><br>"); 43 35 } 44 45 36 ?> 46 47 37 </body> 48 38 </html>
