"; $result = mysql_query("Select photoID from gns_event_photos where photoID > $id AND eventID = 2 order by photoID limit 1"); if($row = mysql_fetch_assoc($result)) { if($row['photoID'] != $id) { echo "Prev | "; } } echo "Main"; $result = mysql_query("Select photoID from gns_event_photos where photoID < $id AND eventID = 2 order by photoID DESC limit 1"); if($row = mysql_fetch_assoc($result)) { if($row['photoID'] != $id) { echo " | Next"; } } echo "

"; echo "$title

$title
$description


"; if($id && $admin) { echo "
Delete Photo
"; } ?>