4 $prefetch = array('`points`', '`last_active_date`', '`register_date`', '`sig`', '`quote`', '`reg_email`', '`public_email`', '`private_email`', '`useragent`',
5 'INET_NTOA(`last_login_ip`) AS `last_login_ip`', 'INET_NTOA(`last_ip`) AS `last_ip`', 'INET_NTOA(`reg_ip`) AS `reg_ip`');
8 $page->title
= _('User Details');
10 if ( ! ($user instanceof authuser
) )
11 $page->errorfooter('login');
13 $uid = isset($_GET['id']) ?
intval($_GET['id']) : $user->userid
;
15 if ( $user->userid
!= $uid && $DB->query('SELECT `userid` FROM `users` WHERE `userid` = '.$uid)->num_rows
== 0 )
16 $page->errorfooter('userid');
18 if ( $user->userid
== $uid ) {
19 $page->title
= _('Your Details');
24 '<fieldset style="float:right" class="content"><legend>',_('Options Menu'),'</legend>
26 <li><a href="theme">',_('Edit your theme'),'</a></li>
27 <li><a href="options">',_('Change settings and profile'),'</a></li>
28 <li><a href="passwd">',_('Change your password'),'</a></li>
29 <li><a href="userlist">',_('See user list'),'</a></li>
30 <li><a href="userlist?show=banned">',_('See banned user list'),'</a></li>
31 <li><a href="invites">',_('Check your invite list'),'</a></li>
36 $user2 = new reguser($DB, $uid, $prefetch);
37 $page->title
= sprintf(_('User Details for %s'), $user2->alias
);
39 if ( LVL_RESTRICTED
== $user2->level
&& LVL_ADMIN
<= $user->level
&& isset($_POST['activate']) ) {
40 $user2->level
= LVL_NEW
;
41 echo '<p class="notice">',_('User account has been activated.'),'</p>';
46 '<dt>',_('User Name'),'</dt>
47 <dd><strong>',$user2->alias
,'</strong></dd>
48 <dt>',_('Account ID'),'</dt>
49 <dd>',$user2->userid
,'</dd>
50 <dt>',_('Level'),'</dt>
51 <dd>',$user2->level
,': ';
53 switch ( round($user2->level
-5, -1) ) {
55 echo _('New Account'); break;
57 echo _('Regular Account'); break;
59 echo _('Experienced User'); break;
61 echo _('Special User'); break;
63 echo _('Moderator'); break;
65 echo _('Administrator'); break;
70 echo _('Restricted Account'); break;
74 <dt>',_('Points'),'</dt>
75 <dd>',$user2->points
,'</dd>
76 <dt>',_('Last Active'),'</dt>
77 <dd>',$user->fdate($user2->last_active_date
),'</dd>
78 <dt>',_('Registration Date'),'</dt>
79 <dd>',$user->fdate($user2->register_date
),'</dd>
80 <dt>',_('Signature'),'</dt>
81 <dd>',nl2br(htmlspecialchars($user2->sig
)),'</dd>
82 <dt>',_('Quote'),'</dt>
83 <dd>',nl2br(htmlspecialchars($user2->quote
)),'</dd>
84 <dt>',_('Public E-mail Address'),'</dt>
85 <dd>',$user2->public_email
,'</dd>
86 <dt>',_('Browser'),'</dt>
87 <dd>',htmlspecialchars($user2->useragent
),'</dd>
91 if ( LVL_ADMIN
<= $user->level
) {
93 '<p class="notice">',_('Administrator Information'),"</p>\n",
95 '<dt>',_('Private E-Mail Address'),"</dt>\n",
96 ' <dd>',$user2->private_email
,"</dd>\n",
97 '<dt>',_('Signup E-Mail Address'),"</dt>\n",
98 ' <dd>',$user2->reg_email
,"</dd>\n";
101 _('Last Login From') => $user2->last_login_ip
,
102 _('Last Active From') => $user2->last_ip
,
103 _('Signed Up From') => $user2->reg_ip
106 foreach ( $fields as $title => $addr )
107 echo '<dt>',$title,"</dt>\n",
108 "\t<dd>",( is_null($addr) ?
_('Unknown Address') : $addr.' → '.gethostbyaddr($addr) ),"</dd>\n";
112 if ( LVL_RESTRICTED
>= $user2->level
)
114 '<form action="',$_SERVER['PHP_SELF'],'?id=',$user2->userid
,'" method="post" class="info">',"\n",
115 "\t<p>",_('This user is currently pending confirmation:'),
116 ' <input type="submit" name="activate" value="',_('Activate Account'),'"/></p>',"\n",