Travel Photography: 2001-

= 0; $lt--) { $location = rtrim (pg_result ( $locations_result, $lt, 0 ) ); $location_description = pg_result ( $locations_result, $lt, 1 ); $good_pics = pg_exec ( "SELECT * FROM images WHERE location='".addslashes($location)."' AND use_for_main='t'" ); $row_max = pg_numrows ( $good_pics ); $row = rand ( 0, $row_max - 1 ); if ( $row_max == 0 ) continue; $id = pg_result($good_pics, $row, 0); $caption = pg_result($good_pics, $row, 1); $description = pg_result($good_pics, $row, 2); $country = rtrim(pg_result($good_pics, $row, 3)); $spec_loc = rtrim(pg_result($good_pics, $row, 4)); $date = pg_result($good_pics, $row, 5); $photographer = pg_result($good_pics, $row, 6); $use_for_main = pg_result($good_pics, $row, 7); $quality = pg_result($good_pics, $row, 8); $fileext = pg_result($good_pics, $row, 9); $file_loc=escape_slash ( escape_space ( "https://xenotropic.net/images/{$country}/{$spec_loc}{$id}_med.{$fileext}" ) ); $med_width = pg_result($good_pics, $row, 12); $med_height = pg_result($good_pics, $row, 13); if ( $width_count == $width_limit ) { echo " \n"; $width_count = 1; } else { $width_count ++; } if ( $med_width < 300 ) { echo "
\n"; // $width_count = $width_limit; } else { echo "\n"; } echo "\n\"$caption\"\n"; echo "
$location:
  $location_description "; } ?>