$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');
$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
// 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;
} // 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);