summaryrefslogtreecommitdiff
path: root/pages/wot
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2011-02-16 20:01:54 +0100
committerMichael Tänzer <neo@nhng.de>2011-02-16 20:01:54 +0100
commita509863d4933c17fe08f6081858c6b22c4517fdd (patch)
tree724f1ebec63435a06c640c6b14f9991eff7587e6 /pages/wot
parent55c305d6c2c766e4aed538e6c2d2e93bcdbb8ddc (diff)
downloadcacert-devel-a509863d4933c17fe08f6081858c6b22c4517fdd.tar.gz
cacert-devel-a509863d4933c17fe08f6081858c6b22c4517fdd.tar.xz
cacert-devel-a509863d4933c17fe08f6081858c6b22c4517fdd.zip
#827: Review Thawte Patch
Corrections: - Fix HTML markup - Slight rewordings - Always initialize variables before use - Use printf() or echo instead of escaping PHP mode and immediately entering it again Signed-off-by: Michael Tänzer <neo@nhng.de>
Diffstat (limited to 'pages/wot')
-rw-r--r--pages/wot/10.php3
-rw-r--r--pages/wot/15.php32
2 files changed, 19 insertions, 16 deletions
diff --git a/pages/wot/10.php b/pages/wot/10.php
index 2c2e620..50b1ecb 100644
--- a/pages/wot/10.php
+++ b/pages/wot/10.php
@@ -47,7 +47,7 @@
</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>")?>
+<?=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>
<br>
@@ -81,6 +81,7 @@
<?
$thawte = ($row['method'] == "Thawte Points Transfer") or $thawte;
} ?>
+ <tr>
<td class="DataTD" colspan="3"><b><?=_("Total Points")?>:</b></td>
<td class="DataTD"><?=intval($_SESSION['profile']['points'])?></td>
<td class="DataTD" colspan="2">&nbsp;</td>
diff --git a/pages/wot/15.php b/pages/wot/15.php
index 172e722..e42e316 100644
--- a/pages/wot/15.php
+++ b/pages/wot/15.php
@@ -59,7 +59,8 @@
</tr>
<?
-$points = 0;
+ $points = 0;
+ $sumexperienceA = 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))
@@ -73,9 +74,11 @@ $points = 0;
$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>
@@ -92,7 +95,7 @@ $points = 0;
<td class="DataTD" colspan="3"><b><?=_("Total Points Issued")?>:</b></td>
<td class="DataTD"><?=$points?></td>
<td class="DataTD">&nbsp;</td>
- <td class="DataTD"><strong><?=_("Total Points")?>:</strong></td>
+ <td class="DataTD"><strong><?=_("Total Experience Points")?>:</strong></td>
<td class="DataTD"><?=$sumexperienceA?></td>
</tr>
</table>
@@ -114,6 +117,7 @@ $points = 0;
<?
$points = 0;
$maxpoints = 100;
+ $sumexperience = 0;
// $query = "select sum(points) as apoints from `notary` where `from`='".intval($_SESSION['profile']['id'])."' and `from`=`to` ";
// $res = mysql_query($query);
// $row = mysql_fetch_assoc($res);
@@ -205,9 +209,9 @@ $fromuser = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".i
<td class="DataTD"><?=$sumexperienceA?></td>
<td class="DataTD" colspan="3">
<? if ($points < 100)
- {?>
-<?=sprintf(_("%s Points on hold due to less Assurance points"),$sumexperienceAHold)?>
-<? }?>
+ {
+ printf(_("%s Points on hold due to less Assurance points"), $sumexperienceAHold);
+ }?>
</td>
</tr>
<tr>
@@ -215,16 +219,14 @@ $fromuser = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".i
<td class="DataTD"><?=$sumexperienceOut?></td>
<td class="DataTD" colspan="3">&nbsp;
<? if ($sumexperience != $sumexperienceOut)
- {
- ?>
- <? if (points <100)
- { ?>
- <?=sprintf(_("%s Points on hold due to less Assurance points"),$sumexperienceOutHold)?>
- <? } else { ?>
- <?=_("Limit reached")?>
- <? } ?>
- <? }
- ?>
+ {
+ if (points <100)
+ {
+ printf(_("%s Points on hold due to less Assurance points"), $sumexperienceOutHold);
+ } else {
+ echo _("Limit reached");
+ }
+ }?>
</td>
</tr>
<tr>