All mysql_-statments replaced by their corresponding mysqli_-statements
[cacert-devel.git] / pages / account / 44.php
1 <? /*
2 LibreSSL - CAcert web application
3 Copyright (C) 2004-2008 CAcert Inc.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; version 2 of the License.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19 if(array_key_exists('error',$_SESSION['_config']) && $_SESSION['_config']['error'] != "") {
20 ?>
21 <div style="color: orange;">ERROR: <?=$_SESSION['_config']['error']?></div>
22 <?
23 unset($_SESSION['_config']['error']);
24 }
25
26 $ticketno = "";
27 if (array_key_exists('ticketno', $_SESSION)) {
28 $ticketno = $_SESSION['ticketno'];
29 }
30
31 if (!valid_ticket_number($ticketno)) {
32 printf(_("I'm sorry, you did not enter a ticket number! %s You cannot reset the password."), '<br/>');
33 echo '<br/><a href="account.php?id=43&amp;userid='.intval($_REQUEST['userid']).'">'._('Back to previous page.').'</a>';
34 showfooter();
35 exit;
36 }
37 ?>
38
39 <form method="post" action="account.php">
40 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
41 <tr>
42 <td colspan="2" class="title"><?=_("Change Password")?></td>
43 </tr>
44 <tr>
45 <td class="DataTD"><?=_("Email")?>:</td>
46 <td class="DataTD"><b><?=sanitizeHTML($_REQUEST['email'])?></b></td>
47 </tr>
48 <tr>
49 <td class="DataTD"><?=_("New Password")?>:</td>
50 <td class="DataTD"><input type="text" name="newpass" value="<?=array_key_exists('newpass',$_REQUEST)?sanitizeHTML($_REQUEST['newpass']):""?>"></td>
51 </tr>
52 <tr>
53 <td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Next")?>"></td>
54 </tr>
55 </table>
56 <input type="hidden" name="userid" value="<?=intval($_REQUEST['userid'])?>">
57 <input type="hidden" name="oldid" value="<?=intval($id)?>">
58 <input type="hidden" name="ticketno" value="<?=sanitizeHTML($ticketno)?>"/>
59 </form>