Zeile 44 | Zeile 44 |
---|
$query = $db->simple_select("users", "COUNT(uid) AS users", "lastactive > '{$threshold}' AND invisible = '1'"); $invis_count = $db->fetch_field($query, "users");
|
$query = $db->simple_select("users", "COUNT(uid) AS users", "lastactive > '{$threshold}' AND invisible = '1'"); $invis_count = $db->fetch_field($query, "users");
|
if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1) { $mybb->settings['threadsperpage'] = 20;
| if(!$mybb->settings['wolusersperpage'] || (int)$mybb->settings['wolusersperpage'] < 1) { $mybb->settings['wolusersperpage'] = 20;
|
}
|
}
|
|
|
// Add pagination
|
// Add pagination
|
$perpage = $mybb->settings['threadsperpage'];
| $perpage = $mybb->settings['wolusersperpage'];
|
if($mybb->get_input('page', MyBB::INPUT_INT) > 0)
|
if($mybb->get_input('page', MyBB::INPUT_INT) > 0)
|
{
| {
|
$page = $mybb->get_input('page', MyBB::INPUT_INT); $start = ($page-1) * $perpage; $pages = ceil($todaycount / $perpage);
|
$page = $mybb->get_input('page', MyBB::INPUT_INT); $start = ($page-1) * $perpage; $pages = ceil($todaycount / $perpage);
|
if($page > $pages) { $start = 0; $page = 1; } } else { $start = 0; $page = 1; }
| if($page > $pages) { $start = 0; $page = 1; } } else { $start = 0; $page = 1; }
|
$query = $db->simple_select("users", "*", "lastactive > '{$threshold}'", array("order_by" => "lastactive", "order_dir" => "desc", "limit" => $perpage, "limit_start" => $start));
|
$query = $db->simple_select("users", "*", "lastactive > '{$threshold}'", array("order_by" => "lastactive", "order_dir" => "desc", "limit" => $perpage, "limit_start" => $start));
|
|
|
$todayrows = ''; while($online = $db->fetch_array($query)) {
| $todayrows = ''; while($online = $db->fetch_array($query)) {
|
Zeile 87 | Zeile 87 |
---|
$onlinetime = my_date('normal', $online['lastactive']);
eval("\$todayrows .= \"".$templates->get("online_today_row")."\";");
|
$onlinetime = my_date('normal', $online['lastactive']);
eval("\$todayrows .= \"".$templates->get("online_today_row")."\";");
|
} }
$multipage = multipage($todaycount, $perpage, $page, "online.php?action=today");
| } }
$multipage = multipage($todaycount, $perpage, $page, "online.php?action=today");
|
$todaycount = my_number_format($todaycount); $invis_count = my_number_format($invis_count);
|
$todaycount = my_number_format($todaycount); $invis_count = my_number_format($invis_count);
|
|
|
if($todaycount == 1)
|
if($todaycount == 1)
|
{
| {
|
$onlinetoday = $lang->member_online_today; } else
| $onlinetoday = $lang->member_online_today; } else
|
Zeile 107 | Zeile 107 |
---|
if($invis_count) { $string = $lang->members_online_hidden;
|
if($invis_count) { $string = $lang->members_online_hidden;
|
|
|
if($invis_count == 1) { $string = $lang->member_online_hidden;
| if($invis_count == 1) { $string = $lang->member_online_hidden;
|
Zeile 127 | Zeile 127 |
---|
// Custom sorting options if($mybb->get_input('sortby') == "username")
|
// Custom sorting options if($mybb->get_input('sortby') == "username")
|
{
| {
|
$sql = "u.username ASC, s.time DESC"; $refresh_string = "?sortby=username"; } elseif($mybb->get_input('sortby') == "location")
|
$sql = "u.username ASC, s.time DESC"; $refresh_string = "?sortby=username"; } elseif($mybb->get_input('sortby') == "location")
|
{
| {
|
$sql = "s.location, s.time DESC"; $refresh_string = "?sortby=location"; }
| $sql = "s.location, s.time DESC"; $refresh_string = "?sortby=location"; }
|
Zeile 148 | Zeile 148 |
---|
default: $sql = "IF( s.uid >0, 1, 0 ) DESC, s.time DESC"; break;
|
default: $sql = "IF( s.uid >0, 1, 0 ) DESC, s.time DESC"; break;
|
}
| }
|
$refresh_string = '';
|
$refresh_string = '';
|
}
| }
|
$timesearch = TIME_NOW - $mybb->settings['wolcutoffmins']*60;
| $timesearch = TIME_NOW - $mybb->settings['wolcutoffmins']*60;
|
Zeile 162 | Zeile 162 |
---|
GROUP BY uid, ip ) s ");
|
GROUP BY uid, ip ) s ");
|
|
|
$online_count = $db->fetch_field($query, "online");
if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1) { $mybb->settings['threadsperpage'] = 20;
|
$online_count = $db->fetch_field($query, "online");
if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1) { $mybb->settings['threadsperpage'] = 20;
|
}
| }
|
// How many pages are there? $perpage = $mybb->settings['threadsperpage'];
| // How many pages are there? $perpage = $mybb->settings['threadsperpage'];
|
Zeile 208 | Zeile 208 |
---|
($db->type == 'sqlite' && version_compare($dbversion, '3.25.0', '>=')) ) {
|
($db->type == 'sqlite' && version_compare($dbversion, '3.25.0', '>=')) ) {
|
| $sql = str_replace('u.username', 's.username', $sql);
|
$query = $db->query(" SELECT * FROM ( SELECT
| $query = $db->query(" SELECT * FROM ( SELECT
|