OurCS Conference 2013 (October 18-20): Part 1

View OurCS Conference 2013 Part 2

View OurCS Conference 2013 Part 3

"; echo ""; echo " "; $counter = 0; $directory = opendir(getcwd()); //opens current directory for reading $webpath = strstr(getcwd(), '/Photo/'); while(false != ($file = readdir( $directory ))) { //loops through all files if( $file == ".." || $file == "." || substr($file,0,1)=="_") { continue; } //ignores the "."(current directory) and ".."(parent directory) else { if ($counter % 3 == 0) echo " \n"; //three image per row //if it/s not a directory it will assume its an image file $originalName = $file; $dotLoc = strpos($file, '.'); $ext = substr($file, $dotLoc); $fileWithoutExt = substr($file, 0, $dotLoc); //it assumes that the images except thumb.jpg are valid images to //go on to the website (with extensions either in .gif, .JPG, .jpg, and .bmp) if($file!="thumb.jpg" && (".gif"==$ext || ".JPG"==$ext || ".jpg"==$ext || ".bmp"==$ext)) { //the extension of the thumbnails should be in lower case if (".JPG"==$ext) { $file = $fileWithoutExt.strtolower($ext); } echo ""; $counter++; } } } closedir($directory); //closes current directory if ($counter % 3 != 2) echo ""; // close the tr tag when it has not been closed in the loop echo ""; ?>
\n"; // Class is specified as 'picgroup' to specify a colorbox gallery of photos echo ""; echo " \n"; echo " \n"; if ($counter % 3 == 2) echo "