Vergleich index.php - 1.8.13 - 1.8.22

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 34Zeile 34
$statspage = '';
if($mybb->settings['statsenabled'] != 0)
{

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

 
	if(!empty($logoutlink))
{
$stats_page_separator = $lang->board_stats_link_separator;
}

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


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


Zeile 45Zeile 49
	{
$order_by = 'u.username ASC';
$order_by2 = 's.time DESC';

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

	}
else

	}
else

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

$timesearch = TIME_NOW - (int)$mybb->settings['wolcutoff'];

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

$timesearch = TIME_NOW - (int)$mybb->settings['wolcutoff'];

	$comma = '';
































$membercount = $guestcount = $anoncount = $botcount = 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
WHERE uid = 0 AND time > $timesearch
GROUP BY location1
");

while($location = $db->fetch_array($query))
{
$guestcount += $location['guestcount'];

if($location['location1'])
{
$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->query("

	$query = $db->query("

		SELECT s.sid, s.ip, s.uid, s.time, s.location, s.location1, u.username, u.invisible, u.usergroup, u.displaygroup
FROM ".TABLE_PREFIX."sessions s
LEFT JOIN ".TABLE_PREFIX."users u ON (s.uid=u.uid)
WHERE s.time > '".$timesearch."'



		SELECT
s.sid, s.ip, s.uid, s.time, s.location, s.location1, u.username, u.invisible, u.usergroup, u.displaygroup
FROM
".TABLE_PREFIX."sessions s
LEFT JOIN ".TABLE_PREFIX."users u ON (s.uid=u.uid)
WHERE (s.uid != 0 OR SUBSTR(s.sid,4,1) = '=') AND s.time > $timesearch

		ORDER BY {$order_by}, {$order_by2}
");

		ORDER BY {$order_by}, {$order_by2}
");


$forum_viewers = $doneusers = array();
$membercount = $guestcount = $anoncount = $botcount = 0;
$onlinemembers = $comma = '';

 

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


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

Zeile 102Zeile 134
					// Properly format the username and assign the template.
$user['username'] = format_name(htmlspecialchars_uni($user['username']), $user['usergroup'], $user['displaygroup']);
$user['profilelink'] = build_profile_link($user['username'], $user['uid']);

					// Properly format the username and assign the template.
$user['username'] = format_name(htmlspecialchars_uni($user['username']), $user['usergroup'], $user['displaygroup']);
$user['profilelink'] = build_profile_link($user['username'], $user['uid']);

					eval('$onlinemembers .= "'.$templates->get('index_whosonline_memberbit', 1, 0).'";');
$comma = $lang->comma;

					eval('$onlinemembers[] = "'.$templates->get('index_whosonline_memberbit', 1, 0).'";');


				}
// This user has been handled.
$doneusers[$user['uid']] = $user['time'];

				}
// This user has been handled.
$doneusers[$user['uid']] = $user['time'];

Zeile 111Zeile 142
		}
elseif(my_strpos($user['sid'], 'bot=') !== false && $spiders[$botkey])
{

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

 
			if($mybb->settings['wolorder'] == 'username')
{
$key = $spiders[$botkey]['name'];
}
else
{
$key = $user['time'];
}


			// The user is a search bot.

			// The user is a search bot.

			$onlinemembers .= $comma.format_name($spiders[$botkey]['name'], $spiders[$botkey]['usergroup']);
$comma = $lang->comma;

			$onlinebots[$key] = format_name($spiders[$botkey]['name'], $spiders[$botkey]['usergroup']);


			++$botcount;

			++$botcount;

		}
else
{
// The user is a guest.
++$guestcount;
}

		}







if($user['location1'])
{
++$forum_viewers[$user['location1']];
}


if($user['location1'])
{
++$forum_viewers[$user['location1']];
}

 
	}

if($mybb->settings['wolorder'] == 'activity')
{
// activity ordering is DESC, username is ASC
krsort($onlinebots);
}
else
{
ksort($onlinebots);
}

$onlinemembers = array_merge($onlinebots, $onlinemembers);
if(!empty($onlinemembers))
{
$comma = $lang->comma." ";
$onlinemembers = implode($comma, $onlinemembers);
}
else
{
$onlinemembers = "";

	}

// Build the who's online bit on the index page.
$onlinecount = $membercount + $guestcount + $botcount;

if($onlinecount != 1)

	}

// Build the who's online bit on the index page.
$onlinecount = $membercount + $guestcount + $botcount;

if($onlinecount != 1)

	{

	{

		$onlinebit = $lang->online_online_plural;

		$onlinebit = $lang->online_online_plural;

	}
else
{

	}
else
{

		$onlinebit = $lang->online_online_singular;
}
if($membercount != 1)

		$onlinebit = $lang->online_online_singular;
}
if($membercount != 1)

	{

	{

		$memberbit = $lang->online_member_plural;
}
else

		$memberbit = $lang->online_member_plural;
}
else

Zeile 148Zeile 203
		$memberbit = $lang->online_member_singular;
}
if($anoncount != 1)

		$memberbit = $lang->online_member_singular;
}
if($anoncount != 1)

	{

	{

		$anonbit = $lang->online_anon_plural;
}
else

		$anonbit = $lang->online_anon_plural;
}
else

Zeile 182Zeile 237
	{
$cache->update_birthdays();
$bdaycache = $cache->read('birthdays');

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

	}

	}


$hiddencount = $today_bdays = 0;
if(isset($bdaycache[$bdaydate]))


$hiddencount = $today_bdays = 0;
if(isset($bdaycache[$bdaydate]))

Zeile 200Zeile 255
			foreach($today_bdays as $key => $bdayuser_pc)
{
$bdayusers[$bdayuser_pc['uid']] = $key;

			foreach($today_bdays as $key => $bdayuser_pc)
{
$bdayusers[$bdayuser_pc['uid']] = $key;

			}


			}


			if(!empty($bdayusers))
{
// Find out if our users have enough posts to be seen on our birthday list

			if(!empty($bdayusers))
{
// Find out if our users have enough posts to be seen on our birthday list

Zeile 214Zeile 269
					{
unset($today_bdays[$bdayusers[$bdayuser['uid']]]);
}

					{
unset($today_bdays[$bdayusers[$bdayuser['uid']]]);
}

				}
}
}

				}
}
}


// We still have birthdays - display them in our list!
if(!empty($today_bdays))


// We still have birthdays - display them in our list!
if(!empty($today_bdays))

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

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




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

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


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