X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fpool%2Fpool-user.php;h=9fe3822ada72dd86be1c68122705393a3dce5037;hb=93ccd79d1a3fcb1ee5a101cb6bb670901f154555;hp=d57caf685c2934d4ab78c0ecd726e0dd4e9b215b;hpb=0f3a135204757cc8750262871c8e62c42300acb4;p=mailer.git diff --git a/inc/pool/pool-user.php b/inc/pool/pool-user.php index d57caf685c..9fe3822ada 100644 --- a/inc/pool/pool-user.php +++ b/inc/pool/pool-user.php @@ -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;