"; if (count($file_array) == 0) { echo "Sorry, no photos to display."; } else { echo count($file_array); echo " images"; } echo ""; /* Script to display images. Checks in thumbs directory first then loads from images directory if it doesn't exist. */ echo "
"; if ($file_array) { sort ($file_array); foreach ($file_array as $file) { echo "
"; $thumbfile = $_GET['id'] . '/' . thumbs . '/' . $file; if (file_exists($thumbfile)) { echo "$file
"; } else { if (file_exists($thumbpath)) { echo "$file
"; } else { echo "$file
"; }} } } echo ""; ?>