From 9917ec285689b2088a8143af0e21a303d736b828 Mon Sep 17 00:00:00 2001 From: mcrane Date: Sun, 19 Apr 2009 02:04:35 -0600 Subject: FreeSWITCH remove trailing white spaces. --- config/freeswitch/freeswitch_recordings.tmp | 128 ++++++++++++++-------------- 1 file changed, 64 insertions(+), 64 deletions(-) (limited to 'config/freeswitch/freeswitch_recordings.tmp') diff --git a/config/freeswitch/freeswitch_recordings.tmp b/config/freeswitch/freeswitch_recordings.tmp index 6683bd15..62d81ae2 100644 --- a/config/freeswitch/freeswitch_recordings.tmp +++ b/config/freeswitch/freeswitch_recordings.tmp @@ -4,7 +4,7 @@ freeswitch_recordings.php Copyright (C) 2008 Mark J Crane All rights reserved. - + FreeSWITCH (TM) http://www.freeswitch.org/ @@ -49,7 +49,7 @@ if ($_GET['a'] == "download") { header("Content-Type: application/octet-stream"); header("Content-Type: application/download"); header("Content-Description: File Transfer"); - header('Content-Disposition: attachment; filename="'.$_GET['filename'].'"'); + header('Content-Disposition: attachment; filename="'.$_GET['filename'].'"'); } else { $file_ext = substr($_GET['filename'], -3); @@ -58,7 +58,7 @@ if ($_GET['a'] == "download") { } if ($file_ext == "mp3") { header("Content-Type: audio/mp3"); - } + } } header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past @@ -66,7 +66,7 @@ if ($_GET['a'] == "download") { fpassthru($fd); } } - + if ($_GET['type'] = "moh") { if (file_exists($dir_music_on_hold_8000.$_GET['filename'])) { $fd = fopen($dir_music_on_hold_8000.$_GET['filename'], "rb"); @@ -75,7 +75,7 @@ if ($_GET['a'] == "download") { header("Content-Type: application/octet-stream"); header("Content-Type: application/download"); header("Content-Description: File Transfer"); - header('Content-Disposition: attachment; filename="'.$_GET['filename'].'"'); + header('Content-Disposition: attachment; filename="'.$_GET['filename'].'"'); } else { $file_ext = substr($_GET['filename'], -3); @@ -84,7 +84,7 @@ if ($_GET['a'] == "download") { } if ($file_ext == "mp3") { header("Content-Type: audio/mp3"); - } + } } header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past @@ -180,29 +180,29 @@ function EvalSound(soundobj) { - 0) { foreach ($a_recordings as $recordingent) { $config_recording_list .= $recordingent['filename']."|"; - $i++; + $i++; } } - + $config_change = 0; if (is_dir($dir_recordings)) { if ($dh = opendir($dir_recordings)) { while (($file = readdir($dh)) !== false) { - if (filetype($dir_recordings . $file) == "file") { - + if (filetype($dir_recordings . $file) == "file") { + if (strpos($config_recording_list, $file) === false) { - + //$handle = fopen($dir_recordings.$file,'rb'); //$file_content = fread($handle,filesize($dir_recordings.$file)); //fclose($handle); @@ -215,83 +215,83 @@ if (is_dir($dir_recordings)) { $recordingent['recordingid'] = guid(); //$recordingent['filecontent'] = base64_encode($file_content); $recordingent['descr'] = 'Auto'; - + $a_recordings[] = $recordingent; write_config(); - + unset($file_content); - + } else { //echo "The file was found.
"; } - + } } closedir($dh); } } - -//saved for future use if and when config.xml scales well + +//saved for future use if and when config.xml scales well //enough to save the files inside it //$i = 0; -//if (count($a_recordings) > 0) { +//if (count($a_recordings) > 0) { // foreach ($a_recordings as $recordingent) { // if (!is_file($dir_recordings.$recordingent['filename'])) { //echo "not found: ".$recordingent['filename']."
"; - + //recording not found restore the file from the config.xml - //$file_content = $recordingent['filecontent']; + //$file_content = $recordingent['filecontent']; //$handle = fopen($dir_recordings.$recordingent['filename'],'w'); - //fwrite ($handle, base64_decode($file_content)); + //fwrite ($handle, base64_decode($file_content)); //unset($file_content); //fclose($handle); - //$recordingent['filecontent'] = base64_encode($file_content); - - // loop through recordings in the config.xml + //$recordingent['filecontent'] = base64_encode($file_content); + + // loop through recordings in the config.xml // if the file does not exist remove it from the file system. //unset($a_recordings[$i]); - -// $config_change = 1; + +// $config_change = 1; // } // else { - //echo "found: ".$recordingent['filename']."
"; + //echo "found: ".$recordingent['filename']."
"; // } -// $i++; +// $i++; // } //} if ($config_change == 1) { write_config(); - $config_change = 0; + $config_change = 0; } -//if ($savemsg) print_info_box($savemsg); +//if ($savemsg) print_info_box($savemsg); //if (file_exists($d_hostsdirty_path)): echo"

"; //print_info_box_np("The FreeSWITCH recordings have been changed.
You must apply the changes in order for them to take effect."); //echo"
"; -//endif; +//endif; ?> - +

Recordings:
To make a recording dial extension 732673 (record) or you can make a - 16bit 8khz/16khz Mono WAV file then copy it to the - following directory then refresh the page to play it back. - Click on the 'Filename' to download it or the 'Recording Name' to + 16bit 8khz/16khz Mono WAV file then copy it to the + following directory then refresh the page to play it back. + Click on the 'Filename' to download it or the 'Recording Name' to play the audio.

- +
- +

@@ -305,11 +305,11 @@ if ($config_change == 1) { - +
- + @@ -327,9 +327,9 @@ if ($config_change == 1) { - 0) { + if (count($a_recordings) > 0) { foreach ($a_recordings as $recordingent) { ?> @@ -341,7 +341,7 @@ if ($config_change == 1) {
Filename (download)
  - +   @@ -355,12 +355,12 @@ if ($config_change == 1) {
- - +

- +
- +
@@ -414,8 +414,8 @@ if ($config_change == 1) { - + +
-
@@ -434,7 +434,7 @@ if ($config_change == 1) { if ($handle = opendir($dir_music_on_hold_8000)) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != ".." && is_file($dir_music_on_hold_8000.$file)) { - + $tmp_filesize = filesize($dir_music_on_hold_8000.$file); $tmp_filesize = byte_convert($tmp_filesize); @@ -442,18 +442,18 @@ if ($config_change == 1) { echo " \n"; echo " \n"; echo " $file"; - echo " "; + echo " "; echo " \n"; echo " \n"; echo " \n"; $tmp_file_array = split("\.",$file); echo " ".$tmp_file_array[0]; - echo " "; - echo " \n"; + echo " "; + echo " \n"; echo " \n"; echo date ("F d Y H:i:s", filemtime($dir_music_on_hold_8000.$file)); echo " \n"; - echo " \n"; + echo " \n"; echo " ".$tmp_filesize; echo " \n"; echo " \n"; @@ -465,7 +465,7 @@ if ($config_change == 1) { echo " \n"; echo " \n"; echo "\n"; - + } } closedir($handle); -- cgit v1.2.3