A lot code rewritten:
[mailer.git] / inc / modules / guest / what-top10.php
index de8eef86e4774110befe53510d966ee8bb75194a..82d1adab6e5bec0475c4a5407107aa39f9ae7ab2 100644 (file)
@@ -65,7 +65,7 @@ ORDER BY
        `total_logins` DESC
 LIMIT {?top10_max?}", __FILE__, __LINE__);
 
-$OUT = ''; $SW = 2; $cnt = 1;
+$OUT = ''; $cnt = 1;
 while ($content = SQL_FETCHARRAY($result)) {
        // Init nickname
        $content['nickname'] = '';
@@ -75,7 +75,6 @@ while ($content = SQL_FETCHARRAY($result)) {
 
        // Prepare data for template
        $content = array(
-               'sw'           => $SW,
                'cnt'          => $cnt,
                'userid'       => $content['userid'],
                'nickname'     => $content['nickname'],
@@ -87,8 +86,8 @@ while ($content = SQL_FETCHARRAY($result)) {
        // Load row template
        $OUT .= loadTemplate('guest_top10_row_login', true, $content);
 
-       // Switch colors and count one up
-       $SW = 3 - $SW; $cnt++;
+       // Count one up
+       $cnt++;
 } // END - while
 
 if ($cnt < getConfig('top10_max')) {
@@ -96,13 +95,11 @@ if ($cnt < getConfig('top10_max')) {
        for ($i = $cnt; $i <= getConfig('top10_max'); $i++) {
                // Prepare data for template
                $content = array(
-                       'sw'    => $SW,
                        'index' => $i
                );
 
                // Load row template
                $OUT .= loadTemplate('guest_top10_empty5', true, $content);
-               $SW = 3 - $SW;
        } // END - for
 } // END - if
 
@@ -133,7 +130,7 @@ ORDER BY
        d.last_online DESC
 LIMIT {?top10_max?}", __FILE__, __LINE__);
 
-$OUT = ''; $SW = 2; $cnt = 1;
+$OUT = ''; $cnt = 1;
 while ($content = SQL_FETCHARRAY($result)) {
        // Init nickname
        $content['nickname'] = '';
@@ -143,7 +140,6 @@ while ($content = SQL_FETCHARRAY($result)) {
 
        // Prepare data for template
        $content = array(
-               'sw'          => $SW,
                'cnt'         => $cnt,
                'userid'      => $content['userid'],
                'nickname'    => $content['nickname'],
@@ -154,8 +150,8 @@ while ($content = SQL_FETCHARRAY($result)) {
        // Load row template
        $OUT .= loadTemplate('guest_top10_row_earner', true, $content);
 
-       // Switch colors and count one up
-       $SW = 3 - $SW; $cnt++;
+       // Count one up
+       $cnt++;
 } // END - while
 
 if ($cnt < getConfig('top10_max')) {
@@ -163,13 +159,11 @@ if ($cnt < getConfig('top10_max')) {
        for ($i = $cnt; $i <= getConfig('top10_max'); $i++) {
                // Prepare data for template
                $content = array(
-                       'sw'    => $SW,
                        'index' => $i
                );
 
                // Load row template
                $OUT .= loadTemplate('guest_top10_empty4', true, $content);
-               $SW = 3 - $SW;
        } // END - for
 } // END - if
 
@@ -200,7 +194,7 @@ ORDER BY
        d.last_online DESC
 LIMIT {?top10_max?}", __FILE__, __LINE__);
 
-$OUT = ''; $SW = 2; $cnt = 1;
+$OUT = ''; $cnt = 1;
 while ($content = SQL_FETCHARRAY($result)) {
        // Init nickname
        $content['nickname'] = '';
@@ -210,7 +204,6 @@ while ($content = SQL_FETCHARRAY($result)) {
 
        // Prepare data for template
        $content = array(
-               'sw'          => $SW,
                'cnt'         => $cnt,
                'userid'      => $content['userid'],
                'refs'        => $content['refs'],
@@ -222,8 +215,8 @@ while ($content = SQL_FETCHARRAY($result)) {
        // Load row template
        $OUT .= loadTemplate('guest_top10_row_refs', true, $content);
 
-       // Switch colors and count one up
-       $SW = 3 - $SW; $cnt++;
+       // Count one up
+       $cnt++;
 } // END - while
 
 if ($cnt < getConfig('top10_max')) {
@@ -231,13 +224,11 @@ if ($cnt < getConfig('top10_max')) {
        for ($i = $cnt; $i <= getConfig('top10_max'); $i++) {
                // Prepare data for template
                $content = array(
-                       'sw'    => $SW,
                        'index' => $i
                );
 
                // Load row template
                $OUT .= loadTemplate('guest_top10_empty5', true, $content);
-               $SW = 3 - $SW;
        } // END - for
 } // END - if