X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mailid.php;h=6ca76095ad8eed7e5fd6384f8568fb7d2dd09f4e;hb=77f1fa8cd38db6a89be86c51b9aef70915457ed8;hp=289ac310cd4a701d728f6993b57a358078e3b5fa;hpb=e41922487c1c0ef1ed3294e31e5fee7d776876fd;p=mailer.git diff --git a/mailid.php b/mailid.php index 289ac310cd..6ca76095ad 100644 --- a/mailid.php +++ b/mailid.php @@ -72,19 +72,18 @@ if (isGetRequestElementSet('userid')) $userId = bigintval(getRequestElement('u if (isGetRequestElementSet('mailid')) $mailId = bigintval(getRequestElement('mailid')); if (isGetRequestElementSet('bonusid')) $bonusId = bigintval(getRequestElement('bonusid')); -// 01 1 12 2 2 21 1 2210 -if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalErrorsDetected())) { +if ((isValidId($userId)) && ((isValidId($mailId)) || (isValidId($bonusId))) && (!ifFatalErrorsDetected())) { // Init result $result_link = FALSE; // Maybe he wants to confirm an email? - if ($mailId > 0) { + if (isValidId($mailId)) { // Member mail $result_link = SQL_QUERY_ESC("SELECT `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)) { // Bonus mail $result_link = SQL_QUERY_ESC("SELECT `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s AND `userid`=%s LIMIT 1", array($bonusId, $userId), __FILE__, __LINE__); @@ -182,8 +181,8 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr // Was that mail a valid one? if ($isValid === TRUE) { // If time is zero seconds we have a sponsor mail. 1 Second shall be set to avoid problems - if (($time == '0') && ($payment > 0)) { - $url = getUrl(); + if (($time == '0') && ($payment > 0)) { + $url = getUrl(); $time = 1; } // END - if