A lot code rewritten:
[mailer.git] / inc / modules / admin / what-refbanner.php
index 95bfc0973d3ae327b185bb8e195cfc2eaf2a438c..7332b032cd316c8d15444f4f1b8cdfa6f4c82aa1 100644 (file)
@@ -100,7 +100,7 @@ VALUES ('%s','%s','%s')",
        loadTemplate('admin_settings_saved', false, $content);
 } elseif ((countPostSelection() > 0) && (isFormSent('edit'))) {
        // Edit banner
-       $SW = 2; $OUT = '';
+       $OUT = '';
        foreach (postRequestParameter('sel') as $id => $sel) {
                // Load data
                $result = SQL_QUERY_ESC("SELECT url, alternate, visible FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE `id`=%s LIMIT 1",
@@ -110,7 +110,6 @@ VALUES ('%s','%s','%s')",
 
                // Preapre data for the row
                $content = array(
-                       'sw'  => $SW,
                        'id'  => $id,
                        'url' => $url,
                        'alt' => $alt,
@@ -119,8 +118,7 @@ VALUES ('%s','%s','%s')",
 
                // Load row template and switch color
                $OUT .= loadTemplate('admin_refbanner_edit_row', true, $content);
-               $SW = 3 - $SW;
-       }
+       } // END - foreach
 
        // Load main template
        loadTemplate('admin_refbanner_edit', false, $OUT);
@@ -139,12 +137,11 @@ VALUES ('%s','%s','%s')",
        // Entries found?
        if (SQL_NUMROWS($result) > 0) {
                // Make referal banner editable and deletable
-               $OUT = ''; $SW = 2;
+               $OUT = '';
                while ($content = SQL_FETCHARRAY($result)) {
                        // Preapre data for the row
                        // @TODO Rewritings: alt->alternate,cnt->counter,clx->clicks in template
                        $content = array(
-                               'sw'  => $SW,
                                'id'  => $content['id'],
                                'url' => $content['url'],
                                'alt' => $content['alternate'],
@@ -155,8 +152,7 @@ VALUES ('%s','%s','%s')",
 
                        // Load row template and switch color
                        $OUT .= loadTemplate('admin_refbanner_row', true, $content);
-                       $SW = 3 - $SW;
-               }
+               } // END - while
 
                // Free memory
                SQL_FREERESULT($result);