0)) { // Update account's ref_payout for "must-confirm" addSql(sprintf("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_payout`=(%s - `mails_confirmed`) WHERE `mails_confirmed` < %s", $REF, $REF)); } elseif ((getRefPayout() > 0) && (postRequestElement('ref_payout') == '0')) { // Update account's ref_payout for "not-must-confirm" addSql("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_payout`=0 WHERE `ref_payout` > 0"); // @TODO Rewrite these two lines for new user_points columns (e.g. locked_order_points) with a filter addSql("UPDATE `{?_MYSQL_PREFIX?}_user_points` SET `points`=`points`+`locked_points` WHERE `locked_points` > 0"); addSql("UPDATE `{?_MYSQL_PREFIX?}_user_points` SET `locked_points`=0 WHERE `locked_points` > 0"); } break; } // END - switch // Is there an array? if ((getRequestElement('sub') != 'points') && (ifSqlsRegistered())) { // Default is failed-message $message = '{--SETTINGS_NOT_SAVED--}'; if (countSqls() > 0) { // Run all SQL commands runFilterChain('run_sqls'); // Entry saved... $message = '{--SETTINGS_SAVED--}'; // Destroy config cache file here... rebuildCache('config', 'config'); } // END - if // Remove SQL queries unsetSqls(); } // END - if // Shall we display a message? if (!empty($message)) { // When do so... displayMessage($message); } // END - if } elseif (getRequestElement('sub') == 'settings') { // Setup some settings like direct pay and so on // 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 // Load template loadTemplate('admin_config_point_settings', FALSE, $content); } elseif (getRequestElement('sub') == 'points') { // Load template loadTemplate('admin_config_sub_points'); } else { // Display selection box loadTemplate('admin_config_points'); } // [EOF] ?>