Gallery
\"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); //Lets get some images!! $dir=@opendir($full_server.$album); //Loop through them all ;). while($file=@readdir($dir)) { //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)) { //If the file has the ignore word in it, do not show the file. If(!eregi($ignore_word,$file)) { $display_name=str_replace($find,$replace,$file); //Make the html $folders .= "\"".ucwords($display_name)."\"
".ucwords($display_name)."
\n"; $j++; If(is_int($j / $table_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((!eregi("_thumb",$file)) && (in_array(file_ext($file),$show_files))) { //If the file has the ignore word in it, do not show the file. If(!eregi($ignore_word,$file)) { //If a thumb file dosen't exists, then try and make one. If($auto_thumb) { If(!file_exists($full_server.$album.$file_name."_thumb".$file_ext)) { If(!file_thumb($file,$full_server.$album,$file_name)) { $thumb_error .="Thumb for ".$files_path.$album.$file." could not be created.
"; } } } //Now, if there is a thumb file, display the thumb, else display the full images but smaller :(. If(file_exists($full_server.$album.$file_name."_thumb".$file_ext) OR file_exists($full_server.$album.$file_name."_thumb".$file_ext)) { $thumb="_thumb".$file_ext; } Else { $thumb=$file_ext; } //Make the html $remove=""; If($display_admin) { If($phAdmin==true) { $remove="\n
\n"; } } 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 .=""; } } } } } } @closedir($dir); ?>

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



© All Rights Reserved in Varkala Sathyan.  Website designed and developed by - RoyalStar

Varkala Sathyan  IEng, MIET(London)
Cine & Stage Artiste and Technical Consultant, Broadcasting