- // Write new cookies for the password
- $onetimepad = OneTimePadCreate(strlen($cp_newpass));
- $key = OneTimePadEncrypt($cp_newpass, $onetimepad);
- sqsession_register($onetimepad, 'onetimepad');
- setcookie('key', $key, 0, $base_uri);
+ 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', '<b>' . _("Change Password") . '</b>', 'center', $color[0])
+ ),
+ 'center', $color[9], 'width="95%" border="0" cellpadding="1" cellspacing="0"') . "<br>\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');
+}