Display (x) new users with pictures
Last modified: November 11, 2006 - 23:31
Displays the newest users who has uploaded a picture
<?php
//show user pictures ---------------------------
//Will only show those users who have a picture
$count = 4; //how many userpictures, edit this value
global $user;
$output = '<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%"><TR><TD BGCOLOR="#f0f7f0"><center>';
$result = db_query_range("SELECT * FROM {users} as u where status=1 AND picture <> '' ORDER BY created DESC",0,$count);
while ($user_info = db_fetch_object($result)) {
$output .= '<a href="/user/'.$user_info->uid.'">
<img src="/'.$user_info->picture.'" hspace=0 height="90" ></a>';
}
$output .= '</center></TD></TR></TABLE>';
//------------------------------------------------------
print $output;
?>