10000) { $focalLength = substr($focalLength,0,2); } $exifHTML .= "$focalLength mm, "; } if ($exifHTML !== "") { $exifHTML = substr($exifHTML,0,-2); } //image dimensions list($width, $height, $type, $attr) = @getimagesize($photoFile); $cssWidth = ($width - 10); list($width_m, $height_m, $type_m, $attr_m) = @getimagesize($thumbFile_m); if ($_SESSION['admin']) { $adminTitleJS = "onmouseover=\"this.style.backgroundColor='#666'\" onmouseout=\"this.style.backgroundColor='#111'\" onclick=\"editTitle()\""; $adminCaptionJS = "onmouseover=\"this.style.backgroundColor='#666'\" onmouseout=\"this.style.backgroundColor='#111'\" onclick=\"editCaption()\""; $adminTagsJS = "onmouseover=\"this.style.backgroundColor='#222'\" onmouseout=\"this.style.backgroundColor='#111'\" onclick=\"editTags()\""; $photoPublic = $photo['Public']; $adminEditJS = '
'; if ($photoPublic) { $adminEditJS .= 'public '; } else { $adminEditJS .= 'public '; } $adminEditJS .= ' caption rotate delete
'; } else { $adminTitleJS = ""; $adminCaptionJS = ""; $adminTagsJS = ""; $adminEditJS = ""; } if ($photoDescription == "") { $captionCSS = "display:none;"; } else { $captionCSS = ""; } if ($cntPhoto == 1) { $photoBody = ""; if ($tag !== "") { $photoBody .= "
Tag: $tag
"; } $photoBody .= << stub = '{$_GET['p']}'; width = ({$width}-10);

{$photoTitle}

{$photoTitle}
{$photoDescription}
{$adminEditJS}
[.] {$photoDateTitle} at {$photoDateTime}
PHOTOEND; //Print out exif data, if available if ($exifHTML !== "") { $photoBody .= '
[c] '; $photoBody .= $exifHTML; $photoBody .= "
"; } //Print out tags $photoBody .= '
[t] '; if ($photoTags !== "") { $tags = explode(":",$photoTags); array_pop($tags); for($t=0;$t'; if ($t < (count($tags)-1)) { $photoBody .= ", "; $tagList .= ", "; } } } else { if ($_SESSION['admin']) { $photoBody .= "Click here to add tags for this photo."; } } $photoBody .= "
"; $photoBody .= ''; } } } $backNext = ''; // Get back $photoDate_f = date("Y-m-d H:i:s",strtotime($photoDate)); $sql = "SELECT PhotoID, Title, Stub, DateCreated FROM photos WHERE "; if (!$_SESSION['admin']) { $sql .= "Public = 1 AND "; } if ($tag !== "") { $sql .= "PhotoID IN ($tagPhotoIDs) AND "; } $sql .= "PhotoID <> $photoID AND DateCreated < '$photoDate_f' ORDER BY DateCreated DESC LIMIT 1"; if (!$result = @ mysql_query ($sql, $connection)) logerror(); if (mysql_num_rows($result) > 0) { while ($backphoto = mysql_fetch_array($result)) { $photoDate = $backphoto['DateCreated']; $backphotoID = $backphoto['PhotoID']; $photoYear = date("Y",strtotime($photoDate)); $thumbYearDir = THUMB_DIR . $photoYear; $thumbBaseFile = $thumbYearDir . "\\" . md5(SALT.$backphotoID); $thumbFile_s = $thumbBaseFile . "_s.jpg"; $thumbSRC_s = str_replace(THUMB_DIR, THUMB_URL, $thumbFile_s); $thumbSRC_s = str_replace("\\", "/", $thumbSRC_s); list($width_s, $height_s, $type_s, $attr_s) = @getimagesize($thumbFile_s); $backNext .= <<back
older
BACKEND; $menuOlderHTML = 'older'; } } else { $backNext .= '
'; $menuOlderHTML = 'older'; } // Get next $sql = "SELECT PhotoID, Title, Stub, DateCreated FROM photos WHERE "; if (!$_SESSION['admin']) { $sql .= "Public = 1 AND "; } if ($tag !== "") { $sql .= "PhotoID IN ($tagPhotoIDs) AND "; } $sql .= "PhotoID <> $photoID AND DateCreated > '$photoDate_f' ORDER BY DateCreated ASC LIMIT 1"; if (!$result = @ mysql_query ($sql, $connection)) logerror(); if (mysql_num_rows($result) > 0) { while ($nextphoto = mysql_fetch_array($result)) { $photoDate = $nextphoto['DateCreated']; $nextphotoID = $nextphoto['PhotoID']; $photoYear = date("Y",strtotime($photoDate)); $thumbYearDir = THUMB_DIR . $photoYear; $thumbBaseFile = $thumbYearDir . "\\" . md5(SALT.$nextphotoID); $thumbFile_s = $thumbBaseFile . "_s.jpg"; $thumbSRC_s = str_replace(THUMB_DIR, THUMB_URL, $thumbFile_s); $thumbSRC_s = str_replace("\\", "/", $thumbSRC_s); list($width_s, $height_s, $type_s, $attr_s) = @getimagesize($thumbFile_s); $backNext .= <<next
newer
NEXTEND; $menuNewerHTML = 'newer'; } } else { $menuNewerHTML = 'older'; } $backNext .= "
 
"; ?> <?php print APP_TITLE ?>: <?php print $photoTitle ?>
phases
onfocus * photossun
all photos | blog | feed feed | photos cc 1998-2007 pb.