/*
LibreSSL - CAcert web application
Copyright (C) 2004-2008 CAcert Inc.
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.
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.
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
*/ ?>
?>
=_("Assurer Ranking")?> |
$query = "SELECT `users`. *, count(*) AS `list` FROM `users`, `notary`
WHERE `users`.`id` = `notary`.`from` AND `notary`.`from` != `notary`.`to`
AND `from`='".$_SESSION['profile']['id']."' GROUP BY `notary`.`from`";
$res = mysql_query($query);
$row = mysql_fetch_assoc($res);
$rc = $row['list'];
$query = "SELECT `users`. *, count(*) AS `list` FROM `users`, `notary`
WHERE `users`.`id` = `notary`.`from` AND `notary`.`from` != `notary`.`to`
GROUP BY `notary`.`from` HAVING count(*) > '$rc' ORDER BY `notary`.`when` DESC";
$rank = mysql_num_rows(mysql_query($query)) + 1;
?>
=sprintf(_("You have made %s assurances which ranks you as the #%s top assurer."), intval($rc), intval($rank))?> |
=_("Your Assurance Points")?> |
=_("ID")?> |
=_("Date")?> |
=_("Who")?> |
=_("Points")?> |
=_("Location")?> |
=_("Method")?> |
$query = "select * from `notary` where `to`='".$_SESSION['profile']['id']."'";
$res = mysql_query($query);
while($row = mysql_fetch_assoc($res))
{
$fromuser = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".$row['from']."'"));
?>
=$row['id']?> |
=$row['date']?> |
=$fromuser['fname']." ".$fromuser['lname']?> |
=$row['points']?> |
=$row['location']?> |
=_(sprintf("%s", $row['method']))?> |
} ?>
=_("Total Points")?>: |
=$_SESSION['profile']['points']?> |
|
=_("Assurance Points You Issued")?> |
=_("ID")?> |
=_("Date")?> |
=_("Who")?> |
=_("Points")?> |
=_("Location")?> |
=_("Method")?> |
$points = 0;
$query = "select * from `notary` where `from`='".$_SESSION['profile']['id']."' and `to`!='".$_SESSION['profile']['id']."'";
$res = mysql_query($query);
while($row = mysql_fetch_assoc($res))
{
$fromuser = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".$row['to']."'"));
$points += $row['points'];
$name = trim($fromuser['fname']." ".$fromuser['lname']);
if($name == "")
$name = _("Deleted before Verification");
else
$name = "$name";
?>
=$row['id']?> |
=$row['date']?> |
=$name?> |
=$row['points']?> |
=$row['location']?> |
=$row['method']==""?"":_(sprintf("%s", $row['method']))?> |
} ?>
=_("Total Points Issued")?>: |
=$points?> |
|
[ =_("Go Back")?> ]