2004-10-16 00:28:17 +00:00
|
|
|
<? /*
|
2008-04-06 19:45:09 +00:00
|
|
|
LibreSSL - CAcert web application
|
|
|
|
Copyright (C) 2004-2008 CAcert Inc.
|
2004-10-16 00:28:17 +00:00
|
|
|
|
2008-04-06 19:45:09 +00:00
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; version 2 of the License.
|
2004-10-16 00:28:17 +00:00
|
|
|
|
2008-04-06 19:45:09 +00:00
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
2004-10-16 00:28:17 +00:00
|
|
|
|
2008-04-06 19:45:09 +00:00
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2004-10-16 00:28:17 +00:00
|
|
|
*/ ?>
|
|
|
|
<?
|
2013-08-29 10:20:30 +00:00
|
|
|
$query = "select * from `users` where `id`='".intval($_SESSION['profile']['id'])."' and `users`.`deleted`=0";
|
|
|
|
$res = mysql_query($query);
|
|
|
|
$user = mysql_fetch_assoc($res);
|
2008-08-31 21:37:34 +00:00
|
|
|
|
2013-08-29 10:20:30 +00:00
|
|
|
$year = intval(substr($user['dob'], 0, 4));
|
|
|
|
$month = intval(substr($user['dob'], 5, 2));
|
|
|
|
$day = intval(substr($user['dob'], 8, 2));
|
2014-01-15 15:40:51 +00:00
|
|
|
$showdetails = array_key_exists("showdetails",$_REQUEST) ? intval($_REQUEST['showdetails']) : 0;
|
|
|
|
|
2013-08-29 10:20:30 +00:00
|
|
|
if($showdetails){
|
|
|
|
$body = sprintf(_("Hi %s,"),$user['fname'])."\n\n";
|
|
|
|
$body .= _("You receive this automatic mail since you yourself or someone ".
|
|
|
|
"else looked up your secret questions and answers for a forgotten ".
|
|
|
|
"password.\n\n".
|
|
|
|
"If it was you who looked up or changed that data, or clicked ".
|
|
|
|
"through the menu in your account, everything is in best order ".
|
|
|
|
"and you can ignore this mail.\n\n".
|
|
|
|
"But if you received this mail without a recognisable reason, ".
|
|
|
|
"there is a danger that an unauthorised person accessed your ".
|
|
|
|
"account, and you should promptly change your password and your ".
|
|
|
|
"secret questions and answers.")."\n\n";
|
2006-08-14 05:46:33 +00:00
|
|
|
|
2013-08-29 10:20:30 +00:00
|
|
|
$body .= _("Best regards")."\n"._("CAcert Support");
|
2006-08-14 05:46:33 +00:00
|
|
|
|
2013-08-29 10:20:30 +00:00
|
|
|
sendmail($user['email'], "[CAcert.org] "._("Email Notification"), $body, "support@cacert.org", "", "", "CAcert Support");
|
|
|
|
}
|
2004-10-16 00:28:17 +00:00
|
|
|
?>
|
2013-08-29 10:20:30 +00:00
|
|
|
|
2004-10-16 00:28:17 +00:00
|
|
|
<form method="post" action="account.php">
|
|
|
|
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper" width="400">
|
|
|
|
<tr>
|
|
|
|
<td colspan="2" class="title"><?=_("My Details")?></td>
|
|
|
|
</tr>
|
2005-07-24 13:56:10 +00:00
|
|
|
<? if($_SESSION['profile']['points'] == 0) { ?>
|
2004-10-16 00:28:17 +00:00
|
|
|
<tr>
|
|
|
|
<td class="DataTD" width="125"><?=_("First Name")?>: </td>
|
2014-06-07 09:15:39 +00:00
|
|
|
<td class="DataTD" width="125"><input type="text" name="fname" value="<?=sanitizeHTML($user['fname'])?>"></td>
|
2004-10-16 00:28:17 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD" valign="top"><?=_("Middle Name(s)")?><br>
|
|
|
|
(<?=_("optional")?>)
|
|
|
|
</td>
|
2014-06-07 09:15:39 +00:00
|
|
|
<td class="DataTD"><input type="text" name="mname" value="<?=sanitizeHTML($user['mname'])?>"></td>
|
2004-10-16 00:28:17 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Last Name")?>: </td>
|
2014-06-07 09:15:39 +00:00
|
|
|
<td class="DataTD"><input type="text" name="lname" value="<?=sanitizeHTML($user['lname'])?>"></td>
|
2004-10-16 00:28:17 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Suffix")?><br>
|
|
|
|
(<?=_("optional")?>)</td>
|
2014-06-07 09:15:39 +00:00
|
|
|
<td class="DataTD"><input type="text" name="suffix" value="<?=sanitizeHTML($user['suffix'])?>"></td>
|
2004-10-16 00:28:17 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Date of Birth")?><br>
|
|
|
|
(<?=_("dd/mm/yyyy")?>)</td>
|
|
|
|
<td class="DataTD"><nobr><select name="day">
|
|
|
|
<?
|
2013-08-29 10:20:30 +00:00
|
|
|
for($i = 1; $i <= 31; $i++)
|
|
|
|
{
|
|
|
|
echo "<option";
|
|
|
|
if($day == $i)
|
|
|
|
echo " selected='selected'";
|
|
|
|
echo ">$i</option>";
|
|
|
|
}
|
2004-10-16 00:28:17 +00:00
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
<select name="month">
|
|
|
|
<?
|
2013-08-29 10:20:30 +00:00
|
|
|
for($i = 1; $i <= 12; $i++)
|
|
|
|
{
|
|
|
|
echo "<option value='$i'";
|
|
|
|
if($month == $i)
|
|
|
|
echo " selected='selected'";
|
|
|
|
echo ">".ucwords(recode("utf-8..html", strftime("%B", mktime(0,0,0,$i,1,date("Y")))))."</option>";
|
|
|
|
}
|
2004-10-16 00:28:17 +00:00
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
<input type="text" name="year" value="<?=$year?>" size="4"></nobr>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2005-01-03 01:03:03 +00:00
|
|
|
<? } else { ?>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD" width="125"><?=_("First Name")?>: </td>
|
2014-06-07 09:15:39 +00:00
|
|
|
<td class="DataTD" width="125"><?=sanitizeHTML($user['fname'])?></td>
|
2005-01-03 01:03:03 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD" valign="top"><?=_("Middle Name(s)")?><br>
|
|
|
|
(<?=_("optional")?>)
|
|
|
|
</td>
|
2014-06-07 09:15:39 +00:00
|
|
|
<td class="DataTD"><?=sanitizeHTML($user['mname'])?></td>
|
2005-01-03 01:03:03 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Last Name")?>: </td>
|
2014-06-07 09:15:39 +00:00
|
|
|
<td class="DataTD"><?=sanitizeHTML($user['lname'])?></td>
|
2005-01-03 01:03:03 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Suffix")?><br>
|
|
|
|
(<?=_("optional")?>)</td>
|
2014-06-07 09:15:39 +00:00
|
|
|
<td class="DataTD"><?=sanitizeHTML($user['suffix'])?></td>
|
2005-01-03 01:03:03 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Date of Birth")?><br>
|
2013-08-29 10:20:30 +00:00
|
|
|
(<?=_("dd/mm/yyyy")?>)</td>
|
2005-07-01 13:12:14 +00:00
|
|
|
<td class="DataTD"><?=$day?> <?=ucwords(recode("utf-8..html", strftime("%B", mktime(0,0,0,$month,1,1))))?> <?=$year?></td>
|
2005-01-03 01:03:03 +00:00
|
|
|
</tr>
|
2004-10-16 00:28:17 +00:00
|
|
|
<? } ?>
|
2013-08-29 10:20:30 +00:00
|
|
|
<tr>
|
2014-06-07 09:15:39 +00:00
|
|
|
<td colspan="2" class="title"><a href="account.php?id=59&oldid=13&userid=<?=intval($_SESSION['profile']['id'])?>"><?=_('Show account history')?></a></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2014-11-18 22:08:23 +00:00
|
|
|
<td colspan="2" class="title"><a href="account.php?id=13&showdetails=<?=intval(!$showdetails)?>"><?=_("View secret question & answers")?></a></td>
|
2013-08-29 10:20:30 +00:00
|
|
|
</tr>
|
|
|
|
<? if($showdetails){ ?>
|
2004-10-16 00:28:17 +00:00
|
|
|
<tr>
|
|
|
|
<td class="DataTD" colspan="2"><?=_("Lost Pass Phrase Questions")?></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2010-01-17 14:10:43 +00:00
|
|
|
<td class="DataTD">1) <input type="text" name="Q1" size="15" value="<?=sanitizeHTML($user['Q1'])?>"></td>
|
|
|
|
<td class="DataTD"><input type="text" name="A1" value="<?=sanitizeHTML($user['A1'])?>"></td>
|
2004-10-16 00:28:17 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2010-01-17 14:10:43 +00:00
|
|
|
<td class="DataTD">2) <input type="text" name="Q2" size="15" value="<?=sanitizeHTML($user['Q2'])?>"></td>
|
|
|
|
<td class="DataTD"><input type="text" name="A2" value="<?=sanitizeHTML($user['A2'])?>"></td>
|
2004-10-16 00:28:17 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2010-01-17 14:10:43 +00:00
|
|
|
<td class="DataTD">3) <input type="text" name="Q3" size="15" value="<?=sanitizeHTML($user['Q3'])?>"></td>
|
|
|
|
<td class="DataTD"><input type="text" name="A3" value="<?=sanitizeHTML($user['A3'])?>"></td>
|
2004-10-16 00:28:17 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2010-01-17 14:10:43 +00:00
|
|
|
<td class="DataTD">4) <input type="text" name="Q4" size="15" value="<?=sanitizeHTML($user['Q4'])?>"></td>
|
|
|
|
<td class="DataTD"><input type="text" name="A4" value="<?=sanitizeHTML($user['A4'])?>"></td>
|
2004-10-16 00:28:17 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2010-01-17 14:10:43 +00:00
|
|
|
<td class="DataTD">5) <input type="text" name="Q5" size="15" value="<?=sanitizeHTML($user['Q5'])?>"></td>
|
|
|
|
<td class="DataTD"><input type="text" name="A5" value="<?=sanitizeHTML($user['A5'])?>"></td>
|
2004-10-16 00:28:17 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2014-01-15 15:40:51 +00:00
|
|
|
<input type="hidden" name="showdetails" value="1" />
|
2013-08-29 10:20:30 +00:00
|
|
|
<? } ?>
|
2004-10-16 00:28:17 +00:00
|
|
|
<td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Update")?>"></td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2008-09-07 02:45:49 +00:00
|
|
|
<input type="hidden" name="csrf" value="<?=make_csrf('perschange')?>" />
|
2014-06-07 09:15:39 +00:00
|
|
|
<input type="hidden" name="oldid" value="<?=intval($id)?>">
|
2004-10-16 00:28:17 +00:00
|
|
|
</form>
|