X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Fwhat-active.php;h=9f449e15268c23fad22597f34b17c2d7a5b300c0;hb=8d2c9b91eb82ea74fac58b2541982f760d0f77fc;hp=b9dfc392effb626677c0c5589800e588c4378645;hpb=1ebf518b9552f71ee95de6f4b80e6de3a27716d1;p=mailer.git diff --git a/inc/modules/guest/what-active.php b/inc/modules/guest/what-active.php index b9dfc392ef..9f449e1526 100644 --- a/inc/modules/guest/what-active.php +++ b/inc/modules/guest/what-active.php @@ -1,7 +1,7 @@ = {?START_TDAY?} AND `status`='CONFIRMED' + `last_online` >= {?START_TDAY?} AND + `status`='CONFIRMED' ORDER BY `last_online` DESC LIMIT {?active_limit?}", __FILE__, __LINE__); // Entries found? -if (SQL_NUMROWS($result) > 0) { +if (!SQL_HASZERONUMS($result)) { // At least one member was online so let's load them all - $OUT = ''; $SW = 2; + $OUT = ''; while (list($userid, $nick, $last) = SQL_FETCHROW($result)) { $nick2 = '---'; if (($nick != $userid) && (!empty($nick))) $nick2 = $nick; // Transfer data to array $content = array( - 'sw' => $SW, 'userid' => $userid, 'nickname' => $nick2, - 'points' => translateComma(countSumTotalData($userid, 'user_points', 'points') - countSumTotalData($userid, 'user_data', 'used_points')), - 'last_online' => generateDateTime($last, '2'), + 'points' => getTotalPoints($userid), + 'last_online' => generateDateTime($last, 2), ); // Load template $OUT .= loadTemplate('guest_active_row', true, $content); - - // Switch colors - $SW = 3 - $SW; - } + } // END - while } else { // No member was online today! :-( $OUT = loadTemplate('guest_active_none_row', true);