* -------------------------------------------------------------------- *
* Kurzbeschreibung : Monatlicher Bonus von Klick-Verguetung *
* -------------------------------------------------------------------- *
* -------------------------------------------------------------------- *
* Kurzbeschreibung : Monatlicher Bonus von Klick-Verguetung *
* -------------------------------------------------------------------- *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
-if (($curr != getConfig('last_month')) && (getConfig('bonus_ranks') > 0) && ($GLOBALS['output_mode'] != 1)) {
- // Extension "autopurge" is inactive or purging of inactive accounts is deactivated
+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'";
$whereStatement2 = getConfig(('bonus_ranks'));
// Shall I keep inactive members away from here? (mostly wanted in an "active-rallye" ...)
$whereStatement1 = "WHERE `status`='CONFIRMED'";
$whereStatement2 = getConfig(('bonus_ranks'));
// Shall I keep inactive members away from here? (mostly wanted in an "active-rallye" ...)
// Use last online stamp only when autopurge for inactive members is activated
if (getConfig('ap_inactive_since') > 0) {
// Okay, include last online timestamp
// Use last online stamp only when autopurge for inactive members is activated
if (getConfig('ap_inactive_since') > 0) {
// Okay, include last online timestamp
- $ADD = "";
- 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";
+ $add = '';
+ 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_ESC("SELECT userid, email, gender, surname, family, (0".$add.") AS points
// Make sure zero points are not mailed
if ($content['points'] > 0) {
// Add points to user's account directly
// Make sure zero points are not mailed
if ($content['points'] > 0) {
// Add points to user's account directly
- ADD_POINTS_REFSYSTEM("monthly_bonus", $content['uid'], $content['points'], false, "0", false, "direct");
+ ADD_POINTS_REFSYSTEM_DIRECT('monthly_bonus', $content['uid'], $content['points']);
- $content['gender'] = TRANSLATE_GENDER($content['gender']);
- $content['points'] = TRANSLATE_COMMA($content['points']);
+ $content['gender'] = translateGender($content['gender']);
+ $content['points'] = translateComma($content['points']);
// Load email template and email it away
$msg = LOAD_EMAIL_TEMPLATE("member_bonus", $content['points'], bigintval($content['uid']));
// Load email template and email it away
$msg = LOAD_EMAIL_TEMPLATE("member_bonus", $content['points'], bigintval($content['uid']));