<?php if (isset($_POST['titre']) and isset($_POST['date_event']) and strlen($_POST['titre']) != 0 and strlen($_POST['date_event']) != 0) { $titre = $_POST['titre']; $date = $_POST['date_event']; $urlname = transformTo_URL($_POST['titre']); if (albumExiste($titre) == FALSE) { creatAlbumInBDD($titre, $date, $urlname); creatDir($urlname); ?> <section class="slice bg-3"> <div class="w-section inverse"> <div class="container"> <div class="row"> <div class="col-md-7"> <p>Information :</p> <ul class="list-check"> <li><i class="fa fa-check"></i> L'album a bien été créé !</li> </ul> <p>Tu peux maintenant mettre les photos !</p> </div> </div> </div> </div> </section> <?php } else { ?> <section class="slice bg-3"> <div class="w-section inverse"> <div class="container">
} //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 echo "Photo " . $image['name'][$i] . " uploadé.<br/>"; ?> </li> </ul> </div>
<?php if (isset($_POST['titre']) and isset($_POST['date_event']) and strlen($_POST['titre']) != 0 and strlen($_POST['date_event']) != 0 and isset($_POST['dateEvent']) and strlen($_POST['dateEvent']) != 0) { $newDate = $_POST['date_event']; $pastDate = $_POST['dateEvent']; // $newDate = date("m-d-Y", strtotime($originalDate)); $titre = $_POST['titre']; $urlTitre = transformTo_URL($_POST['titre']); modifierEvent($pastDate, addslashes($titre), $urlTitre, $newDate); ?> <section class="slice bg-3"> <div class="w-section inverse"> <div class="container"> <div class="row"> <div class="col-md-7"> <p>Information :</p> <ul class="list-check"> <li><i class="fa fa-check"></i> L'event a bien été modifié !</li> </ul> </div> </div> </div> </div> </section> <?php } else { ?> <table class="ds_box" cellpadding="0" cellspacing="0" id="ds_conclass" style="display: none;"> <tr> <td id="ds_calclass"></td>