$value){ $path = realpath($dir.DIRECTORY_SEPARATOR.$value); if (is_dir($path) && $value != "." && $value != "..") { $folderTitle = $value; $folderLink = "?folder=".getActiveFolder().$value.DIRECTORY_SEPARATOR; $folderClass = ""; include("includes/photos/folder_template.php"); $displayedItems++; } } if ($displayedItems == 0) { $placeHolder = "Pas d'autres albums !"; include("includes/photos/place_holder.php"); } } function getPhotos($dir){ $files = scandir($dir); $displayedItems = 0; foreach ($files as $key => $value){ $path = realpath($dir.DIRECTORY_SEPARATOR.$value); if (!is_dir($path)) { $ext = pathinfo($path, PATHINFO_EXTENSION); if ($ext == "bmp" || $ext == "jpg" || $ext == "jpeg" || $ext == "png"){ $imageSrc = getActiveFolder().$value; $imageId = "photo-".$displayedItems; include("includes/photos/photo_template.php"); $displayedItems++; } } } if ($displayedItems == 0) { $placeHolder = "Pas de photos ici !"; include("includes/photos/place_holder.php"); } } function generatePath($dir){ $folders = explode(DIRECTORY_SEPARATOR, $dir); $currentPath = ""; foreach ($folders as $value){ if ($value != ""){ $pathTitle = $value; $currentPath .= $value.DIRECTORY_SEPARATOR; $pathLink = "?folder=".$currentPath; include("includes/photos/path_template.php"); } } } ?>
Cliquez sur le dossier de votre choix pour afficher les photos
Chemin :