$media - $".$price.""; return $o; } $file_id = $_GET["file_id"]; $start = $_GET["start"]; include 'statsi.inc'; include '../mysql.inc'; $mysqli = new mysqli("localhost", $username, $password, $dbuse); // Validate "file_id" to prevent malicious activity $x = explode("-", $file_id); $itsok = 0; // format NNNN-YYY if (strlen($x[0]) == 4 && strlen($x[1]) >= 2 && strlen($x[1]) <= 3) $itsok = 1; // format PAxxxxx or PBxxxxx if (strlen($file_id) == 8 && $file_id[0] == "P" && ($file_id[1] == "A" || $file_id[1] == 'B')) $itsok = 1; if (strlen($file_id) == 8 && $file_id[0] == "p" && ($file_id[1] == "a" || $file_id[1] == 'b')) $itsok = 1; // Format IMG_nnnnnn.m $x = explode("_", $file_id); if (($x[0] == "img" || $x[0] == "IMG") && strlen($x[1]) <= 8) $itsok = 1; // Check for anything specifically bad if (strstr($file_id, "<") > 0 || strstr($file_id, ">") > 0 || strstr($file_id, "\'") > 0) $itsok = 0; if (!$itsok) $file_id = "INVALID_NAME"; $result = $mysqli->query ("SELECT * FROM `photo` WHERE name='$file_id';"); if ($result) { $value = $result->fetch_object(); } else { $result = $mysqli->query ("SELECT * FROM `photo` WHERE alias='$file_id';"); // old ID if ($result) { $value = $result->fetch_object(); // $file_id = $value->id; // use the main file name } // else // { // echo "Query failed

".mysql_error(); // } } $picname=$file_id; $enable_buying = 1; if ($result) $result->free(); $filename=$picname.".jpg"; $hdr_keywords = "fine,art,nature,photography,photographs,pennsylvania,bucks,county,bucks county,sunsets,trees,farms,country,rural,natural,mountains,flowers,philadelphia,new,jersey,"; if ($value) { // Set $webtitle for use later in the Pinterest button if ($value->webtitle) $webtitle = $value->webtitle." Photo Art Print - ".$value->desc." - ".$value->location; else if ($value->location) $webtitle = $value->location." Photo Art Print - ".$value->desc; else $webtitle = $value->desc." Photo Art Print - ".$value->location; $webtitle .= " - Photography by Matt Schrier"; $hdr_keywords .= $value->keywords; $hdr_description = "Original Photograph, available as matted, unmatted, or framed print. Subject: $value->desc, $value->location"; } else { $webtitle = "Bucks County Photography by Matt Schrier"; $hdr_description = "Original Photographs, available as matted, unmatted, or framed print"; } ?> \n"; echo "\n"; echo "".$webtitle."\n"; ?> ////////// Page-specific Content starts HERE /////////////// ?>

filename != "") { // use the specified filename // better for google image searches $img_source = "images_new/$value->filename.jpg"; } else if (file_exists("images_new/$picname.jpg")) $img_source = "images_new/$picname.jpg"; else if (file_exists("images_new/$picname_u.jpg")) $img_source = "images_new/$picname_u.jpg"; else if (file_exists("images_new/$picname_u-img.jpg")) $img_source = "images_new/$picname_u-img.jpg"; else $img_source = "get_my_img.php?id=$picname&size=F&fsize=0&msize=0"; if ($value == 0) { echo "Sorry - You have requested an invalid image ID
\n"; $picnamesafe = htmlentities($file_id); incrementVisits("photo_inv_$picnamesafe", $_SERVER['REMOTE_ADDR'], 0, ""); } else { incrementVisits("photo_$picname", $_SERVER['REMOTE_ADDR'] , 0, $_SERVER['HTTP_REFERER']); $img_src = imagecreatefromjpeg($img_source); $ww = imagesx($img_src); $hh = imagesy($img_src); $x = imagesx($img_src); $y = imagesy($img_src); $dd = $value->desc . ", " . $value->location; // Limit the image size, to fit the redesign of 2014 if ($ww > 500) $ww = 500; echo "\n\n"; echo "
\n
"; echo "
"; // Display keywords as links, to allow the user to find related photos if ($value->keywords != '') { // Create a link for each keyword echo "Find Related Images: "; $items = explode(',',$value->keywords); foreach ($items as $item) { // replace any leading spaces $item2 = preg_replace("/^( +)/m", "", $item); echo "".$item2." \n"; } } else if ($value->cat) { // Display a link to the gallery this photo is in $cats = explode(',',$value->cat); if ($cats[0] == 'new') $cat1 = $cats[1]; // skip the "new" category else $cat1 = $cats[0]; if ($cat1 != '') { $resultc = $mysqli->query ("SELECT * FROM `photocat` WHERE name = '$cat1';"); if ($resultc) { $valuec = $resultc->fetch_object(); $cat_desc = $valuec->display; echo "See more photos in the '$cat_desc' Gallery
\n"; $resultc->free(); } } } echo "

\n"; ///////////////////////////////// Display the image HERE //////////////////////////// echo "
"; echo "\"$dd\"

\n"; echo ""; ?>

\"$value->desc\"
$value->location

"; } ?> "; ?>
\"Add
\n"; $l = encodelink("mailto:schrierphoto@gmail.com?subject=Photo Inquiry - Viewing: $value->desc ($picname)", "Inquire About this Photo"); // echo ""; // echo "
".$l."
"; echo $l."
"; ?> Sign up for E-mail.
echo "
"; /////////////////////////////// /// Insert Pinterest link here (must come last on the line, since the script adds the count) /////////////////////////////// // Example: // $pinterest = ""; echo $pinterest; ?>

Licensing: This image is available for Licensing. E-mail me. related1 != "" || $value->related2 != "" || $value->related3 != "") { $doing_related = 1; } if ($doing_related) { ?>

You may also like ...
related1 != "") { $u = photoURL($value->related1, "none"); $link = ""; echo $link; } if ($value->related2 != "") { $u = photoURL($value->related2, "none"); $link = ""; echo $link; } if ($doing_related) { echo "
related1&size=T&fsize=3&msize=10\" alt=\"\">
related2&size=T&fsize=3&msize=10\" alt=\"\">
\n"; } ?>
Important Ordering Information - Please Read:
  • I do not accept orders through this website any longer.
  • Please visit my Etsy Store to see my available items. If you don't see the item you are looking for please e-mail me for a custom listing.
close(); ?>