Vergleich portal.php - 1.2.0 - 1.2.2

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html
*

 * $Id: portal.php 2164 2006-08-30 06:17:49Z chris $

 * $Id: portal.php 2378 2006-10-30 15:06:39Z Tikitiki $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 31Zeile 31
$parser = new postParser;

global $theme, $templates;

$parser = new postParser;

global $theme, $templates;

 

// Fetch the current URL
$portal_url = get_current_location();


// Load global language phrases
$lang->load("portal");


// Load global language phrases
$lang->load("portal");

Zeile 48Zeile 51
	$login_text = '';

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

	$login_text = '';

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

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

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

			$login_text = sprintf($lang->failed_login_again, $mybb->settings['failedlogincount'] - $logins);
}
error($lang->error_invalidusername.$login_text);
}
$user = validate_password_from_username($mybb->input['username'], $mybb->input['password']);
if(!$user['uid'])

			$login_text = sprintf($lang->failed_login_again, $mybb->settings['failedlogincount'] - $logins);
}
error($lang->error_invalidusername.$login_text);
}
$user = validate_password_from_username($mybb->input['username'], $mybb->input['password']);
if(!$user['uid'])

	{

	{

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

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

Zeile 67Zeile 70
			$login_text = sprintf($lang->failed_login_again, $mybb->settings['failedlogincount'] - $logins);
}
error($lang->error_invalidpassword.$login_text);

			$login_text = sprintf($lang->failed_login_again, $mybb->settings['failedlogincount'] - $logins);
}
error($lang->error_invalidpassword.$login_text);

	}

	}


my_setcookie('loginattempts', 1);
$db->delete_query(TABLE_PREFIX."sessions", "ip='".$session->ipaddress."' AND sid != '".$session->sid."'");


my_setcookie('loginattempts', 1);
$db->delete_query(TABLE_PREFIX."sessions", "ip='".$session->ipaddress."' AND sid != '".$session->sid."'");

Zeile 80Zeile 83
	// 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'];


	my_setcookie("mybbuser", $user['uid']."_".$user['loginkey']);
my_setcookie("sid", $session->sid, -1);

	my_setcookie("mybbuser", $user['uid']."_".$user['loginkey'], null, true);
my_setcookie("sid", $session->sid, -1, true);


if(function_exists("loggedIn"))
{


if(function_exists("loggedIn"))
{

Zeile 91Zeile 94
	$plugins->run_hooks("portal_do_login_end");

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

	$plugins->run_hooks("portal_do_login_end");

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

}


}


$plugins->run_hooks("portal_start");



$plugins->run_hooks("portal_start");



Zeile 382Zeile 385
	if($announcement['icon'] > 0 && $icon_cache[$announcement['icon']])
{
$icon = $icon_cache[$announcement['icon']];

	if($announcement['icon'] > 0 && $icon_cache[$announcement['icon']])
{
$icon = $icon_cache[$announcement['icon']];

		$icon = "<img src=\"{$icon[path]}\" alt=\"{$icon[name]}\" />";

		$icon = "<img src=\"{$icon['path']}\" alt=\"{$icon['name']}\" />";

	}
else
{

	}
else
{

Zeile 413Zeile 416
		eval("\$numcomments = \"".$templates->get("portal_announcement_numcomments_no")."\";");
$lastcomment = '';
}

		eval("\$numcomments = \"".$templates->get("portal_announcement_numcomments_no")."\";");
$lastcomment = '';
}

 
	
$plugins->run_hooks("portal_announcement");

$parser_options = array(
"allow_html" => $forum[$announcement['fid']]['allowhtml'],
"allow_mycode" => $forum[$announcement['fid']]['allowmycode'],
"allow_smilies" => $forum[$announcement['fid']]['allowsmilies'],
"allow_imgcode" => $forum[$announcement['fid']]['allowimgcode']
);
if($announcement['smilieoff'] == "yes")
{
$parser_options['allow_smilies'] = "no";
}

$message = $parser->parse_message($announcement['message'], $parser_options);


	if(is_array($attachcache[$announcement['pid']]))
{ // This post has 1 or more attachments
$validationcount = 0;

	if(is_array($attachcache[$announcement['pid']]))
{ // This post has 1 or more attachments
$validationcount = 0;

Zeile 425Zeile 444
				$attachment['filesize'] = get_friendly_size($attachment['filesize']);
$ext = get_extension($attachment['filename']);
if($ext == "jpeg" || $ext == "gif" || $ext == "bmp" || $ext == "png" || $ext == "jpg")

				$attachment['filesize'] = get_friendly_size($attachment['filesize']);
$ext = get_extension($attachment['filename']);
if($ext == "jpeg" || $ext == "gif" || $ext == "bmp" || $ext == "png" || $ext == "jpg")

				{

				{

					$isimage = true;
}
else

					$isimage = true;
}
else

				{

				{

					$isimage = false;
}
$attachment['icon'] = get_attachment_icon($ext);
// Support for [attachment=id] code

					$isimage = false;
}
$attachment['icon'] = get_attachment_icon($ext);
// Support for [attachment=id] code

				if(stripos($announcement['message'], "[attachment=".$attachment['aid']."]") !== false)

				if(stripos($message, "[attachment=".$attachment['aid']."]") !== false)

				{
if($attachment['thumbnail'] != "SMALL" && $attachment['thumbnail'] != '')
{ // We have a thumbnail to show (and its not the "SMALL" enough image

				{
if($attachment['thumbnail'] != "SMALL" && $attachment['thumbnail'] != '')
{ // We have a thumbnail to show (and its not the "SMALL" enough image

Zeile 444Zeile 463
					{
// Image is small enough to show - no thumbnail
eval("\$attbit = \"".$templates->get("postbit_attachments_images_image")."\";");

					{
// Image is small enough to show - no thumbnail
eval("\$attbit = \"".$templates->get("postbit_attachments_images_image")."\";");

					}
else
{

					}
else
{

						// Show standard link to attachment
eval("\$attbit = \"".$templates->get("postbit_attachments_attachment")."\";");

						// Show standard link to attachment
eval("\$attbit = \"".$templates->get("postbit_attachments_attachment")."\";");

					}
$announcement['message'] = preg_replace("#\[attachment=".$attachment['aid']."]#si", $attbit, $announcement['message']);

					}
$message = preg_replace("#\[attachment=".$attachment['aid']."]#si", $attbit, $message);

				}
else
{

				}
else
{

Zeile 468Zeile 487
					{
// Image is small enough to show - no thumbnail
eval("\$post['imagelist'] .= \"".$templates->get("postbit_attachments_images_image")."\";");

					{
// Image is small enough to show - no thumbnail
eval("\$post['imagelist'] .= \"".$templates->get("postbit_attachments_images_image")."\";");

					}

					}

					else
{
eval("\$post['attachmentlist'] .= \"".$templates->get("postbit_attachments_attachment")."\";");
}
}

					else
{
eval("\$post['attachmentlist'] .= \"".$templates->get("postbit_attachments_attachment")."\";");
}
}

			}

			}

			else
{
$validationcount++;

			else
{
$validationcount++;

Zeile 493Zeile 512
			eval("\$post['attachments'] = \"".$templates->get("postbit_attachments")."\";");
}
}

			eval("\$post['attachments'] = \"".$templates->get("postbit_attachments")."\";");
}
}


$plugins->run_hooks("portal_announcement");

$parser_options = array(
"allow_html" => $forum[$announcement['fid']]['allow_html'],
"allow_mycode" => $forum[$announcement['fid']]['allow_mycode'],
"allow_smilies" => $forum[$announcement['fid']]['allowsmilies'],
"allow_imgcode" => $forum[$announcement['fid']]['allowimgcode']
);
if($announcement['smilieoff'] == "yes")
{
$parser_options['allow_smilies'] = "no";
}

$message = $parser->parse_message($announcement['message'], $parser_options);

 

eval("\$announcements .= \"".$templates->get("portal_announcement")."\";");
unset($post);


eval("\$announcements .= \"".$templates->get("portal_announcement")."\";");
unset($post);