Fixed delete logs
[squasher.git] / templates / udmin.tpl
1 <html>
2 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
3 <link rel=stylesheet href="css/squasher.css">
4 <title>Squasher</title>
5 <script>
6    {literal}
7    function confirm_delete(formID) {
8     if (confirm("Are you sure you want to delete this user?")) {
9      document.getElementById(formID).submit();
10     }
11    }
12    {/literal}
13 </script>
14
15 <div class="wrappercontainer">
16
17         <div class="banner">&nbsp;<div class="control">{if $user_level > 99}<a href="?">home</a>&nbsp;|&nbsp;<a href="?tools=access">access</a>&nbsp;|&nbsp;<a href="?tools=users">users</a>&nbsp;|&nbsp;<a href="?tools=logs">logs</a>&nbsp;|{/if}&nbsp;<a href="index.php?tools=logout">logout({$user_name|escape})</a>&nbsp;</div></div>
18
19         <div class="content">
20
21 {foreach item=user key=user_id from=$users}
22 <div class="white_border">
23         <form method='post' name='user_{$user.id|escape}' id='user_{$user.id|escape}'>
24         <input type='hidden' name='u[user_id]' id='user_id' value='{$user.id|escape}'>
25         <input type='hidden' name='type' id='type' value=''>
26         <input name='u[user_name]' id='user_name' value='{$user.name|escape}' readonly>
27          | {html_options name='u[user_level]' id='user_level' options=$user_levels selected=$user.level}
28          |
29                 {if $user.enabled}
30                 <a onClick="document.user_{$user.id}.type.value='disable';document.user_{$user.id}.submit();" style="cursor:pointer" >remove password</a>
31                 {else}
32                 <input name='u[user_pass]' id='user_pass'>
33                 {/if}
34          | <a onClick="document.user_{$user.id}.type.value='delete';confirm_delete('user_{$user.id}');" style="cursor:pointer" >delete</a>
35          | <a onClick="document.user_{$user.id}.type.value='update';document.user_{$user.id}.submit();" style="cursor:pointer" >update</a>
36         </form>
37 </div>
38 {/foreach}
39
40 <div class="white_border">
41         <form method='post' name='user_new' id='user_new'><input type='hidden' name='type' id='type' value=''>
42                 <input name='u[user_name]' value=''>
43                 | {html_options name='u[user_level]' options=$user_levels }
44                 | <input name='u[user_pass]'>
45                 | <a onClick="document.user_new.type.value='new';document.user_new.submit();" style="cursor:pointer" >add</a>
46         </form>
47 </div>
48
49         </div>
50
51         <div class="bottomimage"></div>
52         <div class="footer">&nbsp;</div>
53
54 </div>
55 {if $debug}{debug}{/if}
56 {* vim: set syntax=smarty ts=4 sw=4 sts=4 sr noet: *}