Vergleich online.php - 1.6.6 - 1.6.17

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: online.php 5638 2011-10-26 08:59:45Z 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 39Zeile 39
	$query = $db->simple_select("users", "COUNT(uid) AS users", "lastactive > '{$threshold}'");
$todaycount = $db->fetch_field($query, "users");


	$query = $db->simple_select("users", "COUNT(uid) AS users", "lastactive > '{$threshold}'");
$todaycount = $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 51Zeile 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 = '';

	$invis_count = 0;

 
	while($online = $db->fetch_array($query))
{
$invisiblemark = '';
if($online['invisible'] == 1)
{

	while($online = $db->fetch_array($query))
{
$invisiblemark = '';
if($online['invisible'] == 1)
{

			++$invis_count;

 
			$invisiblemark = "*";

			$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 86Zeile 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 117Zeile 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 164Zeile 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'];