]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-guestedit.php
A lot code rewritten:
[mailer.git] / inc / modules / admin / what-guestedit.php
index 6e80602f5a921451a8a66c7895465d4a3669a668..eb779a1f35ef80e60289bd3f1cc4dd6dad98b186 100644 (file)
@@ -59,7 +59,7 @@ if ((isFormSent('edit')) && (countPostSelection() > 0) && (!isDemoModeActive()))
        $content['sub'] = $SUB;
        $content['chk'] = countPostSelection();
 
-       $cnt = '0'; $OUT = ''; $SW = 2;
+       $cnt = '0'; $OUT = '';
        foreach (postRequestParameter('sel') as $sel => $confirm) {
                if ($confirm == 1) {
                        $cnt++;
@@ -76,7 +76,6 @@ if ((isFormSent('edit')) && (countPostSelection() > 0) && (!isDemoModeActive()))
                                        'action' => adminAddMenuSelectionBox('guest', 'action', 'sel_action[' . $sel . ']', $DATA['action']),
                                        'what'   => adminAddMenuSelectionBox('guest', 'what'  , 'sel_what['   . $sel . ']', $DATA['what']),
                                        'menu'   => $DATA['title'],
-                                       'sw'     => $SW,
                                );
 
                                // Load row template
@@ -84,7 +83,6 @@ if ((isFormSent('edit')) && (countPostSelection() > 0) && (!isDemoModeActive()))
                        } else {
                                // Entry not found
                                $DATA = array(
-                                       'sw'  => $SW,
                                        'sel' => $sel
                                );
                                $OUT .= loadTemplate('admin_menu_404_row', true, $DATA);
@@ -92,7 +90,6 @@ if ((isFormSent('edit')) && (countPostSelection() > 0) && (!isDemoModeActive()))
 
                        // Free result and switch color
                        SQL_FREERESULT($result);
-                       $SW = 3 - $SW;
                } // END - if
        } // END - foreach
 
@@ -108,7 +105,6 @@ if ((isFormSent('edit')) && (countPostSelection() > 0) && (!isDemoModeActive()))
 
        $cnt = '0';
        $OUT = '';
-       $SW  = 2;
 
        foreach (postRequestParameter('sel') as $sel => $confirm) {
                if ($confirm == 1) {
@@ -122,21 +118,18 @@ if ((isFormSent('edit')) && (countPostSelection() > 0) && (!isDemoModeActive()))
                                        'cnt'  => $cnt,
                                        'menu' => $DATA['title'],
                                        'sel'  => $sel,
-                                       'sw'   => $SW,
                                );
                                $OUT .= loadTemplate('admin_gmenu_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 - foreach
        $content['rows'] = $OUT;
        $content['cnt']  = $cnt;
 
@@ -189,7 +182,7 @@ if ((isFormSent('edit')) && (countPostSelection() > 0) && (!isDemoModeActive()))
        $content['chk'] = countPostSelection();
 
        // Load template
-       $SW = 2; $cnt = '0'; $OUT = '';
+       $cnt = '0'; $OUT = '';
        foreach (postRequestParameter('sel') as $sel => $confirm) {
                if ($confirm == 1) {
                        $cnt++;
@@ -202,7 +195,6 @@ if ((isFormSent('edit')) && (countPostSelection() > 0) && (!isDemoModeActive()))
                                        'cnt'     => $cnt,
                                        'menu'    => $data['title'],
                                        'sel'     => $sel,
-                                       'sw'      => $SW,
                                        'visible' => addSelectionBox('yn', $data['visible'], 'visible', $sel),
                                        'locked'  => addSelectionBox('yn', $data['locked'] , 'locked' , $sel),
                                );
@@ -212,14 +204,12 @@ if ((isFormSent('edit')) && (countPostSelection() > 0) && (!isDemoModeActive()))
                        } 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 - foreach
        $content['cnt']  = $cnt;
@@ -278,7 +268,6 @@ if ((isFormSent('edit')) && (countPostSelection() > 0) && (!isDemoModeActive()))
                $content['sub'] = $SUB;
 
                // Init variables
-               $SW = 2;
                $cnt = '0';
                $OUT = '';
 
@@ -302,7 +291,6 @@ if ((isFormSent('edit')) && (countPostSelection() > 0) && (!isDemoModeActive()))
 
                        // Prepapre content
                        $row = array(
-                               'sw'     => $SW,
                                'id'     => $data['id'],
                                'action' => $data['action'],
                                'what'   => $data['what'],
@@ -313,7 +301,6 @@ if ((isFormSent('edit')) && (countPostSelection() > 0) && (!isDemoModeActive()))
 
                        // Load row template
                        $OUT .= loadTemplate('admin_menu_overview_row', true, $row);
-                       $SW = 3 - $SW;
                } // END - while
 
                // Add rows