Welcome to the photo album!

Use the menu on the left to navigate through the pictures.
To download pictures, left click on an image to view the full sized image, then right click on that image and choose 'Save Picture/Image As'. If you simply right click on the small thumbnail image and save that one, you will not be downloading the full sized image, but the small thumbnail version of it."; $NUMBER_OF_THUMBNAILS_PER_ROW = 3; // Number of thumbnails to display on each row $SHOW_FILENAMES = $YES; // ($YES or $NO) Display the filenames of the pictures $SHOW_PICTURE_NUMBERS = $YES; // ($YES or $NO) Display the picture numbers (in the order they are displayed) $DISPLAY_PICTURES_IN_HOME = $YES; // ($YES or $NO) Display the pictures in the Home directory (where this file is placed). NOTE: $SHOW_ALL_PICTURES_IN_HOME_AND_HIDE_DIRECTORY_MENU overrides this setting $SHOW_DIRECTORY_MENU = $YES; // ($YES or $NO) Show the Directory Menu or not (If set to $NO, only pictures in the Home directory will be visible). NOTE: $SHOW_ALL_PICTURES_IN_HOME_AND_HIDE_DIRECTORY_MENU overrides this setting $SHOW_DIRECTORY_NUMBERS = $NO; // ($YES or $NO) Show the directory level numbers in the Directory Menu // Display all pictures from ALL DIRECTORIES and hide the Directory Menu (since it won't be needed because all pictures are being displayed) // NOTE: If this is $YES, $DISPLAY_PICTURES_IN_HOME and $SHOW_DIRECTORY_MENU variables are ignored // NOTE: Accessing the photo gallery using this set to $YES and the Pictures Per Page option set to 0 (display all pictures) // may result in a timeout the first few times the photo gallery is accessed for the reason described // in the OPTIONAL section at the top of this file, so you may need to access the site a few times before all pictures are actually // displayed. If there are too many pictures in the photo gallery (thousands), the page may never completely load all of the pictures before // the timeout, so you may want to force using X number of Pictures Per Page (Set $DISABLE_VIEW_ALL_PICTURES_OPTION = $YES and make sure $DEFAULT_PICTURES_PER_PAGE is not 0) $SHOW_ALL_PICTURES_AND_HIDE_DIRECTORY_MENU = $NO; // ($YES or $NO) // This will display a link to the Dans One File Photo Gallery homepage. I would appreciate you leaving this on, but if you really don't want it shown you can easily turn it off $SHOW_FOOTER = $YES; // ($YES or $NO) // END CONFIGURATION SECTION // DO NOT EDIT THIS SECTION ?> <?php print($WINDOW_TITLE); ?> #Pictures{float:none; width:99%;}"); } // END STYLE SHEET SECTION /**************************************************************** * DO NOT EDIT BELOW HERE UNLESS YOU KNOW WHAT YOU ARE DOING * ****************************************************************/ ?> "; // If the Directory level numbers should be shown if ($SHOW_DIRECTORY_NUMBERS) { $DirectoryList = $DirectoryList . "$ThisDirectoryNumber - "; } $DirectoryList = $DirectoryList . "$Filename
"; } else { // Else just display the directory name $DirectoryList = $DirectoryList . ""; // If the Directory level numbers should be shown if ($SHOW_DIRECTORY_NUMBERS) { $DirectoryList = $DirectoryList . "$ThisDirectoryNumber - "; } $DirectoryList = $DirectoryList . "$Filename
"; } // Call recursively to list all other directories $DirectoryList = $DirectoryList . ReturnDirectoryList($DirectoryPath, $Level + 1, $ThisDirectoryNumber); } } } // Close directory closedir($DirHandle); } else { print("Unable to open directory: $RootDirectory
"); } // Return the html string of this Directory and it's sub-directories return $DirectoryList; } // Function to delete Thumbnails from RootDirectory and all sub-directories function DeleteThumbnails($RootDirectory) { // Import variables into this function global $DELETE_THUMBNAILS, $THUMBNAILS_DIRECTORY_NAME, $THUMBNAIL_FILENAME_PREFIX; // First delete the root Thumbnails directory tree if it exists DeleteThumbnailsDirectoryTree($THUMBNAILS_DIRECTORY_NAME); // If we are able to open the directory if ($DirHandle = opendir($RootDirectory)) { // Specify Thumbnail directory for this directory $ThumbnailDir = "$RootDirectory/$THUMBNAILS_DIRECTORY_NAME"; $ThumbnailDir = ltrim($ThumbnailDir, './'); // If the Thumbnails directory exists and it should be deleted if (is_dir($ThumbnailDir)) { // If we can access the Thumbnails directory to remove if ($RemoveDirHandle = opendir($ThumbnailDir)) { // Delete all files in this directory while (false !== ($FilenameToRemove = readdir($RemoveDirHandle))) { // Skip default listings and make sure this File To Remove is one we created (i.e. filename starts with $THUMBNAIL_FILENAME_PREFIX) if ($FilenameToRemove != '.' && $FilenameToRemove != '..' && stripos($FilenameToRemove, $THUMBNAIL_FILENAME_PREFIX) == 0 && stripos($FilenameToRemove, $THUMBNAIL_FILENAME_PREFIX) !== false) { // Delete this file if (!unlink("$ThumbnailDir/$FilenameToRemove")) { print("Cannot delete file: $ThumbnailDir/$FilenameToRemove
"); } } } // Delete the Thumbnails directory now that it should be empty if (!rmdir($ThumbnailDir)) { print("Could not delete directory: $ThumbnailDir. It may contains filenames not starting with: $THUMBNAIL_FILENAME_PREFIX
"); } // Close directory closedir($RemoveDirHandle); } } // Loop over files and get filenames while (false !== ($Filename = readdir($DirHandle))) { // Skip default listings and Thumbnails directories if ($Filename != '.' && $Filename != '..' && $Filename != $THUMBNAILS_DIRECTORY_NAME) { // Specify the Directory Path properly $DirectoryPath = "$RootDirectory/$Filename"; $DirectoryPath = ltrim($DirectoryPath, './'); // If this is a directory if (is_dir($DirectoryPath)) { // Call recursively to delete Thumbnails from all sub-directories DeleteThumbnails($DirectoryPath); } } } // Close directory closedir($DirHandle); } else { print("Unable to open directory: $RootDirectory
"); } } // Function to delete the root Thumbnails directory tree that is created when $THUMBNAILS_DIRECTORIES_CREATED_IN_PICTURE_DIRECTORIES == $NO function DeleteThumbnailsDirectoryTree($DirectoryToRemove) { // Import variables into this function global $DELETE_THUMBNAILS, $THUMBNAILS_DIRECTORY_NAME, $THUMBNAIL_FILENAME_PREFIX; // If we are able to open the Thumbnail directory to remove if ($DirHandle = opendir($DirectoryToRemove)) { // Delete all files in this directory while (false !== ($FilenameToRemove = readdir($DirHandle))) { // Skip default listings if ($FilenameToRemove != '.' && $FilenameToRemove != '..') { // Get the Path to the file or directory to remove $PathToRemove = "$DirectoryToRemove/$FilenameToRemove"; $PathToRemove = ltrim($PathToRemove, './'); // If this is a directory if (is_dir($FilenameToRemove)) { // Delete all of the thumbnails in this directory DeleteThumbnailsDirectoryTree($PathToRemove); } // Else this is a file else { // If this File To Remove is one we created (i.e. filename starts with $THUMBNAIL_FILENAME_PREFIX) if (stripos($FilenameToRemove, $THUMBNAIL_FILENAME_PREFIX) == 0 && stripos($FilenameToRemove, $THUMBNAIL_FILENAME_PREFIX) !== false) { // Delete this file if (!unlink($PathToRemove)) { print("Cannot delete file: $PathToRemove
"); } } } } } // Delete the Thumbnails directory now that it should be empty if (!rmdir($DirectoryToRemove)) { print("Could not delete directory: $DirectoryToRemove. It may contains filenames not starting with: $THUMBNAIL_FILENAME_PREFIX
"); } // Close the directory closedir($DirHandle); } } // Function builds and returns an array containing the Paths to all of the Pictures in the specified $SearchDirectory. Returns false if there are no supported pictures in the directory function RetrievePicturePathsArrayFromDirectory($SearchDirectory) { // Import needed variables global $SUPPORTED_FILE_TYPES; // If we are able to open the directory if ($SearchDirHandle = opendir($SearchDirectory)) { // Initialize file counter $FileIndex = 0; // Initialize Picture Paths array $PicturePathsArray = array(); // Loop over files and get filenames while (false !== ($Filename = readdir($SearchDirHandle))) { // Skip default listings if ($Filename != '.' && $Filename != '..') { // Initialize that this file type is not supported $IsASupportedFileType = false; // Check if this file is a supported picture (not a directory or other type of file) foreach ($SUPPORTED_FILE_TYPES as $FileType) { // If this is a supported file type if (stripos($Filename, $FileType) !== false) { // Mark that this file type is supported $IsASupportedFileType = true; break; // Break out of this foreach loop } } // If this is a supported picture if ($IsASupportedFileType) { // Add this filename to the array $PicturePathsArray['Directory'][$FileIndex] = "$SearchDirectory"; $PicturePathsArray['Filename'][$FileIndex] = "$Filename"; // Increment file counter $FileIndex++; } } } // Close directory closedir($SearchDirHandle); // If there are no pictures in this directory if ($FileIndex == 0) { return false; } // Return the array containing all of the Picture Paths return $PicturePathsArray; } else { print("Unable to open directory: $SearchDirectory
Make sure the directory name does not contain any unusual characters, such as &, +, etc
"); } } // Function fills the given array ($DirectoryArray) with the Paths of all directories and sub-directories in the specified $RootDirectory function FillDirectoryArray($RootDirectory, &$DirectoryArray) { // Import needed variables global $THUMBNAILS_DIRECTORY_NAME; // If we are able to open the directory if ($DirHandle = opendir($RootDirectory)) { // Loop over files and get filenames while (false !== ($Filename = readdir($DirHandle))) { // Skip default listings and Thumbnails directories if ($Filename != '.' && $Filename != '..' && $Filename != $THUMBNAILS_DIRECTORY_NAME) { // Specify the Directory Path properly $DirectoryPath = "$RootDirectory/$Filename"; $DirectoryPath = ltrim($DirectoryPath, './'); // If this is a directory if (is_dir($DirectoryPath)) { // Append this Directory Path to the array $DirectoryArray[count($DirectoryArray)] = $DirectoryPath; // Call recursively to get all sub-directories FillDirectoryArray($DirectoryPath, $DirectoryArray); } } } // Close directory closedir($DirHandle); } else { print("Unable to open directory: $RootDirectory
"); } } // Function to display the table containing the Page links (is only displayed if Pages are being used) function DisplayPagesTable($TotalNumberOfPictures) { // Import needed variables global $PicturesPerPage, $CurrentPicturePage, $Directory; // If show all pictures is not chosen, show the page information if ($PicturesPerPage != 0) { // Calculate how many Pages are needed for this directory $NumberOfPages = ceil($TotalNumberOfPictures / $PicturesPerPage); // If there is more than one Page if ($NumberOfPages > 1) { print("
"); // If we are not on the first Page if ($CurrentPicturePage > 1) { // Display Previous Page link (htmlentities() is used to allow special characters, like apostrophes, by converting them into html entities) print("Previous "); }else { // Display Previous Page, but not as a link print("Previous "); } print(""); // Loop through all Pages for ($Count = 0; $Count < $NumberOfPages; $Count++) { // Display Page as a link (htmlentities() is used to allow special characters, like apostrophes, by converting them into html entities) print("" . ($Count + 1) . " "); } print(""); // If there are more Pages if ($CurrentPicturePage < $NumberOfPages) { // Display Next Page link print(" Next"); }else { // Display Next Page, but not as a link print(" Next"); } print("
"); } } } // Function to convert (encode) special characters into other formats to allow for processing function EncodeSpecialCharacters($String) { // Convert special characters not caught by htmlentities $String = str_replace(array('&', '+'), array('AmPeRsAnDEnCoDed', 'PlUsEnCoDeD'), $String); // Convert rest of special characters into HTML Entities $String = htmlentities($String, ENT_QUOTES); // Return the encoded string return $String; } // Function to decode the special characters back to original format function DecodeSpecialCharacters($String) { // Convert special characters not caught by htmlentities $String = str_replace(array('AmPeRsAnDEnCoDed', 'PlUsEnCoDeD'), array('&', '+'), $String); // Return decoded string return $String; } // The following thumbnail class was taken from http://www.phpclasses.org/browse/package/1261.html /*############################################ # Shiege Iseng Resize Class # 11 March 2003 # shiegege_at_yahoo.com # View Demo : # http://kentung.f2o.org/scripts/thumbnail/sample.php ################ # Thanks to : # Dian Suryandari ############################################## Sample : $thumb=new thumbnail("./shiegege.jpg"); // generate image_file, set filename to resize $thumb->size_width(100); // set width for thumbnail, or $thumb->size_height(300); // set height for thumbnail, or $thumb->size_auto(200); // set the biggest width or height for thumbnail $thumb->jpeg_quality(75); // [OPTIONAL] set quality for jpeg only (0 - 100) (worst - best), default = 75 $thumb->show(); // show your thumbnail $thumb->save("./huhu.jpg"); // save your thumbnail to file ---------------------------------------------- Note : - GD must Enabled - Autodetect file extension (.jpg/jpeg, .png, .gif, .wbmp) but some server can't generate .gif / .wbmp file types - If your GD not support 'ImageCreateTrueColor' function, change one line from 'ImageCreateTrueColor' to 'ImageCreate' (the position in 'show' and 'save' function) ############################################*/ class thumbnail { var $img; function thumbnail($imgfile) { //detect image format $this->img["format"]=ereg_replace(".*\.(.*)$","\\1",$imgfile); $this->img["format"]=strtoupper($this->img["format"]); if ($this->img["format"]=="JPG" || $this->img["format"]=="JPEG") { //JPEG $this->img["format"]="JPEG"; $this->img["src"] = ImageCreateFromJPEG ($imgfile); } elseif ($this->img["format"]=="PNG") { //PNG $this->img["format"]="PNG"; $this->img["src"] = ImageCreateFromPNG ($imgfile); } elseif ($this->img["format"]=="GIF") { //GIF $this->img["format"]="GIF"; $this->img["src"] = ImageCreateFromGIF ($imgfile); } elseif ($this->img["format"]=="WBMP") { //WBMP $this->img["format"]="WBMP"; $this->img["src"] = ImageCreateFromWBMP ($imgfile); } else { //DEFAULT echo "Not Supported File"; exit(); } @$this->img["lebar"] = imagesx($this->img["src"]); @$this->img["tinggi"] = imagesy($this->img["src"]); //default quality jpeg $this->img["quality"]=75; } function size_height($size=100) { //height $this->img["tinggi_thumb"]=$size; @$this->img["lebar_thumb"] = ($this->img["tinggi_thumb"]/$this->img["tinggi"])*$this->img["lebar"]; } function size_width($size=100) { //width $this->img["lebar_thumb"]=$size; @$this->img["tinggi_thumb"] = ($this->img["lebar_thumb"]/$this->img["lebar"])*$this->img["tinggi"]; } function size_auto($size=100) { //size if ($this->img["lebar"]>=$this->img["tinggi"]) { $this->img["lebar_thumb"]=$size; @$this->img["tinggi_thumb"] = ($this->img["lebar_thumb"]/$this->img["lebar"])*$this->img["tinggi"]; } else { $this->img["tinggi_thumb"]=$size; @$this->img["lebar_thumb"] = ($this->img["tinggi_thumb"]/$this->img["tinggi"])*$this->img["lebar"]; } } function jpeg_quality($quality=75) { //jpeg quality $this->img["quality"]=$quality; } function show() { //show thumb @Header("Content-Type: image/".$this->img["format"]); /* change ImageCreateTrueColor to ImageCreate if your GD not supported ImageCreateTrueColor function*/ $this->img["des"] = ImageCreateTrueColor($this->img["lebar_thumb"],$this->img["tinggi_thumb"]); @imagecopyresized ($this->img["des"], $this->img["src"], 0, 0, 0, 0, $this->img["lebar_thumb"], $this->img["tinggi_thumb"], $this->img["lebar"], $this->img["tinggi"]); if ($this->img["format"]=="JPG" || $this->img["format"]=="JPEG") { //JPEG imageJPEG($this->img["des"],"",$this->img["quality"]); } elseif ($this->img["format"]=="PNG") { //PNG imagePNG($this->img["des"]); } elseif ($this->img["format"]=="GIF") { //GIF imageGIF($this->img["des"]); } elseif ($this->img["format"]=="WBMP") { //WBMP imageWBMP($this->img["des"]); } } function save($save="") { //save thumb if (empty($save)) $save=strtolower("./thumb.".$this->img["format"]); /* change ImageCreateTrueColor to ImageCreate if your GD not supported ImageCreateTrueColor function*/ $this->img["des"] = ImageCreateTrueColor($this->img["lebar_thumb"],$this->img["tinggi_thumb"]); @imagecopyresized ($this->img["des"], $this->img["src"], 0, 0, 0, 0, $this->img["lebar_thumb"], $this->img["tinggi_thumb"], $this->img["lebar"], $this->img["tinggi"]); if ($this->img["format"]=="JPG" || $this->img["format"]=="JPEG") { //JPEG imageJPEG($this->img["des"],"$save",$this->img["quality"]); } elseif ($this->img["format"]=="PNG") { //PNG imagePNG($this->img["des"],"$save"); } elseif ($this->img["format"]=="GIF") { //GIF imageGIF($this->img["des"],"$save"); } elseif ($this->img["format"]=="WBMP") { //WBMP imageWBMP($this->img["des"],"$save"); } } } ?>
"); print("$HEADING_TITLE
"); // If we should show the Options if ($SHOW_OPTIONS) { // Double check to make sure Options should be displayed if ($GIVE_OPEN_PICTURES_IN_OPTION || $GIVE_PICTURES_PER_PAGE_OPTION) { // If the Options should only be displayed in the Home link, make sure we are in the Home link if ((!$ONLY_DISPLAY_OPTIONS_IN_HOME) || ($ONLY_DISPLAY_OPTIONS_IN_HOME && $Directory == '.')) { print(""); // If the Open Pictures In option should be displayed if ($GIVE_OPEN_PICTURES_IN_OPTION){print("");} // If the Pictures Per Page option should be displayed if ($GIVE_PICTURES_PER_PAGE_OPTION) { print(""); } // Display Apply button and also include Directory to load after apply is hit (hidden) (htmlentities() is used to allow special characters, like apostrophes, by converting them into html entities) print("
Open pictures in: This Window New WindowPictures per page:
"); } } } print("
"); print("
"); } // If all Thumbnails should be deleted if ($DELETE_THUMBNAILS) { // Delete all Thumbnails from the Home directory and all sub-directories DeleteThumbnails('.'); } ?> "); // Table Menu heading print("
Directory Menu
"); // Build Home link of Menu $ThisFile = $_SERVER['PHP_SELF']; print("Home
"); // If the DirectoryMenu hasn't been built yet this session, build it if (!isset($_SESSION['DirectoryList']) || $BUILD_DIRECTORY_LIST_EVERY_TIME) { $_SESSION['DirectoryList'] = ReturnDirectoryList('.'); } // Search Directory List and mark current directory as Selected (EncodeSpecialCharacters() is used to allow special characters, like apostrophes) $TempDirectoryList = str_replace("href='?Directory=" . EncodeSpecialCharacters($Directory) . "&PicturePage=1'", "href='?Directory=" . EncodeSpecialCharacters($Directory) . "&PicturePage=1'class='Selected'", $_SESSION['DirectoryList']); // Display the pre-compiled DirectoryMenu print($TempDirectoryList); print(""); } ?>
"); } } $DisplayPictures = true; // If we are in the Home directory and pictures should not be shown in the Home directory if ($Directory == '.' && !$DISPLAY_PICTURES_IN_HOME && !$SHOW_ALL_PICTURES_AND_HIDE_DIRECTORY_MENU) { $DisplayPictures = false; } // If this directories Pictures should be displayed if ($DisplayPictures) { // If all Pictures from all directories should be shown if ($SHOW_ALL_PICTURES_AND_HIDE_DIRECTORY_MENU) { // Initialize array $DirectoryPathsArray = array(); // Get all Directory Paths FillDirectoryArray('.', $DirectoryPathsArray); // Store how many directories were obtained $NumOfDirectories = count($DirectoryPathsArray); // If some directories were returned if ($NumOfDirectories > 0) { // Initialize array $PicturePathsArray = array(); // Loop through all Directory Paths in the array for($DirIndex = 0; $DirIndex < $NumOfDirectories; $DirIndex++) { $TempPicturePathsArray = RetrievePicturePathsArrayFromDirectory($DirectoryPathsArray[$DirIndex]); // If this directory contains Pictures if (count($TempPicturePathsArray['Filename']) > 0) { // Append them to the PicturePathsArray $PicturePathsArray = array_merge_recursive($PicturePathsArray, $TempPicturePathsArray); } } } }else { // Get the array of Picture Paths for the current directory $PicturePathsArray = RetrievePicturePathsArrayFromDirectory($Directory); } // If pictures were found if (count($PicturePathsArray['Filename']) > 0) { // Store the length of the array $PicturePathsArrayLength = count($PicturePathsArray['Filename']); // Calculate First and Last Pictures to display $FirstFileToDisplay = $FileIndex = ($CurrentPicturePage - 1) * $PicturesPerPage; $LastFileToDisplay = ($PicturesPerPage == 0) ? $PicturePathsArrayLength : ($CurrentPicturePage * $PicturesPerPage); if ($LastFileToDisplay > $PicturePathsArrayLength){$LastFileToDisplay = $PicturePathsArrayLength;} // Display the Pages table (is only displayed if needed) DisplayPagesTable($PicturePathsArrayLength); // Build table to hold pictures print(""); // Loop through all Pictures which will be displayed while ($FileIndex < $LastFileToDisplay) { // Get Directory and Filename of this Picture $PictureDirectory = $PicturePathsArray['Directory'][$FileIndex]; $PictureFilename = $PicturePathsArray['Filename'][$FileIndex]; // Create the paths to the Thumbnail and Picture $PicturePath = "$PictureDirectory/$PictureFilename"; $ThumbnailDirectory = "$PictureDirectory/$THUMBNAILS_DIRECTORY_NAME"; $ThumbnailPath = "$PictureDirectory/$THUMBNAILS_DIRECTORY_NAME/$THUMBNAIL_FILENAME_PREFIX" . $PictureFilename; // If the Thumbnails should be created in their own directory tree if (!$THUMBNAILS_DIRECTORIES_CREATED_IN_PICTURE_DIRECTORIES) { $ThumbnailDirectory = "$THUMBNAILS_DIRECTORY_NAME/$PictureDirectory"; $ThumbnailPath = "$THUMBNAILS_DIRECTORY_NAME/$PictureDirectory/$THUMBNAIL_FILENAME_PREFIX" . $PictureFilename; // The mkdir() function is currently broken and can't support spaces in the directory path, so // replace all spaces with underscores in the thumbnail paths $ThumbnailDirectory = str_replace(" ", "_", $ThumbnailDirectory); $ThumbnailPath = str_replace(" ", "_", $ThumbnailPath); } // If the thumbnail doesn't exist yet, and Recreating Thumbnails is allowed if (!file_exists($ThumbnailPath) && (!$DELETE_THUMBNAILS || $RECREATE_THUMBNAILS_AFTER_DELETE)) { // If the Thumbnails should be stored in their own directory tree if (!$THUMBNAILS_DIRECTORIES_CREATED_IN_PICTURE_DIRECTORIES) { // Break the Thumbnail Directory path into its individual Directories $Directories = explode("/", $ThumbnailDirectory); // Make sure each of the Directories in the Thumbnail Directory have been created $DirectoryPath = ""; foreach($Directories as $Directory) { // Append this Directory to the Directory Path $DirectoryPath .= $Directory; // Create the Directory if it does not exist yet if (!is_dir($DirectoryPath)) { mkdir($DirectoryPath); } // Set the Directory Path up for the next Directory to be added to it $DirectoryPath .= "/"; } } // Create Thumbnails folder if it doesn't exist yet if (!is_dir($ThumbnailDirectory)) { mkdir($ThumbnailDirectory); } // Create Thumbnail from Picture and save it in Thumbnails folder $thumb = new thumbnail($PicturePath); // Prepare to generate Thumbnail from full Picture if ($THUMBNAIL_QUALITY) $thumb->jpeg_quality($THUMBNAIL_QUALITY); // Set the pictures quality of the Thumbnail if ($THUMBNAIL_MAX_WIDTH) $thumb->size_width($THUMBNAIL_MAX_WIDTH); // Set max width of Thumbnail if ($THUMBNAIL_MAX_HEIGHT) $thumb->size_height($THUMBNAIL_MAX_HEIGHT); // Set max height of Thumbnail $thumb->save($ThumbnailPath); // Save the Thumbnail } // If Thumbnail exists, display it if (file_exists($ThumbnailPath)) { // If this picture should be displayed on a new row if ((($FileIndex - $FirstFileToDisplay) % $NUMBER_OF_THUMBNAILS_PER_ROW) == 0){print("");} // Display the thumbnail as a link to the full Picture (htmlentities() is used to allow special characters, like apostrophes, by converting them into html entities, so that Paths are not cut off short if they contain one) print(""); } // Increment the File counter $FileIndex++; } // Close picture table print("
"); if ($SHOW_PICTURE_NUMBERS || $SHOW_FILENAMES) { print("
"); if ($SHOW_PICTURE_NUMBERS){print($FileIndex + 1);} if ($SHOW_PICTURE_NUMBERS && $SHOW_FILENAMES){print(" - ");} if ($SHOW_FILENAMES){print("$PictureFilename");} } print("
"); // Display the Pages table (is only displayed if needed) DisplayPagesTable($PicturePathsArrayLength); } else { // Don't display No Pictures message in Home directory if ($Directory != '.') { print("There are no supported pictures to display in directory: $Directory
"); } } } ?>
"); print(""); } ?>