[ UP ] cgi
[archserver.git] / cgi / samba / manager_user.lua
blob75d1e4d914b4f0d74055354cc5b3e4ff35da8118
1 #!/usr/bin/lua
2 local htmlcode = [[
3 <form name="manager_user" method="post" action="shares_manager_user.cgi">
4 <h3>用户管理</h3>
5 <table cellspacing="0" cellpadding="0" border="0">
6 <tr><td><div class="table_input_head">
7 添加/修改用户
8 </div></td></tr>
9 <tr><td align="left" valign="top">
10 <div class="table_input_body">
11 <table cellspacing="2" cellpadding="8" border="0" width="100%">
12 <tr><td class="color_table_heading" align="right">用户名</td>
13 <td class="color_table_row1">
14 <input type="text" name="user_name">
15 </td><tr>
16 <tr><td class="color_table_heading" align="right">密码</td>
17 <td class="color_table_row2">
18 <input type="password" name="passwd">
19 </td></tr>
20 <tr><td class="color_table_heading" align="right">
21 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
22 确认密码</td>
23 <td class="color_table_row1">
24 <input type="password" name="passwd_cf">
25 </td></tr>
26 </table>
27 </div>
28 </td></tr>
29 </table>
30 <input type=hidden name="todo" value="no">
31 <input type="button" onclick="mysubmit('create')" value="创建新用户">
32 <input type="button" onclick="mysubmit('update')" value="更改用户密码 ">
33 <input type="reset" value="清空">
34 </form>
36 <form name="delete_user" method="post" action="shares_manager_user.cgi">
37 <table cellspacing="0" cellpadding="0" border="0">
38 <tr><td><div class="table_input_head">
39 删除用户
40 </div></td></tr>
41 <tr><td align="left" valign="top">
42 <div class="table_input_body">
43 <table cellspacing="2" cellpadding="8" border="0" width="100%">
44 <tr><td class="color_table_heading" align="right">
45 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
46 删除用户名</td>
47 <td class="color_table_row1">
48 <input type="text" name="delname">
49 </td></tr>
50 </table>
51 </div>
52 </td></tr>
53 </table>
54 <input type=hidden name="todo" value="no">
55 <input type="button" onclick="delsubmit('delete')" value="删除用户">
56 <input type="reset" value="清空">
57 </form>
58 <hr>
59 <script type="text/javascript">
60 function mysubmit(todo) {
61 var cf=document.manager_user;
62 cf.todo.value=todo;
63 cf.submit();
65 function delsubmit(todo) {
66 var cf=document.delete_user;
67 cf.todo.value=todo;
68 cf.submit();
70 </script>
73 print(htmlcode)