4 $default_password = null;
7 $page->title
= 'Admin Control Panel';
9 if ( ! ($user instanceof authuser
) )
10 $page->errorfooter('login');
14 if ( isset($_POST['passreset']) ) {
15 if ( !is_numeric($_POST['p_user']) )
16 list($user2) = $DB->query('SELECT `userid` FROM `users` WHERE `alias` = \''.$DB->escape_string($_POST['p_user']).'\'')
19 $user2 = intval($_POST['p_user']);
21 $user2 = new reguser($user2);
22 $user2->password
= $default_password;
23 echo '<p class="notice">Password for user ',$user2->alias
,' is now "',var_dump($default_password),'".</p>';
25 echo '<p class="error">That user doesn\'t seem to exist.</p>';
29 <form method
="post" action
="<?php echo $_SERVER['PHP_SELF']; ?>">
30 <fieldset
><legend
>Password reset thing
</legend
>
31 <p
>Resets the user
's password to a random number.</p>
32 <label>Username or userid: <input type="text" name="p_user"/></label>
33 <p><button type="submit" name="passreset" value="1">Reset</button></p>
38 $q = $DB->query('SELECT `userid`
, `code` FROM `invites` ORDER BY `userid`
');
39 while ( list($userid, $code) = $q->fetch_row() )
40 $invites[$userid][] = $code;
43 <fieldset><legend>User invites</legend>
46 foreach ( $invites as $userid => $i ) {
47 echo '<dt
>',$user->namelink($userid),"</dt>\n";
48 foreach ( $i as $code )
49 printf(' <dd
><a href
="register?user=%d;code=%s">http
://%s%s/register?user=%1$d;code=%2$s</a></dd>'."\n",
50 $userid, $code, $_SERVER['HTTP_HOST'], dirname($_SERVER['REQUEST_URI']));