summaryrefslogtreecommitdiff
path: root/www/wot.php
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2011-08-21 02:07:40 +0200
committerMichael Tänzer <neo@nhng.de>2011-08-21 02:07:40 +0200
commitce4bfbaf0c2babb5bba2568d3b8712e1615aa651 (patch)
treebcdd82ada2066eff6fc21f6dfc2fe01844f1550f /www/wot.php
parent983a7dced2bc15cfb5760b81659bc72fb39b2567 (diff)
downloadcacert-devel-ce4bfbaf0c2babb5bba2568d3b8712e1615aa651.tar.gz
cacert-devel-ce4bfbaf0c2babb5bba2568d3b8712e1615aa651.tar.xz
cacert-devel-ce4bfbaf0c2babb5bba2568d3b8712e1615aa651.zip
Source code taken from cacert-20110820.tar.bz2
Diffstat (limited to 'www/wot.php')
-rw-r--r--www/wot.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/www/wot.php b/www/wot.php
index 2bd4622..7fa572f 100644
--- a/www/wot.php
+++ b/www/wot.php
@@ -206,9 +206,15 @@
if($oldid == 6)
{
$max = maxpoints();
- $awarded = $newpoints = intval($_POST['points']);
- if($newpoints > $max)
- $newpoints = $max;
+
+ if (intval($_POST['points']) > $max) {
+ $awarded = $newpoints = $max;
+ } elseif (intval($_POST['points']) < 0) {
+ $awarded = $newpoints = 0;
+ } else {
+ $awarded = $newpoints = intval($_POST['points']);
+ }
+
$query = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['_config']['notarise']['id']."' group by `to`";
$res = mysql_query($query);
$drow = mysql_fetch_assoc($res);