home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / xampp-win32-1.6.7-installer.exe / phpMyAdmin / libraries / display_change_password.lib.php < prev    next >
Encoding:
PHP Script  |  2008-06-23  |  3.0 KB  |  80 lines

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