Removed global variables with array counts in sqlparser.lib.php
[phpmyadmin.git] / libraries / display_change_password.lib.php
blob4dcb2c9070d750e8413ba258e09bd29d389fed09
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Displays form for password change
6 * @package phpMyAdmin
7 */
8 if (! defined('PHPMYADMIN')) {
9 exit;
12 /**
13 * autocomplete feature of IE kills the "onchange" event handler and it
14 * must be replaced by the "onpropertychange" one in this case
16 $chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5)
17 ? 'onpropertychange'
18 : 'onchange';
20 // Displays the form
22 <form method="post" id="change_password_form" action="<?php echo $GLOBALS['PMA_PHP_SELF']; ?>" name="chgPassword" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? 'class="ajax" ' : ''); ?> onsubmit="return checkPassword(this)">
23 <?php echo PMA_generate_common_hidden_inputs();
24 if (strpos($GLOBALS['PMA_PHP_SELF'], 'server_privileges') !== false) {
25 echo '<input type="hidden" name="username" value="' . htmlspecialchars($username) . '" />' . "\n"
26 . '<input type="hidden" name="hostname" value="' . htmlspecialchars($hostname) . '" />' . "\n";
27 }?>
28 <fieldset id="fieldset_change_password">
29 <legend><?php echo __('Change password'); ?></legend>
30 <table class="data">
31 <tr class="odd noclick">
32 <td colspan="2">
33 <input type="radio" name="nopass" value="1" id="nopass_1" onclick="pma_pw.value = ''; pma_pw2.value = ''; this.checked = true" />
34 <label for="nopass_1"><?php echo __('No Password') . "\n"; ?></label>
35 </td>
36 </tr>
37 <tr class="even noclick">
38 <td>
39 <input type="radio" name="nopass" value="0" id="nopass_0" onclick="document.getElementById('text_pma_pw').focus();" checked="checked " />
40 <label for="nopass_0"><?php echo __('Password'); ?>:&nbsp;</label>
41 </td>
42 <td>
43 <input type="password" name="pma_pw" id="text_pma_pw" size="10" class="textfield" <?php echo $chg_evt_handler; ?>="nopass[1].checked = true" />
44 &nbsp;&nbsp;
45 <?php echo __('Re-type'); ?>:&nbsp;
46 <input type="password" name="pma_pw2" id="text_pma_pw2" size="10" class="textfield" <?php echo $chg_evt_handler; ?>="nopass[1].checked = true" />
47 </td>
48 </tr>
49 <tr>
50 <td>
51 <?php echo __('Password Hashing'); ?>:
52 </td>
53 <td>
54 <input type="radio" name="pw_hash" id="radio_pw_hash_new" value="new" checked="checked" />
55 <label for="radio_pw_hash_new">
56 MySQL&nbsp;4.1+
57 </label>
58 </td>
59 </tr>
60 <tr id="tr_element_before_generate_password">
61 <td>&nbsp;</td>
62 <td>
63 <input type="radio" name="pw_hash" id="radio_pw_hash_old" value="old" />
64 <label for="radio_pw_hash_old">
65 <?php echo __('MySQL 4.0 compatible'); ?>
66 </label>
67 </td>
68 </tr>
69 </table>
70 </fieldset>
71 <fieldset id="fieldset_change_password_footer" class="tblFooters">
72 <input type="submit" name="change_pw" value="<?php echo(__('Go')); ?>" />
73 </fieldset>
74 </form>