// Transfer data to template
define('__YR_LEVEL' , $rank);
define('__YR_POINTS', $points);
- define('__YR_TMARK' , generateDateTime($mark, "1"));
+ define('__YR_TMARK' , generateDateTime($mark, '1'));
// Load template
define('__YOUR_RANKING_LINE', LOAD_TEMPLATE("show_bonus_yr", true));
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')) {
+ if ((getConfig('bonus_mode') == 'UID') && (getConfig('bonus_uid') == '0')) {
// Update database & config
updateConfiguration('bonus_mode', 'JACKPOT');
} // END - if
- if ($mode == "login_bonus") {
+ if ($mode == 'login_bonus') {
// Login bonus detected
$points = getConfig('login_bonus');
} else {
case 'JACKPOT': // ... jackpot
if ((SUB_JACKPOT($points) == -1) && (getConfig('bonus_uid') > 0)) {
// Check points amount first...
- $total = GET_TOTAL_DATA(getConfig('bonus_uid'), "user_points", "points") - GET_TOTAL_DATA(getConfig('bonus_uid'), "user_data", "used_points");
+ $total = GET_TOTAL_DATA(getConfig('bonus_uid'), 'user_points', 'points') - GET_TOTAL_DATA(getConfig('bonus_uid'), 'user_data', 'used_points');
if ($total >= $points) {
// Subtract points from userid's account
- SUB_POINTS("bonus_payout_jackpot", getConfig('bonus_uid'), $points);
+ SUB_POINTS('bonus_payout_jackpot', getConfig('bonus_uid'), $points);
} // END - if
} // END - if
break;
- case "UID": // ... userid's account
+ case 'UID': // ... userid's account
// Check his amount first
- $total = GET_TOTAL_DATA(getConfig('bonus_uid'), "user_points", "points") - GET_TOTAL_DATA(getConfig('bonus_uid'), "user_data", "used_points");
+ $total = GET_TOTAL_DATA(getConfig('bonus_uid'), 'user_points', 'points') - GET_TOTAL_DATA(getConfig('bonus_uid'), 'user_data', 'used_points');
if ($total >= $points) {
// Subtract points from userid's account
- SUB_POINTS("bonus_payout_uid", getConfig('bonus_uid'), $points);
+ SUB_POINTS('bonus_payout_uid', getConfig('bonus_uid'), $points);
} else {
// Try to subtract from jackpot
$dummy = SUB_JACKPOT($points);
$result = SQL_QUERY("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_bonus_turbo` WHERE timemark < (UNIX_TIMESTAMP() - ".getConfig('bonus_timeout').")", __FUNCTION__, __LINE__);
if (SQL_AFFECTEDROWS() > 0) {
// Send out email to admin
- sendAdminNotification(AUTOPURGE_ADMIN_TURBO_SUBJECT, "admin_autopurge_turbo", SQL_AFFECTEDROWS(), '');
- }
+ sendAdminNotification(AUTOPURGE_ADMIN_TURBO_SUBJECT, 'admin_autopurge_turbo', SQL_AFFECTEDROWS(), '');
+ } // END - if
}
+
//
?>