Home Page Photo Album : Main Folder
|
if ($subcatagory == "") {
if ($imageview == "Same") {
echo "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 " ";
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 "";
foreach ($file_list as $filename) {
if (!eregi("\.jpg",$filename) && $filename!=='.' && $filename!=='..' && $filename!=='explain.txt' && !eregi("\.txt",$filename)) {
echo "
|
$filename | ";
}
}
echo " ";
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 |
|
|
|
";
} 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 "";
}
$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 " |