]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-points.php
Reset rewritten, SQL fixed, zeros are now numeric
[mailer.git] / inc / modules / member / what-points.php
index 6293845d814d2e848ff713b84b7817c2ce1ef256..129fb4026384d3410d18aa52689aeaf7e5cfd6fb 100644 (file)
@@ -42,7 +42,6 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
 // Add description as navigation point
 ADD_DESCR("member", basename(__FILE__));
 
-OPEN_TABLE("100%", "member_content member_content_align", "");
 $result_depths = SQL_QUERY("SELECT level, percents FROM "._MYSQL_PREFIX."_refdepths ORDER BY level", __FILE__, __LINE__);
 $depths = SQL_NUMROWS($result_depths);
 
@@ -55,12 +54,12 @@ if (GET_EXT_VERSION("bonus") >= "0.4.4") $depths += 4;
 define('__ROWS_VALUE', ($depths*2+15));
 
 // Init some vars...
-$TPTS = "0"; $TREF = "0"; $TLOCK = "0"; $OUT = "";
+$TPTS = 0; $TREF = 0; $TLOCK = 0; $OUT = "";
 
 // Load ref levels
 while (list($lvl, $per) = SQL_FETCHROW($result_depths)) {
        // Initialize ref-count
-       $REFS = "0";
+       $REFS = 0;
 
        // Load referral 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($GLOBALS['userid'], bigintval($lvl)), __FILE__, __LINE__);
@@ -80,7 +79,7 @@ while (list($lvl, $per) = SQL_FETCHROW($result_depths)) {
                SQL_FREERESULT($result_refs);
                $TREF += $REFS;
        } else {
-               $REFS = "0";
+               $REFS = 0;
        }
 
        // Transfer data to array for template
@@ -202,6 +201,5 @@ if (EXT_IS_ACTIVE("payout")) {
        PAYOUT_OUTPUT_PAYOUT_LIST(str_replace(",", ".", ($TPTS - $USED)));
 }
 
-CLOSE_TABLE();
 //
 ?>