X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=inc%2Fmodules%2Fadmin%2Fwhat-config_bonus.php;h=0bc5676d6a78211c49bfb4e24f246f8886b639c4;hb=53312d69c8cb5b7ea0c85909cb45356ad4f3bb0b;hp=412e177909b4a5055d9cc7c929850c8e5198544e;hpb=2e715eb7f3f8ca8d259aacb4cbbddde7d9d18e01;p=mailer.git diff --git a/inc/modules/admin/what-config_bonus.php b/inc/modules/admin/what-config_bonus.php index 412e177909..0bc5676d6a 100644 --- a/inc/modules/admin/what-config_bonus.php +++ b/inc/modules/admin/what-config_bonus.php @@ -17,7 +17,7 @@ * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2011 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -44,42 +44,40 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); if (isFormSent()) { - // Replace german decimal commas to computer decimal dots - setPostRequestParameter('login_bonus', convertCommaToDot(postRequestParameter('login_bonus'))); - setPostRequestParameter('turbo_bonus', convertCommaToDot(postRequestParameter('turbo_bonus'))); - setPostRequestParameter('bonus_ref', convertCommaToDot(postRequestParameter('bonus_ref'))); - setPostRequestParameter('bonus_order', convertCommaToDot(postRequestParameter('bonus_order'))); - setPostRequestParameter('bonus_notify_points', convertCommaToDot(postRequestParameter('bonus_notify_points'))); + // Replace german decimal comma with computer decimal dot + convertCommaToDotInPostDataArray(array('login_bonus', 'turbo_bonus', 'bonus_ref', 'bonus_order', 'bonus_notify_points')); // Generate string for saving ranks - setPostRequestParameter('turbo_rates', ''); + setPostRequestElement('turbo_rates', ''); $RATES = array(); - foreach (postRequestParameter('rate') as $rate) { + foreach (postRequestElement('rate') as $rate) { $rate = trim(convertCommaToDot($rate)); if (!empty($rate)) $RATES[] = $rate; } // END - foreach - setPostRequestParameter('turbo_rates', trim(implode(';', $RATES))); - unsetPostRequestParameter('rate'); + setPostRequestElement('turbo_rates', trim(implode(';', $RATES))); + unsetPostRequestElement('rate'); // Automatically calculate bonus points for ranks 2 and 3 when not set - if (!isPostRequestParameterSet('turbo_rates')) setPostRequestParameter('turbo_rates', ''.round(getConfig('turbo_bonus') / 2).';'.round(getConfig('turbo_bonus') / 4).''); + if (!isPostRequestElementSet('turbo_rates')) { + setPostRequestElement('turbo_rates', ''.round(getConfig('turbo_bonus') / 2).';'.round(getConfig('turbo_bonus') / 4).''); + } // END - if // Save data adminSaveSettingsFromPostData(); // Remember new settings - setConfigEntry('bonus_active' , postRequestParameter('bonus_active')); - setConfigEntry('bonus_enable_notify' , postRequestParameter('bonus_enable_notify')); - setConfigEntry('bonus_disable_notify', postRequestParameter('bonus_disable_notify')); + setConfigEntry('bonus_active' , postRequestElement('bonus_active')); + setConfigEntry('bonus_enable_notify' , postRequestElement('bonus_enable_notify')); + setConfigEntry('bonus_disable_notify', postRequestElement('bonus_disable_notify')); } else { // Transfer options to template - $content['form_selection'] = addMemberSelectionBox(getBonusUserId(), false, true, true, 'bonus_userid'); + $content['bonus_userid'] = addMemberSelectionBox(getBonusUserid(), false, true, true, 'bonus_userid'); // Initialize array for the points list - $RANKS = explode(';', getConfig('turbo_rates')); + $RANKS = explode(';', getTurboRates()); // Automatically calculate bonus points for ranks 2 and 3 when not set - if (getConfig('turbo_rates') == '') $RANKS = array(round(getConfig('turbo_bonus') / 2), round(getConfig('turbo_bonus') / 4)); + if (getTurboRates() == '') $RANKS = array(round(getConfig('turbo_bonus') / 2), round(getConfig('turbo_bonus') / 4)); // Generate list $OUT = '