]> git.mxchange.org Git - mailer.git/blobdiff - mailid_top.php
Typo fixed
[mailer.git] / mailid_top.php
index 54f17d5ad32b494b566fdaa0c7e4d39847110970..0ad68b00d53cbeb9357004b3ef793fe288b75e0d 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;
 
@@ -125,10 +125,14 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr
                        list($pool, $sender, $notify) = SQL_FETCHROW($result_mailid);
 
                        // Correct notification switch in non-bonus mails
-                       if (($notify != 'Y') && ($notify != 'N')) $notify = 'N';
+                       if (($notify != 'Y') && ($notify != 'N')) {
+                               $notify = 'N';
+                       } // END - if
 
                        // Set sender to 0 when we have a bonus mail
-                       if ($ltype == 'BONUS') $sender = '0';
+                       if ($ltype == 'BONUS') {
+                               $sender = '0';
+                       } // END - if
 
                        // Is the user id valid?
                        if (fetchUserData($userId) === true) {
@@ -154,7 +158,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?
@@ -239,7 +243,7 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr
                                                                        } // END - if
 
                                                                        // Insert stats record
-                                                                       //insertUserStatsRecord($userId, $type, $stats_data);
+                                                                       insertUserStatsRecord($userId, $type, $stats_data);
 
                                                                        // Right code entered?
                                                                        if (bigintval(postRequestParameter('gfx_check')) == $realCode) {
@@ -298,6 +302,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