-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUserEdit.page
More file actions
60 lines (41 loc) · 1.72 KB
/
UserEdit.page
File metadata and controls
60 lines (41 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Icon="icons/user.png"
Menu="UserList"
Title="User '$name' Settings"
---
<?
/* handle user deleted */
if (!array_key_exists( $name, $users)) {
echo "<p class='notice'>User $name has been deleted.</p>";
echo "<p class='notice'><button type='button' onClick='done();'>OK</button></p>";
return;
}
$user = $users[$name];
?>
<form markdown="1" method="POST" action="/update.htm" target="progressFrame">
Description:
: <input type="text" name="userDesc" maxlength="64" value="<?=$user['desc'];?>">
<? if ($user['name']=="root"): ?>
: <input type="hidden" name="userName" value="<?=$user['name'];?>">
<input type="submit" name="cmdUserEdit" value="Apply">
<button type="button" onClick="done();">Done</button>
<? else: ?>
Delete<input type="checkbox" name="confirmDelete" onChange="chkDelete(this.form, this.form.cmdUserEdit);">
: <input type="hidden" name="userName" value="<?=$user['name'];?>">
<input type="submit" name="cmdUserEdit" value="Apply">
<button type="button" onClick="done();">Done</button>
<? endif; ?>
</form>
<hr>
<form markdown="1" method="POST" action="/update.htm" target="progressFrame">
Password:
: <input type="password" name="userPassword" maxlength="40"
onKeyUp="this.form.cmdUserEdit.disabled = (this.form.userPassword.value != this.form.userPasswordConf.value);">
Retype password:
: <input type="password" name="userPasswordConf" maxlength="40"
onKeyUp="this.form.cmdUserEdit.disabled = (this.form.userPassword.value != this.form.userPasswordConf.value);">
: <input type="hidden" name="userName" value="<?=$user['name'];?>">
<input type="submit" name="cmdUserEdit" value="Change">
<button type="button" onClick="done();">Done</button>
</form>