X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-usr_online.php;h=019b56484207033299c95053e4f29df5c990fa12;hb=4da570680cb8c5ed1e550746e48a16965b7175c4;hp=d1a676b52ece97d80573d0864c9554b0eef007f9;hpb=5bdeaf8b452206598b6c6cd4f941145b11a0eccc;p=mailer.git diff --git a/inc/modules/admin/what-usr_online.php b/inc/modules/admin/what-usr_online.php index d1a676b52e..019b564842 100644 --- a/inc/modules/admin/what-usr_online.php +++ b/inc/modules/admin/what-usr_online.php @@ -1,7 +1,7 @@ 0) - { - // Load header template - LOAD_TEMPLATE("admin_online_header"); - + $result = SQL_QUERY("SELECT `id`, `ip`, `userid`, `refid`, `module`, `action`, `what`, `is_member`, `is_admin`, `timestamp` FROM `{?_MYSQL_PREFIX?}_online` ORDER by `timestamp` DESC", + __FILE__, __LINE__); + if (SQL_NUMROWS($result) > 0) { // List all online users - $SW = 2; - while (list($id, $ip, $uid, $ref, $mod, $act, $wht, $mem, $admin, $time) = SQL_FETCHROW($result)) - { - if (empty($act)) $act = "---"; - if (empty($wht)) $wht = "---"; + $OUT = ''; $SW = 2; + while ($row = SQL_FETCHARRAY($result)) { + // Fix empty action/what + if (empty($row['action'])) $row['action'] = '---'; + if (empty($row['what'])) $row['what'] = '---'; - if ($admin == "Y") - { + if ($row['is_admin'] == 'Y') { // Is an administrator - $uid = _IS_ADMIN; - } - elseif (($mem == "N") && ($admin == "N")) - { + $row['userid'] = getMessage('_IS_ADMIN'); + } elseif (($row['is_member'] != 'Y') && ($row['is_admin'] != 'Y')) { // Is a guest - $uid = _IS_GUEST; - } - OUTPUT_HTML("