Refback will be payed now (user cannot setup currently)
[mailer.git] / inc / modules / member / what-points.php
index d146a2c..0cb4d3c 100644 (file)
@@ -64,16 +64,17 @@ while (list($lvl, $per) = SQL_FETCHROW($result_depths)) {
        // Load referral points
        $result_points = SQL_QUERY_ESC("SELECT points, locked_points FROM "._MYSQL_PREFIX."_user_points WHERE userid=%s AND ref_depth=%d LIMIT 1", array($GLOBALS['userid'], bigintval($lvl)), __FILE__, __LINE__);
        if (SQL_NUMROWS($result_points) == 1) {
-               list($points, $LOCKED) = SQL_FETCHROW($result_points);
+               list($points, $locked) = SQL_FETCHROW($result_points);
                SQL_FREERESULT($result_points);
                // Also count locked points
-               $TPTS += $points; $TLOCK += $LOCKED;
+               $TPTS += $points; $TLOCK += $locked;
        } else {
-               $points = "0.00000"; $LOCKED = "0.00000";
+               $points = "0.00000"; $locked = "0.00000";
        }
 
        // Load referral counts
-       $result_refs = SQL_QUERY_ESC("SELECT counter FROM "._MYSQL_PREFIX."_refsystem WHERE userid=%s AND level='%s' LIMIT 1", array($GLOBALS['userid'], bigintval($lvl)), __FILE__, __LINE__);
+       $result_refs = SQL_QUERY_ESC("SELECT counter FROM "._MYSQL_PREFIX."_refsystem WHERE userid=%s AND level=%s LIMIT 1",
+               array($GLOBALS['userid'], bigintval($lvl)), __FILE__, __LINE__);
        if (SQL_NUMROWS($result_refs) == 1) {
                list($REFS) = SQL_FETCHROW($result_refs);
                SQL_FREERESULT($result_refs);