' . $strNoRights . '
' . "\n"; require_once('./footer.inc.php'); } // end if /** * If the "change password" form has been submitted, checks for valid values * and submit the query or logout */ if (isset($nopass)) { $error_msg = ''; if ($nopass == 0 && isset($pma_pw) && isset($pma_pw2)) { if ($pma_pw != $pma_pw2) { $error_msg = $strPasswordNotSame; } if (empty($pma_pw) || empty($pma_pw2)) { $error_msg = $strPasswordEmpty; } } // end if // here $nopass could be == 1 if (empty($error_msg)) { // Defines the url to return to in case of error in the sql statement $common_url_query = PMA_generate_common_url(); $err_url = 'user_password.php?' . $common_url_query; $sql_query = 'SET password = ' . (($pma_pw == '') ? '\'\'' : 'PASSWORD(\'' . preg_replace('@.@s', '*', $pma_pw) . '\')'); $local_query = 'SET password = ' . (($pma_pw == '') ? '\'\'' : 'PASSWORD(\'' . PMA_sqlAddslashes($pma_pw) . '\')'); $result = @PMA_mysql_query($local_query) or PMA_mysqlDie('', '', FALSE, $err_url); // Changes password cookie if required if ($cfg['Server']['auth_type'] == 'cookie') { setcookie('pma_cookie_password', base64_encode(PMA_blowfish_encrypt($pma_pw,$GLOBALS['cfg']['blowfish_secret'])), 0, $cookie_path, '', $is_https); } // end if // For http auth. mode, the "back" link will also enforce new // authentication $http_logout = ($cfg['Server']['auth_type'] == 'http') ? '&old_usr=relog' : ''; // Displays the page require_once('./header.inc.php'); echo '' . $strError . ' : ' . $error_msg . '
' . "\n"; } // loic1: autocomplete feature of IE kills the "onchange" event handler and it // must be replaced by the "onpropertychange" one in this case $chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5) ? 'onpropertychange' : 'onchange'; // Displays the form ?>