<?php

	include "library.php";

	$cxn = start_code( true );
	
	$cxn_common = db_common_login();
	

	$_SESSION['validation_error'] = "false";
	$_SESSION['validation_errors'] = "";

	page_header( "", $cxn, $cxn_common, "", true );

	$query = "SELECT profile.id as member_id, photos.*, profile.handle FROM photos LEFT JOIN profile ON profile.id = photos.member_id ORDER BY photos.id DESC LIMIT 50";

 	$result = run_query( $query, $cxn );

	echo "<table width='100%'>";

	for ($i=0; $i < mysql_num_rows($result); $i++)
	{
		$data = get_row( $result );

		echo "<tr><td width='10%'>";

		echo show_handle( $data['member_id'], $data['handle'], "main", "" );

		echo "</td><td width='90%'>";

		show_photo( $data['member_id'], 100, $data['photo_number'], true, false, $cxn );

		echo "</td></tr><tr><td>.</td></tr>";
	}

	echo "</table>";

	echo black( "<br><br>Finished" );
?>
