- 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']);
-
- // Activate / Deactivate beg rallye (Y/N)
- switch ($_CONFIG['beg_rallye'])
- {
- case 'Y':
- define('__BEG_RALLYE_Y', " checked");
- define('__BEG_RALLYE_N', "");
- break;
-
- case 'N':
- define('__BEG_RALLYE_Y', "");
- define('__BEG_RALLYE_N', " checked");
- break;
- }
- switch ($_CONFIG['beg_active'])
- {
- case 'Y':
- define('__BEG_ACTIVE_Y', " checked");
- define('__BEG_ACTIVE_N', "");
- break;
-
- case 'N':
- define('__BEG_ACTIVE_Y', "");
- define('__BEG_ACTIVE_N', " checked");
- break;
- }
- switch ($_CONFIG['beg_mode'])
- {
- case "DIRECT":
- define('__BEG_MODE_DIRECT', " checked");
- define('__BEG_MODE_REF' , "");
- break;
-
- case "REF":
- define('__BEG_MODE_DIRECT', "");
- define('__BEG_MODE_REF' , " checked");
- break;
- }
- switch ($_CONFIG['beg_ral_en_notify'])
- {
- case 'Y':
- define('__BEG_RAL_EN_NOTIFY_Y', " checked");
- define('__BEG_RAL_EN_NOTIFY_N', "");
- break;
-
- case 'N':
- define('__BEG_RAL_EN_NOTIFY_Y', "");
- define('__BEG_RAL_EN_NOTIFY_N', " checked");
- break;
- }
- switch ($_CONFIG['beg_ral_di_notify'])
- {
- case 'Y':
- define('__BEG_RAL_DI_NOTIFY_Y', " checked");
- define('__BEG_RAL_DI_NOTIFY_N', "");
- break;
-
- case 'N':
- define('__BEG_RAL_DI_NOTIFY_Y', "");
- define('__BEG_RAL_DI_NOTIFY_N', " checked");
- break;
- }
- switch ($_CONFIG['beg_new_mem_notify'])
- {
- case 'Y':
- define('__BEG_NEW_MEMBER_NOTIFY_Y', " checked");
- define('__BEG_NEW_MEMBER_NOTIFY_N', "");
- break;
-
- case 'N':
- define('__BEG_NEW_MEMBER_NOTIFY_Y', "");
- define('__BEG_NEW_MEMBER_NOTIFY_N', " checked");
- break;
- }
- switch ($_CONFIG['beg_include_own'])
- {
- case 'Y':
- define('__BEG_INCLUDE_OWN_Y', " checked");
- define('__BEG_INCLUDE_OWN_N', "");
- break;
-
- case 'N':
- define('__BEG_INCLUDE_OWN_Y', "");
- define('__BEG_INCLUDE_OWN_N', " checked");
- break;
- }
-
- // Add data to constant __MEMBER_SELECTION
- ADD_MEMBER_SELECTION_BOX(false, true, true, $_CONFIG['beg_uid']);
+ $content['points'] = translateComma(getConfig('beg_points') , false);
+ $content['points_max'] = translateComma(getConfig('beg_points_max') , false);
+ $content['notify_bonus'] = translateComma(getConfig('beg_notify_bonus'), false);
+ $content['timeout'] = createTimeSelections(getConfig('beg_timeout') , 'beg_timeout' , 'Dhm');
+ $content['userid_timeout'] = createTimeSelections(getConfig('beg_userid_timeout'), 'beg_userid_timeout', 'Dhm');
+ $content['ip_timeout'] = createTimeSelections(getConfig('beg_ip_timeout') , 'beg_ip_timeout' , 'Dhm');
+ $content['wait_selection'] = createTimeSelections(getConfig('beg_notify_wait') , 'beg_notify_wait' , 'ms' );
+
+ // Init all Y/N selections
+ foreach (array('rallye', 'active', 'mode', 'rallye_enable_notify', 'rallye_disable_notify', 'new_member_notify', 'include_own') as $entry) {
+ $content[$entry . '_y'] = '';
+ $content[$entry . '_n'] = '';
+ $content[$entry . '_' . strtolower(getConfig('beg_' . $entry))] = ' checked="checked"';
+ } // END - foreach
+
+ // Init elements for faker-mode
+ foreach (array('pay_mode_img','pay_mode_js','pay_mode_both','pay_mode_none') as $entry) {
+ $content[$entry] = '';
+ } // END - foreach
+
+ // Set default faker-mode
+ $content['pay_mode_' . strtolower(getConfig('beg_pay_mode'))] = ' selected="selected"';
+
+ // Init beg_mode elements
+ foreach (array('direct', 'ref') as $entry) {
+ $content['beg_mode_' . $entry] = '';
+ } // END - foreach
+
+ // Set default mode
+ $content['beg_mode_' . strtolower(getConfig('beg_mode'))] = ' checked="checked"';
+
+ // Member selection box
+ $content['member_selection'] = addMemberSelectionBox(getConfig('beg_userid'), false, true, true, 'beg_userid');