getMIOLOInstance($path, $module, false); $MIOLOConsole->loadMIOLO(); ?>
getClass('gnuteca3', 'GnutecaBusiness'); $busFile = $MIOLO->getBusiness('gnuteca3', 'BusFile' ); $targetPath = $busFile->getAbsoluteServerPath(true).'/tmp/'. basename( $_FILES['uploadedfile']['name']); //evita sobreescrita $i = 1; while ( file_exists($targetPath) ) { $targetPath = str_replace('_'.($i-1),'',$targetPath); $explode = explode('.',"$targetPath"); $targetPath = $explode[0].'_'.$i.'.'.$explode[1]; $i++; } $ok = move_uploaded_file( $_FILES['uploadedfile']['tmp_name'], $targetPath); #a função não retorna mais true ou false if ( $ok ) { $ajaxFunction = 'addFile'; $_FILES['uploadedfile']['tmp_name'] = $targetPath; } else { $ajaxFunction = 'addFileError'; $value = '0'; } $value = base64_encode( serialize($_FILES['uploadedfile'])) ; $form = $MIOLO->page->getFormId(); echo " "; } ?>