return $OUT;
}
//
-function BONUS_POINTS_HANDLER($MODE)
-{
+function BONUS_POINTS_HANDLER($MODE) {
global $_CONFIG;
// Shall we add bonus points?
if ($_CONFIG['bonus_active'] == "N") return;
// Switch to jackpot-mode when no UID is supplied but userid-mode is selected
- if (($_CONFIG['bonus_mode'] == "UID") && ($_CONFIG['bonus_uid'] == "0")) $_CONFIG['bonus_mode'] = "JACKPOT";
+ if (($_CONFIG['bonus_mode'] == "UID") && ($_CONFIG['bonus_uid'] == "0")) {
+ // Update database
+ UPDATE_CONFIG(array('bonus_mode'), array("JACKPOT"));
- if ($MODE == "login_bonus")
- {
+ // Update configuration
+ $_CONFIG['bonus_mode'] = "JACKPOT";
+ } // END - if
+
+ if ($MODE == "login_bonus") {
// Login bonus detected
$points = $_CONFIG['login_bonus'];
- }
- else
- {
+ } else {
// Direct points supplied
$points = $MODE;
}