|
|
|
@ -188,8 +188,7 @@ $(document).ready(function(){ |
|
|
|
|
<?php |
|
|
|
|
if (Security::remove_XSS($_POST['text2voice_mode'])=='google') { |
|
|
|
|
downloadMP3_google($filepath, $dir); |
|
|
|
|
} |
|
|
|
|
elseif(Security::remove_XSS($_POST['text2voice_mode'])=='pediaphon'){ |
|
|
|
|
} elseif (Security::remove_XSS($_POST['text2voice_mode']) == 'pediaphon') { |
|
|
|
|
downloadMP3_pediaphon($filepath, $dir); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -311,13 +310,10 @@ $(document).ready(function(){ |
|
|
|
|
$result_select = Database::query($sql_select); |
|
|
|
|
echo '<select name="lang" id="select">'; |
|
|
|
|
while ($row = Database::fetch_array($result_select)) { |
|
|
|
|
|
|
|
|
|
if (in_array($row['isocode'], array('ca', 'en', 'es', 'hi', 'it', 'pt'))) { |
|
|
|
|
|
|
|
|
|
if (api_get_setting('platformLanguage')==$row['english_name']){ |
|
|
|
|
echo '<option value="'.$row['isocode'].'" selected="selected">'.$row['original_name'].' ('.$row['english_name'].')</option>'; |
|
|
|
|
} |
|
|
|
|
else{ |
|
|
|
|
} else { |
|
|
|
|
echo '<option value="'.$row['isocode'].'">'.$row['original_name'].' ('.$row['english_name'].')</option>'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -356,7 +352,8 @@ Display :: display_footer(); |
|
|
|
|
* @author Juan Carlos Raña Trabado <herodoto@telefonica.net> |
|
|
|
|
* @version january 2011, chamilo 1.8.8 |
|
|
|
|
*/ |
|
|
|
|
function downloadMP3_google($filepath, $dir) { |
|
|
|
|
function downloadMP3_google($filepath, $dir) |
|
|
|
|
{ |
|
|
|
|
$location='create_audio.php?'.api_get_cidreq().'&id='.Security::remove_XSS($_POST['document_id']).'&dt2a=google'; |
|
|
|
|
|
|
|
|
|
//security |
|
|
|
@ -469,9 +466,6 @@ function downloadMP3_pediaphon($filepath, $dir){ |
|
|
|
|
|
|
|
|
|
$documentPath = $filepath.'/'.$audio_filename; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//prev for a fine unicode, borrowed from main api TODO:clean |
|
|
|
|
// Safe replacements for some non-letter characters (whitout blank spaces) |
|
|
|
|
$search = array("\0", "\t", "\n", "\r", "\x0B", '/', "\\", '"', "'", '?', '*', '>', '<', '|', ':', '$', '(', ')', '^', '[', ']', '#', '+', '&', '%'); |
|
|
|
@ -488,12 +482,10 @@ function downloadMP3_pediaphon($filepath, $dir){ |
|
|
|
|
|
|
|
|
|
//adding the file |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($clean_lang=='de') { |
|
|
|
|
$url_pediaphon='http://www.pediaphon.org/~bischoff/radiopedia/sprich_multivoice.cgi'; |
|
|
|
|
$find_t2v = '/http\:\/\/www\.pediaphon\.org\/\~bischoff\/radiopedia\/mp3\/(.*)\.mp3\"/'; |
|
|
|
|
} |
|
|
|
|
else{ |
|
|
|
|
} else { |
|
|
|
|
$url_pediaphon='http://www.pediaphon.org/~bischoff/radiopedia/sprich_multivoice_'.$clean_lang.'.cgi';//en, es, fr |
|
|
|
|
$find_t2v = '/http\:\/\/www\.pediaphon\.org\/\~bischoff\/radiopedia\/mp3\/'.$clean_lang.'\/(.*)\.mp3\"/'; |
|
|
|
|
} |
|
|
|
|