$tblstart"; if(!$id){ $userlist=" $tccell1s colspan=3>Sex: Male | Female | N/A | All $tccell2 colspan=3>Click on the pictures to view them in full size. $tccellh width=60>Picture $tccellh>Username $tccellh>Real name "; $where=($sex?'WHERE sex=':'').($sex=='m'?'0':'').($sex=='f'?'1':'').($sex=='n'?'2':''); $users=mysql_query("SELECT id,name,realname,sex,powerlevel FROM users $where ORDER BY name"); $numusers=mysql_num_rows($users); for($usercount=0;$user=mysql_fetch_array($users);){ $i=$user[id]; if(file_exists("photo/$i"."s.jpg")){ $usercount++; $userlist.=''; $userpicture=""; $namecolor=getnamecolor($user[sex],$user[powerlevel]); $userlist.=" $tccell2 width=60>$userpicture $tccell2l>$user[name] $tccell2l>$user[realname]  "; } } print "$tccellh colspan=3>$usercount users found.$userlist"; }else{ $user=mysql_fetch_array(mysql_query("SELECT id,name,realname FROM users WHERE id=$id")); print " $tccellc>$user[name] -- $user[realname] $tccell2> $tccell1>Back to Photo Album "; } print $tblend.$footer; printtimedif($startingtime); ?>