]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-points.php
New wrapper introduced, more usage of EL:
[mailer.git] / inc / modules / member / what-points.php
index 32200ad60710b3e80d736768fae3a6092f8c64df..3c8f391d9edde75fa579fc77d96b93c07ce9f0ad 100644 (file)
@@ -49,16 +49,18 @@ addMenuDescription('member', __FILE__);
 
 // Query for referal levels and percents
 $result_depths = SQL_QUERY("SELECT `level`, `percents` FROM `{?_MYSQL_PREFIX?}_refdepths` ORDER BY `level` ASC", __FILE__, __LINE__);
-$depths = SQL_NUMROWS($result_depths);
+
+// Get total depths
+$numDepths = SQL_NUMROWS($result_depths);
 
 // Add many more rows for the login/turbo/ref/order bonus
 // @TODO Should we rewrite this to a filter?
-if (!isExtensionActive('bonus')) $depths += 1;
-if (isExtensionInstalledAndNewer('bonus', '0.2.2')) $depths += 6;
-if (isExtensionInstalledAndNewer('bonus', '0.4.4')) $depths += 4;
+if (!isExtensionActive('bonus')) $numDepths += 1;
+if (isExtensionInstalledAndNewer('bonus', '0.2.2')) $numDepths += 6;
+if (isExtensionInstalledAndNewer('bonus', '0.4.4')) $numDepths += 4;
 
 // Remember row count in constant
-$content['rowspan'] = ($depths*2+15);
+$content['rowspan'] = ($numDepths * 2 + 15);
 
 // Init some vars...
 $content['total_points'] = '0';
@@ -125,25 +127,6 @@ SQL_FREERESULT($result_depths);
 // Put rows to constant for the main template
 $content['rows'] = $OUT;
 
-// Initialize variables
-$content['confirmed'] = '---';
-$content['sent']      = '---';
-$content['receive']   = '---';
-
-// Only user >= v0.1.2: Fetch confirmed mails counter
-if (isExtensionInstalledAndNewer('user', '0.1.2')) {
-       $add = '';
-       $content['confirmed'] = getUserData('mails_confirmed');
-
-       if (isExtensionInstalledAndNewer('user', '0.1.4')) {
-               $content['sent']    = getUserData('emails_sent');
-               $content['receive'] = getUserData('emails_received');
-       } // END - if
-} // END - if
-
-// If TLOCK is 0 add 3 zeros for floating
-if ($content['total_locked'] == '0') $content['total_locked'] = '0.00000';
-
 // Remember several values in constants
 $content['total_points']  = ($content['total_points'] - getUserData('used_points'));