Subversion Repositories taios

Rev

Rev 70 | Rev 183 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php

require '../_taios.php';

$page = new Taios_Page('Manage Account', '../');
$page->drawHeader();
$page->drawMiddle();

$page->checkLoggedIn();

$userID = $page->getGetID();
$user = $page->getUserByID($userID);

if (($page->getLoggedInUser()->ID == $userID || $page->isUserAdmin($page->getLoggedInUser())) && $user)
{
?>

<p class="bold">Here you can edit your account.</p>
<p>Only change the password value if you want to change your password.</p>
<br />

<form action="account-do.php" method="POST">
<table>
<tr><td class="bold">ID: </td><td><?php echo $user->ID; ?></td></tr>
<?php
if ($page->isUserAdmin($page->getLoggedInUser()))
{
    write('<tr><td class="bold">AccessID: </td><td><input type="text" name="accessID" value="' . $user->accessID . '" /></td></tr>');
}
else
{
    write('<tr><td class="bold">AccessID: </td><td>' . $user->accessID . '</td></tr>');
}    
?>
<tr><td class="bold">Username: </td><td><?php echo $user->username; ?></td></tr>
<tr><td class="bold">Password: </td><td><input type="password" name="password" /></td></tr>
<tr><td class="bold">Email Address: </td><td><input type="text" name="email" value="<?php echo $user->emailAddress; ?>" /></td></tr>
<tr><td class="bold">Name: </td><td><input type="text" name="name" value="<?php echo $user->name; ?>" /></td></tr>
<tr><td></td><td><input type="submit" value="Update Account" /></td></tr>
</table>
</form>

<?php
}
else
{
    if (!$user)
    {
        drawError('No such user, #' . $userID);
    }
    else
    {
        drawError('You do not have permission to access this page.');
    }
}

$page->drawFooter();

?>