function print_head() {
readfile("head.ssi");
}
function print_tail() {
readfile("tail.ssi");
print "";
}
print_head();
?>
(Yes, there are still some bugs in the gallery, but you can deal with it for now)
$font = "";
$picname = $HTTP_GET_VARS["picname"];
$show = $HTTP_GET_VARS["show"];
$picnum = $HTTP_GET_VARS["pic"];
if ($picnum == "" && $picname == "") {
$picnum = 1;
}
$p = $picnum-1;
$n = $picnum+1;
# create the array
$filearray = array();
# open and load
$handle=opendir('gallery');
while ($file = readdir($handle)) {
if ($file != "." && $file != ".." && $file != "") {
$filearray[] = $file;
}
}
closedir($handle);
$total = count($filearray)-1;
if ($picnum != "") {
$thefile = $filearray[$picnum];
}
else {
$thefile = $picname;
}
$tablestart = "
";
if ($picnum <= 1 or $picnum = "") {
$verystart = "";
$tableend = "