[3367] | 1 | <?php |
---|
[3889] | 2 | |
---|
| 3 | session_id( $_GET['id'] ); |
---|
[3367] | 4 | session_start(); |
---|
[3889] | 5 | setcookie( 'jupload', $_GET['id'], time()+3600 ); |
---|
[3367] | 6 | |
---|
| 7 | include 'jupload.php'; |
---|
[3889] | 8 | |
---|
| 9 | function handle_uploaded_files($juploadPhpSupportClass, $files) |
---|
| 10 | { |
---|
[3367] | 11 | return |
---|
| 12 | "<P>We are in the 'handle_uploaded_files' callback function, in the index.php script. To avoid double coding, we " |
---|
| 13 | . "just call the default behavior of the JUpload PHP class. Just replace this by your code...</P>" |
---|
| 14 | . $juploadPhpSupportClass->defaultAfterUploadManagement(); |
---|
| 15 | ; |
---|
| 16 | |
---|
| 17 | } |
---|
[3889] | 18 | |
---|
| 19 | // Set Max File Size |
---|
| 20 | $maxFileSize = "10M"; |
---|
| 21 | |
---|
| 22 | if ( file_exists('setFileMaxSize.php') ) |
---|
| 23 | { |
---|
| 24 | require_once('setFileMaxSize.php'); |
---|
| 25 | $maxFileSize = unserialize(base64_decode($SET_FILE_MAX_SIZE)); |
---|
| 26 | $maxFileSize = trim($maxFileSize)."M"; |
---|
| 27 | } |
---|
| 28 | |
---|
[3894] | 29 | // Set Max Chunk Size |
---|
| 30 | $maxChunkSize = ini_get('upload_max_filesize'); |
---|
| 31 | $maxChunkSize = ( $maxChunkSize*1024 )*1024; |
---|
| 32 | |
---|
[3367] | 33 | $appletParameters = array( |
---|
[3894] | 34 | 'maxFileSize' => $maxFileSize, |
---|
| 35 | 'maxChunkSize' => $maxChunkSize, |
---|
[5327] | 36 | 'archive' => '../tp/juploader/wjhk.jupload.jar', |
---|
| 37 | 'afterUploadURL' => 'after_upload.php', |
---|
[3894] | 38 | 'sendMD5Sum' => 'true', |
---|
[5327] | 39 | 'showLogWindow' => 'false', |
---|
| 40 | 'debugLevel' => 0 |
---|
[3889] | 41 | ); |
---|
| 42 | |
---|
[3367] | 43 | $classParameters = array( |
---|
[5327] | 44 | 'demo_mode' => false, |
---|
[3894] | 45 | 'allow_subdirs' => true, |
---|
[5327] | 46 | 'destdir' => '/tmp' //Where to store the files on the webserver |
---|
[3889] | 47 | ); |
---|
[3367] | 48 | |
---|
| 49 | $juploadPhpSupportClass = new JUpload($appletParameters, $classParameters); |
---|
| 50 | |
---|
[3386] | 51 | echo '<div align="left"><!--JUPLOAD_FILES--></div>'; |
---|
| 52 | echo '<div align="left"><!--JUPLOAD_APPLET--></div>'; |
---|
[3367] | 53 | |
---|
[3889] | 54 | ?> |
---|