/*
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
*/ ?>
$thawte = false;
?>
=_("Assurer Ranking")?> |
$query = "SELECT `users`. *, count(*) AS `list` FROM `users`, `notary`
WHERE `users`.`id` = `notary`.`from` AND `notary`.`from` != `notary`.`to`
AND `from`='".intval($_SESSION['profile']['id'])."' GROUP BY `notary`.`from`";
$res = mysql_query($query);
$row = mysql_fetch_assoc($res);
$rc = intval($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";
*/
$query = "SELECT count(*) AS `list` FROM `users`
inner join `notary` on `users`.`id` = `notary`.`from`
GROUP BY `notary`.`from` HAVING count(*) > '$rc'";
$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))?> |
=sprintf(_("The calculation of points will be changed in the near future. Please check the %s new calculation %s"), "", "")?>
=_("Your Assurance Points")?> |
=_("ID")?> |
=_("Date")?> |
=_("Who")?> |
=_("Points")?> |
=_("Location")?> |
=_("Method")?> |
$query = "select * from `notary` where `to`='".intval($_SESSION['profile']['id'])."'";
$res = mysql_query($query);
while($row = mysql_fetch_assoc($res))
{
$fromuser = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".intval($row['from'])."'"));
?>
=$row['id']?> |
=$row['date']?> |
=$fromuser['fname']." ".$fromuser['lname']?> |
=$row['points']?> |
=$row['location']?> |
=_(sprintf("%s", $row['method']))?> |
$thawte = ($row['method'] == "Thawte Points Transfer") || $thawte;
} ?>
=_("Total Points")?>: |
=intval($_SESSION['profile']['points'])?> |
|
if ($thawte)
{
?>
=_("Your Thawte-Points will be revoked in the near future. Please check new calculation!");?>
}?>
=_("Assurance Points You Issued")?> |
=_("ID")?> |
=_("Date")?> |
=_("Who")?> |
=_("Points")?> |
=_("Location")?> |
=_("Method")?> |
$points = 0;
$query = "select * from `notary` where `from`='".intval($_SESSION['profile']['id'])."' and `to`!='".intval($_SESSION['profile']['id'])."'";
$res = mysql_query($query);
while($row = mysql_fetch_assoc($res))
{
$fromuser = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".intval($row['to'])."'"));
$points += $row['points'];
$name = trim($fromuser['fname']." ".$fromuser['lname']);
if($name == "")
$name = _("Deleted before Verification");
else
$name = "$name";
?>
=intval($row['id'])?> |
=$row['date']?> |
=$name?> |
=intval($row['points'])?> |
=$row['location']?> |
=$row['method']==""?"":_(sprintf("%s", $row['method']))?> |
} ?>
=_("Total Points Issued")?>: |
=$points?> |
|
[ =_("Go Back")?> ]