moved code up one level to eliminate the docs subdirectory
[acontent.git] / themes / default / change_password.tmpl.php
1 <?php 
2 /************************************************************************/
3 /* AContent                                                             */
4 /************************************************************************/
5 /* Copyright (c) 2010                                                   */
6 /* Inclusive Design Institute                                           */
7 /*                                                                      */
8 /* This program is free software. You can redistribute it and/or        */
9 /* modify it under the terms of the GNU General Public License          */
10 /* as published by the Free Software Foundation.                        */
11 /************************************************************************/
12
13 global $onload;
14 $onload = 'document.form.password.focus();';
15
16 require(TR_INCLUDE_PATH.'header.inc.php'); 
17 ?>
18
19 <script language="JavaScript" src="include/jscripts/sha-1factory.js" type="text/javascript"></script>
20
21 <script type="text/javascript">
22 function encrypt_password()
23 {
24         document.form.password_error.value = "";
25
26         err = verify_password(document.form.password.value, document.form.password2.value);
27         
28         if (err.length > 0)
29         {
30                 document.form.password_error.value = err;
31         }
32         else
33         {
34                 document.form.form_password_hidden.value = hex_sha1(document.form.password.value);
35                 document.form.password.value = "";
36                 document.form.password2.value = "";
37         }
38 }
39 </script>
40
41 <div class="input-form">
42 <fieldset class="group_form"><legend class="group_form"><?php echo _AT('password_reminder'); ?></legend>
43
44         <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
45                 <input type="hidden" name="form_change" value="true" />
46                 <input type="hidden" name="id" value="<?php echo $this->id; ?>" />
47                 <input type="hidden" name="g" value="<?php echo $this->g; ?>" />
48                 <input type="hidden" name="h" value="<?php echo $this->h; ?>" />
49                 <input type="hidden" name="form_password_hidden" value="" />
50                 <input type="hidden" name="password_error" value="" />
51
52                 <table class="form-data" align="center" width="60%">
53                         <tr>
54                                 <td colspan="2" align="left"><?php echo _AT('password_new_blurb'); ?></td>
55                         </tr>
56                         
57                         <tr><td><br /></td></tr>
58
59                         <tr>
60                                 <td align="left">
61                                         <span class="required" title="<?php echo _AT('required_field'); ?>">*</span>
62                                         <label for="password"><?php echo _AT('new_password'); ?></label>:
63                                 </td>
64                                 <td align="left">
65                                         <input id="password" name="password" type="password" size="25" maxlength="15" value="<?php echo stripslashes(htmlspecialchars($_POST['password'])); ?>" />
66                                 </td>
67                         </tr>
68                 
69                         <tr>
70                                 <td align="left">
71                                         <span class="required" title="<?php echo _AT('required_field'); ?>">*</span>
72                                         <label for="password2"><?php echo _AT('password_again'); ?></label>:
73                                 </td>
74                                 <td align="left">
75                                         <input id="password2" name="password2" type="password" size="25" maxlength="15" value="<?php echo stripslashes(htmlspecialchars($_POST['password2'])); ?>" />
76                                 </td>
77                         </tr>
78
79                         <tr>
80                                 <td colspan="2">
81                                         <p class="submit_button">
82                                                 <input type="submit" name="submit" value="<?php echo _AT('submit'); ?>" onClick="encrypt_password()" />
83                                                 <input type="submit" name="cancel" value=" <?php echo _AT('cancel'); ?> " />
84                                         </p>
85                                 </td>
86                         </tr>
87                 </table>
88         </form>
89
90 </fieldset>
91 </div>
92
93 <?php require(TR_INCLUDE_PATH.'footer.inc.php'); ?>