set_max_file_size(5120000); $upload->set_max_image_size(2048, 1536); //in pixels $upload->set_accepted_mime_types($accepted_mime_types); //$upload->draw_form('Upload pictures', 'index.php'); //the second argument is optional if ($_SERVER['REQUEST_METHOD'] == 'POST' && $admin){ $result = $upload->move($destination_folder, $overwrite); echo '
'; if ($result == true){ $da_file = $destination_folder."/".$upload->file['name']; chmod ($da_file, 0644); echo $upload->file['name']." was successfully uploaded | "; if ($_POST['dothumb'] == "y") { $thumb = new image($da_file); $thumb->Resize(640, 480); $thumbname = $thumb->WriteFile($destination_folder."/", "_thumb"); if (file_exists($destination_folder."/".$thumbname)) { echo $thumbname." was successfully Created
"; } } echo '
'; $wiki_image = "[((images/".$thumbname."))|images/".$upload->file['name']."?]"; echo '
Pour afficher l\'image sur une page : '.$wiki_image; ?> " . $upload->error_msg . ""; } } ?>