$value) { $path = realpath($dir.DIRECTORY_SEPARATOR.$value); if (!is_dir($path)) { $valid = pathinfo($path, PATHINFO_EXTENSION) == "zip"; if ($valid) break; } } return $valid; } // Get all directories in the specified path function getDirectories($dir) { $dir = "photos".$dir; $files = scandir($dir); $displayedItems = 0; foreach ($files as $key => $value) { $path = realpath($dir . DIRECTORY_SEPARATOR . $value); if (is_dir($path) && $value != "." && $value != "..") { $folderTitle = $value; $folderLink = "?".urlParam."=".getActivePath().DIRECTORY_SEPARATOR.$value; include("includes/photos/folder_template.php"); $displayedItems++; } } if ($displayedItems == 0) { $placeHolder = "Pas d'autres albums !"; include("includes/photos/place_holder.php"); } } // Get all photos in the specified path function getPhotos($dir) { $dir = "photos_thumb".$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" || $ext == "gif") { $imageSrc = $dir.DIRECTORY_SEPARATOR.$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"); } } // Creates buttons representing the actual path for easier navigation function generatePath($dir) { $folders = explode(DIRECTORY_SEPARATOR, $dir); $currentPath = ""; $pathTitle = "Menu"; $pathLink = "?".urlParam."="; include("includes/photos/path_template.php"); foreach ($folders as $value) { if ($value != "") { $pathTitle = $value; $currentPath .= DIRECTORY_SEPARATOR.$value; $pathLink = "?".urlParam."=".$currentPath; include("includes/photos/path_template.php"); } } } ?>

Photos

Cliquez sur le dossier de votre choix pour afficher les photos

Télécharger l'album