Vergleich index.php - 1.8.22 - 1.8.30

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 19Zeile 19
require_once MYBB_ROOT.'inc/functions_forumlist.php';
require_once MYBB_ROOT.'inc/class_parser.php';
$parser = new postParser;

require_once MYBB_ROOT.'inc/functions_forumlist.php';
require_once MYBB_ROOT.'inc/class_parser.php';
$parser = new postParser;


$plugins->run_hooks('index_start');

 

// Load global language phrases
$lang->load('index');


// Load global language phrases
$lang->load('index');

 

$plugins->run_hooks('index_start');


$logoutlink = '';
if($mybb->user['uid'] != 0)
{
eval('$logoutlink = "'.$templates->get('index_logoutlink').'";');


$logoutlink = '';
if($mybb->user['uid'] != 0)
{
eval('$logoutlink = "'.$templates->get('index_logoutlink').'";');

}


}


$statspage = '';
if($mybb->settings['statsenabled'] != 0)
{

$statspage = '';
if($mybb->settings['statsenabled'] != 0)
{

 
	$stats_page_separator = '';

	if(!empty($logoutlink))

	if(!empty($logoutlink))

	{

	{

		$stats_page_separator = $lang->board_stats_link_separator;
}
eval('$statspage = "'.$templates->get('index_statspage').'";');
}

		$stats_page_separator = $lang->board_stats_link_separator;
}
eval('$statspage = "'.$templates->get('index_statspage').'";');
}





$onlinecount = null;

$whosonline = '';
if($mybb->settings['showwol'] != 0 && $mybb->usergroup['canviewonline'] != 0)
{
// Get the online users.
if($mybb->settings['wolorder'] == 'username')

$whosonline = '';
if($mybb->settings['showwol'] != 0 && $mybb->usergroup['canviewonline'] != 0)
{
// Get the online users.
if($mybb->settings['wolorder'] == 'username')

	{

	{

		$order_by = 'u.username ASC';
$order_by2 = 's.time DESC';
}
else

		$order_by = 'u.username ASC';
$order_by2 = 's.time DESC';
}
else

	{

	{

		$order_by = 's.time DESC';
$order_by2 = 'u.username ASC';
}

		$order_by = 's.time DESC';
$order_by2 = 'u.username ASC';
}

Zeile 62Zeile 64
	$forum_viewers = $doneusers = $onlinemembers = $onlinebots = array();

if($mybb->settings['showforumviewing'] != 0)

	$forum_viewers = $doneusers = $onlinemembers = $onlinebots = array();

if($mybb->settings['showforumviewing'] != 0)

	{

	{

		$query = $db->query("
SELECT
location1, COUNT(DISTINCT ip) AS guestcount
FROM
".TABLE_PREFIX."sessions

		$query = $db->query("
SELECT
location1, COUNT(DISTINCT ip) AS guestcount
FROM
".TABLE_PREFIX."sessions

			WHERE uid = 0 AND time > $timesearch

			WHERE uid = 0 AND location1 != 0 AND SUBSTR(sid,4,1) != '=' AND time > $timesearch

			GROUP BY location1
");

			GROUP BY location1
");





		while($location = $db->fetch_array($query))
{

		while($location = $db->fetch_array($query))
{

			$guestcount += $location['guestcount'];

if($location['location1'])
{

			if(isset($forum_viewers[$location['location1']]))
{



				$forum_viewers[$location['location1']] += $location['guestcount'];

				$forum_viewers[$location['location1']] += $location['guestcount'];

 
			}
else
{
$forum_viewers[$location['location1']] = $location['guestcount'];

			}
}
}

			}
}
}

	else
{
$query = $db->simple_select("sessions", "COUNT(DISTINCT ip) AS guestcount", "uid = 0 AND time > $timesearch");
$guestcount = $db->fetch_field($query, "guestcount");
}


$query = $db->simple_select("sessions", "COUNT(DISTINCT ip) AS guestcount", "uid = 0 AND SUBSTR(sid,4,1) != '=' AND time > $timesearch");
$guestcount = $db->fetch_field($query, "guestcount");




$query = $db->query("
SELECT


$query = $db->query("
SELECT

Zeile 101Zeile 103
	// Fetch spiders
$spiders = $cache->read('spiders');


	// Fetch spiders
$spiders = $cache->read('spiders');


	// Loop through all users.

	// Loop through all users and spiders.

	while($user = $db->fetch_array($query))
{
// Create a key to test if this user is a search bot.

	while($user = $db->fetch_array($query))
{
// Create a key to test if this user is a search bot.

Zeile 114Zeile 116
			if(empty($doneusers[$user['uid']]) || $doneusers[$user['uid']] < $user['time'])
{
// If the user is logged in anonymously, update the count for that.

			if(empty($doneusers[$user['uid']]) || $doneusers[$user['uid']] < $user['time'])
{
// If the user is logged in anonymously, update the count for that.

				if($user['invisible'] == 1)

				if($user['invisible'] == 1 && $mybb->usergroup['canbeinvisible'] == 1)

				{
++$anoncount;
}

				{
++$anoncount;
}

Zeile 122Zeile 124
				if($user['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1 || $user['uid'] == $mybb->user['uid'])
{
// If this usergroup can see anonymously logged-in users, mark them.

				if($user['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1 || $user['uid'] == $mybb->user['uid'])
{
// If this usergroup can see anonymously logged-in users, mark them.

					if($user['invisible'] == 1)

					if($user['invisible'] == 1 && $mybb->usergroup['canbeinvisible'] == 1)

					{
$invisiblemark = '*';
}

					{
$invisiblemark = '*';
}

Zeile 140Zeile 142
				$doneusers[$user['uid']] = $user['time'];
}
}

				$doneusers[$user['uid']] = $user['time'];
}
}

		elseif(my_strpos($user['sid'], 'bot=') !== false && $spiders[$botkey])

		elseif(my_strpos($user['sid'], 'bot=') !== false && $spiders[$botkey] && $mybb->settings['woldisplayspiders'] == 1)

		{
if($mybb->settings['wolorder'] == 'username')
{

		{
if($mybb->settings['wolorder'] == 'username')
{

Zeile 154Zeile 156
			// The user is a search bot.
$onlinebots[$key] = format_name($spiders[$botkey]['name'], $spiders[$botkey]['usergroup']);
++$botcount;

			// The user is a search bot.
$onlinebots[$key] = format_name($spiders[$botkey]['name'], $spiders[$botkey]['usergroup']);
++$botcount;

		}


		}


		if($user['location1'])
{

		if($user['location1'])
{

			++$forum_viewers[$user['location1']];








			if(isset($forum_viewers[$user['location1']]))
{
++$forum_viewers[$user['location1']];
}
else
{
$forum_viewers[$user['location1']] = 1;
}

		}
}


		}
}


Zeile 166Zeile 175
	{
// activity ordering is DESC, username is ASC
krsort($onlinebots);

	{
// activity ordering is DESC, username is ASC
krsort($onlinebots);

	}
else

	}
else

	{
ksort($onlinebots);
}

	{
ksort($onlinebots);
}

Zeile 177Zeile 186
	{
$comma = $lang->comma." ";
$onlinemembers = implode($comma, $onlinemembers);

	{
$comma = $lang->comma." ";
$onlinemembers = implode($comma, $onlinemembers);

	}

	}

	else
{
$onlinemembers = "";

	else
{
$onlinemembers = "";

Zeile 197Zeile 206
	if($membercount != 1)
{
$memberbit = $lang->online_member_plural;

	if($membercount != 1)
{
$memberbit = $lang->online_member_plural;

	}
else

	}
else

	{
$memberbit = $lang->online_member_singular;
}

	{
$memberbit = $lang->online_member_singular;
}

Zeile 209Zeile 218
	else
{
$anonbit = $lang->online_anon_singular;

	else
{
$anonbit = $lang->online_anon_singular;

	}

	}

	if($guestcount != 1)
{
$guestbit = $lang->online_guest_plural;

	if($guestcount != 1)
{
$guestbit = $lang->online_guest_plural;

Zeile 230Zeile 239
	$bdaycount = $bdayhidden = 0;
$bdaydate = my_date('j-n', TIME_NOW, '', 0);
$year = my_date('Y', TIME_NOW, '', 0);

	$bdaycount = $bdayhidden = 0;
$bdaydate = my_date('j-n', TIME_NOW, '', 0);
$year = my_date('Y', TIME_NOW, '', 0);





	$bdaycache = $cache->read('birthdays');

if(!is_array($bdaycache))

	$bdaycache = $cache->read('birthdays');

if(!is_array($bdaycache))

Zeile 239Zeile 248
		$bdaycache = $cache->read('birthdays');
}


		$bdaycache = $cache->read('birthdays');
}


	$hiddencount = $today_bdays = 0;


	$hiddencount = 0;
$today_bdays = array();

	if(isset($bdaycache[$bdaydate]))

	if(isset($bdaycache[$bdaydate]))

	{
$hiddencount = $bdaycache[$bdaydate]['hiddencount'];
$today_bdays = $bdaycache[$bdaydate]['users'];







	{
if(isset($bdaycache[$bdaydate]['hiddencount']))
{
$hiddencount = $bdaycache[$bdaydate]['hiddencount'];
}
if(isset($bdaycache[$bdaydate]['users']))
{
$today_bdays = $bdaycache[$bdaydate]['users'];
}

	}

$comma = '';

	}

$comma = '';

Zeile 284Zeile 300
				}

// If this user's display group can't be seen in the birthday list, skip it

				}

// If this user's display group can't be seen in the birthday list, skip it

				if($groupscache[$bdayuser['displaygroup']] && $groupscache[$bdayuser['displaygroup']]['showinbirthdaylist'] != 1)

				if(isset($groupscache[$bdayuser['displaygroup']]) && $groupscache[$bdayuser['displaygroup']]['showinbirthdaylist'] != 1)

				{
continue;
}

				{
continue;
}

Zeile 328Zeile 344
{
// First, load the stats cache.
$stats = $cache->read('stats');

{
// First, load the stats cache.
$stats = $cache->read('stats');





	// Check who's the newest member.
if(!$stats['lastusername'])
{

	// Check who's the newest member.
if(!$stats['lastusername'])
{

Zeile 346Zeile 362

// Find out what the highest users online count is.
$mostonline = $cache->read('mostonline');


// Find out what the highest users online count is.
$mostonline = $cache->read('mostonline');

	if($onlinecount > $mostonline['numusers'])

	if($onlinecount !== null && $onlinecount > $mostonline['numusers'])

	{
$time = TIME_NOW;
$mostonline['numusers'] = $onlinecount;

	{
$time = TIME_NOW;
$mostonline['numusers'] = $onlinecount;

Zeile 356Zeile 372
	$recordcount = $mostonline['numusers'];
$recorddate = my_date($mybb->settings['dateformat'], $mostonline['time']);
$recordtime = my_date($mybb->settings['timeformat'], $mostonline['time']);

	$recordcount = $mostonline['numusers'];
$recorddate = my_date($mybb->settings['dateformat'], $mostonline['time']);
$recordtime = my_date($mybb->settings['timeformat'], $mostonline['time']);





	// Then format that language string.
$lang->stats_mostonline = $lang->sprintf($lang->stats_mostonline, my_number_format($recordcount), $recorddate, $recordtime);


	// Then format that language string.
$lang->stats_mostonline = $lang->sprintf($lang->stats_mostonline, my_number_format($recordcount), $recorddate, $recordtime);


Zeile 372Zeile 388
		// Load the stats cache.
$stats = $cache->read('stats');
}

		// Load the stats cache.
$stats = $cache->read('stats');
}

	
$expaltext = (in_array("boardstats", $collapse)) ? "[+]" : "[-]";















if(!isset($collapsedthead['boardstats']))
{
$collapsedthead['boardstats'] = '';
}
if(!isset($collapsedimg['boardstats']))
{
$collapsedimg['boardstats'] = '';
}
if(!isset($collapsed['boardstats_e']))
{
$collapsed['boardstats_e'] = '';
}

$expaltext = (in_array("boardstats", $collapse)) ? $lang->expcol_expand : $lang->expcol_collapse;

	eval('$boardstats = "'.$templates->get('index_boardstats').'";');
}


	eval('$boardstats = "'.$templates->get('index_boardstats').'";');
}


Zeile 421Zeile 450
}

$excols = 'index';

}

$excols = 'index';

$permissioncache['-1'] = '1';

$permissioncache = null;

$bgcolor = 'trow1';

// Decide if we're showing first-level subforums on the index page.

$bgcolor = 'trow1';

// Decide if we're showing first-level subforums on the index page.