".$dir_http[1]."

"; echo "
 "; $i = 0; $lnkcnt = 1; //begin directory nav if (is_dir($dir)) { $dh = opendir($dir); while (($file = readdir($dh)) !== false) { if ($file !== "generator.php" && $file !== "index.php" && $file !== "viewer.php"&& $file !== "." && $file !== "..") { // directories into one array if (is_dir($dir.$file)) { $dirdb[] = $file; } else //files into another { $filedb[] = $file; } } $i++; } closedir($dh); } $pages = (count($dirdb) + count($filedb)) / 20; $pages += .9; if ( $pages >= 2 ) { echo "Page:  "; while ($lnkcnt <= $pages) { echo "".$lnkcnt.", "; $lnkcnt++; } echo "..."; } ?> $file3) //output as one array ( separating into directories and files again, but one array is easier to count and manage) { if ($key >= ($skip * 16)) //don't show more than 16 { } elseif (($skip >= 2) && ($key <= (($skip * 16) - 16))) //don't show the earlier 16 { } else { if (!($key%4)) //new row every four entries { echo ""; } if (is_dir($dir.$file3)) //directory output { echo ""; } else { echo ""; } } } echo "

".$file3."

".$file3."
"; echo "

"; echo "Gallery scripts provided by Neoteric Computers
"; ?>