$numImages) $f_pagePos = floor($numImages / $numPerPage); //extract an array of thumbnails for this page to display $g_images_sliced = array_slice($g_images,$imagePos,$numPerPage); //build imagename from image array if one isn't set if(!isset($f_imageName)) $f_imageName = key($g_images_sliced); create_header(); ?>
\n"; //loop through thumbnails $counter = 1; foreach($g_images_sliced as $g_imageName => $g_imageCaption) { //pull image width and height list($thumbWidth, $thumbHeight) = getimagesize("locations/" . $f_locationKey . "/thumbnails/" . $g_imageName . ".jpg"); print "\n"; if($counter % 3 == 0 && $counter != $numImages) print "\n"; $counter++; } //fill in remaining td cells with blank information for($i = 1; $i <= $counter % 3 && $counter != $numPerPage + 1; $i++) { print "\n"; } print "\n"; print "
$numPerPage) { print "
\n"; print "
Navigate
"; if ($f_pagePos > 0) print "« | \n"; else print "« | "; for($i = 1; $i <= $numPages; $i++) { //if printing out number of current page, boldify if($f_pagePos == ($i - 1)) { $beginHREF = ""; $endHREF = ""; } //otherwise, linkify else { $beginHREF = ""; $endHREF = ""; } print $beginHREF . $i . $endHREF . " | "; } if($numImages - (($f_pagePos + 1) * $numPerPage) > 0) print "»\n"; else print "»"; print "
\n"; } ?>
\n"; print "
\n"; print "
\n"; print "
\n"; print "\n"; print "\""
 
\n"; ?>
<?=$g_images[$f_imageName]?>
Download hi-res image for printing