]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_country.php
A lot code rewritten:
[mailer.git] / inc / modules / admin / what-list_country.php
index f7c4fd16a7a080b2d88839ea9433d81ec81873ac..fe0e6b9ee7d0e9265389e724ce57c4499c2a144c 100644 (file)
@@ -101,7 +101,7 @@ if ((isFormSent('add')) && (isPostRequestParameterSet('code')) && (isPostRequest
                }
 
                // Edit all selected country codes
-               $OUT = ''; $SW = 2;
+               $OUT = '';
                foreach (postRequestParameter('id') as $id => $status) {
                        // Load data from DB
                        $result = SQL_QUERY_ESC("SELECT code, descr FROM `{?_MYSQL_PREFIX?}_countries` WHERE `id`=%s LIMIT 1",
@@ -116,7 +116,6 @@ if ((isFormSent('add')) && (isPostRequestParameterSet('code')) && (isPostRequest
                                        'id'    => $id,
                                        'code'  => $code,
                                        'descr' => $descr,
-                                       'sw'    => $SW,
                                );
 
                                if ($post == 'modify') {
@@ -129,9 +128,8 @@ if ((isFormSent('add')) && (isPostRequestParameterSet('code')) && (isPostRequest
 
                                // Insert row template and switch color
                                $OUT .= loadTemplate($row, true, $content);
-                               $SW = 3 - $SW;
-                       }
-               }
+                       } // END - if
+               } // END - foreach
 
                // Prepare content for template
                $content = array(
@@ -179,16 +177,14 @@ if ((isFormSent('add')) && (isPostRequestParameterSet('code')) && (isPostRequest
        __FILE__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                // List all countries
-               $OUT = ''; $SW = 2;
+               $OUT = '';
                while ($content = SQL_FETCHARRAY($result)) {
                        // Prepare array for the template
                        $content['active'] = translateYesNo($content['is_active']);
-                       $content['sw']     = $SW;
 
                        // Load row template and switch colors
                        $OUT .= loadTemplate('admin_list_country_row', true, $content);
-                       $SW = 3 - $SW;
-               }
+               } // END - while
 
                // Free memory
                SQL_FREERESULT($result);