#CACHE{0} [(#HTTP_HEADER{Content-type: text/html[; charset=(#CHARSET)]})] <?php echo _T('ckeditor:explorateur_titre'); ?> _T('ckeditor:erreur_transmission'), 2=>_T('ckeditor:type_fichier_interdit'), 3=>_T('ckeditor:erreur_droits') ) ; $message = strip_tags(_T('ckeditor:copie_impossible', array('fichier'=> $name_file, 'errmsg'=>$errmsg[$erreur]))) ; } else { $url = _FILEBROWSER_FILES_BASE_URL.$request_dir.$name_file ; } } else { $message = strip_tags(_T('ckeditor:acces_interdit')) ; } echo ""; } else { if (_request('upload') == 'form') { if ($peut_telecharger) { print('
'."\n") ; print('

'._T('ckeditor:telecharger_document').'

'."\n") ; print(_T('ckeditor:liste_telechargements_autorises', array('liste' => $extauth))) ; print(_T('ckeditor:taille_maximale_telechargements', array('taille' => _FILEBROWSER_UPLOAD_MAXSIZE))) ; print('
'."\n") ; print(''."\n") ; print('
'."\n"); print(''."\n") ; print(''."\n") ; print('
'."\n"); print('
'."\n") ; } else { print("

"._T('ckeditor:acces_interdit')."

") ; } } elseif (_request('upload') == 'post') { if ($peut_telecharger) { $tmp_file = $_FILES['fichier']['tmp_name']; $erreur = -1 ; if( is_uploaded_file($tmp_file) ) { $name_file = $_FILES['fichier']['name']; if (preg_match(_FILEBROWSER_FILETYPE_REGEX, $name_file)) { if (move_uploaded_file($tmp_file, $dir_name .'/'. $name_file)) { $erreur = false ; } else { $erreur = 3 ; } } else { $erreur = 2 ; } } else { $erreur = 1 ; } print('
'."\n") ; print('

'._T('ckeditor:telecharger_document').'

'."\n") ; if ($erreur) { @unlink($tmp_file) ; $errmsg = array( 1=>_T('ckeditor:erreur_transmission'), 2=>_T('ckeditor:type_fichier_interdit'), 3=>_T('ckeditor:erreur_droits') ) ; print(_T('ckeditor:copie_impossible', array('fichier'=> $name_file, 'errmsg'=>$errmsg[$erreur]))) ; } else { print('

'._T('ckeditor:copie_reussie', array('fichier'=> $name_file)).'

') ; $txt = _T('ckeditor:utiliser_fichier', array('fichier'=> $name_file)) ; print('

'); } } else { print("

"._T('ckeditor:acces_interdit')."

") ; } } else { if ($peut_mkdir && ($mkdir = _request('mkdir'))) { @mkdir($dir_name.'/'.$mkdir) ; } $h_dir = @opendir($dir_name) ; $dirs = array() ; $files = array() ; if ($h_dir) { while ($filename = @readdir($h_dir)) { if (_FILEBROWSER_HIDE_DOT_FILES && (strpos($filename, '.') === 0)) { continue ; } if (filetype($dir_name . '/' . $filename) == 'dir') { if ( ($filename != '.') && ($filename != '..') ) { $dirs[] = array($filename,$request_dir.($request_dir?'/':'').$filename, _T('ckeditor:acceder_repertoire', array('repertoire'=>$filename))) ; } } else { $files[]= $filename ; } } print('
'."\n") ; natsort($dirs) ; if ($request_dir && ($request_dir != '.')) { array_unshift($dirs, array('↑', dirname($request_dir), _T('ckeditor:repertoire_parent'), ' updir')) ; } $img = "" ; foreach($dirs as $dir) { print(''."\n") ; } if ($peut_mkdir) { print(''); } print('
'."\n") ; natsort($files) ; if ($request_dir == '.') { $request_dir = '' ; } if ($request_dir) { $request_dir .= '/' ; } $GLOBALS['meta']['formats_graphiques'] = $GLOBALS['meta']['gd_formats'] ; include_spip('inc/filtres_images_mini') ; foreach($files as $file) { if (preg_match(_FILEBROWSER_FILETYPE_REGEX, $file)) { $fileinfo = pathinfo($file) ; if (preg_match(_FILEBROWSER_IMG_EXT_REGEX, $fileinfo['extension'], $match)) { $img = image_reduire("$file",50,50) ; } else if ($img = find_in_path('vignettes/'.$fileinfo['extension'].'.png')) { $img = "$file" ; } else { $img = "$file" ; } print(''."\n") ; } } $peut_telecharger && print(''."\n") ; print('
'."\n") ; } } } } else { print("

"._T('ckeditor:acces_interdit')."

") ; } ?>