3.3.8 release
[phpmyadmin/tyronm.git] / libraries / display_change_password.lib.php
blobd44e22e2425f2429b230e51494b34474a38bd187
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Displays form for password change
6 * @version $Id$
7 * @package phpMyAdmin
8 */
9 if (! defined('PHPMYADMIN')) {
10 exit;
13 /**
14 * loic1: autocomplete feature of IE kills the "onchange" event handler and it
15 * must be replaced by the "onpropertychange" one in this case
17 $chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5)
18 ? 'onpropertychange'
19 : 'onchange';
21 // Displays the form
23 <form method="post" action="<?php echo $GLOBALS['PMA_PHP_SELF']; ?>" name="chgPassword" onsubmit="return checkPassword(this)">
24 <?php echo PMA_generate_common_hidden_inputs();
25 if (strpos($GLOBALS['PMA_PHP_SELF'], 'server_privileges') !== false) {
26 echo '<input type="hidden" name="username" value="' . htmlspecialchars($username) . '" />' . "\n"
27 . '<input type="hidden" name="hostname" value="' . htmlspecialchars($hostname) . '" />' . "\n";
28 }?>
29 <fieldset id="fieldset_change_password">
30 <legend><?php echo $GLOBALS['strChangePassword']; ?></legend>
31 <table class="data">
32 <tr class="odd noclick">
33 <td colspan="2">
34 <input type="radio" name="nopass" value="1" id="nopass_1" onclick="pma_pw.value = ''; pma_pw2.value = ''; this.checked = true" />
35 <label for="nopass_1"><?php echo $GLOBALS['strNoPassword'] . "\n"; ?></label>
36 </td>
37 </tr>
38 <tr class="even noclick">
39 <td>
40 <input type="radio" name="nopass" value="0" id="nopass_0" onclick="document.getElementById('text_pma_pw').focus();" checked="checked " />
41 <label for="nopass_0"><?php echo $GLOBALS['strPassword']; ?>:&nbsp;</label>
42 </td>
43 <td>
44 <input type="password" name="pma_pw" id="text_pma_pw" size="10" class="textfield" <?php echo $chg_evt_handler; ?>="nopass[1].checked = true" />
45 &nbsp;&nbsp;
46 <?php echo $GLOBALS['strReType']; ?>:&nbsp;
47 <input type="password" name="pma_pw2" id="text_pma_pw2" size="10" class="textfield" <?php echo $chg_evt_handler; ?>="nopass[1].checked = true" />
48 </td>
49 </tr>
50 <tr>
51 <td>
52 <?php echo $strPasswordHashing; ?>:
53 </td>
54 <td>
55 <input type="radio" name="pw_hash" id="radio_pw_hash_new" value="new" checked="checked" />
56 <label for="radio_pw_hash_new">
57 MySQL&nbsp;4.1+
58 </label>
59 </td>
60 </tr>
61 <tr>
62 <td>&nbsp;</td>
63 <td>
64 <input type="radio" name="pw_hash" id="radio_pw_hash_old" value="old" />
65 <label for="radio_pw_hash_old">
66 <?php echo $strCompatibleHashing; ?>
67 </label>
68 </td>
69 </tr>
70 <tr>
71 <td>
72 <?php echo $strGeneratePassword; ?>
73 </td>
74 <td>
75 <input type="button" id="button_generate_password" value="<?php echo $strGenerate; ?>" onclick="suggestPassword(this.form)" />
76 <input type="text" name="generated_pw" id="generated_pw" />
77 </td>
78 </tr>
79 </table>
80 </fieldset>
81 <fieldset id="fieldset_change_password_footer" class="tblFooters">
82 <input type="submit" name="change_pw" value="<?php echo($strGo); ?>" />
83 </fieldset>
84 </form>