Vergleich portal.php - 1.6.5 - 1.6.9

  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: portal.php 5297 2010-12-28 22:01:14Z Tomm $

 * $Id$

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 47Zeile 47
$portal_url = get_current_location();

add_breadcrumb($lang->nav_portal, "portal.php");

$portal_url = get_current_location();

add_breadcrumb($lang->nav_portal, "portal.php");


// This allows users to login if the portal is stored offsite or in a different directory
if($mybb->input['action'] == "do_login" && $mybb->request_method == "post")
{
$plugins->run_hooks("portal_do_login_start");

// Checks to make sure the user can login; they haven't had too many tries at logging in.
// Is a fatal call if user has had too many tries
$logins = login_attempt_check();
$login_text = '';

if(!username_exists($mybb->input['username']))
{
error($lang->error_invalidpworusername.$login_text);
}
$user = validate_password_from_username($mybb->input['username'], $mybb->input['password']);
if(!$user['uid'])
{
my_setcookie('loginattempts', $logins + 1);
$db->update_query("users", array('loginattempts' => 'loginattempts+1'), "LOWER(username) = '".$db->escape_string(my_strtolower($mybb->input['username']))."'", 1, true);
if($mybb->settings['failedlogintext'] == 1)
{
$login_text = $lang->sprintf($lang->failed_login_again, $mybb->settings['failedlogincount'] - $logins);
}
error($lang->error_invalidpassword.$login_text);
}

my_setcookie('loginattempts', 1);
$db->delete_query("sessions", "ip='".$db->escape_string($session->ipaddress)."' AND sid != '".$session->sid."'");
$newsession = array(
"uid" => $user['uid'],
);
$db->update_query("sessions", $newsession, "sid='".$session->sid."'");

$db->update_query("users", array("loginattempts" => 1), "uid='{$mybb->user['uid']}'");

my_setcookie("mybbuser", $user['uid']."_".$user['loginkey'], ($mybb->input['remember'] == "yes" ? null : 0), true);
my_setcookie("sid", $session->sid, -1, true);

if(function_exists("loggedIn"))
{
loggedIn($user['uid']);
}

$plugins->run_hooks("portal_do_login_end");

redirect("portal.php", $lang->redirect_loggedin);
}

 

$plugins->run_hooks("portal_start");



$plugins->run_hooks("portal_start");


Zeile 181Zeile 133
	{
$lang->guest_welcome_registration = $lang->sprintf($lang->guest_welcome_registration, $mybb->settings['bburl'] . '/member.php?action=register');
$mybb->user['username'] = $lang->guest;

	{
$lang->guest_welcome_registration = $lang->sprintf($lang->guest_welcome_registration, $mybb->settings['bburl'] . '/member.php?action=register');
$mybb->user['username'] = $lang->guest;

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

		eval("\$welcometext = \"".$templates->get("portal_welcome_guesttext")."\";");
}
$lang->welcome = $lang->sprintf($lang->welcome, $mybb->user['username']);

		eval("\$welcometext = \"".$templates->get("portal_welcome_guesttext")."\";");
}
$lang->welcome = $lang->sprintf($lang->welcome, $mybb->user['username']);

Zeile 292Zeile 259
				if($user['invisible'] == 1)
{
$invisiblemark = "*";

				if($user['invisible'] == 1)
{
$invisiblemark = "*";

				}
else

				}
else

				{
$invisiblemark = '';
}

				{
$invisiblemark = '';
}

Zeile 363Zeile 330
	);
while($thread = $db->fetch_array($query))
{

	);
while($thread = $db->fetch_array($query))
{

 
		$forumpermissions[$thread['fid']] = forum_permissions($thread['fid']);

// Make sure we can view this thread
if($forumpermissions[$thread['fid']]['canview'] == 0 || $forumpermissions[$thread['fid']]['canviewthreads'] == 0 || $forumpermissions[$thread['fid']]['canonlyviewownthreads'] == 1 && $thread['uid'] != $mybb->user['uid'])
{
continue;
}


		$lastpostdate = my_date($mybb->settings['dateformat'], $thread['lastpost']);
$lastposttime = my_date($mybb->settings['timeformat'], $thread['lastpost']);
// Don't link to guest's profiles (they have no profile).

		$lastpostdate = my_date($mybb->settings['dateformat'], $thread['lastpost']);
$lastposttime = my_date($mybb->settings['timeformat'], $thread['lastpost']);
// Don't link to guest's profiles (they have no profile).

Zeile 373Zeile 348
		else
{
$lastposterlink = build_profile_link($thread['lastposter'], $thread['lastposteruid']);

		else
{
$lastposterlink = build_profile_link($thread['lastposter'], $thread['lastposteruid']);

		}

		}

		if(my_strlen($thread['subject']) > 25)
{
$thread['subject'] = my_substr($thread['subject'], 0, 25) . "...";

		if(my_strlen($thread['subject']) > 25)
{
$thread['subject'] = my_substr($thread['subject'], 0, 25) . "...";

Zeile 383Zeile 358
		$thread['lastpostlink'] = get_thread_link($thread['tid'], 0, "lastpost");
eval("\$threadlist .= \"".$templates->get("portal_latestthreads_thread")."\";");
$altbg = alt_trow();

		$thread['lastpostlink'] = get_thread_link($thread['tid'], 0, "lastpost");
eval("\$threadlist .= \"".$templates->get("portal_latestthreads_thread")."\";");
$altbg = alt_trow();

	}

	}

	if($threadlist)
{
// Show the table only if there are threads
eval("\$latestthreads = \"".$templates->get("portal_latestthreads")."\";");

	if($threadlist)
{
// Show the table only if there are threads
eval("\$latestthreads = \"".$templates->get("portal_latestthreads")."\";");

	}

	}

}

// Get latest news announcements

}

// Get latest news announcements

Zeile 403Zeile 378
	$announcementsfids = implode(',', $fid_array);
}
// And get them!

	$announcementsfids = implode(',', $fid_array);
}
// And get them!

$query = $db->simple_select("forums", "*", "fid IN (".$announcementsfids.")");
while($forumrow = $db->fetch_array($query))

foreach($forum_cache as $fid => $f)


{

{

    $forum[$forumrow['fid']] = $forumrow;




	if(is_array($fid_array) && in_array($fid, $fid_array))
{
$forum[$fid] = $f;
}

}

$numannouncements = intval($mybb->settings['portal_numannouncements']);

}

$numannouncements = intval($mybb->settings['portal_numannouncements']);

Zeile 494Zeile 471
	else
{
$icon = " ";

	else
{
$icon = " ";

	}

	}

	if($announcement['avatar'] != '')
{
$avatar_dimensions = explode("|", $announcement['avatardimensions']);

	if($announcement['avatar'] != '')
{
$avatar_dimensions = explode("|", $announcement['avatardimensions']);

Zeile 631Zeile 608

eval("\$portal = \"".$templates->get("portal")."\";");
output_page($portal);


eval("\$portal = \"".$templates->get("portal")."\";");
output_page($portal);



 
?>

?>