0 ) $limit = 30;
/***********************************************************************\
* Display the page:
\***********************************************************************/
admin_page_head("New Users");
echo "
Recently joined:
\n";
echo "These are the most recent ".$limit." users to join the project.
\n";
echo "Clicking on a name opens a user management page in another window or tab\n";
echo "\n";
$query="SELECT * FROM user ORDER BY create_time DESC LIMIT $limit";
$result = mysql_query($query);
if (mysql_num_rows($result) < 1) {
echo "There are no new users.";
admin_page_tail();
}
start_table();
table_header("ID", "Name", "Email", "Team", "Country", "Joined");
while ($row = mysql_fetch_object($result)) {
$id = $row->id;
$name = $row->name;
$email = $row->email_addr;
$country = $row->country;
$joined = time_str($row->create_time);
$email_validated = $row->email_validated;
$team_name="";
if($row->teamid > 0){
$team = lookup_team($row->teamid);
$team_name = $team->name;
}
// Special Users:
$roles = "";
$user = getForumPreferences($row);
$special_bits = $user->special_user;
if ($special_bits != "0") {
for ($i = 0; $i < 7; $i++) {
$bit = substr($special_bits, $i, 1);
if ($bit == '1'){
if (!empty($roles)) {
$roles .= ", ";
}
$roles .= $special_user_bitfield[$i];
}
}
}
if (!empty($roles)) {
$roles = "[$roles]";
}
// Banished?
if (!empty($user->banished_until)) {
$dt = $user->banished_until - time();
if( $dt > 0 ) {
$x = "Currently banished";
}
else {
$x = "Previously banished";
}
$roles .= $x;
}
if ($email_validated) {
$email = "".$email."\n";
} else {
$email = "".$email."\n";
}
table_row($id, "".$name." ".$roles, $email,
$team_name, $country, $joined);
}
end_table();
admin_page_tail();
?>