* *
* -------------------------------------------------------------------- *
* File : monthly_bonus.php *
* *
* -------------------------------------------------------------------- *
* File : monthly_bonus.php *
* svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
// Extension 'autopurge' is inactive or purging of inactive accounts is deactivated
$whereStatement1 = "WHERE `status`='CONFIRMED'";
// Extension 'autopurge' is inactive or purging of inactive accounts is deactivated
$whereStatement1 = "WHERE `status`='CONFIRMED'";
// Shall I keep inactive members away from here? (mostly wanted in an "active-rallye" ...)
if (isExtensionActive('autopurge')) {
// Use last online stamp only when autopurge for inactive members is activated
// Shall I keep inactive members away from here? (mostly wanted in an "active-rallye" ...)
if (isExtensionActive('autopurge')) {
// Use last online stamp only when autopurge for inactive members is activated
- if (getConfig('bonus_click_yn') == 'Y') $add .= " + `turbo_bonus`";
- if (getConfig('bonus_login_yn') == 'Y') $add .= " + `login_bonus`";
- if (getConfig('bonus_order_yn') == 'Y') $add .= " + `bonus_order`";
- if (getConfig('bonus_stats_yn') == 'Y') $add .= " + `bonus_stats`";
- if (getConfig('bonus_ref_yn') == 'Y') $add .= " + `bonus_ref`";
+ if (getConfig('bonus_click_yn') == 'Y') $add .= ' + `turbo_bonus`';
+ if (getConfig('bonus_login_yn') == 'Y') $add .= ' + `login_bonus`';
+ if (getConfig('bonus_order_yn') == 'Y') $add .= ' + `bonus_order`';
+ if (getConfig('bonus_stats_yn') == 'Y') $add .= ' + `bonus_stats`';
+ if (getConfig('bonus_ref_yn') == 'Y') $add .= ' + `bonus_ref`';
- $result_main = SQL_QUERY_ESC("SELECT `userid`, `email`, `gender`, `surname`, `family`, (0".$add.") AS points
+ $result_main = SQL_QUERY('SELECT
+ `userid`, `email`, `gender`, `surname`, `family`, (0' . $add . ') AS points
// Add points to user's account directly
addPointsDirectly('monthly_bonus', $content['userid'], $content['points']);
// Add points to user's account directly
addPointsDirectly('monthly_bonus', $content['userid'], $content['points']);
- $message = loadEmailTemplate('member_bonus', $content['points'], bigintval($content['userid']));
- sendEmail($content['email'], getMessage('BONUS_MONTHLY_ONLINE_BONUS'), $message);
+ $message = loadEmailTemplate('member_bonus', $content, bigintval($content['userid']));
+ sendEmail($content['email'], '{--MEMBER_MONTHLY_BONUS_WON_SUBJECT--}', $message);
- // Reset accounts
- $result = SQL_QUERY("UPDATE `{?_MYSQL_PREFIX?}_user_data`
-SET turbo_bonus=0, login_bonus=0, bonus_order=0, bonus_stats=0, bonus_ref=0", __FILE__, __LINE__);
+ // Reset all accounts
+ $result = SQL_QUERY('UPDATE `{?_MYSQL_PREFIX?}_user_data`
+SET
+ `turbo_bonus`=0,
+ `login_bonus`=0,
+ `bonus_order`=0,
+ `bonus_stats`=0,
+ `bonus_ref`=0', __FILE__, __LINE__);