$max_pass_length) { $error_messages[] = sprintf(_("Your new password should be %s to %s characters long."), $min_pass_length, $max_pass_length); } } } $old_pass = sqauth_read_password(); if(!isset($error_messages['cp_no_old']) && $change_pass_old != $old_pass) { $error_messages['cp_wrong_old'] = _("Your current password is not correct."); } if(count($error_messages) == 0) { $error_messages = change_pass_dochange($change_pass_old, $change_pass_new, $debug); if(count($error_messages) == 0) { $showform = false; } } sq_change_text_domain('squirrelmail'); } displayPageHeader($color, ''); sq_change_text_domain('change_pass'); echo html_tag('table', "\n" . html_tag('tr', "\n" . html_tag('td', '' . _("Change Password") . '', 'center', $color[0]) ), 'center', $color[9], 'width="95%" border="0" cellpadding="1" cellspacing="0"') . "
\n"; if(count($error_messages) > 0) { echo html_tag('table', '', 'center', '', 'width="100%" border="0" cellpadding="1" cellspacing="0"'); echo html_tag('tr'); echo html_tag('td', '', 'center'); echo html_tag('ul'); foreach($error_messages as $line) { echo html_tag('li', htmlspecialchars($line), '', '', 'style="color: ' . $color[2] . '"'); } echo html_tag('/ul'); echo html_tag('tr', html_tag('td', ' ')) . "\n"; echo html_tag('/table'); } if($showform) { echo addForm(sqm_baseuri() . 'plugins/change_pass/options.php'); echo addHidden('smtoken', sm_generate_security_token()); echo html_tag('table', "\n" . html_tag('tr', "\n" . html_tag('td', _("Current Password:"), 'right') . html_tag('td', addPwField('change_pass_old', ''), 'left') ) . html_tag('tr', "\n" . html_tag('td', _("New Password:"), 'right') . html_tag('td', addPwField('change_pass_new', ''), 'left') ) . html_tag('tr', "\n" . html_tag('td', _("Verify New Password:"), 'right') . html_tag('td', addPwField('change_pass_verify', ''), 'left') ) . html_tag('tr', "\n" . html_tag('td', addSubmit(_('Change Password'), 'change_pass_form'), 'center', '', 'colspan="2"') ), 'center', '', 'border="0" cellpadding="1" cellspacing="0"') . "\n"; echo html_tag('/form'); echo html_tag('/body'); echo html_tag('/html'); } sq_change_text_domain('squirrelmail');