Vergleich index.php - 1.6.9 - 1.6.16

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 12Zeile 12
define("IN_MYBB", 1);
define('THIS_SCRIPT', 'index.php');


define("IN_MYBB", 1);
define('THIS_SCRIPT', 'index.php');


$templatelist = "index,index_whosonline,index_welcomemembertext,index_welcomeguest,index_whosonline_memberbit,forumbit_depth1_cat,forumbit_depth1_forum,forumbit_depth2_cat,forumbit_depth2_forum,forumbit_depth1_forum_lastpost,forumbit_depth2_forum_lastpost,index_modcolumn,forumbit_moderators,forumbit_subforums,index_welcomeguesttext";
$templatelist .= ",index_birthdays_birthday,index_birthdays,index_pms,index_loginform,index_logoutlink,index_stats,forumbit_depth3,forumbit_depth3_statusicon,index_boardstats";

$templatelist = "index,index_whosonline,index_whosonline_memberbit,forumbit_depth1_cat,forumbit_depth2_cat,forumbit_depth2_forum,forumbit_depth1_forum_lastpost,forumbit_depth2_forum_lastpost,forumbit_moderators,forumbit_subforums";
$templatelist .= ",index_birthdays_birthday,index_birthdays,index_loginform,index_logoutlink,index_stats,forumbit_depth3,forumbit_depth3_statusicon,index_boardstats";


require_once "./global.php";



require_once "./global.php";


Zeile 70Zeile 70
		ORDER BY u.username ASC, s.time DESC
");


		ORDER BY u.username ASC, s.time DESC
");


	$forum_viewers = array();
$membercount = 0;

 
	$onlinemembers = '';

	$onlinemembers = '';

	$guestcount = 0;
$anoncount = 0;
$doneusers = array();

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



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


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

Zeile 90Zeile 87
		if($user['uid'] > 0)
{
// The user is registered.

		if($user['uid'] > 0)
{
// The user is registered.

			if($doneusers[$user['uid']] < $user['time'] || !$doneusers[$user['uid']])

			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 the user is logged in anonymously, update the count for that.
if($user['invisible'] == 1)

Zeile 141Zeile 138

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


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

	



	if($onlinecount != 1)
{
$onlinebit = $lang->online_online_plural;

	if($onlinecount != 1)
{
$onlinebit = $lang->online_online_plural;

	}

	}

	else
{
$onlinebit = $lang->online_online_singular;

	else
{
$onlinebit = $lang->online_online_singular;

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

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

	}
else
{

	}
else
{

		$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 169Zeile 166
	if($guestcount != 1)
{
$guestbit = $lang->online_guest_plural;

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

	}

	}

	else
{
$guestbit = $lang->online_guest_singular;

	else
{
$guestbit = $lang->online_guest_singular;

Zeile 187Zeile 184
	$bdaytime = TIME_NOW;
$bdaydate = my_date("j-n", $bdaytime, '', 0);
$year = my_date("Y", $bdaytime, '', 0);

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

	



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

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

	



	if(!is_array($bdaycache))

	if(!is_array($bdaycache))

	{

	{

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

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

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






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


$comma = '';
if(!empty($today_bdays))


$comma = '';
if(!empty($today_bdays))

Zeile 258Zeile 259
				++$bdaycount;
$comma = $lang->comma;
}

				++$bdaycount;
$comma = $lang->comma;
}

		}

		}

	}

if($hiddencount > 0)

	}

if($hiddencount > 0)

	{

	{

		if($bdaycount > 0)
{
$bdays .= " - ";
}
$bdays .= "{$hiddencount} {$lang->birthdayhidden}";
}

		if($bdaycount > 0)
{
$bdays .= " - ";
}
$bdays .= "{$hiddencount} {$lang->birthdayhidden}";
}

	



	// If there are one or more birthdays, show them.
if($bdaycount > 0 || $hiddencount > 0)
{

	// If there are one or more birthdays, show them.
if($bdaycount > 0 || $hiddencount > 0)
{

Zeile 287Zeile 288
	if(!$stats['lastusername'])
{
$newestmember = "no-one";

	if(!$stats['lastusername'])
{
$newestmember = "no-one";

	}

	}

	else
{
$newestmember = build_profile_link($stats['lastusername'], $stats['lastuid']);

	else
{
$newestmember = build_profile_link($stats['lastusername'], $stats['lastuid']);

	}

	}


// Format the stats language.
$lang->stats_posts_threads = $lang->sprintf($lang->stats_posts_threads, my_number_format($stats['numposts']), my_number_format($stats['numthreads']));


// Format the stats language.
$lang->stats_posts_threads = $lang->sprintf($lang->stats_posts_threads, my_number_format($stats['numposts']), my_number_format($stats['numthreads']));

Zeile 315Zeile 316
	$lang->stats_mostonline = $lang->sprintf($lang->stats_mostonline, my_number_format($recordcount), $recorddate, $recordtime);

eval("\$forumstats = \"".$templates->get("index_stats")."\";");

	$lang->stats_mostonline = $lang->sprintf($lang->stats_mostonline, my_number_format($recordcount), $recorddate, $recordtime);

eval("\$forumstats = \"".$templates->get("index_stats")."\";");

}

}


// Show the board statistics table only if one or more index statistics are enabled.
if(($mybb->settings['showwol'] != 0 && $mybb->usergroup['canviewonline'] != 0) || $mybb->settings['showindexstats'] != 0 || ($mybb->settings['showbirthdays'] != 0 && $bdaycount > 0))
{
if(!is_array($stats))


// Show the board statistics table only if one or more index statistics are enabled.
if(($mybb->settings['showwol'] != 0 && $mybb->usergroup['canviewonline'] != 0) || $mybb->settings['showindexstats'] != 0 || ($mybb->settings['showbirthdays'] != 0 && $bdaycount > 0))
{
if(!is_array($stats))

	{

	{

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

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

	}


	}


	$post_code_string = '';
if($mybb->user['uid'])
{
$post_code_string = "&amp;my_post_key=".$mybb->post_code;
}

	$post_code_string = '';
if($mybb->user['uid'])
{
$post_code_string = "&amp;my_post_key=".$mybb->post_code;
}





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


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


Zeile 342Zeile 343
		SELECT *
FROM ".TABLE_PREFIX."forums
WHERE active != 0

		SELECT *
FROM ".TABLE_PREFIX."forums
WHERE active != 0

		ORDER BY pid, disporder
");


		ORDER BY pid, disporder
");


	$forumsread = my_unserialize($mybb->cookies['mybb']['forumread']);
}
else

	$forumsread = my_unserialize($mybb->cookies['mybb']['forumread']);
}
else

{

{

	// Build a forum cache.
$query = $db->query("
SELECT f.*, fr.dateline AS lastread

	// Build a forum cache.
$query = $db->query("
SELECT f.*, fr.dateline AS lastread

Zeile 357Zeile 358
		WHERE f.active != 0
ORDER BY pid, disporder
");

		WHERE f.active != 0
ORDER BY pid, disporder
");

}


}


while($forum = $db->fetch_array($query))
{
if($mybb->user['uid'] == 0)
{

while($forum = $db->fetch_array($query))
{
if($mybb->user['uid'] == 0)
{

		if($forumsread[$forum['fid']])

		if(!empty($forumsread[$forum['fid']]))

		{
$forum['lastread'] = $forumsread[$forum['fid']];
}

		{
$forum['lastread'] = $forumsread[$forum['fid']];
}

Zeile 374Zeile 375

// Get the forum moderators if the setting is enabled.
if($mybb->settings['modlist'] != "off")


// Get the forum moderators if the setting is enabled.
if($mybb->settings['modlist'] != "off")

{	

{

	$moderatorcache = $cache->read("moderators");
}


	$moderatorcache = $cache->read("moderators");
}