]> git.mxchange.org Git - mailer.git/blobdiff - inc/pool/pool-user.php
Bad things are now 'classified' as bad (CSS class 'bad' is being used instead of...
[mailer.git] / inc / pool / pool-user.php
index d57caf685c2934d4ab78c0ecd726e0dd4e9b215b..9fe3822ada72dd86be1c68122705393a3dce5037 100644 (file)
@@ -17,7 +17,7 @@
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
@@ -55,7 +55,7 @@ $HTML = '';
 // Check for freed mail orders to send out
 if (isExtensionActive('html_mail')) {
        // With HTML mails
-       $HTML = ', `html_msg`';
+       $HTML = ',`html_msg`';
 } // END - if
 
 // Main query
@@ -116,8 +116,39 @@ if (!SQL_HASZERONUMS($result_main)) {
                                        //* DEBUG: */ debugOutput('!L:'.__LINE__.'/'.SQL_NUMROWS($result_stats).'!');
                                        if (SQL_HASZERONUMS($result_stats)) {
                                                // No entry was found, so we add him!
-                                               SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_stats` (`pool_id` , `userid`,`cat_id`,`payment_id`,`subject`,`url` , `max_rec` , `timestamp_ordered`,`timestamp_sstart`) VALUES ('%s','%s','%s','%s','%s','%s','%s','%s' , UNIX_TIMESTAMP())",
-                                                       array(bigintval($mailData['id']), bigintval($mailData['sender_userid']), bigintval($mailData['cat_id']), bigintval($mailData['payment_id']), $mailData['subject'], $mailData['url'], $mailData['target_send'], bigintval($mailData['timestamp'])), __FILE__, __LINE__);
+                                               SQL_QUERY_ESC("INSERT INTO
+       `{?_MYSQL_PREFIX?}_user_stats`
+(
+       `pool_id`,
+       `userid`,
+       `cat_id`,
+       `payment_id`,
+       `subject`,
+       `url`,
+       `max_rec`,
+       `timestamp_ordered`,
+       `timestamp_sstart`
+) VALUES (
+       %s,
+       %s,
+       %s,
+       %s,
+       '%s',
+       '%s',
+       %s,
+       %s,
+       UNIX_TIMESTAMP()
+)",
+                                                       array(
+                                                               bigintval($mailData['id']),
+                                                               bigintval($mailData['sender_userid']),
+                                                               bigintval($mailData['cat_id']),
+                                                               bigintval($mailData['payment_id']),
+                                                               $mailData['subject'],
+                                                               $mailData['url'],
+                                                               bigintval($mailData['target_send']),
+                                                               bigintval($mailData['timestamp'])
+                                                       ), __FILE__, __LINE__);
 
                                                // Receive it's id for the links table
                                                $result_stats = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `pool_id`=%s AND `userid`=%s AND timestamp_ordered='%s' LIMIT 1",
@@ -207,7 +238,7 @@ if (!SQL_HASZERONUMS($result_main)) {
                                                } // END - if
 
                                                // Set status to SEND because we completely send it away
-                                               SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET `data_type`='SEND', `target_send`=0, `receivers`='' WHERE `id`=%s LIMIT 1",
+                                               SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET `data_type`='SEND',`target_send`=0,`receivers`='' WHERE `id`=%s LIMIT 1",
                                                        array(bigintval($mailData['id'])), __FILE__, __LINE__);
 
                                                // Update send-completed-time
@@ -255,8 +286,8 @@ if (!SQL_HASZERONUMS($result_main)) {
                                                if (isValidUserId($userid)) {
                                                        // User does not exists, pay points back
                                                        $points = getPaymentPoints($mailData['payment_id']);
-                                                       initReferalSystem();
-                                                       addPointsThroughReferalSystem('pool_payback', $mailData['sender_userid'], $points);
+                                                       initReferralSystem();
+                                                       addPointsThroughReferralSystem('pool_payback', $mailData['sender_userid'], $points);
 
                                                        // Add points together and remove user
                                                        $pointsBack[$mailData['sender_userid']] += $points;