2011-03-02 13:56:48 +03:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
* Template for admin pages
|
|
|
|
*/
|
|
|
|
?>
|
2011-03-02 01:20:16 +03:00
|
|
|
<h1>Administration</h1>
|
|
|
|
<h2>Users</h2>
|
|
|
|
|
2011-04-17 01:26:55 +04:00
|
|
|
<table id="userstable">
|
2011-03-02 01:20:16 +03:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Groups</th>
|
2011-04-16 16:59:10 +04:00
|
|
|
<th></th>
|
2011-03-02 01:20:16 +03:00
|
|
|
</tr>
|
2011-04-17 01:26:55 +04:00
|
|
|
</thead>
|
2011-03-02 01:20:16 +03:00
|
|
|
<tbody>
|
2011-03-09 22:13:52 +03:00
|
|
|
<?php foreach($_["users"] as $user): ?>
|
2011-03-02 01:20:16 +03:00
|
|
|
<tr>
|
2011-03-09 23:57:00 +03:00
|
|
|
<td><?php echo $user["name"]; ?></td>
|
|
|
|
<td><?php echo $user["groups"]; ?></td>
|
2011-04-17 01:26:55 +04:00
|
|
|
<td x-uid="<?php echo $user["name"] ?>"><a href="" class="edituser-button">edit</a> | <a class="removeuser-button" href="">remove</a></td>
|
2011-03-02 01:20:16 +03:00
|
|
|
</tr>
|
2011-03-09 22:13:52 +03:00
|
|
|
<?php endforeach; ?>
|
2011-03-02 01:20:16 +03:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
2011-04-16 16:59:10 +04:00
|
|
|
<a id="adduser-button" href="">New user</a>
|
|
|
|
|
2011-03-02 01:20:16 +03:00
|
|
|
<h2>Groups</h2>
|
2011-04-16 16:59:10 +04:00
|
|
|
<form>
|
2011-04-17 01:26:55 +04:00
|
|
|
<table id="groupstable">
|
2011-04-16 16:59:10 +04:00
|
|
|
<thead>
|
2011-03-02 01:20:16 +03:00
|
|
|
<tr>
|
2011-04-16 16:59:10 +04:00
|
|
|
<th>Name</th>
|
|
|
|
<th></th>
|
2011-03-02 01:20:16 +03:00
|
|
|
</tr>
|
2011-04-17 01:26:55 +04:00
|
|
|
</thead>
|
2011-04-16 16:59:10 +04:00
|
|
|
<tbody>
|
|
|
|
<?php foreach($_["groups"] as $group): ?>
|
|
|
|
<tr>
|
|
|
|
<td><?php echo $group["name"] ?></td>
|
2011-04-17 01:26:55 +04:00
|
|
|
<td x-gid="<?php echo $group["name"]; ?>"><a class="removegroup-button" href="">remove</a></td>
|
2011-04-16 16:59:10 +04:00
|
|
|
</tr>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
<tr>
|
|
|
|
<td><input type="text" name="name" /></td>
|
|
|
|
<td><input type="submit" /></td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<a id="addgroup-button" href="">Add group</a>
|
|
|
|
|
|
|
|
|
|
|
|
<div id="adduser-form" title="Add user">
|
2011-04-17 01:26:55 +04:00
|
|
|
<form id="createuserdata">
|
|
|
|
<fieldset>
|
2011-04-16 16:59:10 +04:00
|
|
|
User name<br>
|
2011-04-17 01:26:55 +04:00
|
|
|
<input type="text" name="username" /><br>
|
2011-04-16 16:59:10 +04:00
|
|
|
Password<br>
|
|
|
|
<input type="password" name="password" />
|
2011-04-17 01:26:55 +04:00
|
|
|
</fieldset>
|
|
|
|
<fieldset id="usergroups">
|
|
|
|
groups<br>
|
|
|
|
<?php foreach($_["groups"] as $i): ?>
|
|
|
|
<input type="checkbox" name="groups[]" value="<? echo $i["name"]; ?>" /><? echo $i["name"]; ?><br>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</fieldset>
|
2011-04-16 16:59:10 +04:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="edituser-form" title="Force new password">
|
2011-04-17 01:26:55 +04:00
|
|
|
<form id="edituserdata">
|
|
|
|
New password for <span id="edituserusername">$user</span><br>
|
2011-04-16 16:59:10 +04:00
|
|
|
<input type="password" name="password" />
|
2011-04-17 01:26:55 +04:00
|
|
|
<input type="hidden" name="username" value="">
|
2011-04-16 16:59:10 +04:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="removeuser-form" title="Remove user">
|
2011-04-17 01:26:55 +04:00
|
|
|
<form id="removeuserdata">
|
|
|
|
Do you really want to delete user <span id="deleteuserusername">$user</span>?
|
|
|
|
<input type="hidden" name="username" value="">
|
|
|
|
</form>
|
2011-04-16 16:59:10 +04:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="removegroup-form" title="Remove Group">
|
2011-04-17 01:26:55 +04:00
|
|
|
<form id="removeuserdata">
|
|
|
|
Do you really want to delete group <span id="deletegroupgroupname">$group</span>?
|
|
|
|
<input id="deletegroupnamefield" type="hidden" name="username" value="">
|
|
|
|
</form>
|
2011-04-16 16:59:10 +04:00
|
|
|
</div>
|