\n"; // Go through the entire array of images... for ($i=0; $i\n"; echo " \""\n"; echo " \n"; } // Close the div layer echo " \n"; // If the visitor tried to access some particular image... } else if ($imageChoice != "") { if ($imageChoice > $count) $imageChoice = $count-1; else if ($imageChoice < 0) $imageChoice = 0; // Set some variables that are easier to work with $currentImageSize = getimagesize($photoDir . "/" . $imageName[$imageChoice]); $width = $currentImageSize[0]; $height = $currentImageSize[1]; $areaWidth = $firstImageWidth + $previousImageWidth + $width + $nextImageWidth + $lastImageWidth + (4 * $spaceBetween) - (2 * $padding); if (($navChoice == "image" || $navChoice == "both") && sizeof($imageName) > 1) { // Start a new div layer echo "
\n"; // Link to the first photo echo " \n"; echo " \"First\n"; echo " \n"; // Close the div layer echo "
\n\n"; // Start a new div layer echo "
\n"; // If we're not at the beginning of the photos... if ($imageChoice != 0) // Get a link to the previous full-size image echo " \n"; echo " \"Previous\"\n"; echo " \n"; // Close the div layer echo "
\n\n"; } // Start a new div echo "
\n"; // Display the current image echo " \""\n"; // Close the div layer echo "
\n\n"; if (($navChoice == "image" || $navChoice == "both") && sizeof($imageName) > 1) { // Start a new div layer echo "
\n"; // If we're not at the end of the photos... if ($imageChoice != (sizeof($imageName)-1)) // Get a link to the next full-size image echo " \n"; echo " \"Next\"\n"; echo " \n"; // Close the div layer echo "
\n\n"; // Start a new div layer echo "
\n"; // Link to the last photo echo " \n"; echo " \"Last\n"; echo " \n"; // Close the div layer echo "
\n\n"; } // Start a new div layer echo "
\n"; if (($navChoice == "text" || $navChoice == "both") && sizeof($imageName) > 1) { // First image link echo " " . $firstLinkText . "\n"; // Previous image link echo " 0) echo ($imageChoice-1); else echo ($count-1); echo "\" title=\"Previous\">" . $previousLinkText . "\n"; } // The information about the photo switch ($photoNumStyle) { case 1: echo " Photo #" . ($imageChoice+1) . " of " . $count . "\n"; break; case 2: echo " " . ($imageChoice+1) . "/" . $count . "\n"; break; case 3: echo " Photo " . ($imageChoice+1) . "/" . $count . "\n"; break; default: echo " Photo #" . ($imageChoice+1) . "/" . $count . "\n"; } if (($navChoice == "text" || $navChoice == "both") && sizeof($imageName) > 1) { // Next image link echo " " . $nextLinkText . "\n"; // Last image link echo " " . $lastLinkText . "\n"; } // Close the div layer echo "
\n\n"; if (sizeof($imageName) > 1) { // Start a new div layer echo "
\n"; // Go through all the images in our array of images for ($i=0; $i\n"; echo " \""\n"; echo " \n"; } } // Close the div layer echo "
\n"; } } // Otherwise, if there are no photos in the gallery... } else echo "

No photos in gallery.

\n"; ?>