summaryrefslogtreecommitdiff
path: root/pages/wot
diff options
context:
space:
mode:
Diffstat (limited to 'pages/wot')
-rw-r--r--pages/wot/10.php15
-rw-r--r--pages/wot/15.php167
2 files changed, 116 insertions, 66 deletions
diff --git a/pages/wot/10.php b/pages/wot/10.php
index fefc84c..2c2e620 100644
--- a/pages/wot/10.php
+++ b/pages/wot/10.php
@@ -45,6 +45,11 @@
<td class="DataTD"><?=sprintf(_("You have made %s assurances which ranks you as the #%s top assurer."), intval($rc), intval($rank))?></td>
</tr>
</table>
+<center>
+<br>
+<?=sprintf(_("The calculation of points will be changed in the near future. Please check the new calculation %s here %s"),"<a href='/wot.php?id=15'></strong>","</a>")?>
+<br>
+</center>
<br>
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
<tr>
@@ -83,9 +88,17 @@
</table>
<?
if ($thawte)
- echo "<br><strong style='color: red'>Your Thawte-Points will be revoked as of November 16, 2010. Please check new calculation <a href='/wot.php?id=15'></strong>here</a>";
+{
?>
<br>
+<center>
+<strong style='color: red'>
+<?=_("Your Thawte-Points will be revoked in the near future. Please check new calculation!");?>
+<br>
+</strong>
+</center>
+<?}?>
+<br>
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
<tr>
<td colspan="6" class="title"><?=_("Assurance Points You Issued")?></td>
diff --git a/pages/wot/15.php b/pages/wot/15.php
index fa1ca50..d3fbb98 100644
--- a/pages/wot/15.php
+++ b/pages/wot/15.php
@@ -46,7 +46,7 @@
<br>
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
<tr>
- <td colspan="6" class="title"><?=_("Your Experience Points")?></td>
+ <td colspan="7" class="title"><?=_("Assurance Points You Issued")?></td>
</tr>
<tr>
<td class="DataTD"><b><?=_("ID")?></b></td>
@@ -55,40 +55,52 @@
<td class="DataTD"><b><?=_("Points")?></b></td>
<td class="DataTD"><b><?=_("Location")?></b></td>
<td class="DataTD"><b><?=_("Method")?></b></td>
+ <td class="DataTD"><b><?=_("Experience Points")?></b></td>
</tr>
<?
- $maxpoints=50;
- $points = 0;
- $query = "select * from `notary` where `to`='".intval($_SESSION['profile']['id'])."' and `from` = `to` order by `id` desc ";
+$points = 0;
+ $query = "select * from `notary` where `from`='".intval($_SESSION['profile']['id'])."' and `to`!='".intval($_SESSION['profile']['id'])."' order by `id` desc";
$res = mysql_query($query);
while($row = mysql_fetch_assoc($res))
{
- $awarded = $row['awarded'];
- if ($points+$awarded > $maxpoints)
- $awarded = $maxpoints-$points;
- $points = $points + $awarded;
- $fromuser = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".intval($row['from'])."'"));
+ $fromuser = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".intval($row['to'])."'"));
+ $points += $row['awarded'];
+ $name = trim($fromuser['fname']." ".$fromuser['lname']);
+ if($name == "")
+ $name = _("Deleted before Verification");
+ else
+ $name = "<a href='wot.php?id=9&amp;userid=".intval($row['to'])."'>$name</a>";
+ $experience="";
+ if ($row['method'] == "Face to Face Meeting")
+ if ($sumexperienceA < 50)
+ $sumexperienceA=$sumexperienceA+2;
+ $experience="2";
+
?>
<tr>
- <td class="DataTD"><?=$row['id']?></td>
+ <td class="DataTD"><?=intval($row['id'])?></td>
<td class="DataTD"><?=$row['date']?></td>
- <td class="DataTD"><a href="wot.php?id=9&amp;userid=<?=intval($row['from'])?>"><?=$fromuser['fname']." ".$fromuser['lname']?></td>
- <td class="DataTD"><?=$awarded?></td>
+ <td class="DataTD"><?=$name?></td>
+ <td class="DataTD"><?=intval($row['awarded'])?></td>
<td class="DataTD"><?=$row['location']?></td>
- <td class="DataTD"><?=_(sprintf("%s", $row['method']))?></td>
- </tr>
+ <td class="DataTD"><?=$row['method']==""?"":_(sprintf("%s", $row['method']))?></td>
+ <td class="DataTD"><?=$experience?>&nbsp;</td>
+</tr>
<? } ?>
<tr>
- <td class="DataTD" colspan="3"><b><?=_("Total Points")?>:</b></td>
+ <td class="DataTD" colspan="3"><b><?=_("Total Points Issued")?>:</b></td>
<td class="DataTD"><?=$points?></td>
- <td class="DataTD" colspan="2">&nbsp;</td>
+ <td class="DataTD">&nbsp;</td>
+ <td class="DataTD"><strong><?=_("Total Points")?>:</strong></td>
+ <td class="DataTD"><?=$sumexperienceA?></td>
</tr>
</table>
<br>
+
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
<tr>
- <td colspan="6" class="title"><?=_("Your Assurance Points")?></td>
+ <td colspan="7" class="title"><?=_("Your Assurance Points")?></td>
</tr>
<tr>
<td class="DataTD"><b><?=_("ID")?></b></td>
@@ -97,6 +109,7 @@
<td class="DataTD"><b><?=_("Points")?></b></td>
<td class="DataTD"><b><?=_("Location")?></b></td>
<td class="DataTD"><b><?=_("Method")?></b></td>
+ <td class="DataTD"><b><?=_("Experience Points")?></b></td>
</tr>
<?
$points = 0;
@@ -111,18 +124,54 @@
$res = mysql_query($query);
while($row = mysql_fetch_assoc($res))
{
+ $experience = 0;
$awarded = $row['awarded'];
- if ($row['method'] == "Thawte Points Transfer")
+ if ($awarded < 0)
+ $awarded = 0;
+ if ($row['points'] > $row['awarded'])
+ $awarded = $row['points'];
+ if ($awarded > 150)
+ $awarded = 150;
+ $awardedcount = $awarded;
+ if ($awarded > 100)
{
- $points=0;
- $awarded="<strong style='color: red'>Revoked</strong>";
- } else
- {
- if ($points+$awarded > $maxpoints)
- $awarded = $maxpoints-$points;
- $points = $points + $awarded;
+ $experience = $awarded - $maxpoints;
+ $awarded = 100;
}
- $fromuser = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".intval($row['from'])."'"));
+ if ($points+$awarded > $maxpoints)
+ $awarded = $maxpoints-$points;
+
+ switch ($row['method'])
+ {
+ case 'Thawte Points Transfer':
+ // $points=0;
+ $awarded=sprintf("<strong style='color: red'>%s</strong>",_("Revoked"));
+ $experience=0;
+ break;
+ case 'CT Magazine - Germany':
+ // $points=0;
+ $awarded=sprintf("<strong style='color: red'>%s</strong>",_("Revoked"));
+ $experience=0;
+ break;
+ case 'Temporary Increase':
+// Current usage of 'Temporary Increase' may break audit aspects, needs to be reimplemented
+ // $points=0;
+ $awarded=sprintf("<strong style='color: red'>%s</strong>",_("Revoked"));
+ $experience=0;
+ break;
+ case 'Administrative Increase':
+ if ($row['points'] > 2)
+ $points = $points + $awarded;
+ break;
+ default:
+ $points = $points + $awarded;
+ }
+ if ($sumexperience+$experience < 150)
+ $sumexperience = $sumexperience + $experience;
+ else
+ $sumexperience = 150;
+
+$fromuser = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".intval($row['from'])."'"));
?>
<tr>
<td class="DataTD"><?=$row['id']?></td>
@@ -131,55 +180,43 @@
<td class="DataTD"><?=$awarded?></td>
<td class="DataTD"><?=$row['location']?></td>
<td class="DataTD"><?=_(sprintf("%s", $row['method']))?></td>
+ <td class="DataTD"><?=$experience?></b></td>
</tr>
-<? } ?>
+<? }
+ if ($sumexperienceA + $sumexperience > 50)
+ $sumexperienceOut = 50-$sumexperienceA;
+ else
+ $sumexperienceOut = $sumexperience;
+
+?>
<tr>
- <td class="DataTD" colspan="3"><b><?=_("Total Points")?>:</b></td>
+ <td class="DataTD" colspan="3"><b><?=_("Total Assurance Points")?>:</b></td>
<td class="DataTD"><?=$points?></td>
- <td class="DataTD" colspan="2">&nbsp;</td>
- </tr>
-</table>
-<br>
-<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
- <tr>
- <td colspan="6" class="title"><?=_("Assurance Points You Issued")?></td>
+ <td class="DataTD" colspan="3">&nbsp;</td>
</tr>
<tr>
- <td class="DataTD"><b><?=_("ID")?></b></td>
- <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>
+ <td class="DataTD" colspan="3"><b><?=_("Total Experience Points by Assurance")?>:</b></td>
+ <td class="DataTD"><?=$sumexperienceA?></td>
+ <td class="DataTD" colspan="3">&nbsp;</td>
</tr>
-<?
- $points = 0;
- $query = "select * from `notary` where `from`='".intval($_SESSION['profile']['id'])."' and `to`!='".intval($_SESSION['profile']['id'])."' order by `id` desc";
- $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['awarded'];
- $name = trim($fromuser['fname']." ".$fromuser['lname']);
- if($name == "")
- $name = _("Deleted before Verification");
- else
- $name = "<a href='wot.php?id=9&amp;userid=".intval($row['to'])."'>$name</a>";
-?>
<tr>
- <td class="DataTD"><?=intval($row['id'])?></td>
- <td class="DataTD"><?=$row['date']?></td>
- <td class="DataTD"><?=$name?></td>
- <td class="DataTD"><?=intval($row['awarded'])?></td>
- <td class="DataTD"><?=$row['location']?></td>
- <td class="DataTD"><?=$row['method']==""?"":_(sprintf("%s", $row['method']))?></td>
+ <td class="DataTD" colspan="3"><b><?=_("Total Experience Points (other ways)")?>:</b></td>
+ <td class="DataTD"><?=$sumexperienceOut?></td>
+ <td class="DataTD" colspan="3">&nbsp;
+ <? if ($sumexperience != $sumexperienceOut)
+ {
+ ?>
+ <?=_("Limit reached")?>
+ <? }
+ ?>
+ </td>
</tr>
-<? } ?>
<tr>
- <td class="DataTD" colspan="3"><b><?=_("Total Points Issued")?>:</b></td>
- <td class="DataTD"><?=$points?></td>
- <td class="DataTD" colspan="2">&nbsp;</td>
+ <td class="DataTD" colspan="3"><b><?=_("Total Points")?>:</b></td>
+ <td class="DataTD"><?=$points + $sumexperienceA + $sumexperienceOut?></td>
+ <td class="DataTD" colspan="3">&nbsp;</td>
</tr>
+
</table>
<p>[ <a href='javascript:history.go(-1)'><?=_("Go Back")?></a> ]</p>