示例#1
0
 // on ajoute les infos dans la BDD
 $nameTransform = $nomImage;
 if ($ext == "png") {
     $nameTransform = substr($nomImage, 0, -3) . "jpg";
     //  echo "\n coucou c\'est moi je suis dans le if == png\n";
     // $fileTransform = (substr($fileTransform, 0, -3)."jpg");
 }
 //if (photoExisteDansAlbumID($nomImage, $id_album) != TRUE)
 if (photoExisteDansAlbumID($nameTransform, $id_album) != TRUE) {
     //  Img::compress_image($uploadDir.$image['tmp_name'][$i],$uploadDir.$image['tmp_name'][$i], 10);
     $result = move_uploaded_file($image['tmp_name'][$i], $uploadDir . $namePhoto);
     // $imagecache = new ImageCache();
     //$imagecache->cached_image_directory = $uploadDir;
     //echo "le directory est = ".$namePhoto."\n";
     //$poubelle = $imagecache->cache( $uploadDir.$namePhoto );
     $resultat_compress = Img::compress_image($uploadDir . $image['name'][$i], $uploadDir . $image['name'][$i], 40);
     //echo "\n resultat var compress = \n ".$resultat_compress."\n";
     Img::creerMin($uploadDir . $image['name'][$i], $uploadDirMiniature, $image['name'][$i], 358, 268);
     Img::convertirJPG($uploadDir . $image['name'][$i]);
     // Img::compress_image($uploadDir.$image['name'][$i],$uploadDir.$image['name'][$i], 90);
     //$nomImage = addslashes($nomImage);
     $urlnamePhoto = transformTo_URL($nomImage);
     addPhotosInBDD($nomImage, $filePhotoLowerEnd, $id_album, $date_event, $urlnamePhoto);
     ?>
     <section class="slice bg-3">
         <div class="w-section inverse">
             <div class="container">
                 <div class="row">
                     <div class="col-md-7">
                         <ul class="list-check">
                             <li><i class="fa fa-check"></i> <?php