Rev 24 | Rev 70 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
19 | tom | 1 | <?php |
2 | |||
3 | require '../_taios.php'; |
||
4 | |||
23 | tom | 5 | $page = new Taios_Page('Manage Account', '../'); |
19 | tom | 6 | $page->drawHeader(); |
7 | $page->drawMiddle(); |
||
8 | |||
9 | $page->checkLoggedIn(); |
||
10 | |||
11 | $userID = $page->getGetID(); |
||
12 | $user = $page->getUserByID($userID); |
||
13 | |||
14 | if (($page->getLoggedInUser()->ID == $userID || $page->isUserAdmin($page->getLoggedInUser())) && $user) |
||
15 | { |
||
16 | ?> |
||
17 | |||
21 | tom | 18 | <p class="bold">Here you can edit your account.</p> |
19 | <p>Only change the password value if you want to change your password.</p> |
||
20 | <br /> |
||
21 | |||
19 | tom | 22 | <table> |
20 | tom | 23 | <tr><td class="bold">ID: </td><td><?php echo $user->ID; ?></td></tr> |
23 | tom | 24 | <?php |
24 | tom | 25 | if ($page->isUserAdmin($page->getLoggedInUser())) |
23 | tom | 26 | { |
27 | write('<tr><td class="bold">AccessID: </td><td><input type="text" name="accessID" value="' . $user->accessID . '" /></td></tr>'); |
||
28 | } |
||
29 | else |
||
30 | { |
||
31 | write('<tr><td class="bold">AccessID: </td><td>' . $user->accessID . '</td></tr>'); |
||
32 | } |
||
33 | ?> |
||
20 | tom | 34 | <tr><td class="bold">Username: </td><td><?php echo $user->username; ?></td></tr> |
21 | tom | 35 | <tr><td class="bold">Password: </td><td><input type="password" name="password" /></td></tr> |
36 | <tr><td class="bold">Email Address: </td><td><input type="text" name="email" value="<?php echo $user->emailAddress; ?>" /></td></tr> |
||
37 | <tr><td class="bold">Name: </td><td><input type="text" name="name" value="<?php echo $user->name; ?>" /></td></tr> |
||
27 | tom | 38 | <tr><td></td><td><input type="submit" value="Update Account" /></td></tr> |
19 | tom | 39 | </table> |
40 | |||
41 | <?php |
||
42 | } |
||
43 | else |
||
44 | { |
||
45 | if (!$user) |
||
46 | { |
||
47 | drawError('No such user, #' . $userID); |
||
48 | } |
||
49 | else |
||
50 | { |
||
51 | drawError('You do not have permission to access this page.'); |
||
52 | } |
||
53 | } |
||
54 | |||
55 | $page->drawFooter(); |
||
56 | |||
57 | ?> |