- ADMIN_SAVE_SETTINGS($_POST, "_config", "config='0'");
-}
- else
-{
- // Prepare data for the template
- // - Charge rate
- define('__DOUBLER_CHARGE', TRANSLATE_COMMA(($CONFIG['doubler_charge'] * 100), false));
- // - Referral rate
- define('__DOUBLER_REFERRAL', TRANSLATE_COMMA(($CONFIG['doubler_ref'] * 100), false));
- // - Minimum points to double
- define('__DOUBLER_MINIMUM', TRANSLATE_COMMA($CONFIG['doubler_min'], false));
- // - Maximum points to double
- define('__DOUBLER_MAXIMUM', TRANSLATE_COMMA($CONFIG['doubler_max'], false));
- // - Points left on users account after doubling
- define('__DOUBLER_LEFT', TRANSLATE_COMMA($CONFIG['doubler_left'], false));
- // - Max payouts to check per click/reset
- define('__DOUBLER_MAX_SENT', $CONFIG['doubler_max_sent']);
- // - Group sending
- define('__DOUBLER_GROUP_SENT', $CONFIG['doubler_group_sent']);
-
- // Take points from jackpot (Y/N)
- switch ($CONFIG['doubler_jackpot'])
- {
- case "Y":
- define('__DOUBLER_JACKPOT_Y', " checked");
- define('__DOUBLER_JACKPOT_N', "");
- break;
-
- case "N":
- define('__DOUBLER_JACKPOT_Y', "");
- define('__DOUBLER_JACKPOT_N', " checked");
- break;
- }
+ adminSaveSettingsFromPostData();
+} else {
+ // Init all Y/N selections
+ foreach (array('jackpot', 'own', 'sent_all') as $entry) {
+ $content[$entry . '_y'] = '';
+ $content[$entry . '_n'] = '';
+ $content[$entry . '_' . strtolower(getConfig('doubler_' . $entry))] = ' checked="checked"';
+ } // END - foreach