]> git.mxchange.org Git - mailer.git/blobdiff - mailid_top.php
Encapsulated access on many ['cache_array']['modules']['foo'] entries
[mailer.git] / mailid_top.php
index 5bc0116022c051d8ae92272265d39795fc1c457e..d77d5eba4cee15ae5bf2519e40700a4452e0f3c7 100644 (file)
@@ -14,8 +14,6 @@
  * $Date::                                                            $ *
  * $Tag:: 0.2.1-FINAL                                                 $ *
  * $Author::                                                          $ *
- * Needs to be in all Files and every File needs "svn propset           *
- * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
@@ -67,13 +65,13 @@ $code = '0';
 $mode = '';
 
 // Secure all data
-if (isGetRequestParameterSet('userid'))  $userId = bigintval(getRequestParameter('userid'));
-if (isGetRequestParameterSet('mailid'))  $mailId    = bigintval(getRequestParameter('mailid'));
-if (isGetRequestParameterSet('bonusid')) $bonusId    = bigintval(getRequestParameter('bonusid'));
-if (isGetRequestParameterSet('code'))    $code       = bigintval(getRequestParameter('code'));
-if (isGetRequestParameterSet('mode'))    $mode       = getRequestParameter('mode');
+if (isGetRequestParameterSet('userid'))  $userId  = bigintval(getRequestParameter('userid'));
+if (isGetRequestParameterSet('mailid'))  $mailId  = bigintval(getRequestParameter('mailid'));
+if (isGetRequestParameterSet('bonusid')) $bonusId = bigintval(getRequestParameter('bonusid'));
+if (isGetRequestParameterSet('code'))    $code    = bigintval(getRequestParameter('code'));
+if (isGetRequestParameterSet('mode'))    $mode    = getRequestParameter('mode');
 
-// 01           1        12            2    2            21    1                   22     10
+// 01             2       21    12           2    2            21    1                      2210
 if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalErrorsDetected())) {
        // No image? Then output header
        if ($mode != 'img') loadIncludeOnce('inc/header.php');
@@ -243,7 +241,7 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr
                                                                                $template = 'mailid_points_done';
 
                                                                                // Right code entered add points and remove entry
-                                                                               if ((getUserData('ref_payout') > 0) && (!isDirectPaymentEnabled())) {
+                                                                               if (ifUserPointsLocked($userId)) {
                                                                                        // Don't add points over the referal system
                                                                                        $template = 'mailid_points_locked';
                                                                                } // END - if
@@ -268,7 +266,13 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr
 
                                                                                                        // Set template to mailid_points_done2 which contains a link to the ranking list
                                                                                                        $template = 'mailid_points_done2';
-                                                                                                       if ($locked) $template = 'mailid_points_locked2';
+
+                                                                                                       // Different template if user has some mails to confirm
+                                                                                                       if (ifUserPointsLocked($userId)) {
+                                                                                                               $template = 'mailid_points_locked2';
+                                                                                                       } // END - if
+
+                                                                                                       // Assign more data for the template
                                                                                                        $content['userid']  = $userId;
                                                                                                        $content['type']    = $type;
                                                                                                        $content['data']    = $urlId;
@@ -277,7 +281,10 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr
                                                                                } // END - if
 
                                                                                // Load total points
-                                                                               $content['total'] = getTotalPoints($userId);
+                                                                               $content['total']  = getTotalPoints($userId);
+
+                                                                               // Add payment points
+                                                                               $content['points'] = $payment;
 
                                                                                // Load template
                                                                                loadTemplate($template, false, $content);