]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-payout.php
Deprecated templates removed, some code moved to filters, bug fixed in mydata:
[mailer.git] / inc / modules / member / what-payout.php
index 763187ed6a25ceb31657524be57323d2a3a976fb..50fdef04ef188dabc33b88367882409397589c43 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 04/12/2004 *
+ * Mailer v0.2.1-FINAL                                Start: 04/12/2004 *
  * ================                             Last change: 12/01/2008 *
  *                                                                      *
  * -------------------------------------------------------------------- *
@@ -54,7 +54,7 @@ if ((!isExtensionActive('payout')) && (!isAdmin())) {
 } // END - if
 
 $result_depths = SQL_QUERY("SELECT `level`, `percents` FROM `{?_MYSQL_PREFIX?}_refdepths` ORDER BY level", __FILE__, __LINE__);
-$totalPoints = 0;
+$totalPoints = '0';
 while ($content = SQL_FETCHARRAY($result_depths)) {
        // Load referal points
        $result_points = SQL_QUERY_ESC("SELECT `points` FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s AND `ref_depth`='%s' LIMIT 1",
@@ -140,14 +140,13 @@ ORDER BY
                                }
 
                                // Prepare data for the template
-                               // @TODO Rewritings: acc->target_account,bank->target_bank in templates
                                $content = array(
-                                       'sw'     => $SW,
-                                       'acc'    => $content['target_account'],
-                                       'points' => translateComma($content['payout_total']) . ' ' . $content['type'],
-                                       'bank'   => $content['target_bank'],
-                                       'stamp'  => generateDateTime($content['payout_timestamp'], 2),
-                                       'status' => $content['status']
+                                       'sw'               => $SW,
+                                       'target_account'   => $content['target_account'],
+                                       'points'           => translateComma($content['payout_total']) . ' ' . $content['type'],
+                                       'target_bank'      => $content['target_bank'],
+                                       'payout_timestamp' => generateDateTime($content['payout_timestamp'], 2),
+                                       'status'           => $content['status']
                                );
 
                                // Load row template and switch colors
@@ -179,10 +178,10 @@ ORDER BY
 
                // Calculate maximum value
                $max     = round($totalPoints * $content['rate'] - 0.5);
-               $PAY_MAX = 0;
+               $PAY_MAX = '0';
 
                // Calulcate points from submitted amount
-               $points = 0;
+               $points = '0';
                if (isPostRequestElementSet('payout')) {
                        $points  = bigintval(postRequestElement('payout')) / $content['rate'];
                        $PAY_MAX = $max / $content['rate'];