summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/account.php6
-rw-r--r--includes/lib/account.php4
-rw-r--r--includes/lib/general.php2
-rw-r--r--includes/loggedin.php2
4 files changed, 7 insertions, 7 deletions
diff --git a/includes/account.php b/includes/account.php
index 2addca1..1c9db57 100644
--- a/includes/account.php
+++ b/includes/account.php
@@ -1270,7 +1270,7 @@
if($oldid == 13 && $process != "")
{
- $ddquery = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['profile']['id']."' group by `to`";
+ $ddquery = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['profile']['id']."' and `deleted` = 0 group by `to`";
$ddres = mysql_query($ddquery);
$ddrow = mysql_fetch_assoc($ddres);
$_SESSION['profile']['points'] = $ddrow['total'];
@@ -1340,7 +1340,7 @@
$_SESSION['profile'] = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".$_SESSION['profile']['id']."'"));
$_SESSION['profile']['loggedin'] = 1;
- $ddquery = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['profile']['id']."' group by `to`";
+ $ddquery = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['profile']['id']."' and `deleted` = 0 group by `to`";
$ddres = mysql_query($ddquery);
$ddrow = mysql_fetch_assoc($ddres);
$_SESSION['profile']['points'] = $ddrow['total'];
@@ -3080,7 +3080,7 @@
$tverify = mysql_fetch_assoc(mysql_query("select * from `tverify` where `id`='$uid'"));
$memid = $tverify['memid'];
$user = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='$memid'"));
- $tmp = mysql_fetch_assoc(mysql_query("select sum(`points`) as `points` from `notary` where `to`='$memid'"));
+ $tmp = mysql_fetch_assoc(mysql_query("select sum(`points`) as `points` from `notary` where `to`='$memid' and `deleted` = 0"));
$points = 0;
if($tverify['URL'] != "" && $tverify['photoid'] != "")
diff --git a/includes/lib/account.php b/includes/lib/account.php
index e311668..46bbcee 100644
--- a/includes/lib/account.php
+++ b/includes/lib/account.php
@@ -51,7 +51,7 @@ function fix_assurer_flag($userID = NULL)
SELECT SUM(`points`) FROM `notary` AS `n`
WHERE `n`.`to` = `u`.`id`
AND (`n`.`expire` > now()
- OR `n`.`expire` IS NULL)
+ OR `n`.`expire` IS NULL) and `n`.`deleted` = 0
) >= 100';
$query = mysql_query($sql);
@@ -85,7 +85,7 @@ function fix_assurer_flag($userID = NULL)
AND (
`n`.`expire` > now()
OR `n`.`expire` IS NULL
- )
+ ) and `n`.`deleted` = 0
) < 100
)';
diff --git a/includes/lib/general.php b/includes/lib/general.php
index 85b132d..cb73c51 100644
--- a/includes/lib/general.php
+++ b/includes/lib/general.php
@@ -146,7 +146,7 @@ function runCommand($command, $input = "", &$output = null, &$errors = true) {
$Result |= 5;
}
- $query = mysql_query('SELECT SUM(`points`) AS `points` FROM `notary` AS `n` WHERE `n`.`to` = \''.(int)intval($userID).'\' AND `n`.`expire` < now()');
+ $query = mysql_query('SELECT SUM(`points`) AS `points` FROM `notary` AS `n` WHERE `n`.`to` = \''.(int)intval($userID).'\' AND `n`.`expire` < now() and `deleted` = 0');
$row = mysql_fetch_assoc($query);
if ($row['points'] < 100) {
$Result |= 3;
diff --git a/includes/loggedin.php b/includes/loggedin.php
index 4f9b8e8..de61ee1 100644
--- a/includes/loggedin.php
+++ b/includes/loggedin.php
@@ -113,7 +113,7 @@
if($_SERVER['HTTP_HOST'] == $_SESSION['_config']['securehostname'] && $_SESSION['profile']['id'] > 0 && $_SESSION['profile']['loggedin'] > 0)
{
- $query = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['profile']['id']."' group by `to`";
+ $query = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['profile']['id']."' and `deleted` = 0 group by `to`";
$res = mysql_query($query);
$row = mysql_fetch_assoc($res);
$_SESSION['profile']['points'] = $row['total'];