.
require_once("../inc/util_ops.inc");
require_once("../inc/forum.inc");
require_once("../inc/profile.inc");
db_init();
/***********************************************************************\
* Action: Process form info & controls
\***********************************************************************/
$limit = get_int('limit', true);
if (! $limit > 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 = BoincTeam::lookup_id($row->teamid);
$team_name = $team->name;
}
// Special Users:
$roles = "";
$user = $row;
BoincForumPrefs::lookup($user);
$special_bits = $user->prefs->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();
$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit
?>