Changeset 4972 for sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc
- Timestamp:
- 08/22/11 10:00:54 (13 years ago)
- Location:
- sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/after_upload.php
r3610 r4972 21 21 include_once("../../header.inc.php"); 22 22 23 24 function convert_char( $String ) 25 { 26 $String = trim( str_replace( "\'", "", $String) ); 27 $String = str_replace( "'", "", $String ); 28 $String = str_replace( "ç", "c", $String ); 29 $String = str_replace( "Ã", "C", $String ); 30 $String = ereg_replace( "[áà âã]", "a", $String ); 31 $String = ereg_replace( "[ÃÃÃÃ]", "A", $String ); 32 $String = ereg_replace( "[éÚê]", "e", $String ); 33 $String = ereg_replace( "[ÃÃÃ]", "E", $String ); 34 $String = ereg_replace( "[Ãìîï]", "i", $String ); 35 $String = ereg_replace( "[ÃÃÃ]", "I", $String ); 36 $String = ereg_replace( "[óòÎõ]", "o", $String ); 37 $String = ereg_replace( "[ÃÃÃÃ]", "O", $String ); 38 $String = ereg_replace( "[úùû]", "u", $String ); 39 $String = ereg_replace( "[ÃÃÃ]", "U", $String ); 40 41 return $String; 42 } 43 23 44 $bo = CreateObject('filemanager.bofilemanager'); 24 45 25 foreach ($files as $f) { 26 if ($bo->vfs->cp(array( 27 'from'=> $f['fullName'], 28 'to'=> $f['name'], 29 'relatives' => array(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL) 30 ))) 46 foreach ($files as $f) 47 { 48 $newName = convert_char( $f['name'] ); 49 50 $_array = array( 51 'from' => $f['fullName'], 52 'to' => $newName, 53 'relatives' => array(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL) 54 ); 55 56 if ( $bo->vfs->cp($_array) ) 57 { 58 $bo->vfs->set_attributes(array( 59 'string' => $newName, 60 'relatives' => array( RELATIVE_ALL ), 61 'attributes' => array( 'mime_type' => $f['mimetype'] ) 62 )); 63 64 $fullName = $f['fullName']; 65 66 if( file_exists($fullName) ) 31 67 { 32 $bo->vfs->set_attributes(array( 33 'string'=> $f['name'], 34 'relatives' => array(RELATIVE_ALL), 35 'attributes'=> array( 36 'mime_type' => $f['mimetype'] 37 ) 38 )); 39 exec("rm -f ".escapeshellcmd(escapeshellarg($f['fullName']))); 68 exec("rm -f ".escapeshellcmd(escapeshellarg($fullName))); 40 69 } 70 } 41 71 } 42 72 -
sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/class.uifilemanager.inc.php
r4228 r4972 582 582 $return['files'] = $output; 583 583 $return['quota']['quotaSize'] = ($quota * 1024 * 1024); 584 //echo serialize(htmlspecialchars_decode(htmlentities($return))); 584 585 echo serialize($return); 585 586 } … … 609 610 $return[] = $dir['directory'] . $dir['name']; 610 611 sort(&$return, SORT_STRING); 612 611 613 echo serialize($return); 612 614 } … … 752 754 } 753 755 754 function createdir() { 756 function createdir() 757 { 755 758 if ($this->bo->badchar = $this->bo->bad_chars($this->filename, True, True)) { 756 759 echo lang('Error:') . $this->bo->html_encode(lang('Directory names cannot contain "%1"', $badchar), 1); … … 771 774 $fileinfo = $ls_array[0]; 772 775 773 if ($fileinfo['name']) { 776 if ($fileinfo['name']) 777 { 774 778 if ($fileinfo['mime_type'] != 'Directory') { 775 779 echo lang('Error:') . lang('%1 already exists as a file', $fileinfo['name']); … … 777 781 echo lang('Error:') . lang('Directory %1 already exists', $fileinfo['name']); 778 782 } 779 } else { 783 } 784 else 785 { 780 786 $this->bo->vfs->cd(array('string' => $this->path, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); 781 787 782 if ($this->bo->vfs->mkdir(array('string' => $this->filename))) { 783 echo lang('Created directory %1', $this->disppath . '/' . $this->filename); 784 } else { 788 if ($this->bo->vfs->mkdir(array('string' => $this->filename))) 789 { 790 echo "True"; 791 //echo lang('Created directory %1', $this->disppath . '/' . $this->filename); 792 } 793 else 794 { 785 795 echo lang('Error:') . lang('Could not create %1', $this->disppath . '/' . $this->filename); 786 796 } 787 797 } 788 echo lang('Directory created');798 789 799 } 790 800 -
sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/load_lang.php
r3873 r4972 25 25 } 26 26 27 echo "var array_lang = new Array(); \n$script";27 echo "var array_lang = new Array();\n{$script}"; 28 28 29 29 ?> -
sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/upload.php
r3897 r4972 33 33 $path = $_POST['path']; 34 34 $notifUser = $_POST['notifTo']; 35 $show_upload_boxes = count($_FILES['upload_file']['name']);36 $filesUpload 35 $show_upload_boxes = count($_FILES['upload_file']['name']); 36 $filesUpload = $_FILES['upload_file']; 37 37 38 38 function create_summaryImage($file) … … 121 121 { 122 122 $badchar = $bo->bad_chars( $_FILES['upload_file']['name'][$i], True, True ); 123 123 124 124 if( $badchar ) 125 125 { … … 165 165 $bo->vfs->cp($tmp_arr); 166 166 $tmp_arr=array( 167 'string' => $_FILES['upload_file']['name'][$i],168 'relatives' => array(RELATIVE_ALL),167 'string' => $_FILES['upload_file']['name'][$i], 168 'relatives' => array(RELATIVE_ALL), 169 169 'attributes' => array( 170 'owner_id'=> $bo->userinfo['username'],171 172 'size'=> $_FILES['upload_file']['size'][$i],173 'mime_type'=> $_FILES['upload_file']['type'][$i],174 'deleteable'=> 'Y',175 'comment'=> stripslashes($_POST['upload_comment'][$i])170 'owner_id' => $bo->userinfo['username'], 171 'modifiedby_id' => $bo->userinfo['username'], 172 'size' => $_FILES['upload_file']['size'][$i], 173 'mime_type' => $_FILES['upload_file']['type'][$i], 174 'deleteable' => 'Y', 175 'comment' => stripslashes($_POST['upload_comment'][$i]) 176 176 ) 177 177 ); … … 191 191 ))) 192 192 { 193 193 $bo->vfs->set_attributes(array( 194 194 'string' => $_FILES['upload_file']['name'][$i], 195 195 'relatives' => array(RELATIVE_ALL), 196 196 'attributes' => array( 197 198 197 'mime_type' => $_FILES['upload_file']['type'][$i], 198 'comment' => stripslashes($_POST['upload_comment'][$i]) 199 199 ) 200 200 )); … … 218 218 $bo->vfs->set_attributes(array( 219 219 'string' => $_FILES['upload_file']['name'][$i], 220 'relatives' => array(RELATIVE_ALL),220 'relatives' => array(RELATIVE_ALL), 221 221 'attributes' => array( 222 223 222 'mime_type' => $_FILES['upload_file']['type'][$i], 223 'comment' => stripslashes($_POST['upload_comment'][$i]) 224 224 ) 225 225 )); -
sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/uploadApp.php
r3894 r4972 34 34 'maxFileSize' => $maxFileSize, 35 35 'maxChunkSize' => $maxChunkSize, 36 'archive' 37 'afterUploadURL' 36 'archive' => '../tp/juploader/wjhk.jupload.jar', 37 'afterUploadURL' => 'after_upload.php', 38 38 'sendMD5Sum' => 'true', 39 'showLogWindow' => 'false',40 'debugLevel' 39 'showLogWindow' => 'false', 40 'debugLevel' => 0 41 41 ); 42 42 43 43 $classParameters = array( 44 'demo_mode' => false,44 'demo_mode' => false, 45 45 'allow_subdirs' => true, 46 'destdir' 46 'destdir' => '/tmp' //Where to store the files on the webserver 47 47 ); 48 48
Note: See TracChangeset
for help on using the changeset viewer.