Vergleich portal.php - 1.6.6 - 1.6.8

  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: portal.php 5821 2012-05-02 15:40:38Z Tomm $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 60Zeile 60

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


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

		error($lang->error_invalidpworusername.$login_text);















		switch($mybb->settings['username_method'])
{
case 0:
error($lang->error_invalidpworusername.$login_text);
break;
case 1:
error($lang->error_invalidpworusername1.$login_text);
break;
case 2:
error($lang->error_invalidpworusername2.$login_text);
break;
default:
error($lang->error_invalidpworusername.$login_text);
break;
}

	}
$user = validate_password_from_username($mybb->input['username'], $mybb->input['password']);
if(!$user['uid'])

	}
$user = validate_password_from_username($mybb->input['username'], $mybb->input['password']);
if(!$user['uid'])

Zeile 87Zeile 101
	my_setcookie("sid", $session->sid, -1, true);

if(function_exists("loggedIn"))

	my_setcookie("sid", $session->sid, -1, true);

if(function_exists("loggedIn"))

	{

	{

		loggedIn($user['uid']);
}

		loggedIn($user['uid']);
}





	$plugins->run_hooks("portal_do_login_end");

	$plugins->run_hooks("portal_do_login_end");





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

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

}

$plugins->run_hooks("portal_start");

}

$plugins->run_hooks("portal_start");



// get forums user cannot view



// get forums user cannot view

Zeile 130Zeile 144
				$announcementsfids = implode(',', $fid_array);
$query = $db->simple_select("threads", "COUNT(tid) AS newann", "visible=1 AND dateline>'".$mybb->user['lastvisit']."' AND fid IN (".$announcementsfids.") $unviewwhere");
$newann = $db->fetch_field($query, "newann");

				$announcementsfids = implode(',', $fid_array);
$query = $db->simple_select("threads", "COUNT(tid) AS newann", "visible=1 AND dateline>'".$mybb->user['lastvisit']."' AND fid IN (".$announcementsfids.") $unviewwhere");
$newann = $db->fetch_field($query, "newann");

			}


			}


			if(!$newthreads)
{
$newthreads = 0;

			if(!$newthreads)
{
$newthreads = 0;

Zeile 161Zeile 175
		if($newthreads == 1)
{
$lang->new_threads = $lang->new_thread;

		if($newthreads == 1)
{
$lang->new_threads = $lang->new_thread;

		}
else

		}
else

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

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

Zeile 181Zeile 195
	{
$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 363Zeile 392
	);
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).
if($thread['lastposteruid'] == 0)
{
$lastposterlink = $thread['lastposter'];

		$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).
if($thread['lastposteruid'] == 0)
{
$lastposterlink = $thread['lastposter'];

		}

		}

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

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

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

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

	}
}

	}
}


// Get latest news announcements
// First validate announcement fids:


// Get latest news announcements
// First validate announcement fids:

Zeile 403Zeile 440
	$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 418Zeile 457
$pids = '';
$tids = '';
$comma = '';

$pids = '';
$tids = '';
$comma = '';

$query = $db->query("

$query = $db->query("

	SELECT p.pid, p.message, p.tid, p.smilieoff
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)

	SELECT p.pid, p.message, p.tid, p.smilieoff
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)

Zeile 560Zeile 599
				else
{
$isimage = false;

				else
{
$isimage = false;

				}

				}

				$attachment['icon'] = get_attachment_icon($ext);
// Support for [attachment=id] code
if(stripos($message, "[attachment=".$attachment['aid']."]") !== false)

				$attachment['icon'] = get_attachment_icon($ext);
// Support for [attachment=id] code
if(stripos($message, "[attachment=".$attachment['aid']."]") !== false)

Zeile 568Zeile 607
					if($attachment['thumbnail'] != "SMALL" && $attachment['thumbnail'] != '')
{ // We have a thumbnail to show (and its not the "SMALL" enough image
eval("\$attbit = \"".$templates->get("postbit_attachments_thumbnails_thumbnail")."\";");

					if($attachment['thumbnail'] != "SMALL" && $attachment['thumbnail'] != '')
{ // We have a thumbnail to show (and its not the "SMALL" enough image
eval("\$attbit = \"".$templates->get("postbit_attachments_thumbnails_thumbnail")."\";");

					}
elseif($attachment['thumbnail'] == "SMALL" && $forumpermissions[$announcement['fid']]['candlattachments'] == 1)

					}
elseif($attachment['thumbnail'] == "SMALL" && $forumpermissions[$announcement['fid']]['candlattachments'] == 1)

					{
// 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")."\";");

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

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

					}

					}

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

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

Zeile 614Zeile 653
			eval("\$post['attachedthumbs'] = \"".$templates->get("postbit_attachments_thumbnails")."\";");
}
if($post['imagelist'])

			eval("\$post['attachedthumbs'] = \"".$templates->get("postbit_attachments_thumbnails")."\";");
}
if($post['imagelist'])

		{

		{

			eval("\$post['attachedimages'] = \"".$templates->get("postbit_attachments_images")."\";");
}
if($post['attachmentlist'] || $post['thumblist'] || $post['imagelist'])

			eval("\$post['attachedimages'] = \"".$templates->get("postbit_attachments_images")."\";");
}
if($post['attachmentlist'] || $post['thumblist'] || $post['imagelist'])

Zeile 631Zeile 670

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


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



 
?>

?>