// Add description as navigation point
ADD_DESCR('admin', __FILE__);
-if (IS_FORM_SENT()) {
+if (isFormSent()) {
// Replace german decimal commas to computer decimal dots
- 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('login_bonus', convertCommaToDot(REQUEST_POST('login_bonus')));
+ REQUEST_SET_POST('turbo_bonus', convertCommaToDot(REQUEST_POST('turbo_bonus')));
+ REQUEST_SET_POST('bonus_ref', convertCommaToDot(REQUEST_POST('bonus_ref')));
+ REQUEST_SET_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
if (!empty($rate)) $RATES[] = $rate;
}
REQUEST_SET_POST('turbo_rates', trim(implode(';', $RATES)));
- REQUEST_UNSET_POST(('rate'));
+ REQUEST_UNSET_POST('rate');
// Automatically calculate bonus points for ranks 2 and 3 when not set
- if (!REQUEST_ISSET_POST(('turbo_rates'))) REQUEST_SET_POST('turbo_rates', "".round(getConfig('turbo_bonus') / 2).';'.round(getConfig('turbo_bonus') / 4)."");
+ if (!REQUEST_ISSET_POST(('turbo_rates'))) REQUEST_SET_POST('turbo_rates', ''.round(getConfig('turbo_bonus') / 2).';'.round(getConfig('turbo_bonus') / 4).'');
// Save data
ADMIN_SAVE_SETTINGS_POST();
define('__TLINES_VALUE', getConfig('bonus_lines'));
// Transfer options to template __MEMBER_SELECTION
- define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX(getConfig('bonus_uid'), false, true, true, "bonus_uid"));
+ define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX(getConfig('bonus_uid'), false, true, true, 'bonus_uid'));
// Initialize array for the points list
//die("*".getConfig('turbo_rates')."*");
$OUT .= "</ol>\n";
define('__TRATES_LIST', $OUT);
- 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" ));
+ define('__LOGIN_TIMEOUT_SELECTION', createTimeSelections(getConfig('login_timeout') , 'login_timeout' , 'WDh'));
+ define('__BONUS_TIMEOUT_SELECTION', createTimeSelections(getConfig('bonus_timeout') , 'bonus_timeout' , 'WDh'));
+ $content['wait_selection'] = createTimeSelections(getConfig('bonus_notify_wait'), 'bonus_notify_wait', 'ms' );
// Activate / Deactivate bonus active rallye (Y/N)
switch (getConfig('bonus_active'))
{
- case 'Y':
- define('__BONUS_ACTIVE_Y', ' chkecked="checked"');
- define('__BONUS_ACTIVE_N', '');
- break;
-
- case 'N':
- define('__BONUS_ACTIVE_Y', '');
- define('__BONUS_ACTIVE_N', ' chkecked="checked"');
- break;
+ case 'Y':
+ define('__BONUS_ACTIVE_Y', ' checked="checked"');
+ define('__BONUS_ACTIVE_N', '');
+ break;
+
+ case 'N':
+ define('__BONUS_ACTIVE_Y', '');
+ define('__BONUS_ACTIVE_N', ' checked="checked"');
+ break;
}
// Other bonus to de-/activate
switch (getConfig('bonus_login_yn'))
{
- case 'Y':
- define('__BONUS_LOGIN_Y', ' chkecked="checked"');
- define('__BONUS_LOGIN_N', '');
- break;
-
- case 'N':
- define('__BONUS_LOGIN_Y', '');
- define('__BONUS_LOGIN_N', ' chkecked="checked"');
- break;
+ case 'Y':
+ define('__BONUS_LOGIN_Y', ' checked="checked"');
+ define('__BONUS_LOGIN_N', '');
+ break;
+
+ case 'N':
+ define('__BONUS_LOGIN_Y', '');
+ define('__BONUS_LOGIN_N', ' checked="checked"');
+ break;
}
switch (getConfig('bonus_stats_yn'))
{
- case 'Y':
- define('__BONUS_STATS_Y', ' chkecked="checked"');
- define('__BONUS_STATS_N', '');
- break;
-
- case 'N':
- define('__BONUS_STATS_Y', '');
- define('__BONUS_STATS_N', ' chkecked="checked"');
- break;
+ case 'Y':
+ define('__BONUS_STATS_Y', ' checked="checked"');
+ define('__BONUS_STATS_N', '');
+ break;
+
+ case 'N':
+ define('__BONUS_STATS_Y', '');
+ define('__BONUS_STATS_N', ' checked="checked"');
+ break;
}
switch (getConfig('bonus_order_yn'))
{
- case 'Y':
- define('__BONUS_ORDER_Y', ' chkecked="checked"');
- define('__BONUS_ORDER_N', '');
- break;
-
- case 'N':
- define('__BONUS_ORDER_Y', '');
- define('__BONUS_ORDER_N', ' chkecked="checked"');
- break;
+ case 'Y':
+ define('__BONUS_ORDER_Y', ' checked="checked"');
+ define('__BONUS_ORDER_N', '');
+ break;
+
+ case 'N':
+ define('__BONUS_ORDER_Y', '');
+ define('__BONUS_ORDER_N', ' checked="checked"');
+ break;
}
switch (getConfig('bonus_ref_yn'))
{
- case 'Y':
- define('__BONUS_REF_Y', ' chkecked="checked"');
- define('__BONUS_REF_N', '');
- break;
-
- case 'N':
- define('__BONUS_REF_Y', '');
- define('__BONUS_REF_N', ' chkecked="checked"');
- break;
+ case 'Y':
+ define('__BONUS_REF_Y', ' checked="checked"');
+ define('__BONUS_REF_N', '');
+ break;
+
+ case 'N':
+ define('__BONUS_REF_Y', '');
+ define('__BONUS_REF_N', ' checked="checked"');
+ break;
}
switch (getConfig('bonus_click_yn'))
{
- case 'Y':
- define('__BONUS_CLICK_Y', ' chkecked="checked"');
- define('__BONUS_CLICK_N', '');
- break;
-
- case 'N':
- define('__BONUS_CLICK_Y', '');
- define('__BONUS_CLICK_N', ' chkecked="checked"');
- break;
+ case 'Y':
+ define('__BONUS_CLICK_Y', ' checked="checked"');
+ define('__BONUS_CLICK_N', '');
+ break;
+
+ case 'N':
+ define('__BONUS_CLICK_Y', '');
+ define('__BONUS_CLICK_N', ' checked="checked"');
+ break;
}
switch (getConfig('bonus_en_notify'))
{
- case 'Y':
- define('__BONUS_EN_NOTIFY_Y', ' chkecked="checked"');
- define('__BONUS_EN_NOTIFY_N', '');
- break;
-
- case 'N':
- define('__BONUS_EN_NOTIFY_Y', '');
- define('__BONUS_EN_NOTIFY_N', ' chkecked="checked"');
- break;
+ case 'Y':
+ define('__BONUS_EN_NOTIFY_Y', ' checked="checked"');
+ define('__BONUS_EN_NOTIFY_N', '');
+ break;
+
+ case 'N':
+ define('__BONUS_EN_NOTIFY_Y', '');
+ define('__BONUS_EN_NOTIFY_N', ' checked="checked"');
+ break;
}
switch (getConfig('bonus_di_notify'))
{
- case 'Y':
- define('__BONUS_DI_NOTIFY_Y', ' chkecked="checked"');
- define('__BONUS_DI_NOTIFY_N', '');
- break;
-
- case 'N':
- define('__BONUS_DI_NOTIFY_Y', '');
- define('__BONUS_DI_NOTIFY_N', ' chkecked="checked"');
- break;
+ case 'Y':
+ define('__BONUS_DI_NOTIFY_Y', ' checked="checked"');
+ define('__BONUS_DI_NOTIFY_N', '');
+ break;
+
+ case 'N':
+ define('__BONUS_DI_NOTIFY_Y', '');
+ define('__BONUS_DI_NOTIFY_N', ' checked="checked"');
+ break;
}
switch (getConfig('bonus_new_mem_notify'))
{
- case 'Y':
- define('__BONUS_NEW_MEMBER_NOTIFY_Y', ' chkecked="checked"');
- define('__BONUS_NEW_MEMBER_NOTIFY_N', '');
- break;
-
- case 'N':
- define('__BONUS_NEW_MEMBER_NOTIFY_Y', '');
- define('__BONUS_NEW_MEMBER_NOTIFY_N', ' chkecked="checked"');
- break;
+ case 'Y':
+ define('__BONUS_NEW_MEMBER_NOTIFY_Y', ' checked="checked"');
+ define('__BONUS_NEW_MEMBER_NOTIFY_N', '');
+ break;
+
+ case 'N':
+ define('__BONUS_NEW_MEMBER_NOTIFY_Y', '');
+ define('__BONUS_NEW_MEMBER_NOTIFY_N', ' checked="checked"');
+ break;
}
switch (getConfig('bonus_include_own'))
{
- case 'Y':
- define('__BONUS_INCLUDE_OWN_Y', ' chkecked="checked"');
- define('__BONUS_INCLUDE_OWN_N', '');
- break;
-
- case 'N':
- define('__BONUS_INCLUDE_OWN_Y', '');
- define('__BONUS_INCLUDE_OWN_N', ' chkecked="checked"');
- break;
+ case 'Y':
+ define('__BONUS_INCLUDE_OWN_Y', ' checked="checked"');
+ define('__BONUS_INCLUDE_OWN_N', '');
+ break;
+
+ case 'N':
+ define('__BONUS_INCLUDE_OWN_Y', '');
+ define('__BONUS_INCLUDE_OWN_N', ' checked="checked"');
+ break;
}
// Load final template
- LOAD_TEMPLATE("admin_config_bonus", false);
+ LOAD_TEMPLATE('admin_config_bonus', false, $content);
}
//
?>