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($uid, $prefetch);
37 $page->title
= 'User Details for '.$user2->alias
;
39 if ( LVL_RESTRICTED
== $user2->level
&& LVL_ADMIN
<= $user->level
&& isset($_POST['activate']) ) {
40 $user2->level
= LVL_USER
;
41 echo '<p class="notice">User account has been activated.</p>';
47 <dd><strong>',$user2->alias
,'</strong></dd>
49 <dd>',$user2->userid
,'</dd>
51 <dd>',$user2->level
,': ';
53 switch ( round($user2->level
-5, -1) ) {
55 echo 'Normal User'; break;
57 echo 'Administrator'; break;
63 echo 'Restricted Account'; break;
68 <dd>',$user2->points
,'</dd>
70 <dd>',$user->fdate($user2->last_active_date
),'</dd>
71 <dt>Registration Date</dt>
72 <dd>',$user->fdate($user2->register_date
),'</dd>
74 <dd>',nl2br(htmlspecialchars($user2->sig
)),'</dd>
76 <dd>',nl2br(htmlspecialchars($user2->quote
)),'</dd>
77 <dt>Public E-mail Address</dt>
78 <dd>',$user2->public_email
,'</dd>
80 <dd>',htmlspecialchars($user2->useragent
),'</dd>
84 if ( LVL_ADMIN
<= $user->level
) {
86 '<p class="notice">Administrator Information</p>',"\n",
88 '<dt>Private E-Mail Address</dt>',"\n",
89 ' <dd>',$user2->private_email
,"</dd>\n",
90 '<dt>Signup E-Mail Address</dt>',"\n",
91 ' <dd>',$user2->reg_email
,"</dd>\n";
94 'Last Login From' => $user2->last_login_ip
,
95 'Last Active From' => $user2->last_ip
,
96 'Signed Up From' => $user2->reg_ip
99 foreach ( $fields as $title => $addr )
100 echo '<dt>',$title,"</dt>\n",
101 "\t<dd>",( is_null($addr) ?
'Unknown Address' : $addr.' → '.gethostbyaddr($addr) ),"</dd>\n";
105 if ( LVL_RESTRICTED
>= $user2->level
)
107 '<form action="',$_SERVER['PHP_SELF'],'?id=',$user2->userid
,'" method="post" class="info">',"\n",
108 ' <p>This user is currently pending confirmation:',"\n",
109 ' <input type="submit" name="activate" value="Activate Account"/></p>',"\n",