A lot code rewritten:
[mailer.git] / inc / modules / guest / what-stats.php
index 2ef513ca78cab39f7975ced9dd88a2e9d02a50f5..38ea6bbf473a8d561e7d32bb0f2daf5d3be44e3c 100644 (file)
@@ -163,23 +163,21 @@ switch (getConfig('guest_stats')) {
                                $l = 'll'; $r = 'lr';
                        }
                        $SW = 3 - $SW;
-               }
+               } // END - foreach
                $content['month_rows'] = $OUT;
 
                // Generate category stats
-               $OUT = ''; $SW = 2;
+               $OUT = '';
                foreach ($cat_cnt as $id => $cnt) {
                        // Prepare data for the template
                        $data = array(
-                               'sw'  => $SW,
                                'cat' => $cats[$id],
                                'cnt' => $cnt,
                        );
 
                        // Load row template and switch colors
                        $OUT .= loadTemplate('guest_stats_cats_row', true, $data);
-                       $SW = 3 - $SW;
-               }
+               } // END - foreach
                $content['cats_rows'] = $OUT;
 
                // Load final template
@@ -199,26 +197,18 @@ switch (getConfig('guest_stats')) {
                if (SQL_NUMROWS($guest_t10) > 0) {
                        // Guest clicks
                        $OUT .= loadTemplate('guest_stats_header', true, '{--GUEST_TOP_GUEST_STATS--}');
-                       $SW = 2;
                        while ($content = SQL_FETCHARRAY($guest_t10)) {
-                               $content['sw'] = $SW;
-
                                // Load row template
                                $OUT .= loadTemplate('guest_stats_row', true, $content);
-                               $SW = 3 - $SW;
                        } // END - while
                } // END - if
 
                if (SQL_NUMROWS($mem_t10) > 0) {
                        // Member clicks
                        $OUT .= loadTemplate('guest_stats_header', true, '{--GUEST_TOP_MEMBER_STATS--}');
-                       $SW = 2;
                        while ($content = SQL_FETCHARRAY($mem_t10)) {
-                               $content['sw'] = $SW;
-
                                // Load row template
                                $OUT .= loadTemplate('guest_stats_row', true, $content);
-                               $SW = 3 - $SW;
                        } // END - while
                } // END - if