]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-config_payouts.php
A lot code rewritten:
[mailer.git] / inc / modules / admin / what-config_payouts.php
index 810e489b64e7edd41702b637e39d748746ac185c..640dc3aa5a6c21bbe2c4a5add785d32ba25002fe 100644 (file)
@@ -123,7 +123,7 @@ LIMIT 1",
                $message = '{--ADMIN_PAYOUT_ENTRIES_CHANGED--}';
        } else {
                $display = false; //Suppress any other outputs
-               $OUT = ''; $SW = 2;
+               $OUT = '';
                foreach (postRequestParameter('sel') as $id => $sel) {
                        // Load data
                        $result = SQL_QUERY_ESC("SELECT type, rate, min_points, allow_url FROM `{?_MYSQL_PREFIX?}_payout_types` WHERE `id`=%s LIMIT 1",
@@ -133,7 +133,6 @@ LIMIT 1",
 
                        // Prepare data for the row template
                        $content = array(
-                               'sw'    => $SW,
                                'id'    => $id,
                                'title' => $title,
                                'rate'  => translateComma($rate),
@@ -143,8 +142,7 @@ LIMIT 1",
 
                        // Load row template and switch color
                        $OUT .= loadTemplate('admin_config_payouts_edit_row', true, $content);
-                       $SW = 3 - $SW;
-               }
+               } // END - foreach
 
                // Load main template
                loadTemplate('admin_config_payouts_edit', false, $OUT);
@@ -168,7 +166,7 @@ LIMIT 1",
                $message = '{--ADMIN_PAYOUT_ENTRIES_DELETED--}';
        } else {
                $display = false; //Suppress any other outputs
-               $OUT = ''; $SW = 2;
+               $OUT = '';
                foreach (postRequestParameter('sel') as $id => $sel) {
                        // Secure id number
                        $id = bigintval($id);
@@ -181,7 +179,6 @@ LIMIT 1",
 
                        // Prepare data for the row template
                        $content = array(
-                               'sw'    => $SW,
                                'id'    => $id,
                                'title' => $title,
                                'rate'  => translateComma($rate),
@@ -190,8 +187,7 @@ LIMIT 1",
 
                        // Load row template and switch color
                        $OUT .= loadTemplate('admin_config_payouts_del_row', true, $content);
-                       $SW = 3 - $SW;
-               }
+               } // END - foreach
 
                // Load main template
                loadTemplate('admin_config_payouts_del', false, $OUT);
@@ -213,11 +209,10 @@ ORDER BY
 
 if ((SQL_NUMROWS($result_type) > 0) && ($display)) {
        // List all payout types
-       $OUT = ''; $SW = 2;
+       $OUT = '';
        while ($content = SQL_FETCHARRAY($result_type)) {
                // Prepare data for the row template
                $content = array(
-                       'sw'           => $SW,
                        'id'           => $content['id'],
                        'from_account' => $content['from_account'],
                        'type'         => $content['type'],
@@ -227,7 +222,6 @@ if ((SQL_NUMROWS($result_type) > 0) && ($display)) {
 
                // Load row template and switch color
                $OUT .= loadTemplate('admin_config_payouts_row', true, $content);
-               $SW = 3 - $SW;
        } // END - while
 
        // Free memory
@@ -235,7 +229,7 @@ if ((SQL_NUMROWS($result_type) > 0) && ($display)) {
 
        // Load main template
        loadTemplate('admin_config_payouts', false, $OUT);
-}
+} // END - if
 
 // Does your members request payouts?
 if ((SQL_NUMROWS($result_mem) > 0) && ($display)) {