Changeset 3881
- Timestamp:
- 03/21/11 14:17:53 (12 years ago)
- Location:
- branches/2.2/filemanager
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/filemanager/inc/upload.php
r3879 r3881 23 23 $show_upload_boxes = count($_FILES['upload_file']['name']); 24 24 $filesUpload = $_FILES['upload_file']; 25 26 27 error_log( print_r($_FILES['upload_file'], true), 3, "/tmp/log" );28 25 29 26 function create_summaryImage($file) … … 102 99 elseif( $_FILES['upload_file']['size'][$i] > 0 ) 103 100 { 104 if( $badchar = $bo->bad_chars($_FILES['upload_file']['name'][$i], True, True )) 101 $badchar = $bo->bad_chars( $_FILES['upload_file']['name'][$i], True, True ); 102 103 if( $badchar ) 105 104 { 106 105 $return[] = array( … … 219 218 } 220 219 } 220 221 error_log(print_r($return, true), 3, "/tmp/log"); 221 222 } 222 223 -
branches/2.2/filemanager/js/handler.js
r3880 r3881 232 232 function upload(data) 233 233 { 234 var response = unserialize(data); 235 236 if ( response[0] == "Ok" ) 237 { 238 write_msg(get_lang('All files created sucessfuly')); 239 _winBuild( "dwindownewUpload" , "remove" ); 240 } 241 else 234 var _inputs = document.getElementsByTagName('input'); 235 var response = unserialize(data); 236 237 if ( response[0] != "Ok" ) 242 238 { 243 var _inputs = document.getElementsByTagName('input');244 var removeInputs = null;245 246 239 for( var i = 0; i < response.length; i++ ) 247 240 { 248 241 for( var j = 0 ; j < _inputs.length ; j++ ) 249 242 { 250 if( _inputs[j].getAttribute('type') == 'file')243 if( _inputs[j].getAttribute('type') == "file") 251 244 { 252 if( _inputs[j].value.indexOf( response[i]['file'] ) > -1 ) 253 { 245 var _indexOf = response[i]['file'].toUpperCase().indexOf(_inputs[j].value.toUpperCase() ); 246 247 if( response[i]['file'].toUpperCase() === _inputs[j].value.toUpperCase() && _indexOf > -1 ) 248 { 249 _inputs[j].setAttribute("erroUpload", "true"); 250 254 251 var _parent = _inputs[j].parentNode; 255 252 var _div = _parent.firstChild; … … 267 264 + borkb( response[i]['size'] ) + " - Permitido " + borkb( response[i]['size_max'] ); 268 265 } 269 else 266 else if( response[i]['badchar'] ) 270 267 { 271 268 _div.innerHTML = "<span style='font-weight:bold' >Erro </span>:: " + response[i]['badchar']; 272 269 } 273 else 270 else if( response[i]['directory'] ) 274 271 { 275 272 _div.innerHTML = "<span style='font-weight:bold' >Erro </span>:: " + response[i]['directory']; 276 273 } 277 else 274 else if( response[i]['sendFile'] ) 278 275 { 279 276 _div.innerHTML = "<span style='font-weight:bold' >Erro </span>:: " + response[i]['sendFile']; 280 277 } 281 else 278 else if( response[i]['undefined'] ) 282 279 { 283 280 _div.innerHTML = "<span style='font-weight:bold' >Erro </span>:: " + response[i]['undefined']; 284 281 } 285 282 } 286 else287 removeInputs = _inputs[j];288 283 } 289 284 } 290 291 if( removeInputs != null ) 292 { 293 removeInputs.parentNode.parentNode.removeChild( removeInputs.parentNode ); 294 removeInputs = null; 285 } 286 287 for( var j = 0 ; j < _inputs.length ; j++ ) 288 { 289 if ( !_inputs[j].getAttribute("erroUpload") && _inputs[j].getAttribute('type') == "file" ) 290 { 291 _inputs[j].parentNode.parentNode.removeChild( _inputs[j].parentNode ); 295 292 } 296 } 293 } 294 } 295 else 296 { 297 write_msg(get_lang('All files created sucessfuly')); 298 _winBuild( "dwindownewUpload" , "remove" ); 297 299 } 298 300 -
branches/2.2/filemanager/tp/expressowindow/xsl/upload.xsl
r3879 r3881 41 41 <div></div> 42 42 <input maxlength="255" name="upload_file[]" type="file" style="margin-right:5px" /> 43 <input name="upload_comment[]" type="text" />44 <input type="hidden" name="uploadprocess" value="true" />45 <input type="hidden" name="path" value="{$path}" />43 <input name="upload_comment[]" type="text" /> 44 <input type="hidden" name="uploadprocess" value="true" /> 45 <input type="hidden" name="path" value="{$path}" /> 46 46 </div> 47 47
Note: See TracChangeset
for help on using the changeset viewer.