X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fpool%2Fpool-user.php;h=9ddd52256629c457dc6da8900197218251cd4e82;hb=c2e17d983fcbc0c3bd1dd37908d87c678f0367df;hp=29e87ddafd5f9f0021ea25ea113222c8cbc084c0;hpb=64c8349613addc3da2242c5cd6b99d64e3fb5f8e;p=mailer.git diff --git a/inc/pool/pool-user.php b/inc/pool/pool-user.php index 29e87ddafd..9ddd522566 100644 --- a/inc/pool/pool-user.php +++ b/inc/pool/pool-user.php @@ -61,7 +61,7 @@ if (isExtensionActive('html_mail')) { } // Reset variables -$cnt2 = 0; $lastSentId = 0; $cnt_back = array('0'); $pointsBack = array('0'); +$cnt2 = 0; $lastSentId = 0; $cnt_back = array(0); $pointsBack = array(0); if (SQL_NUMROWS($result_main) > 0) { // Parse all mails while ($DATA = SQL_FETCHARRAY($result_main, 0, false)) { @@ -84,7 +84,7 @@ if (SQL_NUMROWS($result_main) > 0) { $RECEIVERS = array($DATA['receivers']); } else { // No users left - $RECEIVERS = array('0'); + $RECEIVERS = array(0); } $dummy = $RECEIVERS; @@ -105,18 +105,18 @@ if (SQL_NUMROWS($result_main) > 0) { SQL_FREERESULT($result_user); // Do we have a stats entry? - $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", + $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", array($DATA['id'], $DATA['sender'], $DATA['timestamp']), __FILE__, __LINE__); // If there's no stats entry add it! //* DEBUG: */ outputHtml("!L:".__LINE__.'/'.SQL_NUMROWS($result_stats)."!
"); if (SQL_NUMROWS($result_stats) == 0) { // 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())", + 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($DATA['id']), bigintval($DATA['sender']), bigintval($DATA['cat_id']), bigintval($DATA['payment_id']), $DATA['subject'], $DATA['url'], $DATA['target_send'], bigintval($DATA['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", + $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", array(bigintval($DATA['id']), bigintval($DATA['sender']), bigintval($DATA['timestamp'])), __FILE__, __LINE__); } // END - if @@ -215,7 +215,7 @@ if (SQL_NUMROWS($result_main) > 0) { $mailText = loadEmailTemplate('done-member', $content, $DATA['sender']); // Send it also waway - sendEmail($email, MEMBER_SUBJ_SEND_DONE, $mailText); + sendEmail($email, getMessage('MEMBER_SUBJ_SEND_DONE'), $mailText); } // END - if // Free result @@ -258,7 +258,7 @@ if (SQL_NUMROWS($result_main) > 0) { SQL_FREERESULT($result_stats); } else { // User does not exists so we have add the sender's points back to sender's account - if (($RECEIVERS['id'] == '0') || (empty($RECEIVERS['id']))) { + if (($RECEIVERS['id'] == 0) || (empty($RECEIVERS['id']))) { // List was empty SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET `data_type`='SEND' WHERE `id`=%s LIMIT 1", array(bigintval($DATA['id'])), __FILE__, __LINE__);