source: branches/2.2/filemanager/inc/uploadApp.php @ 4915

Revision 4915, 1.5 KB checked in by alexandrecorreia, 13 years ago (diff)

Ticket #2199 - Corrigido bug para criar e mover arquivos dentro do filemanager

RevLine 
[3367]1<?php
[3889]2
3session_id( $_GET['id'] );
[3367]4session_start();
[3889]5setcookie( 'jupload', $_GET['id'], time()+3600 );
[3367]6
7include 'jupload.php';
[3889]8
9function 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
22if ( 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,
[4915]36                                                        'archive'                       => '../tp/juploader/wjhk.jupload.jar',
37                                                        'afterUploadURL'        => 'after_upload.php',
[3894]38                                                        'sendMD5Sum'            => 'true',
[4915]39                                                        'showLogWindow'         => 'false',
40                                                        'debugLevel'            => 0
[3889]41                                                );
42
[3367]43$classParameters = array(
[4915]44                                                        'demo_mode'             => false,
[3894]45                                                        'allow_subdirs' => true,
[4915]46                                                        'destdir'               => '/tmp'  //Where to store the files on the webserver
[3889]47                                                );
[3367]48
49$juploadPhpSupportClass = new JUpload($appletParameters, $classParameters);
50
[3386]51echo '<div align="left"><!--JUPLOAD_FILES--></div>';
52echo '<div align="left"><!--JUPLOAD_APPLET--></div>';
[3367]53
[3889]54?>
Note: See TracBrowser for help on using the repository browser.