15 include(
"configuration.inc.php");
17 if (
vb(
$GLOBALS[
'site_parameters'][
'used_uploader']) !=
'fineuploader') {
22 require(
$GLOBALS[
'dirroot'].
'/lib/class/FineUploader.php');
29 $uploader->allowedExtensions =
$GLOBALS[
'site_parameters'][
'extensions_valides_'.$file_kind];
41 $save_path =
'/'.$GLOBALS[
'site_parameters'][
'cache_folder'];
46 if (empty($new_file_name_without_extension)) {
53 if(empty($new_file_name_without_extension)) {
61 @ignore_user_abort(
true);
68 if (!empty(
$GLOBALS[
'site_parameters'][
'extensions_valides_image']) && in_array(
$extension,
$GLOBALS[
'site_parameters'][
'extensions_valides_image'])) {
70 $the_new_jpg_name = $new_file_name_without_extension .
'.jpg';
74 if (!empty($image_resize_result)) {
76 $result[
'uploadName'] = basename($image_resize_result);
80 $tpl =
$GLOBALS[
'tplEngine']->createTemplate(
'uploaded_file.tpl');
82 $tpl->assign(
'f', $file_infos);
84 $tpl->assign(
'STR_BEFORE_TWO_POINTS',
$GLOBALS[
'STR_BEFORE_TWO_POINTS']);
88 header(
"Content-Type: text/plain");
static strtolower($string)
Returns string with all alphabetic characters converted to lowercase.
if(!empty($_GET['id'])) if(isset($_POST['form_name'], $_POST['form_subject'], $_POST['form_text'], $_POST['form_lang'])&&empty($_GET['id'])) if(empty($_GET['id'])) $tpl
if(empty($new_file_name_without_extension)) $the_new_file_name
format_filename_base($original_name, $rename_file=true)
A partir d'un nom de fichier, on génère un nouveau nom unique pour éviter d'utiliser un nom déjà exis...
get_uploaded_file_infos($field_name, $file, $delete_url, $logo_width=100, $logo_height=100)
Remplit un tableau d'informations pour le template d'upload HTML.
if(!defined('IN_PEEL')) image_resize($origin_filename_with_path, $new_filename_with_path, $destinationW=null, $destinationH=null, $resize_even_if_smaller=false, $allow_keep_origin_file_if_resize_not_needed=true, $filesize_limit_keep_origin_file=102400, $jpeg_quality=85, $gammacorrect=1.0)
On redimensionne l'image pour qu'elle ne dépasse pas la taille de destination Le ratio largeur / haut...
$GLOBALS['page_columns_count']