X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-points.php;h=fea4cd288516d13bc21388eecf0549750cb2f743;hp=947a9edefc0d044ad0f7c9d335434d4c92bb23f2;hb=fd0a0913e4398fc1f85001634f287d889f68a213;hpb=c2e17d983fcbc0c3bd1dd37908d87c678f0367df diff --git a/inc/modules/member/what-points.php b/inc/modules/member/what-points.php index 947a9edefc..fea4cd2885 100644 --- a/inc/modules/member/what-points.php +++ b/inc/modules/member/what-points.php @@ -71,7 +71,7 @@ while ($data = SQL_FETCHARRAY($result_depths)) { $REFS = 0; // Load referal points - $result_points = SQL_QUERY_ESC("SELECT points, locked_points FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s AND `ref_depth`='%s' LIMIT 1", array(getUserId(), bigintval($content['level'])), __FILE__, __LINE__); + $result_points = SQL_QUERY_ESC("SELECT `points`, `locked_points` FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s AND `ref_depth`='%s' LIMIT 1", array(getUserId(), bigintval($content['level'])), __FILE__, __LINE__); if (SQL_NUMROWS($result_points) == 1) { list($points, $locked) = SQL_FETCHROW($result_points); // Also count locked points @@ -84,7 +84,7 @@ while ($data = SQL_FETCHARRAY($result_depths)) { SQL_FREERESULT($result_points); // Load referal counts - $result_refs = SQL_QUERY_ESC("SELECT counter FROM `{?_MYSQL_PREFIX?}_refsystem` WHERE `userid`=%s AND level='%s' LIMIT 1", + $result_refs = SQL_QUERY_ESC("SELECT `counter` FROM `{?_MYSQL_PREFIX?}_refsystem` WHERE `userid`=%s AND `level`='%s' LIMIT 1", array(getUserId(), bigintval($content['level'])), __FILE__, __LINE__); if (SQL_NUMROWS($result_refs) == 1) { list($REFS) = SQL_FETCHROW($result_refs); @@ -98,10 +98,10 @@ while ($data = SQL_FETCHARRAY($result_depths)) { // Transfer data to array for template $row = array( - 'level' => $content['level'], + 'level' => $content['level'], 'percents' => translateComma($content['percents']), - 'points' => translateComma($points), - 'refs' => translateComma($REFS), + 'points' => translateComma($points), + 'refs' => translateComma($REFS), ); // Output row @@ -145,7 +145,7 @@ if ($TLOCK == 0) $TLOCK = '0.00000'; // Remember several values in constants $content['used'] = translateComma($usedPoints); -$content['tpts'] = translateComma($totalPoints - $usedPoints); +$content['sum'] = translateComma($totalPoints - $usedPoints); $content['tref'] = $TREF; $content['tlock'] = translateComma($TLOCK);