\"Album ".$home_link." "; } Else { $nav="\"Album ".$home_link." "; } //How many paths do we got in $album? $count=@count($folder); //Lets make the naviation! Don't look if you have a weak stomache! for($i=0;$i<$count;$i++) { If($folder[$i]) { $path.=$folder[$i]."/"; //Give all the folders except the last folder a link and a closed picture. If(($count-2) > $i) { $nav .=" > \"".ucwords($folder[$i])."\" ".ucwords($folder[$i])." "; } Else { $nav .=" > \"".ucwords($folder[$i])."\" ".ucwords($folder[$i])." "; } } } Echo($nav); $dir=@opendir($full_server.$album); //Loop through them all ;). $files = array(); while($files[]=readdir($dir)); sort($files); closedir($dir); foreach ($files as $file){ //Don't display the stupid directory tree files. If($file!= "." AND $file!= "..") { //If it's a directory, show the folder image with a link to the new album If(is_dir($full_server.$album.$file) AND $file !="") { //If the file has the ignore word in it, do not show the file. If(!preg_match("-hide-i",$file)) { $display_name=str_replace($find,$replace,$file); //Make the html $folders .= "\"".ucwords($display_name)."\"
".ucwords($display_name)."
\n"; $j++; If(is_int($j / $folder_cells)) { //This makes the table all nice and neat, actually, it splits the table with a new every $table_cells images/folders. $folders.= "\n\n"; $folder_close="1"; } Else { $folders.=""; } } // Else, the file is not a directory, so it must be an image. } Else { $file_ext=".".file_ext($file); $file_name=file_name($file); $display_name=str_replace($find,$replace,$file_name); //Hide the thumb files from displaying as regular files and disallow any file types that are not allowed. If((!preg_match("-_thumb-i",$file)) && (in_array(file_ext($file),$show_files))) { //If the file has the ignore word in it, do not show the file. If(!preg_match("-hide-i",$file)) { //Now, if there is a thumb file, display the thumb, else display the full images but smaller :(. $thumb=$file_ext; //Make the html $remove=""; If($drop_shadow) { //Cool drop shadow effect. $images .= "
\"".ucwords($display_name)."\"
".ucwords($display_name)."
".$remove."\n"; } Else { //Image border $images .= "\"".ucwords($display_name)."\"
".ucwords($display_name)."
".$remove."\n"; } $k++; If(is_int($k / $table_cells)) { //This makes the table all nice and neat, actually, it splits the table with a new every $table_cells images/folders. $images .= "\n\n"; $image_close="1"; } Else { $images .=""; } } } } } } //Close the directory so the bugs don't get in and display some folders and images! Whew! What a workout! ?>

\n"); Echo("\n"); Echo($folders); If(!$folder_close) { Echo("\n"); } Echo("\n"); Echo("
\n"); } Echo("
\n"); If($images) { Echo("\n"); Echo("\n"); Echo($images); If(!$image_close) { Echo("\n"); } Echo("
\n"); } ?>