Note: I did not include any CSS or HTML in this file; only the actual PHP coding is included. ******************* * INDEX.PHP * ******************* This is the main PHP file which generates the page with all of the thumbnail images. The user specifies only how many columns they want to display. Currently, a 4-column display does not work quite right. $pictures) { $position = $i - 1; // You have to add the -1 because of the $filesThumb array offset $position1 = $position + 1; if ($remainder == 1) { echo "\n"; echo "\n\t"; echo "\n\t "; echo "\n\t "; } elseif ($remainder == 2) { echo "\n"; echo "\n\t"; echo "\n\t"; echo "\n\t "; } else { echo "\n"; for ($j = 1; $j < $cols + 1; $j++) { if ($j == 1) { $x = $i - 1; } echo "\n\t"; $x++; } } } else { echo "\n"; for ($j = 1; $j < $cols + 1; $j++) { if ($j == 1) { $x = $i - 1; } echo "\n\t"; $x++; } } echo "\n"; } } function FourColumns() { GLOBAL $cols; GLOBAL $pictures; GLOBAL $remainder; GLOBAL $files; GLOBAL $filesThumb; for ($i = 1; $i <= $pictures; $i+=$cols) { if (($i + $cols) > $pictures) { $position = $i -1; $position1 = $position + 1; $position2 = $position + 2; if ($remainder == 1) { echo "\n"; echo "\n\t"; echo "\n\t "; echo "\n\t "; echo "\n\t "; } elseif ($remainder == 2) { echo "\n"; echo "\n\t"; echo "\n\t"; echo "\n\t"; echo "\n\t"; } elseif ($remainder == 3) { echo "\n"; echo "\n\t"; echo "\n\t"; echo "\n\t"; echo "\n\t"; } else { echo "\n"; for ($j = 1; $j < $cols + 1; $j++) { if ($j == 1) { $x = $i; } echo "\n\t"; $x++; } } } else { echo "\n"; for ($j = 1; $j < $cols + 1; $j++) { if ($j == 1) { $x = $i; } echo "\n\t"; $x++; } } echo "\n"; } } ?> ******************* * DETAIL.PHP * ******************* detail.php is the "page" designed display the "full-size" picture, in addition to thumbnails of the next and previous pictures. "; echo "\n\t"; echo "\n\t

Nada Surf - Matrix Club - Bochum, Germany (2006.04.14)

"; if ($id != 0) { echo "
"; echo "Previous Picture

"; } if (($id + 1) != $max) { echo "
"; echo "Next Picture

"; } echo "Back to List"; echo ""; echo "\n"; ?> ********************* *DIRECTORYREADER.PHP* ********************* directoryreader.php is the PHP file which reads through the directory of pictures and puts the thumbnails and full-size images into an array. all images must be, at the current time, jpg images.