"") { $sublinks = "  /  " . $subcatagory . ""; } if ($folder <> "") { if ($page == "") { $page = "Page_1"; } $sublinks .= "  /  " . $folder . ""; $sublinks .= "  /  " . $page . ""; } if ($picturename <> "") { $sublinks .= "  /  " . $picturename . ""; } if ($imageview == "") { $imageview = "Same"; } ?>

Home Page
Photo Album :
Main Folder
Images open in the same window
"; echo "New Window"; } else { echo "Images open in a new window
"; echo "Same Window
"; } } ?>
Folders
"; echo "These are the current folders in my photo album. Each folder here contains photos all seperated by groups. For example in the Animal folder you will find 2 folders, one with my cat Lily's photos and another with my sisters cat Pup's photos
"; while ($f = readdir($dir)) { $file_list[] = $f; } natcasesort($file_list); $sidecount = 0; echo "

"; foreach ($file_list as $filename) { if (!eregi(".jpg",$filename) && $filename!=='.' && $filename!=='..' && $filename!=='photoWindow.php' && $filename!=='PhotoAlbum.php' && $filename!=='Thumbnails' && $filename!=='test.php'){ #if does not match .jpg . and .. $filepath = $filename . "/" . $filename . ".txt"; $handle = fopen($filepath, "r"); $contents = fread($handle, filesize($filepath)); fclose($handle); // This displays the images in a table of 5 images in a row if ($sidecount == "0"){ echo ""; echo ""; $sidecount = 1; }elseif ($sidecount == "1"){ echo ""; $sidecount = 2; }elseif ($sidecount == "2"){ echo ""; $sidecount = 3; }else{ echo ""; echo ""; $sidecount = 0; } } } echo "
$filename
View Album
$contents
$filename
View Album
$contents
$filename
View Album
$contents
$filename
View Album
$contents
"; if ($status == "change") { echo "

Opening Change
"; echo "How the images are viewed has been changed based on your action. This will remain until you leave the photo album."; } } if ($subcatagory <> "") { $file_list = array(); //$d="photo_album/" . $subcatagory; $d = $subcatagory; $files=array(); $dir = opendir($d); echo ""; echo ""; echo "
"; while ($f = readdir($dir)) { $file_list[] = $f; } natcasesort($file_list); echo ""; echo "
Folders

"; echo ""; foreach ($file_list as $filename) { if (!eregi("\.jpg",$filename) && $filename!=='.' && $filename!=='..' && $filename!=='explain.txt' && !eregi("\.txt",$filename)) { echo ""; } } echo "
$filename
"; echo "

"; echo ""; echo "
"; if ($imageview == "Same") { echo "Images are being viewed in the same window

"; //echo "Open in New window"; echo "Change to open in"; echo "

"; } else { echo "Images are being viewed in a new window

"; //echo "Open in the Same window"; echo "Change to open in"; echo "

"; } echo "
"; echo "

"; if ($folder <> "") { if ($viewtype == "Window") { $imagename = $subcatagory . "/" . $folder . "/" . $page . "/" . $picturename; $exif = exif_read_data($imagename, 0, true); $filename = $exif['FILE']['FileName']; $filesize = $exif['FILE']['FileSize']; $imgwidth = $exif['COMPUTED']['Width']; $imgheight = $exif['COMPUTED']['Height']; $comments = $exif['COMPUTED']['UserComment']; $copyright = $exif['COMPUTED']['Copyright']; echo "

$filename;
Image Details
Save Image:
Right Click -> Save As
File Size:
$filesize bytes
Image Width:
$imgwidth pixles
Image Height:
$imgheight pixles
Copyright:
$copyright
Image Comments
$comments
"; } else { if ($page == "") { $page = "Page_1"; } $file_list = array(); //$d = dir($catagory . "/" . $subcatagory . "/" . $folder . "/" . $page); $d = dir($subcatagory . "/" . $folder . "/" . $page); $total =-2; $sidecount = 0; $totalsize = 0; $pageSplit = explode("_",$page); echo "
You Are Viewing Page $pageSplit[1] of This Album

"; echo "
"; while($entry=$d->read()) { $file_list[] = $entry; } natcasesort($file_list); foreach ($file_list as $entry) { $total += 1; //$size = filesize($catagory . "/" . $subcatagory . "/" . $folder . "/" . $page . "/" . $entry); //$size = filesize( $subcatagory . "/" . $folder . "/" . $page . "/" . $entry); //$totalsize += $size; $pieces = explode(".", $entry); // This line will make the program only display the JPEG files in the folder if ($pieces[1] == "jpg") { // This line will make sure only the images for the catagory asked for are showm $fullname = explode("-", $pieces[0]); $splitTitle = explode("_", $fullname[0]); // This displays the images in a table of 5 images in a row if ($sidecount == "0"){ if ($imageview == "Same") { $windowtype = ""; } else { $windowtype = ""; } echo ""; echo ""; $sidecount = 1; }elseif ($sidecount == "1"){ if ($imageview == "Same") { $windowtype = ""; } else { $windowtype = ""; } echo ""; $sidecount = 2; }elseif ($sidecount == "2"){ if ($imageview == "Same") { $windowtype = ""; } else { $windowtype = ""; } echo ""; $sidecount = 3; }elseif ($sidecount == "3"){ if ($imageview == "Same") { $windowtype = ""; } else { $windowtype = ""; } echo ""; $sidecount = 4; }else{ if ($imageview == "Same") { $windowtype = ""; } else { $windowtype = ""; } echo ""; $sidecount = 0; } } } echo "
$windowtype
$splitTitle[0]
$splitTitle[1]
$splitTitle[2]
$windowtype
$splitTitle[0]
$splitTitle[1]
$splitTitle[2]
$windowtype
$splitTitle[0]
$splitTitle[1]
$splitTitle[2]
$windowtype
$splitTitle[0]
$splitTitle[1]
$splitTitle[2]
$windowtype
$splitTitle[0]
$splitTitle[1]
$splitTitle[2]
"; } $total -= 2; //echo "
"; $d->close(); if ($page <> "") { $file_list1 = array(); $d= $subcatagory . "/" . $folder; $files=array(); $dir = opendir($d); echo "
Pages : "; while ($g = readdir($dir)) { $file_list1[] = $g; } $counttemp = 0; natcasesort($file_list1); foreach ($file_list1 as $filename1) { if (!eregi("\.jpg",$filename1) && $filename1!=='.' && $filename1!=='..' && $filename1!=='include_file.php'){ #if does not match .jpg . and .. $counttemp = $counttemp + 1; $pageTemp = explode("_",$filename1); echo "" . $pageTemp[1] . ""; if ($counttemp <> count($file_list1) - 2) { echo "  |  "; } } } echo "
"; } echo "

"; } else { $filename = $subcatagory . "/Explain.txt"; $handle = fopen($filename, "r"); $contents = fread($handle, filesize($filename)); fclose($handle); echo "$contents"; } //$d->close(); } ?> This photo album script was written by Kevin M Cawley Jr
Programmed using HTML and PHP along with photo EXIF tags
http://www.moonsofneptune.com | kevinmc_jr@comcast.net