X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=mailid.php;h=691017aa90998c1c90a94420edde9a6509fdf690;hp=3ae1fa55b87ae77d89c0b9d7efae61ca6b6ba32c;hb=00283a82c807a00d66bd5811d41992bb3b059996;hpb=c3b4eaf29946349ff058691db2dcb615a5379bb2 diff --git a/mailid.php b/mailid.php index 3ae1fa55b8..691017aa90 100644 --- a/mailid.php +++ b/mailid.php @@ -57,9 +57,9 @@ setHttpStatus('404 NOT FOUND'); redirectOnUninstalledExtension('mailid'); // Init -$userId = '0'; -$bonusId = '0'; -$mailId = '0'; +$userId = '0'; +$bonusId = '0'; +$mailId = '0'; // Secure all data if (isGetRequestParameterSet('userid')) $userId = bigintval(getRequestParameter('userid')); @@ -97,7 +97,7 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr switch ($ltype) { case 'NORMAL': // Is the stats id valid? - $result = SQL_QUERY_ESC("SELECT `pool_id`, `url`, `subject` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `id`=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT `pool_id`,`url`,`subject` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `id`=%s LIMIT 1", array($mailId), __FILE__, __LINE__); break; @@ -106,7 +106,7 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr redirectOnUninstalledExtension('bonus'); // Bonus-Mails - $result = SQL_QUERY_ESC("SELECT id, url, subject FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT `id`,`url`,`subject` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1", array($bonusId), __FILE__, __LINE__); break; @@ -117,7 +117,7 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr if (SQL_NUMROWS($result) == 1) { // Load data - list($pool, $URL, $title) = SQL_FETCHROW($result); + list($pool, $url, $title) = SQL_FETCHROW($result); // Free result SQL_FREERESULT($result); @@ -130,7 +130,7 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr // Status must be CONFIRMED if (getUserData('status') == 'CONFIRMED') { // Update last activity if not admin - if (!isAdmin()) { + if ((!isAdmin()) || (isDebugModeEnabled())) { // Is not admin, so update last activity updateLastActivity($userId); } // END - if @@ -153,7 +153,7 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr break; case 'BONUS': - $result = SQL_QUERY_ESC("SELECT `points`, `time` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT `points`,`time` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1", array($bonusId), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { list($points, $time) = SQL_FETCHROW($result); @@ -177,7 +177,7 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr 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(); + $url = getUrl(); $time = 1; } // END - if @@ -190,7 +190,7 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr 'userid' => $userId, 'type' => $type, 'data' => $urlId, - 'url' => $URL + 'url' => $url ); // Load template