}
// This function must be run *BEFORE* a link is removed from table 'mxchange_user_links' !
-function BONUS_ADD_TURBO_POINTS($mid, $uid, $type) {
- global $_CONFIG;
-
+function BONUS_ADD_TURBO_POINTS ($mid, $uid, $type) {
// Shall we add bonus points?
- if (getConfig('bonus_active') == "N") return false;
+ if (getConfig('bonus_active') != "Y") return false;
// Init variables
$SQL = ""; $bonys = 0; $mail = 0; $column = "";
}
//
function BONUS_MAKE_RANK_ROWS ($data, $type, $uid) {
- global $_CONFIG;
$self = false; $OUT = "";
// How many ranks do we have?
}
//
function BONUS_POINTS_HANDLER ($MODE) {
- global $_CONFIG;
-
// Shall we add bonus points?
- if (getConfig('bonus_active') == "N") return;
+ if (getConfig('bonus_active') != "Y") return;
// Switch to jackpot-mode when no UID is supplied but userid-mode is selected
if ((getConfig('bonus_mode') == "UID") && (getConfig('bonus_uid') == "0")) {
- // Update database
- UPDATE_CONFIG(array('bonus_mode'), array("JACKPOT"));
-
- // Update configuration
- $_CONFIG['bonus_mode'] = "JACKPOT";
+ // Update database & config
+ UPDATE_CONFIG('bonus_mode', "JACKPOT");
} // END - if
if ($MODE == "login_bonus") {
break;
}
}
-//
-function BONUS_PURGE_EXPIRED_TURBO_BONUS()
-{
- global $_CONFIG;
+//
+function BONUS_PURGE_EXPIRED_TURBO_BONUS() {
// Remove entries
$result = SQL_QUERY("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_bonus_turbo` WHERE timemark < (UNIX_TIMESTAMP() - ".getConfig('bonus_timeout').")", __FILE__, __LINE__);
if (SQL_AFFECTEDROWS() > 0) {