Subversion Repositories taios

Rev

Rev 83 | Rev 186 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
75 tom 1
<?php
2
 
3
require '../_taios.php';
4
 
5
$page = new Taios_Page('Manage All Accounts', '../');
6
$page->drawHeader();
7
$page->drawMiddle();
8
 
9
$page->checkLoggedIn();
10
 
76 tom 11
if ($page->isUserAdmin($page->getLoggedInUser()))
75 tom 12
{
83 tom 13
    write('<p class="bold">Use this to manage all the accounts on the Tim32 Website.</p><br />');
14
 
75 tom 15
    write('<table>');
78 tom 16
    write('<tr>');
17
    write('<td class="bold">ID</td>');
18
    write('<td class="bold">AccessID</td>');
19
    write('<td class="bold">Username</td>');
20
    write('<td class="bold">Password</td>');
21
    write('<td class="bold">Name</td>');
22
    write('<td class="bold">Email Address</td>');
79 tom 23
    write('<td class="bold">Challenge ID</td>');
78 tom 24
    write('</tr>');
75 tom 25
 
26
    $ids = $page->findIDs('Users');
27
    for ($i = 0; $i < count($ids); $i++)
28
    {
29
        $user = $page->getUserByID($ids[$i]);
30
        write('<tr>');
102 tom 31
        write('<td><a href="account.php?id=' . $user->ID . '">' . $user->ID . '</a></td>');
75 tom 32
        write('<td>' . $user->accessID . '</td>');
33
        write('<td>' . $user->username . '</td>');
34
        write('<td>' . $user->password . '</td>');
35
        write('<td>' . $user->name . '</td>');
79 tom 36
        write('<td>' . $user->emailAddress . '</td>');
37
        write('<td>' . $user->challengeID . '</td>');
75 tom 38
        write('</tr>');
39
    }
40
 
41
    write('</table>');
42
}
43
else
44
{
45
    drawError('You do not have permission to access this page.');
46
}
47
 
48
$page->drawFooter();
49
 
50
?>
51