X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Fwhat-top10.php;h=20865bdfedd99f8410fed3acc8cf5c8f139c9df6;hb=f55a18dbd4f2312a8812fb3feb3296b350ba269b;hp=57d2a6dc95b4e84447d249c91b2b9840abc56554;hpb=263a089d8a499e0e26d0af9e7aa7639f88b8ca60;p=mailer.git diff --git a/inc/modules/guest/what-top10.php b/inc/modules/guest/what-top10.php index 57d2a6dc95..20865bdfed 100644 --- a/inc/modules/guest/what-top10.php +++ b/inc/modules/guest/what-top10.php @@ -1,7 +1,7 @@ $SW, 'cnt' => $cnt, 'userid' => $content['userid'], 'nickname' => $content['nickname'], 'total_logins' => $content['total_logins'], - 'points' => translateComma(countSumTotalData($content['userid'], 'user_points', 'points')), + 'points' => getTotalPoints($content['userid']), 'last_online' => generateDateTime($content['last_online'], 3), ); // 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')) { @@ -95,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 @@ -132,29 +130,28 @@ 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'] = '---'; + $content['nickname'] = ''; // Get nickname if (isExtensionActive('nickname')) $content['nickname'] = getNickname($content['userid']); // Prepare data for template $content = array( - 'sw' => $SW, 'cnt' => $cnt, 'userid' => $content['userid'], 'nickname' => $content['nickname'], - 'points' => translateComma($content['points']), + 'points' => $content['points'], 'last_online' => generateDateTime($content['last_online'], 3) ); // 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')) { @@ -162,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 @@ -199,30 +194,29 @@ 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'] = '---'; + $content['nickname'] = ''; // Get nickname if (isExtensionActive('nickname')) $content['nickname'] = getNickname($content['userid']); // Prepare data for template $content = array( - 'sw' => $SW, 'cnt' => $cnt, 'userid' => $content['userid'], 'refs' => $content['refs'], 'nickname' => $content['nickname'], - 'points' => translateComma(countSumTotalData($content['userid'], 'user_points', 'points')), + 'points' => getTotalPoints($content['userid']), 'last_online' => generateDateTime($content['last_online'], 3) ); // 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')) { @@ -230,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