print "
Below is a list of all of the photo albums and subsites in $_SERVER[HTTP_HOST]. Click on any of the titles below to browse through the photo album or subsite.
"; $count = 0; $files = array(); $titles = array(); $startdates = array(); $dates = array(); $mtimes = array(); $hDir = opendir("."); $have_startdate = 0; $have_date = 0; while (($file = readdir($hDir)) !== false) { if ( !strncmp($file,"_", 1) || !strncmp($file,".", 1) || !is_dir($file) || is_link($file) || file_exists("$file/.htaccess")) continue; $filename = "$file/index.html"; if (is_readable("$file/index.html")) { $hFile = fopen($filename, "r"); $text = fread ($hFile, filesize($filename)); fclose($hFile); $postext = stristr($text, "Listed in order of: | Title "; $checked = ($sortby == "time") ? "checked" : ""; print "Most recent first "; print "\n |
Album/Subsite | "; if ($have_startdate) print "Start Date | "; if ($have_date) print "End Date | "; print "Last Update | "; print "||
$titles[$i] | "; if ($have_startdate) { if ($mtimes[$i] != $startdates[$i]) print "" . strftime($fmt, $startdates[$i]) ." | "; else print ""; } if ($have_date) { if ($mtimes[$i] != $dates[$i]) print " | " . strftime($fmt, $dates[$i]) ." | "; else print ""; } print " | " . strftime($fmt, $mtimes[$i]) ." | "; print "
No subsites found.
\n"; } print "\n"; ?>