X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_bonus.php;h=5f2a8d9e4638b7362d387e2526e59a5c66dfef06;hb=101e5f161c0c367c022c9288398226a57f3919d7;hp=c05283cd952ec2061af75231c7c8c29b052411a4;hpb=e989b0bd424191f6933cf852cca127ea2f437db8;p=mailer.git diff --git a/inc/modules/admin/what-config_bonus.php b/inc/modules/admin/what-config_bonus.php index c05283cd95..5f2a8d9e46 100644 --- a/inc/modules/admin/what-config_bonus.php +++ b/inc/modules/admin/what-config_bonus.php @@ -14,11 +14,9 @@ * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009, 2010 by Mailer Developer Team * + * Copyright (c) 2009 - 2011 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -43,15 +41,11 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { } // END - if // Add description as navigation point -addMenuDescription('admin', __FILE__); +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', ''); @@ -59,68 +53,61 @@ if (isFormSent()) { foreach (postRequestParameter('rate') as $rate) { $rate = trim(convertCommaToDot($rate)); if (!empty($rate)) $RATES[] = $rate; - } + } // END - foreach setPostRequestParameter('turbo_rates', trim(implode(';', $RATES))); unsetPostRequestParameter('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 (!isPostRequestParameterSet('turbo_rates')) { + setPostRequestParameter('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_en_notify', postRequestParameter('bonus_en_notify')); - setConfigEntry('bonus_di_notify', postRequestParameter('bonus_di_notify')); + setConfigEntry('bonus_active' , postRequestParameter('bonus_active')); + setConfigEntry('bonus_enable_notify' , postRequestParameter('bonus_enable_notify')); + setConfigEntry('bonus_disable_notify', postRequestParameter('bonus_disable_notify')); } else { - // Prepare contants for the template - $content['login'] = translateComma(getConfig('login_bonus') , false); - $content['turbo'] = translateComma(getConfig('turbo_bonus') , false); - $content['order'] = translateComma(getConfig('bonus_order') , false); - $content['ref'] = translateComma(getConfig('bonus_ref') , false); - $content['stats'] = translateComma(getConfig('bonus_stats') , false); - $content['notify'] = translateComma(getConfig('bonus_notify_points'), false); - // Transfer options to template - $content['member_selection'] = addMemberSelectionBox(getConfig('bonus_userid'), false, true, true, 'bonus_userid'); + $content['bonus_userid'] = addMemberSelectionBox(getBonusUserid(), false, true, true, 'bonus_userid'); // Initialize array for the points list - //die("*".getConfig('turbo_rates')."*"); $RANKS = explode(';', getConfig('turbo_rates')); // 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)); // Generate list - $OUT = "