2004-10-16 16:51:44 +00:00
< ? /*
2008-04-06 19:45:09 +00:00
LibreSSL - CAcert web application
Copyright ( C ) 2004 - 2008 CAcert Inc .
2004-10-16 16:51:44 +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 16:51:44 +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 16:51:44 +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 16:51:44 +00:00
*/ ?>
< ?
2011-11-27 09:18:36 +00:00
$thawte = false ;
2004-10-16 16:51:44 +00:00
?>
2005-05-13 15:34:39 +00:00
< table align = " center " valign = " middle " border = " 0 " cellspacing = " 0 " cellpadding = " 0 " class = " wrapper " >
< tr >
< td colspan = " 5 " class = " title " >< ? = _ ( " Assurer Ranking " ) ?> </td>
</ tr >
< tr >
2014-06-07 09:15:39 +00:00
< ? // the rank calculation is not adjusted to the new deletion method
2009-06-23 20:53:34 +00:00
$query = " SELECT `users`. *, count(*) AS `list` FROM `users`, `notary`
WHERE `users` . `id` = `notary` . `from` AND `notary` . `from` != `notary` . `to`
2008-09-03 18:25:00 +00:00
AND `from` = '".intval($_SESSION[' profile '][' id '])."' GROUP BY `notary` . `from` " ;
2005-05-13 15:34:39 +00:00
$res = mysql_query ( $query );
$row = mysql_fetch_assoc ( $res );
2008-09-03 18:25:00 +00:00
$rc = intval ( $row [ 'list' ]);
2009-06-23 20:53:34 +00:00
/*
$query = " SELECT `users`. *, count(*) AS `list` FROM `users`, `notary`
WHERE `users` . `id` = `notary` . `from` AND `notary` . `from` != `notary` . `to`
2006-08-14 08:19:38 +00:00
GROUP BY `notary` . `from` HAVING count ( * ) > '$rc' ORDER BY `notary` . `when` DESC " ;
2009-06-23 20:53:34 +00:00
*/
2014-06-07 09:15:39 +00:00
$query = " SELECT count(*) AS `list` FROM `users`
inner join `notary` on `users` . `id` = `notary` . `from`
2009-06-23 20:53:34 +00:00
GROUP BY `notary` . `from` HAVING count ( * ) > '$rc' " ;
2005-05-13 15:34:39 +00:00
$rank = mysql_num_rows ( mysql_query ( $query )) + 1 ;
?>
< td class = " DataTD " >< ? = sprintf ( _ ( " You have made %s assurances which ranks you as the #%s top assurer. " ), intval ( $rc ), intval ( $rank )) ?> </td>
</ tr >
</ table >
2011-11-27 09:18:36 +00:00
< center >
< br >
< ? = sprintf ( _ ( " The calculation of points will be changed in the near future. Please check the %s new calculation %s " ), " <a href='/wot.php?id=15'> " , " </a> " ) ?>
< br >
</ center >
2005-05-13 15:34:39 +00:00
< br >
2004-10-16 16:51:44 +00:00
< table align = " center " valign = " middle " border = " 0 " cellspacing = " 0 " cellpadding = " 0 " class = " wrapper " >
< tr >
2006-08-16 03:56:07 +00:00
< td colspan = " 6 " class = " title " >< ? = _ ( " Your Assurance Points " ) ?> </td>
2004-10-16 16:51:44 +00:00
</ tr >
< tr >
2006-08-16 03:56:07 +00:00
< td class = " DataTD " >< b >< ? = _ ( " ID " ) ?> </b></td>
2004-10-16 16:51:44 +00:00
< 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 >
< ?
2014-06-07 09:15:39 +00:00
$query = " select `id`, `date`, `from`, `points`, `location`, `method` from `notary` where `to`=' " . intval ( $_SESSION [ 'profile' ][ 'id' ]) . " ' and `deleted`=0 " ;
2004-10-16 16:51:44 +00:00
$res = mysql_query ( $query );
while ( $row = mysql_fetch_assoc ( $res ))
{
2014-06-07 09:15:39 +00:00
$fromuser = mysql_fetch_assoc ( mysql_query ( " select `fname`, `lname` from `users` where `id`=' " . intval ( $row [ 'from' ]) . " ' " ));
2004-10-16 16:51:44 +00:00
?>
< tr >
2014-06-07 09:15:39 +00:00
< td class = " DataTD " >< ? = intval ( $row [ 'id' ]) ?> </td>
2004-10-16 16:51:44 +00:00
< td class = " DataTD " >< ? = $row [ 'date' ] ?> </td>
2014-06-07 09:15:39 +00:00
< td class = " DataTD " >< a href = " wot.php?id=9&userid=<?=intval( $row['from'] )?> " >< ? = sanitizeHTML ( trim ( $fromuser [ 'fname' ] . " " . $fromuser [ 'lname' ])) ?> </td>
< td class = " DataTD " >< ? = intval ( $row [ 'points' ]) ?> </td>
< td class = " DataTD " >< ? = sanitizeHTML ( $row [ 'location' ]) ?> </td>
2005-07-01 13:12:14 +00:00
< td class = " DataTD " >< ? = _ ( sprintf ( " %s " , $row [ 'method' ])) ?> </td>
2004-10-16 16:51:44 +00:00
</ tr >
2011-11-27 09:18:36 +00:00
< ?
$thawte = ( $row [ 'method' ] == " Thawte Points Transfer " ) || $thawte ;
} ?>
2004-10-16 16:51:44 +00:00
< tr >
2006-08-16 03:56:07 +00:00
< td class = " DataTD " colspan = " 3 " >< b >< ? = _ ( " Total Points " ) ?> :</b></td>
2008-09-03 18:25:00 +00:00
< td class = " DataTD " >< ? = intval ( $_SESSION [ 'profile' ][ 'points' ]) ?> </td>
2004-10-16 16:51:44 +00:00
< td class = " DataTD " colspan = " 2 " >& nbsp ; </ td >
</ tr >
</ table >
2011-11-27 09:18:36 +00:00
< ?
if ( $thawte )
{
?>
< br >
< center >
< strong style = 'color: red' >
< ? = _ ( " Your Thawte-Points will be revoked in the near future. Please check new calculation! " ); ?>
< br >
</ strong >
</ center >
< ? } ?>
2004-10-21 04:22:14 +00:00
< br >
< table align = " center " valign = " middle " border = " 0 " cellspacing = " 0 " cellpadding = " 0 " class = " wrapper " >
< tr >
2006-08-16 03:56:07 +00:00
< td colspan = " 6 " class = " title " >< ? = _ ( " Assurance Points You Issued " ) ?> </td>
2004-10-21 04:22:14 +00:00
</ tr >
< tr >
2006-08-16 03:56:07 +00:00
< td class = " DataTD " >< b >< ? = _ ( " ID " ) ?> </b></td>
2004-10-21 04:22:14 +00:00
< 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 >
< ?
2004-12-30 22:16:58 +00:00
$points = 0 ;
2014-06-07 09:15:39 +00:00
$query = " select `id`, `date`, `points`, `to`, `location`, `method` from `notary` where `from`=' " . intval ( $_SESSION [ 'profile' ][ 'id' ]) . " ' and `to`!=' " . intval ( $_SESSION [ 'profile' ][ 'id' ]) . " ' and `deleted`=0 " ;
2004-10-21 04:22:14 +00:00
$res = mysql_query ( $query );
while ( $row = mysql_fetch_assoc ( $res ))
{
2014-06-07 09:15:39 +00:00
$fromuser = mysql_fetch_assoc ( mysql_query ( " select `fname`, `lname` from `users` where `id`=' " . intval ( $row [ 'to' ]) . " ' " ));
$points += intval ( $row [ 'points' ]);
2005-11-08 10:06:04 +00:00
$name = trim ( $fromuser [ 'fname' ] . " " . $fromuser [ 'lname' ]);
if ( $name == " " )
$name = _ ( " Deleted before Verification " );
else
2014-06-07 09:15:39 +00:00
$name = " <a href='wot.php?id=9&userid= " . intval ( $row [ 'to' ]) . " '> " . sanitizeHTML ( $name ) . " </a> " ;
2004-10-21 04:22:14 +00:00
?>
< tr >
2008-09-03 18:25:00 +00:00
< td class = " DataTD " >< ? = intval ( $row [ 'id' ]) ?> </td>
2004-10-21 04:22:14 +00:00
< td class = " DataTD " >< ? = $row [ 'date' ] ?> </td>
2005-11-08 10:06:04 +00:00
< td class = " DataTD " >< ? = $name ?> </td>
2008-09-03 18:25:00 +00:00
< td class = " DataTD " >< ? = intval ( $row [ 'points' ]) ?> </td>
2014-06-07 09:15:39 +00:00
< td class = " DataTD " >< ? = sanitizeHTML ( $row [ 'location' ]) ?> </td>
2007-12-14 14:59:55 +00:00
< td class = " DataTD " >< ? = $row [ 'method' ] == " " ? " " : _ ( sprintf ( " %s " , $row [ 'method' ])) ?> </td>
2004-10-21 04:22:14 +00:00
</ tr >
< ? } ?>
< tr >
2006-08-16 03:56:07 +00:00
< td class = " DataTD " colspan = " 3 " >< b >< ? = _ ( " Total Points Issued " ) ?> :</b></td>
2014-06-07 09:15:39 +00:00
< td class = " DataTD " >< ? = intval ( $points ) ?> </td>
2004-10-21 04:22:14 +00:00
< td class = " DataTD " colspan = " 2 " >& nbsp ; </ td >
</ tr >
</ table >
2005-07-01 13:12:14 +00:00
< p > [ < a href = 'javascript:history.go(-1)' >< ? = _ ( " Go Back " ) ?> </a> ]</p>
2004-10-16 16:51:44 +00:00