X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mailid_top.php;h=e4ef0a812e992c0c5163b8dd9acd1ab3d97b9614;hb=fb9a9090248ca810eab3028c660cc0fa429cf854;hp=87db810c76bdfd6e5de4bab753de7581d9a067cc;hpb=c9a5bbe818b2dbcf8e8d5774fb25f08c40c92bd8;p=mailer.git diff --git a/mailid_top.php b/mailid_top.php index 87db810c76..e4ef0a812e 100644 --- a/mailid_top.php +++ b/mailid_top.php @@ -77,8 +77,7 @@ if (isGetRequestElementSet('bonusid')) $bonusId = bigintval(getRequestElement('b if (isGetRequestElementSet('code')) $code = bigintval(getRequestElement('code')); if (isGetRequestElementSet('do')) $do = getRequestElement('do'); -// 01 2 21 12 2 2 21 1 2210 -if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalErrorsDetected())) { +if ((isValidId($userId)) && ((isValidId($mailId)) || (isValidId($bonusId))) && (!ifFatalErrorsDetected())) { // No image? if ($do != 'img') { // ... then output header @@ -86,12 +85,12 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr } // END - fi // Maybe he wants to confirm an email? - if ($mailId > 0) { + if (isValidId($mailId)) { $result_main = SQL_QUERY_ESC("SELECT `id` AS `link_id`, `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `stats_id`=%s AND `userid`=%s LIMIT 1", array($mailId, $userId), __FILE__, __LINE__); $type = 'mailid'; $urlId = $mailId; - } elseif ($bonusId > 0) { + } elseif (isValidId($bonusId)) { $result_main = SQL_QUERY_ESC("SELECT `id` AS `link_id`, `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s AND `userid`=%s LIMIT 1", array($bonusId, $userId), __FILE__, __LINE__); $type = 'bonusid'; @@ -282,7 +281,7 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr // Is an active-rallye running and this is not a notification mail? if ((isBonusRallyeActive()) && ($data['is_notify'] != 'Y')) { // Shall I exclude the webmaster's own userid from the active-rallye? - if ((((getBonusUserid() == $userId) && (getConfig('bonus_include_own') == 'Y')) || (getBonusUserid() != $userId)) && (getDefRefid() != $userId)) { + if ((((getBonusUserid() == $userId) && (isBonusIncludeOwnEnabled())) || (getBonusUserid() != $userId)) && (getDefRefid() != $userId)) { // Add points and remember ranking are done in this function.... addTurboBonus($urlId, $userId, $type); @@ -310,7 +309,7 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr // Load template loadTemplate($template, FALSE, $content); - } elseif (isValidUserId($data['sender'])) { + } elseif (isValidId($data['sender'])) { // Wrong image code! So add points to sender's account initReferralSystem(); addPointsThroughReferralSystem('mailid_payback', $data['sender'], $payment);