Changeset 2368
- Timestamp:
- 12/03/07 22:45:23 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Trunk/SpeechSubmission/VFSpeechSubmission/server/javaUploadServer.php
r2366 r2368 57 57 $newname = $_FILES['userfile']['name']; 58 58 $newname = ereg_replace ( "\.zip" , "" , $newname ); 59 $newname = ereg_replace ( "[^a-zA-Z0-9_-]" , "" , $newname ); 59 60 $newname = substr($newname , 0, 25); 60 $newname = ereg_replace ( "[^a-zA-Z0-9_-]" , "" , $newname );61 61 62 62 $ran = rand () ; … … 112 112 echo "POSTLET:UNKNOWN ERROR\r\n"; 113 113 echo "POSTLET:RETRY\r\n"; 114 print_r($_REQUEST); // Possible usefull for debugging114 // print_r($_REQUEST); // Possibly useful for debugging 115 115 echo "END POSTLET REPLY\r\n"; 116 116 exit; Trunk/SpeechSubmission/VFSpeechSubmission/server/localSubmitSpeech.php
r2366 r2368 6 6 7 7 <body> 8 9 //!!!!!! only required for local testing */10 8 <?php 11 9 setcookie("user", "VoxForge", time()+3600); … … 16 14 17 15 ?> 18 //!!!!!! only required for local testing 16 <?php 17 require_once('localSubmitSpeechServer.php'); 19 18 20 <?php 21 require_once('LocalSubmitSpeechServer.php'); 22 23 echo speex_postlet_applet( 24 'http://localhost:90/httpd/javaUploadServer.php', 25 'http://localhost:90/httpd/endpage.html', 26 'http://localhost:90/httpd/' 27 ); 19 echo speex_postlet_applet(); 28 20 29 21 ?> Trunk/SpeechSubmission/VFSpeechSubmission/server/localSubmitSpeechServer.php
r2366 r2368 11 11 12 12 13 function speex_postlet_applet($ destination, $endpage, $codebase, $filefieldname='userfile'){13 function speex_postlet_applet($filefieldname='userfile'){ 14 14 global $CFG; 15 // $language = NL; 16 // $height = "950"; 17 $language = EN; 18 $height = "875"; 19 15 20 $cookie = htmlspecialchars($_SERVER['HTTP_COOKIE']); 16 21 $code = <<<ENDHTMLFRAGMENT 17 <applet name="VoxForge.org Speech Submission Application" width ="825" height = "950"mayscript="mayscript"22 <applet name="VoxForge.org Speech Submission Application" width ="825" height =$height mayscript="mayscript" 18 23 code="speechrecorder/RecorderApplet.class" style="border: 1px solid rgb(153,153,153);"> 19 <param name="codebase" value=" $codebase"/>24 <param name="codebase" value="http://localhost:90/httpd/"/> 20 25 <param name="archive" value="speechrecorder.jar"/> 21 26 <param name="type" value="application/x-java-applet;version=1.4"/> 22 27 <param name="scriptable" value="true"/> 23 <param name="destination" value=" $destination"/>24 <param name="endpage" value=" $endpage"/>28 <param name="destination" value="http://localhost:90/httpd/javaUploadServer.php"/> 29 <param name="endpage" value="http://localhost:90/httpd/endpage.html"/> 25 30 <param name="cookie" value="$cookie"/> 26 <param name="language" value= "NL"/>31 <param name="language" value=$language/> 27 32 <table style="background-color: rgb(255, 195, 1);" border="1" height="24" width="550"><tbody><tr><td> The VoxForge Speech Submission Applet should appear here. Please see the VoxForge <a href="http://www.voxforge.org/home/read2/java" color="ffffff">Java Troubleshooting Guide</a> to determine if you have Java installed on your PC - this is required in order to use the audio recorder.<br></td></tr></tbody></table> 28 33