A lot code rewritten:
[mailer.git] / inc / modules / admin / what-adminedit.php
index a26f5db01e573d657714a9c4ec1b95e1d2b756f7..b4eb53902fe8d191ccd8eac27443d15b6e4cc457 100644 (file)
@@ -58,7 +58,7 @@ if ((isFormSent('edit')) && (countPostSelection() > 0) && (!isDemoModeActive()))
        // @TODO Kill all constants in this file
        $content['sub'] = $SUB;
        $content['chk'] = countPostSelection();
-       $cnt = '0'; $SW = 2;
+       $cnt = '0';
        foreach (postRequestParameter('sel') as $sel => $confirm) {
                if ($confirm == 1) {
                        $cnt++;
@@ -72,7 +72,6 @@ if ((isFormSent('edit')) && (countPostSelection() > 0) && (!isDemoModeActive()))
                                $data = array(
                                        'action' => adminAddMenuSelectionBox('admin', 'action', 'sel_action[' . $sel . ']', $data['action']),
                                        'what'   => adminAddMenuSelectionBox('admin', 'what'  , 'sel_what['   . $sel . ']', $data['what']),
-                                       'sw'     => $SW,
                                        'sel'    => $sel,
                                        'menu'   => $data['title'],
                                        'descr'  => $data['descr'],
@@ -84,7 +83,6 @@ if ((isFormSent('edit')) && (countPostSelection() > 0) && (!isDemoModeActive()))
                        } else {
                                // Entry not found?
                                $data = array(
-                                       'sw'  => $SW,
                                        'sel' => $sel
                                );
 
@@ -94,7 +92,6 @@ if ((isFormSent('edit')) && (countPostSelection() > 0) && (!isDemoModeActive()))
 
                        // Free result and switch color
                        SQL_FREERESULT($result);
-                       $SW = 3 - $SW;
                } // END - if
        } // END - foreach
 
@@ -109,7 +106,7 @@ if ((isFormSent('edit')) && (countPostSelection() > 0) && (!isDemoModeActive()))
        $content['chk'] = countPostSelection();
 
        // Del menu entries with or without confirmation
-       $SW = 2; $cnt = '0'; $OUT = '';
+       $cnt = '0'; $OUT = '';
        foreach (postRequestParameter('sel') as $sel => $confirm) {
                if ($confirm == 1) {
                        $cnt++;
@@ -124,21 +121,18 @@ if ((isFormSent('edit')) && (countPostSelection() > 0) && (!isDemoModeActive()))
                                        'menu' => $data['title'],
                                        'cnt'  => $cnt,
                                        'sel'  => $sel,
-                                       'sw'   => $SW
                                );
                                $OUT .= loadTemplate('admin_amenu_delete_row', true, $data);
                        } else {
                                // Entry not found?
                                $data = array(
-                                       'sw'  => $SW,
                                        'sel' => $sel
                                );
                                $OUT .= loadTemplate('admin_menu_404_row', true, $data);
                        }
                        SQL_FREERESULT($result);
-                       $SW = 3 - $SW;
-               }
-       }
+               } // END - if
+       } // END - switch
        $content['rows'] = $OUT;
        $content['cnt'] = $cnt;