Vergleich index.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: index.php 5594 2011-09-14 13:13:41Z Tomm $

 * $Id$

 */

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 38Zeile 38
	//Function call is not fatal
if(login_attempt_check(false) !== false)
{

	//Function call is not fatal
if(login_attempt_check(false) !== false)
{

 
		switch($mybb->settings['username_method'])
{
case 0:
$login_username = $lang->login_username;
break;
case 1:
$login_username = $lang->login_username1;
break;
case 2:
$login_username = $lang->login_username2;
break;
default:
$login_username = $lang->login_username;
break;
}

		eval("\$loginform = \"".$templates->get("index_loginform")."\";");
}
}

		eval("\$loginform = \"".$templates->get("index_loginform")."\";");
}
}

Zeile 55Zeile 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 75Zeile 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)
{
++$anoncount;

			{
// If the user is logged in anonymously, update the count for that.
if($user['invisible'] == 1)
{
++$anoncount;

				}

				}

				++$membercount;
if($user['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1 || $user['uid'] == $mybb->user['uid'])
{

				++$membercount;
if($user['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1 || $user['uid'] == $mybb->user['uid'])
{

Zeile 119Zeile 131
		}

if($user['location1'])

		}

if($user['location1'])

		{

		{

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

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

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

// 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;

	}
if($membercount != 1)

	}
if($membercount != 1)

	{
$memberbit = $lang->online_member_plural;
}

	{
$memberbit = $lang->online_member_plural;
}

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

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

	{
$anonbit = $lang->online_anon_plural;
}

	{
$anonbit = $lang->online_anon_plural;
}

Zeile 158Zeile 170
	else
{
$guestbit = $lang->online_guest_singular;

	else
{
$guestbit = $lang->online_guest_singular;

	}

	}

	$lang->online_note = $lang->sprintf($lang->online_note, my_number_format($onlinecount), $onlinebit, $mybb->settings['wolcutoffmins'], my_number_format($membercount), $memberbit, my_number_format($anoncount), $anonbit, my_number_format($guestcount), $guestbit);
eval("\$whosonline = \"".$templates->get("index_whosonline")."\";");
}

	$lang->online_note = $lang->sprintf($lang->online_note, my_number_format($onlinecount), $onlinebit, $mybb->settings['wolcutoffmins'], my_number_format($membercount), $memberbit, my_number_format($anoncount), $anonbit, my_number_format($guestcount), $guestbit);
eval("\$whosonline = \"".$templates->get("index_whosonline")."\";");
}

Zeile 172Zeile 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 254Zeile 270
		}
$bdays .= "{$hiddencount} {$lang->birthdayhidden}";
}

		}
$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 303Zeile 319
}

// Show the board statistics table only if one or more index statistics are enabled.

}

// Show the board statistics table only if one or more index statistics are enabled.

if($mybb->settings['showwol'] != 0 || $mybb->settings['showindexstats'] != 0 || ($mybb->settings['showbirthdays'] != 0 && $bdaycount > 0))

if(($mybb->settings['showwol'] != 0 && $mybb->usergroup['canviewonline'] != 0) || $mybb->settings['showindexstats'] != 0 || ($mybb->settings['showbirthdays'] != 0 && $bdaycount > 0))

{
if(!is_array($stats))
{

{
if(!is_array($stats))
{

Zeile 329Zeile 345
		WHERE active != 0
ORDER BY pid, disporder
");

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

	
$forumsread = unserialize($mybb->cookies['mybb']['forumread']);


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

}
else
{

}
else
{

Zeile 343Zeile 359
		ORDER BY pid, disporder
");
}

		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 358Zeile 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");
}