ADMIN_SAVE_SETTINGS($_POST);
// Remember new settings
- $_CONFIG['beg_rallye'] = $_POST['beg_rallye'];
- $_CONFIG['beg_ral_en_notify'] = $_POST['beg_ral_en_notify'];
- $_CONFIG['beg_ral_di_notify'] = $_POST['beg_ral_di_notify'];
+ setConfigEntry('beg_rallye' , $_POST['beg_rallye']);
+ setConfigEntry('beg_ral_en_notify', $_POST['beg_ral_en_notify']);
+ setConfigEntry('beg_ral_di_notify', $_POST['beg_ral_di_notify']);
} else {
// Prepare constants for the template
- define('__BEG_POINTS' , TRANSLATE_COMMA($_CONFIG['beg_points'] , false));
- define('__BEG_POINTS_MAX' , TRANSLATE_COMMA($_CONFIG['beg_points_max'] , false));
- define('__BEG_NOTIFY_BONUS' , TRANSLATE_COMMA($_CONFIG['beg_notify_bonus'], false));
- define('__BEG_TIMEOUT' , CREATE_TIME_SELECTIONS($_CONFIG['beg_timeout'] , "beg_timeout" , "Dhm"));
- define('__BEG_UID_TIMEOUT' , CREATE_TIME_SELECTIONS($_CONFIG['beg_uid_timeout'], "beg_uid_timeout", "Dhm"));
- define('__BEG_REMOTE_IP_TIMEOUT', CREATE_TIME_SELECTIONS($_CONFIG['beg_ip_timeout'] , "beg_ip_timeout" , "Dhm"));
- define('__WAIT_SELECTION' , CREATE_TIME_SELECTIONS($_CONFIG['beg_notify_wait'], "beg_notify_wait", "ms" ));
- define('__BEG_RANKS', $_CONFIG['beg_ranks']);
+ define('__BEG_POINTS' , TRANSLATE_COMMA(getConfig('beg_points') , false));
+ define('__BEG_POINTS_MAX' , TRANSLATE_COMMA(getConfig('beg_points_max') , false));
+ define('__BEG_NOTIFY_BONUS' , TRANSLATE_COMMA(getConfig('beg_notify_bonus'), false));
+ define('__BEG_TIMEOUT' , CREATE_TIME_SELECTIONS(getConfig('beg_timeout') , "beg_timeout" , "Dhm"));
+ define('__BEG_UID_TIMEOUT' , CREATE_TIME_SELECTIONS(getConfig('beg_uid_timeout'), "beg_uid_timeout", "Dhm"));
+ define('__BEG_REMOTE_IP_TIMEOUT', CREATE_TIME_SELECTIONS(getConfig('beg_ip_timeout') , "beg_ip_timeout" , "Dhm"));
+ define('__WAIT_SELECTION' , CREATE_TIME_SELECTIONS(getConfig('beg_notify_wait'), "beg_notify_wait", "ms" ));
+ define('__BEG_RANKS' , getConfig('beg_ranks'));
// Activate / Deactivate beg rallye (Y/N)
- switch ($_CONFIG['beg_rallye'])
+ switch (getConfig('beg_rallye'))
{
- case 'Y':
+ case "Y":
define('__BEG_RALLYE_Y', " checked=\"checked\"");
define('__BEG_RALLYE_N', "");
break;
- case 'N':
+ case "N":
define('__BEG_RALLYE_Y', "");
define('__BEG_RALLYE_N', " checked=\"checked\"");
break;
}
- switch ($_CONFIG['beg_active'])
+
+ switch (getConfig('beg_active'))
{
- case 'Y':
+ case "Y":
define('__BEG_ACTIVE_Y', " checked=\"checked\"");
define('__BEG_ACTIVE_N', "");
break;
- case 'N':
+ case "N":
define('__BEG_ACTIVE_Y', "");
define('__BEG_ACTIVE_N', " checked=\"checked\"");
break;
}
- switch ($_CONFIG['beg_mode'])
+
+ switch (getConfig('beg_mode'))
{
case "DIRECT":
define('__BEG_MODE_DIRECT', " checked=\"checked\"");
define('__BEG_MODE_REF' , " checked=\"checked\"");
break;
}
- switch ($_CONFIG['beg_ral_en_notify'])
+
+ switch (getConfig('beg_ral_en_notify'))
{
- case 'Y':
+ case "Y":
define('__BEG_RAL_EN_NOTIFY_Y', " checked=\"checked\"");
define('__BEG_RAL_EN_NOTIFY_N', "");
break;
- case 'N':
+ case "N":
define('__BEG_RAL_EN_NOTIFY_Y', "");
define('__BEG_RAL_EN_NOTIFY_N', " checked=\"checked\"");
break;
}
- switch ($_CONFIG['beg_ral_di_notify'])
+
+ switch (getConfig('beg_ral_di_notify'))
{
- case 'Y':
+ case "Y":
define('__BEG_RAL_DI_NOTIFY_Y', " checked=\"checked\"");
define('__BEG_RAL_DI_NOTIFY_N', "");
break;
- case 'N':
+ case "N":
define('__BEG_RAL_DI_NOTIFY_Y', "");
define('__BEG_RAL_DI_NOTIFY_N', " checked=\"checked\"");
break;
}
- switch ($_CONFIG['beg_new_mem_notify'])
+
+ switch (getConfig('beg_new_mem_notify'))
{
- case 'Y':
+ case "Y":
define('__BEG_NEW_MEMBER_NOTIFY_Y', " checked=\"checked\"");
define('__BEG_NEW_MEMBER_NOTIFY_N', "");
break;
- case 'N':
+ case "N":
define('__BEG_NEW_MEMBER_NOTIFY_Y', "");
define('__BEG_NEW_MEMBER_NOTIFY_N', " checked=\"checked\"");
break;
}
- switch ($_CONFIG['beg_include_own'])
+
+ switch (getConfig('beg_include_own'))
{
- case 'Y':
+ case "Y":
define('__BEG_INCLUDE_OWN_Y', " checked=\"checked\"");
define('__BEG_INCLUDE_OWN_N', "");
break;
- case 'N':
+ case "N":
define('__BEG_INCLUDE_OWN_Y', "");
define('__BEG_INCLUDE_OWN_N', " checked=\"checked\"");
break;
}
+ switch (getConfig('beg_pay_mode')) {
+ case "IMG":
+ define('__BEG_PAY_MODE_IMG' , " selected=\"selected\"");
+ define('__BEG_PAY_MODE_JS' , "");
+ define('__BEG_PAY_MODE_BOTH', "");
+ define('__BEG_PAY_MODE_NONE', "");
+ break;
+
+ case "JS":
+ define('__BEG_PAY_MODE_IMG' , "");
+ define('__BEG_PAY_MODE_JS' , " selected=\"selected\"");
+ define('__BEG_PAY_MODE_BOTH', "");
+ define('__BEG_PAY_MODE_NONE', "");
+ break;
+
+ case "BOTH":
+ define('__BEG_PAY_MODE_IMG' , "");
+ define('__BEG_PAY_MODE_JS' , "");
+ define('__BEG_PAY_MODE_BOTH', " selected=\"selected\"");
+ define('__BEG_PAY_MODE_NONE', "");
+ break;
+
+ case "NONE":
+ define('__BEG_PAY_MODE_IMG' , "");
+ define('__BEG_PAY_MODE_JS' , "");
+ define('__BEG_PAY_MODE_BOTH', "");
+ define('__BEG_PAY_MODE_NONE', " selected=\"selected\"");
+ break;
+ }
+
// Add data to constant __MEMBER_SELECTION
- define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX($_CONFIG['beg_uid'], false, true, true, "beg_uid"));
+ define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX(getConfig('beg_uid'), false, true, true, "beg_uid"));
// Load form template
LOAD_TEMPLATE("admin_config_beg");
}
+
//
?>