]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-config_bonus.php
New extension added, more EL-rewrites, naming-convention applied:
[mailer.git] / inc / modules / admin / what-config_bonus.php
index b57ebfaccf800b83b47a5431b45a387ec4935f9a..b6750d4f71e8a31feae45dd461f4efd3a3a30220 100644 (file)
@@ -59,7 +59,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');
 
@@ -70,9 +70,9 @@ 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);
@@ -86,19 +86,18 @@ if (isFormSent()) {
        $content['member_selection'] = addMemberSelectionBox(getConfig('bonus_userid'), 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 = "<ol start=\"2\">\n";
+       $OUT = '<ol start="2">';
        $cnt = '0';
        foreach ($RANKS as $k => $rate) {
-               if (!empty($rate))      {
+               if (!empty($rate)) {
                        // Print only when something is in
-                       $OUT .= "  <li><input type=\"text\" name=\"rate[".($k + 2)."]\" class=\"admin_normal\" size=\"4\" maxlength=\"7\" value=\"".$rate."\" /> <div class=\"admin_notes\">({?POINTS?})</div?</li>\n";
+                       $OUT .= '<li><input type="text" name="rate[' . ($k + 2) . ']" class="admin_normal" size="4" maxlength="7" value="' . $rate . '" /> <div class="admin_note">({?POINTS?})</div></li>';
                } // END - if
                $cnt++;
        } // END - foreach
@@ -109,9 +108,9 @@ if (isFormSent()) {
 
        // Add more empty fields
        for ($i = $cnt; $i < $max; $i++) {
-               $OUT .= "  <li><input type=\"text\" name=\"rate[".($i+2)."]\" class=\"admin_normal\" size=\"4\" maxlength=\"7\" /> <div class=\"admin_notes\">({?POINTS?})</div></li>\n";
+               $OUT .= '  <li><input type="text" name="rate[' . ($i+2) . ']" class="admin_normal" size="4" maxlength="7" /> <div class="admin_note">({?POINTS?})</div></li>';
        } // END - for
-       $OUT .= "</ol>\n";
+       $OUT .= '</ol>';
        $content['trates_list'] = $OUT;
 
        // Selection boxes
@@ -120,7 +119,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"';