]> git.mxchange.org Git - mailer.git/blobdiff - mailid_top.php
Double % for sprintf()
[mailer.git] / mailid_top.php
index 54f17d5ad32b494b566fdaa0c7e4d39847110970..dbd32df25c8099ee7a8df4d3981f743b6e01c80b 100644 (file)
@@ -84,12 +84,12 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr
 
        // Maybe he wants to confirm an email?
        if ($mailId > 0) {
-               $result_main = SQL_QUERY_ESC("SELECT `id`, `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `stats_id`=%s AND `userid`=%s LIMIT 1",
+               $result_main = SQL_QUERY_ESC("SELECT `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) {
-               $result_main = SQL_QUERY_ESC("SELECT `id`, `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s AND `userid`=%s LIMIT 1",
+               $result_main = SQL_QUERY_ESC("SELECT `id`,`link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s AND `userid`=%s LIMIT 1",
                        array($bonusId, $userId), __FILE__, __LINE__);
                $type = 'bonusid';
                $urlId = $bonusId;
@@ -105,12 +105,12 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr
                // @TODO Rewrite this to a filter
                switch ($ltype) {
                        case 'NORMAL':
-                               $result_mailid = SQL_QUERY_ESC("SELECT `pool_id`, `userid`, `id` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `id`=%s LIMIT 1",
+                               $result_mailid = SQL_QUERY_ESC("SELECT `pool_id`,`userid`,`id` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `id`=%s LIMIT 1",
                                        array($mailId), __FILE__, __LINE__);
                                break;
 
                        case 'BONUS':
-                               $result_mailid = SQL_QUERY_ESC("SELECT `id`, `id`, `is_notify` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
+                               $result_mailid = SQL_QUERY_ESC("SELECT `id`,`id`,`is_notify` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
                                        array($bonusId), __FILE__, __LINE__);
                                break;
 
@@ -154,7 +154,7 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr
                                                        break;
 
                                                case 'BONUS':
-                                                       $result = SQL_QUERY_ESC("SELECT `time`, `points` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
+                                                       $result = SQL_QUERY_ESC("SELECT `time`,`points` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
                                                                array(bigintval($pool)), __FILE__, __LINE__);
 
                                                        // Entry found?
@@ -298,6 +298,7 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr
                                                                                loadTemplate($template, false, $content);
                                                                        } elseif (isValidUserId($sender)) {
                                                                                // Wrong image code! So add points to sender's account
+                                                                               initReferalSystem();
                                                                                addPointsThroughReferalSystem('mailid_payback', $sender, $payment);
 
                                                                                // Add payment points