]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_sponsor_pay.php
A lot code rewritten:
[mailer.git] / inc / modules / admin / what-list_sponsor_pay.php
index b4636b937b3d8aa6e3cd204060f4efcb5bd72187..3709b0f646a7ed18cc7bef52c5b7e77236ba2d5e 100644 (file)
@@ -139,7 +139,7 @@ if (isFormSent('add')) {
        loadTemplate('admin_settings_saved', false, $message);
 } elseif ((isFormSent('edit')) || (isFormSent('del'))) {
        // Load all data
-       $OUT = ''; $SW = 2;
+       $OUT = '';
        foreach (postRequestParameter('id') as $id => $sel) {
                // Load entry
                $result = SQL_QUERY_ESC("SELECT `pay_name`, `pay_rate`, `pay_min_count`, `pay_currency` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `id`='%s' LIMIT 1",
@@ -152,7 +152,6 @@ if (isFormSent('add')) {
                        // Transfer data to array
                        $content = array(
                                'id'   => bigintval($id),
-                               'sw'   => bigintval($SW),
                                'name' => htmlspecialchars($name),
                                'rate' => translateComma($rate),
                                'min'  => bigintval($min),
@@ -170,9 +169,6 @@ if (isFormSent('add')) {
                        // Entry invalid
                        $OUT .= loadTemplate('admin_list_sponsor_pay_404', true, $id);
                }
-
-               // Switch colors
-               $SW = 3 - $SW;
        } // END - foreach
 
        // Load main template depending on mode (edit/delete)
@@ -196,13 +192,12 @@ ORDER BY
        // Do we have some paytypes setup?
        if (SQL_NUMROWS($result) > 0) {
                // Prepare variables for listing
-               $OUT = ''; $SW = 2;
+               $OUT = '';
 
                // List alle found payment types
                while ($content = SQL_FETCHARRAY($result)) {
                        // Remember data in array
                        $content = array(
-                               'sw'       => $SW,
                                'id'       => $content['id'],
                                'name'     => $content['pay_name'],
                                'rate'     => translateComma($content['pay_rate']),
@@ -212,9 +207,6 @@ ORDER BY
 
                        // Add row
                        $OUT .= loadTemplate('admin_list_sponsor_pay_row', true, $content);
-
-                       // Switch colors
-                       $SW = 3 - $SW;
                } // END - while
 
                // Load list template