]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-config_points.php
A lot code rewritten:
[mailer.git] / inc / modules / admin / what-config_points.php
index 06b6f2b76238270b9a0aa517d534dfbf9c8de1d3..5a3bb6996db215acf631f9854e916581399a10c5 100644 (file)
@@ -186,7 +186,7 @@ WHERE `mails_confirmed` < %s", $REF, $REF));
        // 12                  3     32    2                  3     32    2               3            4     43    21
        if ((isFormSent('del')) && (isPostRequestParameterSet('sel')) && (countPostSelection() > 0)) {
                // Delete entries
-               $OUT = ''; $SW = 2;
+               $OUT = '';
                foreach (postRequestParameter('sel') as $id => $value) {
                        $result = SQL_QUERY_ESC("SELECT `level`, `percents` FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE `id`=%s LIMIT 1",
                                array(bigintval($id)), __FILE__, __LINE__);
@@ -195,7 +195,6 @@ WHERE `mails_confirmed` < %s", $REF, $REF));
 
                        // Prepare data for the row template
                        $content = array(
-                               'sw'       => $SW,
                                'id'       => $id,
                                'level'    => $content['level'],
                                'percents' => translateComma($content['percents']),
@@ -203,14 +202,13 @@ WHERE `mails_confirmed` < %s", $REF, $REF));
 
                        // Load row template and switch color
                        $OUT .= loadTemplate('admin_points_del_row', true, $content);
-                       $SW = 3 - $SW;
-               }
+               } // END - foreach
 
                // Load main template
                loadTemplate('admin_points_del', false, $OUT);
        } elseif ((isFormSent('edit')) && (isPostRequestParameterSet('sel')) && (countPostSelection() > 0)) {
                // Edit entries
-               $OUT = ''; $SW = 2;
+               $OUT = '';
                foreach (postRequestParameter('sel') as $id => $value) {
                        $result = SQL_QUERY_ESC("SELECT `level`, `percents` FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE `id`=%s LIMIT 1",
                                array(bigintval($id)), __FILE__, __LINE__);
@@ -219,7 +217,6 @@ WHERE `mails_confirmed` < %s", $REF, $REF));
 
                        // Prepare data for the row template
                        $content = array(
-                               'sw'       => $SW,
                                'id'       => $id,
                                'level'    => $content['level'],
                                'percents' => translateComma($content['percents']),
@@ -227,8 +224,7 @@ WHERE `mails_confirmed` < %s", $REF, $REF));
 
                        // Load row template and switch color
                        $OUT .= loadTemplate('admin_points_edit_row', true, $content);
-                       $SW = 3 - $SW;
-               }
+               } // END - foreach
 
                // Load main template
                loadTemplate('admin_points_edit', false, $OUT);
@@ -237,18 +233,16 @@ WHERE `mails_confirmed` < %s", $REF, $REF));
                $result = SQL_QUERY("SELECT `id`, `level`, `percents` FROM `{?_MYSQL_PREFIX?}_refdepths` ORDER BY `level` ASC", __FILE__, __LINE__);
                if (SQL_NUMROWS($result) > 0) {
                        // Make referal levels editable and deletable
-                       $OUT = ''; $SW = 2;
+                       $OUT = '';
 
                        // List already existing categories for editing
                        while ($content = SQL_FETCHARRAY($result)) {
                                // Prepare data for the row template
-                               $content['sw']       = $SW;
                                $content['percents'] = translateComma($content['percents']);
 
                                // Load row template and switch color
                                $OUT .= loadTemplate('admin_points_row', true, $content);
-                               $SW = 3 - $SW;
-                       }
+                       } // END - while
 
                        // Free memory
                        SQL_FREERESULT($result);