]> git.mxchange.org Git - mailer.git/blobdiff - mailid_top.php
Naming convention, more usage of EL, new wrapper function introduced:
[mailer.git] / mailid_top.php
index 6d88d094bc08544fb870e7d070ec94103ad194c0..ba47505ab9043fd61461c75d9d6bdbfa163d822d 100644 (file)
@@ -215,7 +215,6 @@ if ((isValidUserId($url_userid)) && (($url_mid > 0) || ($url_bid > 0)) && (!ifFa
                                                                        } // END - switch
 
                                                                        // Export data into constants for the template
-                                                                       $content['points'] = translateComma($payment);
                                                                        $content['banner'] = loadTemplate('mailid_banner', true);
 
                                                                        // Only when user extension = v0.1.2: Update mails-confirmed counter
@@ -239,13 +238,11 @@ if ((isValidUserId($url_userid)) && (($url_mid > 0) || ($url_bid > 0)) && (!ifFa
                                                                        // Right code entered?
                                                                        if (bigintval(postRequestParameter('gfx_check')) == $img_code) {
                                                                                // Add points over referal system is the default
-                                                                               $locked = false;
                                                                                $template = 'mailid_points_done';
 
                                                                                // Right code entered add points and remove entry
-                                                                               if ((getUserData('ref_payout') > 0) && (getConfig('allow_direct_pay') != 'Y')) {
+                                                                               if ((getUserData('ref_payout') > 0) && (!isDirectPaymentAllowed())) {
                                                                                        // Don't add points over the referal system
-                                                                                       $locked = true;
                                                                                        $template = 'mailid_points_locked';
                                                                                } // END - if
 
@@ -256,7 +253,7 @@ if ((isValidUserId($url_userid)) && (($url_mid > 0) || ($url_bid > 0)) && (!ifFa
                                                                                // Add points
                                                                                // @TODO Try to rewrite the following unset()
                                                                                unset($GLOBALS['ref_level']);
-                                                                               addPointsThroughReferalSystem('mailid_okay', $url_userid, $payment, false, 0, $locked);
+                                                                               addPointsThroughReferalSystem('mailid_okay', $url_userid, $payment);
 
                                                                                // Shall I add bonus points for "turbo clickers" ?
                                                                                if (isExtensionInstalledAndNewer('bonus', '0.2.2')) {
@@ -278,10 +275,7 @@ if ((isValidUserId($url_userid)) && (($url_mid > 0) || ($url_bid > 0)) && (!ifFa
                                                                                } // END - if
 
                                                                                // Load total points
-                                                                               $content['total'] = translateComma(
-                                                                                       countSumTotalData($url_userid, 'user_points', 'points') -
-                                                                                       countSumTotalData($url_userid, 'user_data', 'used_points')
-                                                                               );
+                                                                               $content['total'] = getTotalPoints($url_userid);
 
                                                                                // Load template
                                                                                loadTemplate($template, false, $content);