diff --git a/photos.php b/photos.php index 2b80217..b8cf2b7 100644 --- a/photos.php +++ b/photos.php @@ -1,16 +1,23 @@ $value) { @@ -29,8 +36,10 @@ function getDirectories($dir) } } +// Get all photos in the specified path function getPhotos($dir) { + $dir = "photos/".$dir; $files = scandir($dir); $displayedItems = 0; foreach ($files as $key => $value) { @@ -51,10 +60,14 @@ function getPhotos($dir) } } +// Creates buttons representing the actual path for easier navigation function generatePath($dir) { $folders = explode(DIRECTORY_SEPARATOR, $dir); $currentPath = ""; + $pathTitle = "Menu"; + $pathLink = "?folder="; + include("includes/photos/path_template.php"); foreach ($folders as $value) { if ($value != "") { $pathTitle = $value;