"Add "view personal" information sub menu to the "my details" menu"
This commit is contained in:
Wytze van der Raay 2013-08-29 10:20:30 +00:00
parent fe56243336
commit 99a263d8b0
2 changed files with 48 additions and 40 deletions

View file

@ -172,7 +172,7 @@ function hideall() {
</div> </div>
<div class="relatedLinks"> <div class="relatedLinks">
<h3 class="pointer" onclick="explode('mydetails')">+ <?=_("My Details")?></h3> <h3 class="pointer" onclick="explode('mydetails')">+ <?=_("My Details")?></h3>
<ul class="menu" id="mydetails"><li><a href="account.php?id=13"><?=_("Edit")?></a></li><li><a href="account.php?id=14"><?=_("Change Password")?></a></li><li><a href="account.php?id=41"><?=_("Default Language")?></a></li><li><a href="wot.php?id=8"><?=_("My Listing")?></a></li><li><a href="wot.php?id=13"><?=_("My Location")?></a></li><li><a href="account.php?id=36"><?=_("My Alert Settings")?></a></li><li><a href="wot.php?id=10"><?=_("My Points")?></a></li><? <ul class="menu" id="mydetails"><li><a href="account.php?id=13"><?=_("View/Edit")?></a></li><li><a href="account.php?id=14"><?=_("Change Password")?></a></li><li><a href="account.php?id=41"><?=_("Default Language")?></a></li><li><a href="wot.php?id=8"><?=_("My Listing")?></a></li><li><a href="wot.php?id=13"><?=_("My Location")?></a></li><li><a href="account.php?id=36"><?=_("My Alert Settings")?></a></li><li><a href="wot.php?id=10"><?=_("My Points")?></a></li><?
if($_SESSION['profile']['id'] == 1 || $_SESSION['profile']['id'] == 5897) if($_SESSION['profile']['id'] == 1 || $_SESSION['profile']['id'] == 5897)
echo "<li><a href='sqldump.php'>SQL Dump</a></li>"; echo "<li><a href='sqldump.php'>SQL Dump</a></li>";
?></ul> ?></ul>

View file

@ -23,7 +23,8 @@
$year = intval(substr($user['dob'], 0, 4)); $year = intval(substr($user['dob'], 0, 4));
$month = intval(substr($user['dob'], 5, 2)); $month = intval(substr($user['dob'], 5, 2));
$day = intval(substr($user['dob'], 8, 2)); $day = intval(substr($user['dob'], 8, 2));
$showdetails = array_key_exists('showdetails', $_REQUEST) && !!intval($_REQUEST['showdetails']);
if($showdetails){
$body = sprintf(_("Hi %s,"),$user['fname'])."\n\n"; $body = sprintf(_("Hi %s,"),$user['fname'])."\n\n";
$body .= _("You receive this automatic mail since you yourself or someone ". $body .= _("You receive this automatic mail since you yourself or someone ".
"else looked up your secret questions and answers for a forgotten ". "else looked up your secret questions and answers for a forgotten ".
@ -39,7 +40,9 @@
$body .= _("Best regards")."\n"._("CAcert Support"); $body .= _("Best regards")."\n"._("CAcert Support");
sendmail($user['email'], "[CAcert.org] "._("Email Notification"), $body, "support@cacert.org", "", "", "CAcert Support"); sendmail($user['email'], "[CAcert.org] "._("Email Notification"), $body, "support@cacert.org", "", "", "CAcert Support");
}
?> ?>
<form method="post" action="account.php"> <form method="post" action="account.php">
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper" width="400"> <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper" width="400">
<tr> <tr>
@ -119,6 +122,10 @@
<td class="DataTD"><?=$day?> <?=ucwords(recode("utf-8..html", strftime("%B", mktime(0,0,0,$month,1,1))))?> <?=$year?></td> <td class="DataTD"><?=$day?> <?=ucwords(recode("utf-8..html", strftime("%B", mktime(0,0,0,$month,1,1))))?> <?=$year?></td>
</tr> </tr>
<? } ?> <? } ?>
<tr>
<td colspan="2" class="title"><a href="account.php?id=13&amp;showdetails=<?=!$showdetails?>"><?=_("View secret question & answers and OTP phrases")?></a></td>
</tr>
<? if($showdetails){ ?>
<tr> <tr>
<td class="DataTD"><?=_("OTP Hash")?><br> <td class="DataTD"><?=_("OTP Hash")?><br>
(<?=_("Not displayed")?>)</td> (<?=_("Not displayed")?>)</td>
@ -153,6 +160,7 @@
<td class="DataTD"><input type="text" name="A5" value="<?=sanitizeHTML($user['A5'])?>"></td> <td class="DataTD"><input type="text" name="A5" value="<?=sanitizeHTML($user['A5'])?>"></td>
</tr> </tr>
<tr> <tr>
<? } ?>
<td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Update")?>"></td> <td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Update")?>"></td>
</tr> </tr>
</table> </table>