A lot code rewritten:
[mailer.git] / inc / modules / admin / what-admins_mails.php
index 753cf83265543dfc205822623dde27ff731d399c..6873a5889edd11ad95947e928be4676aa90e3fd7 100644 (file)
@@ -50,7 +50,7 @@ if (isFormSent('edit')) {
        if (countPostSelection() > 0) {
                // Add option for events
                $adminsList = generateOptionList('admins', 'id', 'login', '', 'email');
-               $SW = 2; $rows = '';
+               $rows = '';
                foreach (postRequestParameter('sel') as $template => $sel) {
                        // First of all load data from DB
                        $result = SQL_QUERY_ESC("SELECT `admin_id`, `id` FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE `mail_template`='%s' ORDER BY `id` ASC",
@@ -81,7 +81,6 @@ if (isFormSent('edit')) {
 
                        // Prepare content
                        $content['id']            = $id;
-                       $content['sw']            = $SW;
                        $content['mail_template'] = $template;
                        $content['admins']        = $adminsList;
 
@@ -95,8 +94,7 @@ if (isFormSent('edit')) {
 
                        // Start outputing line
                        $rows .= loadTemplate('admin_admins_mails_edit_row', true, $content);
-                       $SW = 3 - $SW;
-               }
+               } // END - foreach
 
                // Edit checked entries
                loadTemplate('admin_admins_mails_edit', false, $rows);
@@ -169,14 +167,10 @@ ORDER BY
                } // END - if
 
                // List found entries
-               $OUT = ''; $SW = 2;
+               $OUT = '';
                while ($content = SQL_FETCHARRAY($result)) {
-                       // Prepare content
-                       $content['sw']   = $SW;
-
                        // Load row template
                        $OUT .= loadTemplate('admin_admins_mails_list_row', true, $content);
-                       $SW = 3 - $SW;
                } // END - while
 
                // Free result