Location: PHPKode > projects > Stratos > stratos-1.0rc1/plugins/QuickAuth/views/QuickAuthController.getUsers.php
<?php

// ------------------------------------------------------------
// Stratos PHP Framework
// Copyright (c) 2006-2007 Sephira Software, LLC
// 
// This file is subject to the Stratos PHP Framework license
// which you should have received along with this file. The
// license is also accessible on the web at the following URI:
//   http://www.stratosframework.com/wiki/Manual/License
// If you did not receive a copy of the Stratos PHP Framework
// license or you are unable to obtain it through the web,
// please send an e-mail to hide@address.com so a copy
// can be sent to you.
// ------------------------------------------------------------

/**
 * @author Joshua Carnett
 * @copyright Copyright (c) 2006-2007 Sephira Software, LLC
 * @license http://www.stratosframework.com/wiki/Manual/License
 * @package QuickAuth
 * @subpackage views
 */

Stratos::executeView('QuickAuth:header.php');
?>

<h3>Manage Users</h3>

<h4>Add a User</h4>
<form action="<?=Stratos::makeUrl('QuickAuth/addUser') ?>" method="post">
    <label for="" style="width: 300px;">User Name:</label> <input type="text" id="name" name="name"/>
    &nbsp;&nbsp;<label>Password:</label> <input type="password" id="password" name="password"/>
    &nbsp;&nbsp;<input type="submit" id="add_submit" name="add_submit" value="Add User"/>
</form>

<h4>Current Users</h4>
<table style="width: 100%;">
    <tr>
        <th>User</th>
        <th style="width: 20%;">Actions</th>
    </tr>
    
<?php
$i = 0;
foreach ( $users as $user ) { ?>
    
    <tr<?=$i % 2 == 0 ? '' : ' class="alt"' ?>>
        <td><?=htmlentities($user) ?></td>
        <td class="center">
            <a href="<?=Stratos::makeUrl('QuickAuth/removeUser', array(
                'name' => $user)) ?>">Delete</a>
        </td>
    </tr>
    
<?php
    ++$i;
} ?>

</table>

<?php
Stratos::executeView('QuickAuth:footer.php');
?>
Return current item: Stratos