';
// List Galleries on the Home Page
echo "
";
$count=0;
echo "";
// cycles through directories and prints the name, in three columns
$BASEDIR="photos";
$hndl=opendir($BASEDIR);
while($file=readdir($hndl)) {
if ($file=='.' || $file=='..') continue;
$completepath="$BASEDIR/$file";
if (is_dir($completepath)) {
if ($count==4) { // change if you want extra/fewer columns
echo "
";
$count=1;
} else {
$count=$count+1;
}
echo "$file
| ";
} else {
}
}
echo "
";
echo '
';
} elseif ($action=="gallery") {
// List Images in the Gallery (on a Gallery Page)
$image = array("jpg", "png", "jpeg", "gif");
$directory='photos/';
$directory.=$gallery;
$mydir = dir($directory);
echo "
} elseif ($action=="image") {
// Show specific image
// If it is a large image, use the resizing option
if ($information[0]>700) {
echo "
";
}
// Look for the comments file, and show it if availiable
$comments_filename = "$dir/$filename.txt";
if (file_exists($comments_filename)) {
echo '';
} else {
echo "";
}
} else {
};
?>