if (($curr != getConfig('last_month')) && (getConfig('bonus_ranks') > 0) && (getOutputMode() != 1)) {
// Extension 'autopurge' is inactive or purging of inactive accounts is deactivated
$whereStatement1 = "WHERE `status`='CONFIRMED'";
if (($curr != getConfig('last_month')) && (getConfig('bonus_ranks') > 0) && (getOutputMode() != 1)) {
// 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')) {
// Shall I keep inactive members away from here? (mostly wanted in an "active-rallye" ...)
if (isExtensionActive('autopurge')) {
if (getConfig('ap_inactive_since') > 0) {
// Okay, include last online timestamp
$whereStatement1 = "WHERE `status`='CONFIRMED' AND `last_online` >= (UNIX_TIMESTAMP() - {?ap_inactive_since?})";
if (getConfig('ap_inactive_since') > 0) {
// 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