I got it working -- here's how
<?php
$type=$_GET['type']; // get type from the address bar
$year=$_GET['year']; // get year from the address bar
$base="pictures"; // sets the base folder for the script
$directory=$base . "/" . $year . "/" . $type."/"; // put em together
$thumbsdir=$directory ."thumbs/";
$mydir = dir($directory); // open the directory for reading
while(($file = $mydir->read()) !== false) {
if(is_dir($mydir->path.$file)) { continue; } // if it's a folder, do nothing and continue the loop
else { echo "<a href=" . $directory . $file . "><img src=" . $thumbsdir . $file . " border=1></a>";} // otherwise show the thumbnail and link to the picture
}
$mydir->close(); // close the folder
?>
I would like to note that the code is rough and so is the solution but it serves it's purpose for the time being.
Thanks for the assistance.
Cole
Last edited by drspin; 12-19-2005 at 08:18 PM.
|