mirror of https://github.com/BOINC/boinc.git
105 lines
3.0 KiB
PHP
105 lines
3.0 KiB
PHP
|
<?php
|
||
|
$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit
|
||
|
|
||
|
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 "<h2>Recently joined:</h2>\n";
|
||
|
|
||
|
echo "These are the most recent ".$limit." users to join the project.<br>\n";
|
||
|
echo "Clicking on a name opens a user management page <i>in another window or tab</i>\n";
|
||
|
|
||
|
echo "<form name=\"new_user_limit\" action=\"?\" method=\"GET\">\n";
|
||
|
echo "<label for=\"limit\">Limit displayed users to</label>\n";
|
||
|
echo "<input type=\"text\" value=\"".$limit."\" name=\"limit\" id=\"limit\" size=\"5\">";
|
||
|
echo "<input type=\"submit\" value=\"Display\">\n";
|
||
|
echo "</form>\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 = "<span class=\"smalltext\">[$roles]</span>";
|
||
|
}
|
||
|
|
||
|
// Banished?
|
||
|
if (!empty($user->banished_until)) {
|
||
|
$dt = $user->banished_until - time();
|
||
|
if( $dt > 0 ) {
|
||
|
$x = "<span style=\"color: #ff0000\">Currently banished</span>";
|
||
|
}
|
||
|
else {
|
||
|
$x = "<span style=\"color: #ff9900\">Previously banished</span>";
|
||
|
}
|
||
|
$roles .= $x;
|
||
|
}
|
||
|
|
||
|
if ($email_validated) {
|
||
|
$email = "<span style=\"color: #ffff00\">".$email."</span>\n";
|
||
|
} else {
|
||
|
$email = "<span style=\"color: #ff0000\">".$email."</span>\n";
|
||
|
}
|
||
|
|
||
|
table_row($id, "<a href=\"manage_user.php?userid=".$id."\" target=\"_user\">".$name."</a> ".$roles, $email,
|
||
|
$team_name, $country, $joined);
|
||
|
}
|
||
|
end_table();
|
||
|
|
||
|
admin_page_tail();
|
||
|
|
||
|
?>
|