* *
* -------------------------------------------------------------------- *
* File : monthly_bonus.php *
* *
* -------------------------------------------------------------------- *
* File : monthly_bonus.php *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* -------------------------------------------------------------------- *
* 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
// Okay, include last online timestamp
$whereStatement1 = "WHERE `status`='CONFIRMED' AND `last_online` >= (UNIX_TIMESTAMP() - {?ap_inactive_since?})";
// Okay, include last online timestamp
$whereStatement1 = "WHERE `status`='CONFIRMED' AND `last_online` >= (UNIX_TIMESTAMP() - {?ap_inactive_since?})";
- 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);