Vergleich portal.php - 1.4.0 - 1.4.5

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: portal.php 4053 2008-07-31 04:56:19Z Tikitiki $

 * $Id: portal.php 4339 2009-04-04 18:26:37Z Tikitiki $

 */

define("IN_MYBB", 1);
define("IN_PORTAL", 1);

 */

define("IN_MYBB", 1);
define("IN_PORTAL", 1);

 
define('THIS_SCRIPT', 'portal.php');


// set the path to your forums directory here (without trailing slash)
$forumdir = "./";


// set the path to your forums directory here (without trailing slash)
$forumdir = "./";

Zeile 59Zeile 60

if(!username_exists($mybb->input['username']))
{


if(!username_exists($mybb->input['username']))
{

		my_setcookie('loginattempts', $logins + 1);
$db->write_query("UPDATE ".TABLE_PREFIX."sessions SET loginattempts=loginattempts+1 WHERE sid = '{$session->sid}'");
if($mybb->settings['failedlogintext'] == 1)
{
$login_text = $lang->sprintf($lang->failed_login_again, $mybb->settings['failedlogincount'] - $logins);
}

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

		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->write_query("UPDATE ".TABLE_PREFIX."sessions SET loginattempts=loginattempts+1 WHERE sid = '{$session->sid}'");

		$db->write_query("UPDATE ".TABLE_PREFIX."users SET loginattempts=loginattempts+1 WHERE username = '".$db->escape_string($mybb->input['username'])."'");

		if($mybb->settings['failedlogintext'] == 1)
{
$login_text = $lang->sprintf($lang->failed_login_again, $mybb->settings['failedlogincount'] - $logins);

		if($mybb->settings['failedlogintext'] == 1)
{
$login_text = $lang->sprintf($lang->failed_login_again, $mybb->settings['failedlogincount'] - $logins);

Zeile 83Zeile 78
	$db->delete_query("sessions", "ip='".$db->escape_string($session->ipaddress)."' AND sid != '".$session->sid."'");
$newsession = array(
"uid" => $user['uid'],

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

		"loginattempts" => 1,

 
	);
$db->update_query("sessions", $newsession, "sid='".$session->sid."'");

	);
$db->update_query("sessions", $newsession, "sid='".$session->sid."'");

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


// Temporarily set the cookie remember option for the login cookies
$mybb->user['remember'] = $user['remember'];


// Temporarily set the cookie remember option for the login cookies
$mybb->user['remember'] = $user['remember'];

Zeile 158Zeile 154
		else
{
$lang->new_threads = $lang->sprintf($lang->new_threads, $newthreads);

		else
{
$lang->new_threads = $lang->sprintf($lang->new_threads, $newthreads);

		}

		}

		if($newposts == 1)
{
$lang->new_posts = $lang->new_post;

		if($newposts == 1)
{
$lang->new_posts = $lang->new_post;

Zeile 171Zeile 167

}
else


}
else

	{

	{

		$lang->guest_welcome_registration = $lang->sprintf($lang->guest_welcome_registration, $mybb->settings['bburl'] . '/member.php?action=register');
$mybb->user['username'] = $lang->guest;
eval("\$welcometext = \"".$templates->get("portal_welcome_guesttext")."\";");

		$lang->guest_welcome_registration = $lang->sprintf($lang->guest_welcome_registration, $mybb->settings['bburl'] . '/member.php?action=register');
$mybb->user['username'] = $lang->guest;
eval("\$welcometext = \"".$templates->get("portal_welcome_guesttext")."\";");

Zeile 189Zeile 185
	if($mybb->user['uid'] != 0 && $mybb->user['receivepms'] != 0 && $mybb->usergroup['canusepms'] != 0 && $mybb->settings['enablepms'] != 0)
{
switch($db->type)

	if($mybb->user['uid'] != 0 && $mybb->user['receivepms'] != 0 && $mybb->usergroup['canusepms'] != 0 && $mybb->settings['enablepms'] != 0)
{
switch($db->type)

		{

		{

			case "sqlite2":
case "sqlite3":
case "pgsql":
$query = $db->simple_select("privatemessages", "COUNT(*) AS pms_total", "uid='".$mybb->user['uid']."'");
$messages['pms_total'] = $db->fetch_field($query, "pms_total");


			case "sqlite2":
case "sqlite3":
case "pgsql":
$query = $db->simple_select("privatemessages", "COUNT(*) AS pms_total", "uid='".$mybb->user['uid']."'");
$messages['pms_total'] = $db->fetch_field($query, "pms_total");


				$query = $db->simple_select("privatemessages", "SUM(*) AS pms_unread", "uid='".$mybb->user['uid']."' AND IF(status='0' AND folder='1','1','0')");

				$query = $db->simple_select("privatemessages", "COUNT(*) AS pms_unread", "uid='".$mybb->user['uid']."' AND CASE WHEN status = '0' AND folder = '0' THEN TRUE ELSE FALSE END");

				$messages['pms_unread'] = $db->fetch_field($query, "pms_unread");
break;
default:

				$messages['pms_unread'] = $db->fetch_field($query, "pms_unread");
break;
default:

Zeile 208Zeile 204
		if($messages['pms_unread'] == "")
{
$messages['pms_unread'] = 0;

		if($messages['pms_unread'] == "")
{
$messages['pms_unread'] = 0;

		}

		}

		$lang->pms_received_new = $lang->sprintf($lang->pms_received_new, $mybb->user['username'], $messages['pms_unread']);
eval("\$pms = \"".$templates->get("portal_pms")."\";");
}

		$lang->pms_received_new = $lang->sprintf($lang->pms_received_new, $mybb->user['username'], $messages['pms_unread']);
eval("\$pms = \"".$templates->get("portal_pms")."\";");
}

Zeile 451Zeile 447
	$announcement['message'] = $posts[$announcement['tid']]['message'];
$announcement['pid'] = $posts[$announcement['tid']]['pid'];
$announcement['threadlink'] = get_thread_link($announcement['tid']);

	$announcement['message'] = $posts[$announcement['tid']]['message'];
$announcement['pid'] = $posts[$announcement['tid']]['pid'];
$announcement['threadlink'] = get_thread_link($announcement['tid']);

	$announcement['profilelink'] = get_profile_link($announcement['uid']);










	
if($announcement['uid'] == 0)
{
$profilelink = htmlspecialchars_uni($announcement['threadusername']);
}
else
{
$profilelink = build_profile_link($announcement['username'], $announcement['uid']);
}


	if(!$announcement['username'])
{
$announcement['username'] = $announcement['threadusername'];

	if(!$announcement['username'])
{
$announcement['username'] = $announcement['threadusername'];