]> git.mxchange.org Git - mailer.git/blobdiff - mailid_top.php
TODOs.txt updated
[mailer.git] / mailid_top.php
index b0300fda886334cabddb8f9abc21232bf44feccf..7f1639a085d0e807264da6c23da356f14138fa29 100644 (file)
@@ -67,13 +67,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 +243,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 +268,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 +283,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);
@@ -344,30 +353,30 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr
                                                                        break;
                                                        } // END - switch
                                                } else {
-                                                       loadTemplate('admin_settings_saved', false, '<div class="member_failed">{--MAIL_ALREADY_CONFIRMED--} (6)</div>');
+                                                       loadTemplate('admin_settings_unsaved', false, '{--MAIL_ALREADY_CONFIRMED--} (6)');
                                                        $mode = 'failed';
                                                }
                                        } else {
-                                               loadTemplate('admin_settings_saved', false, '<div class="member_failed">{--MAIL_ALREADY_CONFIRMED--} (5)</div>');
+                                               loadTemplate('admin_settings_unsaved', false, '{--MAIL_ALREADY_CONFIRMED--} (5)');
                                                $mode = 'failed';
                                        }
                                } else {
-                                       loadTemplate('admin_settings_saved', false, '<div class="member_failed">{--MAIL_ALREADY_CONFIRMED--} (4)</div>');
+                                       loadTemplate('admin_settings_unsaved', false, '{--MAIL_ALREADY_CONFIRMED--} (4)');
                                        $mode = 'failed';
                                }
                        } else {
-                               loadTemplate('admin_settings_saved', false, '<div class="member_failed">{--MAIL_ALREADY_CONFIRMED--} (3)</div>');
+                               loadTemplate('admin_settings_unsaved', false, '{--MAIL_ALREADY_CONFIRMED--} (3)');
                                $mode = 'failed';
                        }
                } else {
-                       loadTemplate('admin_settings_saved', false, '<div class="member_failed">{--MAIL_ALREADY_CONFIRMED--} (2)</div>');
+                       loadTemplate('admin_settings_unsaved', false, '{--MAIL_ALREADY_CONFIRMED--} (2)');
                        $mode = 'failed';
                }
 
                // Free result
                SQL_FREERESULT($result_mailid);
        } else {
-               loadTemplate('admin_settings_saved', false, '<div class="member_failed">{--MAIL_ALREADY_CONFIRMED--} (1)</div>');
+               loadTemplate('admin_settings_unsaved', false, '{--MAIL_ALREADY_CONFIRMED--} (1)');
                $mode = 'failed';
        }