Liste des Galeries '.$clef.'
Choisissez ci-dessous une Galerie à visionner.
'; $dossier = glob("./*", GLOB_ONLYDIR); usort($dossier,"strnatcmp" ); $nb_gal2 = $nb_gal; $compteur = count($dossier); $compteur = $compteur - 1; $nb_pages=ceil($compteur/$nb_gal2); $current_page = (!isset($_GET['page']) || empty($_GET['page'])) ? 1 : $_GET['page']; if ($nb_pages >1) { echo ''; } echo''; if ($nb_pages >1) { echo ''; } echo'


Un total de '.$compteur.' Galerie(s) disponible(s).
'; break; case "voir_gallerie": $fzfzx = $_GET['rep']; $fzfzx = str_replace('-',' ',$fzfzx); $ffzfzx = str_replace('_',' ',$fzfzx); $monUrl = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; $monUrl = str_replace($_GET['rep'],'',$monUrl); $monUrl = str_replace('.html','',$monUrl); echo '
Galerie >> '.ucfirst($fzfzx).'

Retour a la liste des galeries
'; if (!is_dir($_GET['rep'].'/miniatures')) { mkdir($_GET['rep'].'/miniatures'); } if (!file_exists($_GET['rep'].'/index.php')) { if($fp = fopen($_GET['rep'].'/index.php',"a")) {fwrite($fp, " "); fclose($fp); } } if (!is_dir($_GET['rep'].'/miniatures2')) { mkdir($_GET['rep'].'/miniatures2'); } if (!file_exists($_GET['rep'].'/index.php')) { if($fp = fopen($_GET['rep'].'/index.php',"a")) {fwrite($fp, " "); fclose($fp); } } if (!is_dir($_GET['rep'].'/1024')) { mkdir($_GET['rep'].'/1024'); } if (!file_exists($_GET['rep'].'/index.php')) { if($fp = fopen($_GET['rep'].'/index.php',"a")) {fwrite($fp, " "); fclose($fp); } } if (!is_dir($_GET['rep'].'/1280x1024')) { mkdir($_GET['rep'].'/1280x1024'); } if (!file_exists($_GET['rep'].'/index.php')) { if($fp = fopen($_GET['rep'].'/index.php',"a")) {fwrite($fp, " "); fclose($fp); } } if (!is_dir($_GET['rep'].'/1280x960')) { mkdir($_GET['rep'].'/1280x960'); } if (!file_exists($_GET['rep'].'/index.php')) { if($fp = fopen($_GET['rep'].'/index.php',"a")) {fwrite($fp, " "); fclose($fp); } } if (!is_dir($_GET['rep'].'/iphone')) { mkdir($_GET['rep'].'/iphone'); } if (!file_exists($_GET['rep'].'/index.php')) { if($fp = fopen($_GET['rep'].'/index.php',"a")) {fwrite($fp, " "); fclose($fp); } } if (!file_exists($_GET['rep'].'/miniatures/index.php')) { if($fp = fopen($_GET['rep'].'/miniatures/index.php',"a")) { fwrite($fp, ""); fclose($fp); } } if (!file_exists($_GET['rep'].'/iphone/index.php')) { if($fp = fopen($_GET['rep'].'/iphone/index.php',"a")) { fwrite($fp, ""); fclose($fp); } } if (!file_exists($_GET['rep'].'/miniatures2/index.php')) { if($fp = fopen($_GET['rep'].'/miniatures2/index.php',"a")) { fwrite($fp, ""); fclose($fp); } } $nb_fichiers = $nb_im; $zszz = $_GET['rep']; $dir = glob("$zszz/{*.jpg,*.gif,*.png}", GLOB_BRACE); usort($dir,"strcasecmp" ); $nb_photos = 0; $compteur = count($dir); $nb_pages=ceil($compteur/$nb_fichiers); $current_page = (!isset($_GET['page']) || empty($_GET['page'])) ? 1 : $_GET['page']; if ($nb_pages >1) { echo ''; } echo''; if ($nb_pages >1) { echo ''; } echo '




Soit un total de '.$nb_photos.' Photos disponibles dans la Galerie '.ucfirst($_GET['rep']).'.
'; break; case "voir_photo": $mmc = $_GET['rep']; $mmd = $_GET['photo']; $mme = $_SERVER['SCRIPT_URI']; $mmf = $_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']; $mmf2 = str_replace("index.php", "", "$mmf"); $mmf3 = substr($mmf2,0,-1); $extt1 = "jpg"; $extt2 = "png"; $extt3 = "gif"; echo ' '; $t1 =''.$mmc.'/miniatures/'.$mmd.'_m.'.$extt1.''; $t2 =''.$mmc.'/miniatures/'.$mmd.'_m.'.$extt2.''; $t3 =''.$mmc.'/miniatures/'.$mmd.'_m.'.$extt3.''; if (file_exists($t1)) { $extt4 = "jpg"; } if (file_exists($t2)) { $extt4 = "png"; } if (file_exists($t3)) { $extt4 = "gif"; } if (file_exists($_GET['rep'].'/'.$_GET['photo'])) { echo "

pourquoi une extension ???"; } else { $photo = $_GET['photo']; $taille = getimagesize($_GET['rep'].'/'.$_GET['photo'].'.'.$extt4.''); $poids = filesize($_GET['rep'].'/'.$_GET['photo'].'.'.$extt4.''); $poids = $poids/1024; $poids = round($poids, 2); $filed = $_GET['rep'].'/'.$_GET['photo'].'.'.$extt4.''; setlocale(LC_TIME, "fr_FR"); $filed2 = strftime("%d %B %Y à %H:%M",filemtime($filed)); $disc = $_SERVER['SCRIPT_NAME']; $disc= str_replace ('/', '', $disc); $disc= str_replace ('index.php', '', $disc); $disc2 = '../_compteur/'.$disc.''; $dosc = '../_compteur/'.$disc.'/'.$_GET['rep'].''; if(file_exists($disc2)) {} else {mkdir($disc2);} if (file_exists($dosc)) { } else { mkdir($dosc); } $plopfp = '../_compteur/'.$disc.'/'.$_GET['rep'].'/'.$_GET['photo'].'.txt'; if (file_exists($plopfp)) { $fp=fopen('../_compteur/'.$disc.'/'.$_GET['rep'].'/'.$_GET['photo'].'.txt','a+'); //OUVRE LE FICHIER compteur.txt $num=fgets($fp,4096); // RECUPERE LE CONTENUE DU COMPTEUR fclose($fp); // FERME LE FICHIER $hits=$num - -1; // TRAITEMENT $fp=fopen('../_compteur/'.$disc.'/'.$_GET['rep'].'/'.$_GET['photo'].'.txt','w'); // OUVRE DE NOUVEAU LE FICHIER fputs($fp,$hits); // MET LA NOUVELLE VALEUR fclose($fp); // FERME LE FICHIER } else { $plop22=fopen('../_compteur/'.$disc.'/'.$_GET['rep'].'/'.$_GET['photo'].'.txt','w+'); fclose($plop22); } $plop_plop477 = $_SERVER['REQUEST_URI']; $path477 = "$plop_plop477"; $file477 = dirname($path477); $strep = $_GET['rep']; $strep = str_replace ('_', ' ', $strep); $strep = str_replace ('-', ' ', $strep); $strep = str_replace ('ù', ' ', $strep); if (strlen($strep)>50) { $strep = substr($strep, 0, 50); } $stpho = $_GET['photo']; $archif = array('0','1','2','3','4','5','6','7','8','9'); //$stpho = str_replace ($archif, '', $stpho); $stpho= str_replace ('_', ' ', $stpho); $stpho = str_replace ('-', ' ', $stpho); $stpho = str_replace ('ù', ' ', $stpho); if (empty($stpho) or strlen($stpho)<4) { $stpho = "$clef $strep"; } if (strlen($stpho)>50) { $stpho = substr($stpho, 0, 50); } $min2 = ''.$mmc.'/miniatures2/'.$mmd.'_m2.'.$extt4.''; if (file_exists($min2)) {} else { $min3 = ''.$mmc.'/'.$mmd.'.'.$extt4.''; $xzas3 = ''.$mmc.'/miniatures2/'.$mmd.'_m2.'.$extt4.''; $thumbw = 270; $thumbh = 203; // Dimension of intermediate thumbnail $nh = $thumbh; $nw = $thumbw; $size = getImageSize($min3); $w = $size[0]; $h = $size[1]; // Applying calculations to dimensions of the image $ratio = $h / $w; $nratio = $nh / $nw; if($ratio > $nratio) { $x = intval($w * $nh / $h); if ($x < $nw) { $nh = intval($h * $nw / $w); } else { $nw = $x; } } else { $x = intval($h * $nw / $w); if ($x < $nh) { $nw = intval($w * $nh / $h); } else { $nh = $x; } } // Building the intermediate resized thumbnail if ($extt4 == "jpg") {$resimage = imagecreatefromjpeg($min3);} elseif ($extt4 == "png") { $resimage = imagecreatefrompng($min3); } elseif ($extt4 == "gif") {$resimage = imagecreatefromgif($min3);} $newimage = imagecreatetruecolor($nw, $nh); // use alternate function if not installed imageCopyResampled($newimage, $resimage,0,0,0,0,$nw, $nh, $w, $h); // Making the final cropped thumbnail $viewimage = imagecreatetruecolor($thumbw, $thumbh); imagecopy($viewimage, $newimage, 0, 0, 0, 0, $nw, $nh); imagejpeg($viewimage, $xzas3, 50); } $do = $_GET['rep']; $cp = glob("$do/{*.jpg,*.gif,*.png}", GLOB_BRACE); usort($cp,"strcasecmp" ); $resu = count($cp); for($g = 1; $g <= $resu; $g++) { $cla = $cp[$g]; $cla = str_replace($do.'/','',$cla); $cla = substr($cla, 0, -4); if ($cla == $mmd) { $num = $g; } } if (empty($num)){$num = 0;} if ($num >= $resu){$num = 0;} $rrt = $cp[$num]; $num2 = $num+1; $sui = $cp[$num2]; $sui = str_replace($do.'/','',$sui); $sui = substr($sui, 0, -4); $num3 = $num-1; $prec = $cp[$num3]; $prec = str_replace($do.'/','',$prec); $prec = substr($prec, 0, -4); $rrt = str_replace($do.'/','',$rrt); $rrt = substr($rrt, 0, -4); include ('../_template/'.$templa.'/vari.php'); $monUrl = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; echo'
'; echo '
Retour galerie >> '.ucwords($strep).'
'; if(($taille[0]<270) && ($taille[1]<203)) { echo'
'.$mmd.'
'; } else { echo'
'.$mmd.'
'; } echo'
'.$titre.' - '.ucwords($stpho).' - '.ucwords($strep).' - '.$meta.' - '.$metaplus.'
'; if ($num<=0) {echo'image precedente';} else {echo'image precedente';} echo''; if ($num < ($resu-1)) {echo'image suivante';} else {echo'image suivante';} echo'
'; $monUrlb = $_SERVER['REQUEST_URI']; $monUrlb = str_replace ($mmd, '', $monUrlb); $monUrlb = str_replace ($mmc, '', $monUrlb); $monUrlb = str_replace ($ext, '', $monUrlb); $monUrlb = str_replace ('1920x1080', '', $monUrlb); $monUrlb = str_replace ('html', '', $monUrlb); $monUrlb = str_replace ('.', '', $monUrlb); $monUrlb = str_replace ('-image-', '', $monUrlb); $monUrlb = str_replace ('/', '', $monUrlb); if(($taille[0]<270) && ($taille[1]<203)) {echo'
Taille reelle
'; } else if ($rezt ==1) { echo'
Choisissez votre resolution Taille reelle

1024x768 1280x960 1280x1024 1920x1080 iphone
'; } else {echo'
Telecharger
'; } $check1 ='../_descriptif/'.$disc.'/'.$_GET['rep'].''; $cck ='../_descriptif/'.$disc.'/'; if(file_exists($cck)) {} else { mkdir($cck); } if(file_exists($check1)) {} else { mkdir($check1);} $check = '../_descriptif/'.$disc.'/'.$_GET['rep'].'/descri-'.$_GET['photo'].'.php'; $de=''; if(file_exists($check)) {include('../_descriptif/'.$disc.'/'.$_GET['rep'].'/descri-'.$_GET['photo'].'.php');} else {$fp = fopen($check,"w"); fwrite($fp, $de); fclose($fp); } echo'
'.$descri.'
Visiteurs Proposez nous un descriptif de cette image en cliquant ici

Rechercher une autre image

'; if ($activpubsearch == 1) echo" $pubsearch "; require_once('submitRating.php'); echo'
Avis : '; //votes $idcom = $_GET['photo']; echo $handler->displayTotalNumberOfRatings(''.$idcom.''); echo' votes
'; $handler->displayRating(''.$idcom.'',5); echo'
Partage : partage sur facebook partage sur twitter partage sur myspace



'.$clef.' '.ucwords($strep).' '.$stpho.'
'.ucwords($stpho).'
Dans la galerie '.ucwords($strep).'
Cette image a ete affichees : '.$hits.' fois
Nom : '.$stpho.'
Taille : '.$taille[0].'x'.$taille[1].' (pixels)
Poids : '.$poids.' Ko
'.$clef.' mis en ligne le '.$filed2.'
QR code - Wine label
'; if ($activpub6 == 1) {echo'

'.$pub6.'
';} echo'

'.$mmd.'
'.$titre.' - '.ucwords($stpho).' - '.ucwords($strep).' - '.$meta.' - '.$metaplus.'
'; echo'

'; if ($activpub7 == 1) {echo'
'.$pub7.'
';} echo'

'; //commentaire facebook supprimer pour desactiver if ($activfb == 1) echo'

'; $urz = $_SERVER['SERVER_NAME']; $redir = 'http://'.$mmf2.''.$mmc.'-image-'.$mmd.''; echo '
Ce '.$clef.' sur votre forum



Ce '.$clef.' sur votre Site/Blog

'; echo''; } break; } ?>