" . date("S",$sdatetaken) . " " . date("F Y",$sdatetaken); $ddd = date("w",$sdatetaken); } else { $ddd=99; } switch($ddd) { case 0: $course = "Course S"; break; case 1: $course = "Course A"; break; case 2: $course = "Course B"; break; case 3: $course = "Course C"; break; case 4: $course = "Course A"; break; case 5: $course = "Course B"; break; case 6: $course = "Course C"; break; default : $course = $folder; break; } $curdir = getcwd(); chdir ($thumb); $d = opendir ("."); //list the files in the dir $maxpict = 0; while ($file = readdir ($d)) { if ($file != ".." && $file != ".") { $pfiles[] = $file; $maxpict++; } } $prevpict = $pict-1; if($prevpict < 1) $prevpict = $maxpict; $nextpict = $pict+1; if($nextpict > $maxpict) $nextpict = 1; $pict-=1; // reduce index from [1] to [0] ?>
 
"; print " Click here to download high quality image ($fsize)"; } ?>
 
back to calendar "; ?>back to album"; ?> "; ?>previous photo"; ?> "; ?>next photo"; ?>
"; else if(file_exists($imagefile2)) print ""; else print "Photo not found!!!"; chdir($curdir); ?>