var mapCenterLat = '.$gallery["map_center_lat"].''; } else { echo ''; } } if ( (!isset($_GET["im"])) && (isset($_SESSION["gallery_id"])) ) { $sql="SELECT min(photo_id) AS photo_id FROM photo_to_gallery WHERE gallery_id=".$_SESSION["gallery_id"]; $res = mysql_query($sql,$my_conn); $gallery = mysql_fetch_assoc($res); $_GET["im"] = $gallery["photo_id"]; } //paging stuff for images //check for session vars and assign if none exist $_SESSION["gallery_paging"]=""; if (!$_SESSION['gallery_paging']) { $sql="SELECT p.photo_id FROM photo_to_gallery ptg, photo p WHERE ptg.gallery_id=".$_SESSION["gallery_id"]." AND p.photo_id = ptg.photo_id AND p.public=1 ORDER BY p.photo_id"; $res = mysql_query($sql,$my_conn); while ($gallery_images = mysql_fetch_object($res)) { $_SESSION["gallery_paging"].=$gallery_images->photo_id.","; } $_SESSION["gallery_paging"] = substr($_SESSION["gallery_paging"], 0, strlen($_SESSION["gallery_paging"])-1); } if ( (isset($_GET["im"])) && ($_GET["im"]>0) ) { $sql="SELECT ptg.gallery_id FROM photo_to_gallery ptg, photo p WHERE ptg.photo_id=".mysql_real_escape_string($_GET["im"])." AND p.photo_id=ptg.photo_id AND p.public=1"; $res = mysql_query($sql,$my_conn); $gallery = mysql_fetch_assoc($res); $_SESSION["gallery_id"] = $gallery["gallery_id"]; $sql="SELECT p.photo_id, p.filename, p.description, pg.photographer_name, p.date, DATE_FORMAT(p.date, '%b %d, %Y') AS date_formatted, p.latitude, p.longitude, p.keywords, c.camera_folder_name FROM photo p, camera c, photographer pg WHERE p.photo_id=".mysql_real_escape_string($_GET["im"])." AND p.public=1 AND c.camera_id = p.camera_id AND pg.photographer_id=p.photographer_id "; $res = mysql_query($sql,$my_conn); $db_image = mysql_fetch_array($res); if (isset($db_image)) { //some filenames in the database might include a leading "/". if so, remove it. if (substr($db_image["filename"], 0, 1) == "/") { $db_image["filename"] = substr($db_image["filename"], 1, (strlen($db_image["filename"])-1)); } $exifimage = $_SESSION["image_path"].$db_image["camera_folder_name"]."/".strtoupper($db_image["filename"]); if (file_exists($exifimage)) { echo ""; $exif_data_available = true; } else { $exifimage = $_SESSION["image_path"].$db_image["camera_folder_name"]."/".$db_image["filename"]; if (file_exists($exifimage)) { echo ""; $exif_data_available = true; } else { echo ""; $exifimage = $_SESSION["image_path"].$db_image["camera_folder_name"].$db_image["filename"]; if (file_exists($exifimage)) { echo ""; $exif_data_available = true; } else { echo ""; $exif_data_available = false; } } } ?>


    = 1) { print '
  • « prev
  • '; } if ( ($i > 0) && ($i < count($paging_array)-1) ) { print ''; } if ($i != count($paging_array)-1) { print '
  • next »
  • '; } } } ?>
Keywords:
= 1) { $tags = explode(",", $db_image["keywords"]); $tagscount = count($tags)-1; for ($i=0; $i<=$tagscount;$i++) { $str_keywords .= "".$tags[$i].""; if ($i != $tagscount) $str_keywords .= ", "; } } ?>
EXIF data:
unable to retrieve the requested image
nothing to see here