Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: online.php 5694 2011-12-01 12:50:34Z Tomm $
| * $Id$
|
*/
define("IN_MYBB", 1); define('THIS_SCRIPT', 'online.php');
|
*/
define("IN_MYBB", 1); define('THIS_SCRIPT', 'online.php');
|
$templatelist = "online,online_row,online_row_ip,online_today,online_today_row,online_iplookup,mostonline";
| $templatelist = "online,online_row,online_row_ip,online_today,online_today_row";
|
require_once "./global.php"; require_once MYBB_ROOT."inc/functions_post.php"; require_once MYBB_ROOT."inc/functions_online.php";
| require_once "./global.php"; require_once MYBB_ROOT."inc/functions_post.php"; require_once MYBB_ROOT."inc/functions_online.php";
|
Zeile 42 | Zeile 42 |
---|
$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; }
|
// Add pagination $perpage = $mybb->settings['threadsperpage'];
if(intval($mybb->input['page']) > 0)
|
// Add pagination $perpage = $mybb->settings['threadsperpage'];
if(intval($mybb->input['page']) > 0)
|
{
| {
|
$page = intval($mybb->input['page']); $start = ($page-1) * $perpage; $pages = ceil($todaycount / $perpage);
| $page = intval($mybb->input['page']); $start = ($page-1) * $perpage; $pages = ceil($todaycount / $perpage);
|
Zeile 54 | Zeile 59 |
---|
{ $start = 0; $page = 1;
|
{ $start = 0; $page = 1;
|
} } else {
| } } else {
|
$start = 0; $page = 1; }
|
$start = 0; $page = 1; }
|
|
|
$query = $db->simple_select("users", "*", "lastactive > '{$threshold}'", array("order_by" => "lastactive", "order_dir" => "desc", "limit" => $perpage, "limit_start" => $start));
$todayrows = '';
| $query = $db->simple_select("users", "*", "lastactive > '{$threshold}'", array("order_by" => "lastactive", "order_dir" => "desc", "limit" => $perpage, "limit_start" => $start));
$todayrows = '';
|
Zeile 71 | Zeile 76 |
---|
if($online['invisible'] == 1) { $invisiblemark = "*";
|
if($online['invisible'] == 1) { $invisiblemark = "*";
|
}
| }
|
if($online['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1 || $online['uid'] == $mybb->user['uid']) { $username = $online['username'];
| if($online['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1 || $online['uid'] == $mybb->user['uid']) { $username = $online['username'];
|
Zeile 87 | Zeile 92 |
---|
if($todaycount == 1) { $onlinetoday = $lang->member_online_today;
|
if($todaycount == 1) { $onlinetoday = $lang->member_online_today;
|
} else
| } else
|
{ $onlinetoday = $lang->sprintf($lang->members_were_online_today, $todaycount); }
|
{ $onlinetoday = $lang->sprintf($lang->members_were_online_today, $todaycount); }
|
|
|
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; }
$onlinetoday .= $lang->sprintf($string, $invis_count);
|
if($invis_count == 1) { $string = $lang->member_online_hidden; }
$onlinetoday .= $lang->sprintf($string, $invis_count);
|
}
| }
|
$multipage = multipage($todaycount, $perpage, $page, "online.php?action=today");
| $multipage = multipage($todaycount, $perpage, $page, "online.php?action=today");
|
Zeile 118 | Zeile 123 |
---|
// Custom sorting options if($mybb->input['sortby'] == "username")
|
// Custom sorting options if($mybb->input['sortby'] == "username")
|
{
| {
|
$sql = "u.username ASC, s.time DESC"; $refresh_string = "?sortby=username"; }
| $sql = "u.username ASC, s.time DESC"; $refresh_string = "?sortby=username"; }
|
Zeile 165 | Zeile 170 |
---|
break; }
|
break; }
|
| 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'];
|