
there is a folder named includes, all of the functions files are in that folder.
luck,
robert
There is no "move_file" function in my "functions_upload.php"blackbird.rus wrote:functions_upload.php
Add functionin function "move_file" addCode: Select all
/** * Resize images with the true diemensions (800*600) */ function resize_images() { if ( $this->is_image() ) { $limite_largeur = "800px"; $limite_hauteur = "600px"; $size = getimagesize($this->destination_file); $largeur = $size[0]; $hauteur = $size[1]; if($hauteur > $limite_hauteur OR $largeur > $limite_largeur) { if($largeur > $limite_largeur) { $hauteur = $hauteur / ($largeur / $limite_largeur); $largeur = $limite_largeur; } if($hauteur > $limite_hauteur) { $largeur = $largeur / ($hauteur / $limite_hauteur); $hauteur = $limite_hauteur; } $destination = imagecreatetruecolor($largeur, $hauteur); if ( $this->extension == "jpg" || $this->extension == "jpeg" ) $source = imagecreatefromjpeg($this->destination_file); elseif ( $this->extension == "png" ) $source = imagecreatefrompng($this->destination_file); elseif ( $this->extension == "gif" ) $source = imagecreatefromgif($this->destination_file); imagecopyresampled($destination, $source, 0, 0, 0, 0, $largeur, $hauteur, $size[0], $size[1]); if ( $this->extension == "jpg" || $this->extension == "jpeg" ) imagejpeg($destination, $this->destination_file); elseif ( $this->extension == "png" ) imagepng($destination, $this->destination_file); elseif ( $this->extension == "gif" ) imagegif($destination, $this->destination_file); } } }
beforCode: Select all
if ( $this->is_image() ) { $this->resize_images(); }
Code: Select all
phpbb_chmod($this->destination_file, $chmod);