File: update.inc

package info (click to toggle)
horde3 3.1.3-4etch7
  • links: PTS
  • area: main
  • in suites: etch
  • size: 22,876 kB
  • ctags: 18,071
  • sloc: php: 75,151; xml: 2,979; sql: 1,069; makefile: 79; sh: 64
file content (82 lines) | stat: -rw-r--r-- 2,336 bytes parent folder | download | duplicates (2)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<script type="text/javascript">
<!--

function validate_update()
{
    if (document.updateuser.user_name.value == "") {
        document.updateuser.user_name.focus();
        alert('<?php echo addslashes(_("You must specify the username to add.")) ?>');
        return false;
    } else if (document.updateuser.user_pass_1 &&
               document.updateuser.user_pass_1.value != document.updateuser.user_pass_2.value) {
        document.updateuser.user_pass_1.value = "";
        document.updateuser.user_pass_2.value = "";
        document.updateuser.user_pass_1.focus();
        alert('<?php echo addslashes(_("Passwords must match.")) ?>');
        return false;
    }

    return true;
}

//-->
</script>

<form name="updateuser" method="post">
<input type="hidden" name="form" value="update">
<input type="hidden" name="user_name" value="<?php echo htmlspecialchars($f_user_name) ?>" />
<h1 class="header">
 <?php printf(_("Update %s"), $f_user_name) ?>
</h1>
<table class="striped nowrap" cellspacing="0" width="100%">
<?php if ($auth->hasCapability('update')): ?>
 <tr>
  <td width="1%" class="light rightAlign">
   <?php echo _("New Username (optional)") ?>
  </td>
  <td>
   <input type="text" name="user_name2" value="<?php echo htmlspecialchars($f_user_name) ?>" />
  </td>
 </tr>
 <tr>
  <td class="rightAlign">
   <?php echo _("Password") ?>
  </td>
  <td>
   <input type="password" name="user_pass_1" />
  </td>
 </tr>
 <tr>
  <td class="rightAlign">
   <?php echo _("Confirm Password") ?>
  </td>
  <td>
   <input type="password" name="user_pass_2" />
  </td>
 </tr>
<?php endif; ?>
 <tr>
  <td class="rightAlign">
   <?php echo _("Full Name") ?>
  </td>
  <td>
   <input type="text" name="user_fullname" value="<?php echo htmlspecialchars($identity->getValue('fullname')) ?>" />
  </td>
 </tr>
 <tr>
  <td class="rightAlign">
   <?php echo _("Email Address") ?>
  </td>
  <td>
   <input type="text" name="user_email"  value="<?php echo htmlspecialchars($identity->getValue('from_addr')) ?>" />
  </td>
 </tr>
 <tr>
  <td class="control leftAlign" colspan="2">
   <input type="submit" class="button" name="submit" onclick="return validate_update();" value="<?php echo _("Update user") ?>" />
   <input type="reset" class="button" name="reset" value="<?php echo _("Reset") ?>" />
  </td>
 </tr>
</table>
</form>
<br />