X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_bonus.php;h=ba001891a380e926d6662dae5e085b9943cca960;hb=0ddf8f6c578aa2c1ff1db9fb8eb0b93a1e247b73;hp=bd3f764c40bfc2045d29b492af174258c99fb9c3;hpb=ccf34a2a92d80d01debd84b4b6e1f294d8f90cce;p=mailer.git diff --git a/inc/modules/admin/what-config_bonus.php b/inc/modules/admin/what-config_bonus.php index bd3f764c40..ba001891a3 100644 --- a/inc/modules/admin/what-config_bonus.php +++ b/inc/modules/admin/what-config_bonus.php @@ -14,10 +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 * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -58,7 +57,7 @@ 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'); @@ -69,35 +68,26 @@ if (isFormSent()) { 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['form_selection'] = 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 = "
    \n"; + $OUT = '
      '; $cnt = '0'; foreach ($RANKS as $k => $rate) { - if (!empty($rate)) { + if (!empty($rate)) { // Print only when something is in - $OUT .= "
    1. ({?POINTS?})\n"; + $OUT .= '
    2. ({?POINTS?})
    3. '; } // END - if $cnt++; } // END - foreach @@ -108,9 +98,9 @@ if (isFormSent()) { // Add more empty fields for ($i = $cnt; $i < $max; $i++) { - $OUT .= "
    4. ({?POINTS?})
    5. \n"; + $OUT .= '
    6. ({?POINTS?})
    7. '; } // END - for - $OUT .= "
    \n"; + $OUT .= '
'; $content['trates_list'] = $OUT; // Selection boxes @@ -119,7 +109,7 @@ if (isFormSent()) { $content['wait_selection'] = createTimeSelections(getConfig('bonus_notify_wait'), 'bonus_notify_wait', 'ms' ); // Init Y/N selections - foreach (array('active','login_yn','stats_yn','order_yn','ref_yn','click_yn','en_notify','di_notify','new_mem_notify','include_own') as $entry) { + foreach (array('active','login_yn','stats_yn','order_yn','ref_yn','click_yn','enable_notify','disable_notify','new_member_notify','include_own') as $entry) { $content[$entry . '_y'] = ''; $content[$entry . '_n'] = ''; $content[$entry . '_' . strtolower(getConfig('bonus_' . $entry))] = ' checked="checked"';