2004-10-28 02:13:59 +00:00
|
|
|
<? /*
|
|
|
|
Copyright (C) 2004 by Duane Groth <duane_at_CAcert_dot_org>
|
|
|
|
|
|
|
|
This file is part of CAcert.
|
|
|
|
|
|
|
|
CAcert has been released under the CAcert Source License
|
|
|
|
which can be found included with these source files or can
|
|
|
|
be downloaded from the internet from the following address:
|
|
|
|
http://www.cacert.org/src-lic.php
|
|
|
|
|
|
|
|
CAcert is distributed WITHOUT ANY WARRANTY; without even
|
|
|
|
the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
|
|
PARTICULAR PURPOSE. See the License for more details.
|
|
|
|
*/ ?>
|
|
|
|
<?
|
|
|
|
if(intval($_GET['userid']) <= 0)
|
|
|
|
{
|
2004-11-03 01:45:21 +00:00
|
|
|
$email = mysql_escape_string(stripslashes($_POST['email']));
|
2004-12-02 11:34:07 +00:00
|
|
|
$query = "select `users`.`id` as `id`, `email`.`email` as `email` from `users`,`email`
|
2004-12-09 01:48:16 +00:00
|
|
|
where `users`.`id`=`email`.`memid` and `email`.`email` like '%$email%' and
|
2004-12-07 13:21:06 +00:00
|
|
|
`email`.`hash`='' and `email`.`deleted`=0 and `users`.`deleted`=0 and
|
|
|
|
`users`.`verified`=1
|
2004-12-02 11:34:07 +00:00
|
|
|
group by `users`.`id` limit 100";
|
2004-10-28 02:13:59 +00:00
|
|
|
$res = mysql_query($query);
|
|
|
|
if(mysql_num_rows($res) > 1) { ?>
|
|
|
|
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
|
|
|
|
<tr>
|
|
|
|
<td colspan="5" class="title"><?=_("Select Specific Account Details")?></td>
|
|
|
|
</tr>
|
|
|
|
<?
|
|
|
|
while($row = mysql_fetch_assoc($res))
|
|
|
|
{ ?>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Email")?>:</td>
|
|
|
|
<td class="DataTD"><a href="account.php?id=43&userid=<?=$row['id']?>"><?=$row['email']?></a></td>
|
|
|
|
</tr>
|
2004-11-03 01:45:21 +00:00
|
|
|
<? } if(mysql_num_rows($res) >= 100) { ?>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD" colspan="2"><?=_("Only the first 100 rows are displayed.")?></td>
|
|
|
|
</tr>
|
|
|
|
<? } else { ?>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD" colspan="2"><? printf(_("%s rows displayed."), mysql_num_rows($res)); ?></td>
|
|
|
|
</tr>
|
2004-10-28 02:13:59 +00:00
|
|
|
<? } ?>
|
2004-11-03 01:45:21 +00:00
|
|
|
</table><br><br>
|
2004-10-29 01:02:13 +00:00
|
|
|
<? } elseif(mysql_num_rows($res) == 1) {
|
2004-10-28 02:13:59 +00:00
|
|
|
$row = mysql_fetch_assoc($res);
|
|
|
|
$_GET['userid'] = $row['id'];
|
2004-10-29 01:02:13 +00:00
|
|
|
} else {
|
|
|
|
printf(_("No users found matching %s"), $email);
|
2004-10-28 02:13:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(intval($_GET['userid']) > 0)
|
|
|
|
{
|
|
|
|
$id = intval($_GET['userid']);
|
2004-12-07 13:21:06 +00:00
|
|
|
$query = "select * from `users` where `id`='$id' and `users`.`deleted`=0 and `users`.`verified`=1";
|
2004-10-28 02:13:59 +00:00
|
|
|
$res = mysql_query($query);
|
|
|
|
if(mysql_num_rows($res) <= 0)
|
|
|
|
{
|
|
|
|
echo _("I'm sorry, the user you were looking for seems to have disappeared! Bad things are a foot!");
|
|
|
|
} else {
|
|
|
|
$row = mysql_fetch_assoc($res);
|
|
|
|
$query = "select sum(`points`) as `points` from `notary` where `to`='".$row['id']."'";
|
|
|
|
$dres = mysql_query($query);
|
|
|
|
$drow = mysql_fetch_assoc($dres);
|
|
|
|
?>
|
|
|
|
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
|
|
|
|
<tr>
|
|
|
|
<td colspan="5" class="title"><? printf(_("%s's Account Details"), $row['email']); ?></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Email")?>:</td>
|
|
|
|
<td class="DataTD"><?=$row['email']?></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("First Name")?>:</td>
|
|
|
|
<td class="DataTD"><?=$row['fname']?></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Middle Name")?>:</td>
|
|
|
|
<td class="DataTD"><?=$row['mname']?></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Last Name")?>:</td>
|
|
|
|
<td class="DataTD"><?=$row['lname']?></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Suffix")?>:</td>
|
|
|
|
<td class="DataTD"><?=$row['suffix']?></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Date of Birth")?>:</td>
|
|
|
|
<td class="DataTD"><?=$row['dob']?></td>
|
|
|
|
</tr>
|
2004-11-03 01:45:21 +00:00
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Change Password")?>:</td>
|
|
|
|
<td class="DataTD"><a href="account.php?id=44&userid=<?=$row['id']?>"><?=_("Change Password")?></a></td>
|
|
|
|
</tr>
|
2004-12-07 13:21:06 +00:00
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Delete Account")?>:</td>
|
|
|
|
<td class="DataTD"><a href="account.php?id=50&userid=<?=$row['id']?>"><?=_("Delete Account")?></a></td>
|
|
|
|
</tr>
|
2004-10-28 02:13:59 +00:00
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Lost Password")?> - Q1:</td>
|
|
|
|
<td class="DataTD"><?=$row['Q1']?></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Lost Password")?> - A1:</td>
|
|
|
|
<td class="DataTD"><?=$row['A1']?></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Lost Password")?> - Q2:</td>
|
|
|
|
<td class="DataTD"><?=$row['Q2']?></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Lost Password")?> - A2:</td>
|
|
|
|
<td class="DataTD"><?=$row['A2']?></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Lost Password")?> - Q3:</td>
|
|
|
|
<td class="DataTD"><?=$row['Q3']?></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Lost Password")?> - A3:</td>
|
|
|
|
<td class="DataTD"><?=$row['A3']?></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Lost Password")?> - Q4:</td>
|
|
|
|
<td class="DataTD"><?=$row['Q4']?></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Lost Password")?> - A4:</td>
|
|
|
|
<td class="DataTD"><?=$row['A4']?></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Lost Password")?> - Q5:</td>
|
|
|
|
<td class="DataTD"><?=$row['Q5']?></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Lost Password")?> - A5:</td>
|
|
|
|
<td class="DataTD"><?=$row['A5']?></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Assurance Points")?>:</td>
|
|
|
|
<td class="DataTD"><?=$drow['points']?></td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2004-12-02 11:34:07 +00:00
|
|
|
<br><?
|
|
|
|
$query = "select * from `email` where `memid`='".$row['id']."' and `deleted`=0 and `hash`=''
|
|
|
|
and `email`!='".$row['email']."'";
|
|
|
|
$dres = mysql_query($query);
|
|
|
|
if(mysql_num_rows($dres) > 0) { ?>
|
|
|
|
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
|
|
|
|
<tr>
|
|
|
|
<td colspan="5" class="title"><?=_("Alternate Verified Email Addresses")?></td>
|
|
|
|
</tr><?
|
|
|
|
$rc = mysql_num_rows($dres);
|
|
|
|
while($drow = mysql_fetch_assoc($dres))
|
|
|
|
{ ?>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Secondary Emails")?>:</td>
|
|
|
|
<td class="DataTD"><?=$drow['email']?></td>
|
|
|
|
</tr>
|
|
|
|
<? } ?>
|
|
|
|
</table>
|
|
|
|
<br><? } ?>
|
|
|
|
<?
|
|
|
|
$query = "select * from `domains` where `memid`='".$row['id']."' and `deleted`=0 and `hash`=''";
|
|
|
|
$dres = mysql_query($query);
|
|
|
|
if(mysql_num_rows($dres) > 0) { ?>
|
|
|
|
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
|
|
|
|
<tr>
|
|
|
|
<td colspan="5" class="title"><?=_("Verified Domains")?></td>
|
|
|
|
</tr><?
|
|
|
|
$rc = mysql_num_rows($dres);
|
|
|
|
while($drow = mysql_fetch_assoc($dres))
|
|
|
|
{ ?>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Domain")?>:</td>
|
|
|
|
<td class="DataTD"><?=$drow['domain']?></td>
|
|
|
|
</tr>
|
|
|
|
<? } ?>
|
|
|
|
</table>
|
2004-10-31 07:08:42 +00:00
|
|
|
<br>
|
2004-12-02 11:34:07 +00:00
|
|
|
<? } ?>
|
2004-10-31 07:08:42 +00:00
|
|
|
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
|
|
|
|
<tr>
|
|
|
|
<td colspan="5" class="title"><?=_("Your Assurance Points")?></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><b><?=_("Date")?></b></td>
|
|
|
|
<td class="DataTD"><b><?=_("Who")?></b></td>
|
|
|
|
<td class="DataTD"><b><?=_("Points")?></b></td>
|
|
|
|
<td class="DataTD"><b><?=_("Location")?></b></td>
|
|
|
|
<td class="DataTD"><b><?=_("Method")?></b></td>
|
|
|
|
</tr>
|
|
|
|
<?
|
|
|
|
$query = "select * from `notary` where `to`='".$row['id']."'";
|
|
|
|
$dres = mysql_query($query);
|
|
|
|
$points = 0;
|
|
|
|
while($drow = mysql_fetch_assoc($dres))
|
|
|
|
{
|
|
|
|
$fromuser = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".$drow['from']."'"));
|
|
|
|
$points += $drow['points'];
|
|
|
|
?>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=$drow['date']?></td>
|
|
|
|
<td class="DataTD"><a href="wot.php?id=9&userid=<?=$drow['from']?>"><?=$fromuser['fname']." ".$fromuser['lname']?></td>
|
|
|
|
<td class="DataTD"><?=$drow['points']?></td>
|
|
|
|
<td class="DataTD"><?=$drow['location']?></td>
|
|
|
|
<td class="DataTD"><?=$drow['method']?></td>
|
|
|
|
</tr>
|
|
|
|
<? } ?>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD" colspan="2"><b><?=_("Total Points")?>:</b></td>
|
|
|
|
<td class="DataTD"><?=$points?></td>
|
|
|
|
<td class="DataTD" colspan="2"> </td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<br>
|
|
|
|
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
|
|
|
|
<tr>
|
|
|
|
<td colspan="5" class="title"><?=_("Assurance Points You Issued")?></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><b><?=_("Date")?></b></td>
|
|
|
|
<td class="DataTD"><b><?=_("Who")?></b></td>
|
|
|
|
<td class="DataTD"><b><?=_("Points")?></b></td>
|
|
|
|
<td class="DataTD"><b><?=_("Location")?></b></td>
|
|
|
|
<td class="DataTD"><b><?=_("Method")?></b></td>
|
|
|
|
</tr>
|
|
|
|
<?
|
|
|
|
$query = "select * from `notary` where `from`='".$row['id']."' and `to`!='".$row['id']."'";
|
|
|
|
$dres = mysql_query($query);
|
|
|
|
$points = 0;
|
|
|
|
while($drow = mysql_fetch_assoc($dres))
|
|
|
|
{
|
|
|
|
$fromuser = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".$drow['to']."'"));
|
|
|
|
$points += $drow['points'];
|
|
|
|
?>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=$drow['date']?></td>
|
|
|
|
<td class="DataTD"><a href="wot.php?id=9&userid=<?=$drow['to']?>"><?=$fromuser['fname']." ".$fromuser['lname']?></td>
|
|
|
|
<td class="DataTD"><?=$drow['points']?></td>
|
|
|
|
<td class="DataTD"><?=$drow['location']?></td>
|
|
|
|
<td class="DataTD"><?=$drow['method']?></td>
|
|
|
|
</tr>
|
|
|
|
<? } ?>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD" colspan="2"><b><?=_("Total Points")?>:</b></td>
|
|
|
|
<td class="DataTD"><?=$points?></td>
|
|
|
|
<td class="DataTD" colspan="2"> </td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<br><br>
|
2004-10-28 02:13:59 +00:00
|
|
|
<? } } ?>
|
2004-10-31 07:08:42 +00:00
|
|
|
|