4 $prefetch = array('`points`', '`last_active_date`', '`register_date`', '`sig`', '`quote`',
5 '`reg_email`', '`public_email`', '`private_email`', '`useragent`',
6 'INET_NTOA(`last_login_ip`) AS `last_login_ip`',
7 'INET_NTOA(`last_ip`) AS `last_ip`',
8 'INET_NTOA(`reg_ip`) AS `reg_ip`');
11 $page->title
= 'User Details';
13 if ( ! ($user instanceof authuser
) )
14 $page->errorfooter('login');
16 $uid = is_numeric($_SERVER['QUERY_STRING']) ?
intval($_SERVER['QUERY_STRING']) : $user->userid
;
18 if ( $user->userid
!= $uid && $DB->query('SELECT `userid` FROM `users` WHERE `userid` = '.$uid)->num_rows
== 0 )
19 $page->errorfooter('userid');
21 if ( $user->userid
== $uid ) {
22 $page->title
= 'Your Details';
26 $user2 = new reguser($uid, $prefetch);
27 $page->title
= 'User Details for '.$user2->alias
;
31 $sig = new message($user2->sig
);
32 $quote = new message($user2->quote
);
34 echo '<dl class="userinfo">
36 <dd><strong>',$user2->alias
,'</strong></dd>
38 <dd>',$user2->userid
,'</dd>
40 <dd>',$user2->points
,'</dd>
42 <dd>',$user->fdate($user2->last_active_date
),'</dd>
43 <dt>Registration Date</dt>
44 <dd>',$user->fdate($user2->register_date
),'</dd>
46 <dd>',( $sig->output ?
$sig->output
: '<var>Empty</var>'),'</dd>
48 <dd>',( $quote->output ?
$quote->output
: '<var>Empty</var>'),'</dd>
49 <dt>Public E-mail Address</dt>
50 <dd>',( $user2->public_email ?
$user2->public_email
: '<var>Empty</var>'),'</dd>
52 <dd>',htmlspecialchars($user2->useragent
),"</dd>
56 if ( defined('DEVELOPER') ) {
58 '<h2>Admin-only Information</h2>
60 <dt>Private E-Mail Address</dt>
61 <dd>',( $user2->private_email ?
$user2->private_email
: '<var>Empty</var>'),'</dd>
62 <dt>Signup E-Mail Address</dt>
63 <dd>',( $user2->reg_email ?
$user2->reg_email
: '<var>Empty</var>'),"</dd>\n";
66 'Last Login From' => $user2->last_login_ip
,
67 'Last Active From' => $user2->last_ip
,
68 'Signed Up From' => $user2->reg_ip
71 foreach ( $fields as $title => $addr )
72 echo '<dt>',$title,"</dt>\n",
73 " <dd>",( is_null($addr) ?
'Unknown Address' : $addr ),"</dd>\n";
78 if ( $user->userid
== $uid ) {
82 <dd><a href="theme">Theme</a></dd>
83 <dd><a href="options">Options</a></dd>
84 <dd><a href="passwd">Change Password</a></dd>
85 <dd><a href="userlist">User Directory</a></dd>
86 <dd><a href="invites">Invite List</a></dd>