- // Including new add-mode for one-time referal bonus
- switch (getConfig('allow_direct_pay')) {
- case 'Y':
- define('__DIRECT_Y', ' checked="checked"');
- define('__DIRECT_N', '');
- break;
-
- case 'N':
- define('__DIRECT_Y', '');
- define('__DIRECT_N', ' checked="checked"');
- break;
- }
-
- // One-time referal bonus add-mode
- switch (getConfig('reg_points_mode')) {
- case 'ref' :
- define('__MODE_REF', ' checked="checked"');
- define('__MODE_DIRECT', '');
- break;
-
- case 'direct':
- define('__MODE_REF', '');
- define('__MODE_DIRECT', ' checked="checked"');
- break;
- }
-
- // Referal payout value
- define('__REF_PAYOUT', round(getConfig('ref_payout')));
+ // Including new add-mode for one-time referral bonus
+ foreach (array('allow_direct_pay') as $entry) {
+ $content[$entry . '_y'] = '';
+ $content[$entry . '_n'] = '';
+ $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"';
+ } // END - foreach