X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Freset%2Freset_100_bonus.php;h=f5cff9424c94cdc307b6d5dab57e7bc291fa5607;hb=04b69ac9f33369cbf654396c4a42cb1fff710ff4;hp=ab6e348bb1d2f85f6b2d8226545986e152ac8ca0;hpb=64c8349613addc3da2242c5cd6b99d64e3fb5f8e;p=mailer.git diff --git a/inc/reset/reset_100_bonus.php b/inc/reset/reset_100_bonus.php index ab6e348bb1..f5cff9424c 100644 --- a/inc/reset/reset_100_bonus.php +++ b/inc/reset/reset_100_bonus.php @@ -1,7 +1,7 @@ "); - // Check for 100% klickrate mails $result_bonus = SQL_QUERY("SELECT `id`, `userid`, `subject`, `timestamp_ordered`, `clicks`, `url` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE - `max_rec`=`clicks` AND `clicks` > 0 AND `bonus_stats_active`='N' + `max_rec`=`clicks` AND + `clicks` > 0 AND + `bonus_stats_active`='N' ORDER BY `userid` ASC", __FILE__, __LINE__); if (SQL_NUMROWS($result_bonus) > 0) { - // Remember stats bonus in constant - $content['points'] = translateComma(getConfig('bonus_stats')); - // We found some mail orders... - while ($content = merge_array($content, SQL_FETCHARRAY($result_bonus))) { + while ($content = SQL_FETCHARRAY($result_bonus)) { // Add points SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `bonus_stats`=`bonus_stats`+{?bonus_stats?} WHERE `userid`=%s LIMIT 1", array(bigintval($content['userid'])), __FILE__, __LINE__); // Translate some data - $content['timestamp'] = generateDateTime($content['timestamp_ordered'], '2'); + $content['timestamp'] = generateDateTime($content['timestamp_ordered'], 2); // Load email template and send email $message = loadEmailTemplate('member_stats_bonus', $content, bigintval($content['userid']));