photos); for ($i = 0; $i < $lim; $i++) { if ($profile->photos[$i]['ID'] == $PHOTO) { $width = $profile->photos[$i]['WIDTH']; $height = $profile->photos[$i]['HEIGHT']; $location = $profile->photos[$i]['LOCATION']; $gallery = $profile->photos[$i]['GALLERY']; $caption = $profile->photos[$i]['CAPTION']; break; } } if ($i == $lim) { handle_error ("Photo $ID/$PHOTO does not exist"); } $alias = $profile->row['ALIAS']; set_profile_crumb ($ID, $alias, $profile->row['COUNTRY'], $profile->row['city_id'], $profile->data['country_name'], $profile->data['city_name']); if ($alias != "") { $TITLE = "Photo of $alias"; } else { $TITLE = "Photo of $ID"; } $err = ""; if ($gallery == 'friends') { $TITLE = "Private $TITLE"; $qr = "select FRIEND_A from FRIENDSHIP where FRIEND_A=$ID and FRIEND_B=$user and STATUS='accepted'"; $row = $db_members->query_fetch_single ($qr); if ($row == false) { $err = "Sorry. This photo is only available for friends. add as friend"; } $thispage->add_crumb ("profile.photos.php?ID=$ID&gallery=private", "Private Photos"); } else { $TITLE = "Public $TITLE"; $thispage->add_crumb ("profile.photos.php?ID=$ID&gallery=public", "Public Photos"); } $thispage->add_crumb ("profile.enlarge.photo?ID=$ID&PHOTO=$PHOTO", $PHOTO); $thispage->set_navigation("leftnavigation.profile.php"); $thispage->header (); echo "

$TITLE

\n"; if ($err != "") { echo "

$err

\n"; } else { $new_width = 550; if ($width < $new_width) { $new_width = $width; } echo build_photo_tag ($PHOTO, $location, 'personal', 3, 'full', $width, $height, $new_width, $caption, ''); } $thispage->footer(); ?>