";
$thumb_col = 0;
} else {
$thumb_col++;
}
}
// format thumbnail table
$thumbs_table = "
";
} else {// pic chosen, display with previous/next/back links
$pic = strip_tags(urldecode($_GET["pic"]));
$strjpg=".jpg";
$strtxt=".php";
$desctext = str_replace($strjpg,$strtxt,$img_list["$pic"]);
$desctextres = "./$dir/images/$desctext";
if (file_exists($desctextres)) {
include $desctextres;
} else
{
$imagestext = $img_list["$pic"];
}
$links = "";// begin next/prev links
//display pic with prev and next links
if ($pic > 0) { //set prev link
$links .= "
Previous
|
";
}
// back to thumbnails link
$links .= "
Back
";
if ($pic < (count($img_list)-1)) {
$links .= "
|
Next
";
}
$links .= "
"; // close next/prev links
// get pic size
$size = @getimagesize($cwd."/".$dir."/images/".$img_list["$pic"]);
$image .= "
 |
".$imagestext." |
.
$links
";
} // end if pic
}// end if dir
// determine page display
if (($dir != "") and ($pic !="")) { //display image with links
echo $blurb;
echo $image;
} else if (($dir != "") and ($pic =="")) { // display thumbnails of chosen snapshot folder
echo $blurb;
echo $thumbs_table;
} else { // display snapshot gallery home
echo $blurb;
echo $snap_sub_nav;
}
?>