if (IS_FORM_SENT()) {
// Replace german decimal commas to computer decimal dots
- REQUEST_POST('login_bonus') = REVERT_COMMA(REQUEST_POST('login_bonus') );
- REQUEST_POST('turbo_bonus') = REVERT_COMMA(REQUEST_POST('turbo_bonus') );
- REQUEST_POST('bonus_ref') = REVERT_COMMA(REQUEST_POST('bonus_ref') );
- REQUEST_POST('bonus_order') = REVERT_COMMA(REQUEST_POST('bonus_order') );
- REQUEST_SET_POST('bonus_notify_points', REVERT_COMMA(REQUEST_POST('bonus_notify_points')));
+ REQUEST_POST('login_bonus') = convertCommaToDot(REQUEST_POST('login_bonus') );
+ REQUEST_POST('turbo_bonus') = convertCommaToDot(REQUEST_POST('turbo_bonus') );
+ REQUEST_POST('bonus_ref') = convertCommaToDot(REQUEST_POST('bonus_ref') );
+ REQUEST_POST('bonus_order') = convertCommaToDot(REQUEST_POST('bonus_order') );
+ REQUEST_SET_POST('bonus_notify_points', convertCommaToDot(REQUEST_POST('bonus_notify_points')));
// Generate string for saving ranks
REQUEST_SET_POST('turbo_rates', '');
$RATES = array();
foreach (REQUEST_POST('rate') as $rate) {
- $rate = trim(REVERT_COMMA($rate));
+ $rate = trim(convertCommaToDot($rate));
if (!empty($rate)) $RATES[] = $rate;
}
REQUEST_SET_POST('turbo_rates', trim(implode(';', $RATES)));
setConfigEntry('bonus_di_notify', REQUEST_POST('bonus_di_notify'));
} else {
// Prepare contants for the template
- define('__LOGIN_VALUE' , TRANSLATE_COMMA(getConfig('login_bonus') , false));
- define('__TURBO_VALUE' , TRANSLATE_COMMA(getConfig('turbo_bonus') , false));
- define('__ORDER_VALUE' , TRANSLATE_COMMA(getConfig('bonus_order') , false));
- define('__REF_VALUE' , TRANSLATE_COMMA(getConfig('bonus_ref') , false));
- define('__STATS_VALUE' , TRANSLATE_COMMA(getConfig('bonus_stats') , false));
- define('__NOTIFY_VALUE', TRANSLATE_COMMA(getConfig('bonus_notify_points'), false));
+ define('__LOGIN_VALUE' , translateComma(getConfig('login_bonus') , false));
+ define('__TURBO_VALUE' , translateComma(getConfig('turbo_bonus') , false));
+ define('__ORDER_VALUE' , translateComma(getConfig('bonus_order') , false));
+ define('__REF_VALUE' , translateComma(getConfig('bonus_ref') , false));
+ define('__STATS_VALUE' , translateComma(getConfig('bonus_stats') , false));
+ define('__NOTIFY_VALUE', translateComma(getConfig('bonus_notify_points'), false));
define('__TRANKS_VALUE', getConfig('bonus_ranks'));
define('__TLINES_VALUE', getConfig('bonus_lines'));
$RANKS = explode(';', getConfig('turbo_rates'));
// Automatically calculate bonus points for ranks 2 and 3 when not set
- if (getConfig('turbo_rates') == "") $RANKS = array(round(getConfig('turbo_bonus') / 2), round(getConfig('turbo_bonus') / 4));
+ if (getConfig('turbo_rates') == '') $RANKS = array(round(getConfig('turbo_bonus') / 2), round(getConfig('turbo_bonus') / 4));
// Generate list
$OUT = "<ol start=\"2\">\n";
$OUT .= "</ol>\n";
define('__TRATES_LIST', $OUT);
- define('__LOGIN_TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS(getConfig('login_timeout') , "login_timeout" , "WDh"));
- define('__BONUS_TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS(getConfig('bonus_timeout') , "bonus_timeout" , "WDh"));
- define('__WAIT_SELECTION' , CREATE_TIME_SELECTIONS(getConfig('bonus_notify_wait'), "bonus_notify_wait", "ms" ));
+ define('__LOGIN_TIMEOUT_SELECTION', createTimeSelections(getConfig('login_timeout') , "login_timeout" , "WDh"));
+ define('__BONUS_TIMEOUT_SELECTION', createTimeSelections(getConfig('bonus_timeout') , "bonus_timeout" , "WDh"));
+ define('__WAIT_SELECTION' , createTimeSelections(getConfig('bonus_notify_wait'), "bonus_notify_wait", "ms" ));
// Activate / Deactivate bonus active rallye (Y/N)
switch (getConfig('bonus_active'))