includes/mods/who_was_here.phpНайти
Код: Выделить всё
'user_type' => $user->data['user_type'],
'viewonline' => $user->data['session_viewonline'],Код: Выделить всё
'user_type' => (int) $user->data['user_type'],
'viewonline' => (int) $user->data['session_viewonline'],Код: Выделить всё
$sql = 'SELECT user_id, username, username_clean, user_colour, user_type, viewonline, wwh_lastpage, user_ip
FROM ' . self::table() . "
ORDER BY $sql_order_by $sql_ordering";Код: Выделить всё
$sql = 'SELECT user_id, username, username_clean, user_colour, user_type, viewonline, wwh_lastpage, user_ip
FROM ' . self::table() . '
WHERE user_id != ' . ANONYMOUS . '
ORDER BY ' . $sql_order_by . ' ' . $sql_ordering;Код: Выделить всё
// At the end let's count them =)
if ($row['user_id'] == ANONYMOUS)
{
self::$count_guests++;
}
else if ($row['user_type'] == USER_IGNORE)Код: Выделить всё
// At the end let's count them =)
//if ($row['user_id'] == ANONYMOUS)
//{
// self::$count_guests++;
//}
//else
if ($row['user_type'] == USER_IGNORE)Код: Выделить всё
self::$count_total++;
}
}Код: Выделить всё
$db->sql_freeresult($result);
$sql = 'SELECT COUNT(user_ip) as num_guests
FROM ' . self::table() . '
WHERE user_id = ' . ANONYMOUS . '
ORDER BY ' . $sql_order_by . ' ' . $sql_ordering;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
self::$count_guests = $row['num_guests'];Код: Выделить всё
if (!$config['wwh_disp_guests'])
{
self::$count_total -= self::$count_guests;
}Код: Выделить всё
if ($config['wwh_disp_guests'])
{
self::$count_total += self::$count_guests;
}

