Vergleich usercp.php - 1.6.4 - 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: usercp.php 5459 2011-05-10 10:47:56Z Tomm $

 * $Id$

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 402Zeile 402
	$query = $db->simple_select("profilefields", "*", "editable=1", array('order_by' => 'disporder'));
while($profilefield = $db->fetch_array($query))
{

	$query = $db->simple_select("profilefields", "*", "editable=1", array('order_by' => 'disporder'));
while($profilefield = $db->fetch_array($query))
{

 
		// Does this field have a minimum post count?
if($profilefield['postnum'] && $profilefield['postnum'] > $user['postnum'])
{
continue;
}


		$profilefield['type'] = htmlspecialchars_uni($profilefield['type']);
$profilefield['name'] = htmlspecialchars_uni($profilefield['name']);
$profilefield['description'] = htmlspecialchars_uni($profilefield['description']);

		$profilefield['type'] = htmlspecialchars_uni($profilefield['type']);
$profilefield['name'] = htmlspecialchars_uni($profilefield['name']);
$profilefield['description'] = htmlspecialchars_uni($profilefield['description']);

Zeile 1020Zeile 1026
}

if($mybb->input['action'] == "do_password" && $mybb->request_method == "post")

}

if($mybb->input['action'] == "do_password" && $mybb->request_method == "post")

{
// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


{
// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


	$errors = array();

$plugins->run_hooks("usercp_do_password_start");
if(validate_password_from_uid($mybb->user['uid'], $mybb->input['oldpassword']) == false)

	$errors = array();

$plugins->run_hooks("usercp_do_password_start");
if(validate_password_from_uid($mybb->user['uid'], $mybb->input['oldpassword']) == false)

	{

	{

		$errors[] = $lang->error_invalidpassword;
}
else

		$errors[] = $lang->error_invalidpassword;
}
else

Zeile 1036Zeile 1042
		// Set up user handler.
require_once "inc/datahandlers/user.php";
$userhandler = new UserDataHandler("update");

		// Set up user handler.
require_once "inc/datahandlers/user.php";
$userhandler = new UserDataHandler("update");





		$user = array(
"uid" => $mybb->user['uid'],
"password" => $mybb->input['password'],

		$user = array(
"uid" => $mybb->user['uid'],
"password" => $mybb->input['password'],

Zeile 1055Zeile 1061
			my_setcookie("mybbuser", $mybb->user['uid']."_".$userhandler->data['loginkey']);
$plugins->run_hooks("usercp_do_password_end");
redirect("usercp.php", $lang->redirect_passwordupdated);

			my_setcookie("mybbuser", $mybb->user['uid']."_".$userhandler->data['loginkey']);
$plugins->run_hooks("usercp_do_password_end");
redirect("usercp.php", $lang->redirect_passwordupdated);

		}
}

		}
}

	if(count($errors) > 0)

	if(count($errors) > 0)

	{

	{

			$mybb->input['action'] = "password";
$errors = inline_error($errors);

			$mybb->input['action'] = "password";
$errors = inline_error($errors);

	}
}

	}
}


if($mybb->input['action'] == "password")


if($mybb->input['action'] == "password")

{

{

	$plugins->run_hooks("usercp_password");

eval("\$editpassword = \"".$templates->get("usercp_password")."\";");

	$plugins->run_hooks("usercp_password");

eval("\$editpassword = \"".$templates->get("usercp_password")."\";");

Zeile 1076Zeile 1082
{
// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

{
// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);





	$plugins->run_hooks("usercp_do_changename_start");
if($mybb->usergroup['canchangename'] != 1)
{

	$plugins->run_hooks("usercp_do_changename_start");
if($mybb->usergroup['canchangename'] != 1)
{

Zeile 1084Zeile 1090
	}

if(validate_password_from_uid($mybb->user['uid'], $mybb->input['password']) == false)

	}

if(validate_password_from_uid($mybb->user['uid'], $mybb->input['password']) == false)

	{
$errors[] = $lang->error_invalidpassword;
}
else
{

	{
$errors[] = $lang->error_invalidpassword;
}
else
{

		// Set up user handler.
require_once "inc/datahandlers/user.php";
$userhandler = new UserDataHandler("update");

		// Set up user handler.
require_once "inc/datahandlers/user.php";
$userhandler = new UserDataHandler("update");





		$user = array(
"uid" => $mybb->user['uid'],
"username" => $mybb->input['username']

		$user = array(
"uid" => $mybb->user['uid'],
"username" => $mybb->input['username']

Zeile 1120Zeile 1126
}

if($mybb->input['action'] == "changename")

}

if($mybb->input['action'] == "changename")

{

{

	$plugins->run_hooks("usercp_changename_start");
if($mybb->usergroup['canchangename'] != 1)
{

	$plugins->run_hooks("usercp_changename_start");
if($mybb->usergroup['canchangename'] != 1)
{

Zeile 1184Zeile 1190
	if(is_moderator() == true)
{
$visible = '';

	if(is_moderator() == true)
{
$visible = '';

	}


	}


	// Do Multi Pages
$query = $db->query("
SELECT COUNT(ts.tid) as threads

	// Do Multi Pages
$query = $db->query("
SELECT COUNT(ts.tid) as threads

Zeile 1205Zeile 1211
	if($page > 0)
{
$start = ($page-1) *$perpage;

	if($page > 0)
{
$start = ($page-1) *$perpage;

	}

	}

	else
{
$start = 0;

	else
{
$start = 0;

Zeile 1217Zeile 1223
	if($upper > $threadcount)
{
$upper = $threadcount;

	if($upper > $threadcount)
{
$upper = $threadcount;

	}

	}

	$multipage = multipage($threadcount, $perpage, $page, "usercp.php?action=subscriptions");
$fpermissions = forum_permissions();


	$multipage = multipage($threadcount, $perpage, $page, "usercp.php?action=subscriptions");
$fpermissions = forum_permissions();


Zeile 1250Zeile 1256
	if(is_array($del_subscriptions))
{
$tids = implode(',', $del_subscriptions);

	if(is_array($del_subscriptions))
{
$tids = implode(',', $del_subscriptions);

 


		if($tids)
{
$db->delete_query("threadsubscriptions", "tid IN ({$tids}) AND uid='{$mybb->user['uid']}'");

		if($tids)
{
$db->delete_query("threadsubscriptions", "tid IN ({$tids}) AND uid='{$mybb->user['uid']}'");

		}








		}

$threadcount = $threadcount - count($del_subscriptions);

if($threadcount < 0)
{
$threadcount = 0;
}

	}

if(is_array($subscriptions))

	}

if(is_array($subscriptions))

Zeile 1261Zeile 1275
		$tids = implode(",", array_keys($subscriptions));

if($mybb->user['uid'] == 0)

		$tids = implode(",", array_keys($subscriptions));

if($mybb->user['uid'] == 0)

		{

		{

			// Build a forum cache.
$query = $db->query("
SELECT fid

			// Build a forum cache.
$query = $db->query("
SELECT fid

Zeile 1270Zeile 1284
				ORDER BY pid, disporder
");


				ORDER BY pid, disporder
");


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

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

		}
else
{

		}
else
{

Zeile 1283Zeile 1297
				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)

Zeile 1387Zeile 1402

if($thread['lastpost'] > $cutoff)
{


if($thread['lastpost'] > $cutoff)
{

				if($thread['lastpost'] > $cutoff)

				if($thread['lastread'])

				{

				{

					if($thread['lastread'])
{
$lastread = $thread['lastread'];
}
else
{
$lastread = 1;
}
}

					$lastread = $thread['lastread'];
}
else
{
$lastread = 1;
}




			}

if(!$lastread)

			}

if(!$lastread)

Zeile 1406Zeile 1418
				if($readcookie > $forum_read)
{
$lastread = $readcookie;

				if($readcookie > $forum_read)
{
$lastread = $readcookie;

				}

				}

				else
{
$lastread = $forum_read;
}
}


				else
{
$lastread = $forum_read;
}
}


			if($thread['lastpost'] > $lastread && $lastread)
{

			if($lastread && $lastread < $thread['lastpost'])
{

				$folder .= "new";
$folder_label .= $lang->icon_new;
$new_class = "subject_new";
$thread['newpostlink'] = get_thread_link($thread['tid'], 0, "newpost");
eval("\$gotounread = \"".$templates->get("forumdisplay_thread_gotounread")."\";");
$unreadpost = 1;

				$folder .= "new";
$folder_label .= $lang->icon_new;
$new_class = "subject_new";
$thread['newpostlink'] = get_thread_link($thread['tid'], 0, "newpost");
eval("\$gotounread = \"".$templates->get("forumdisplay_thread_gotounread")."\";");
$unreadpost = 1;

			}
else
{

			}
else
{

				$folder_label .= $lang->icon_no_new;
$new_class = "subject_old";
}

				$folder_label .= $lang->icon_no_new;
$new_class = "subject_old";
}

Zeile 1481Zeile 1493

// Provide remove options
eval("\$remove_options = \"".$templates->get("usercp_subscriptions_remove")."\";");


// Provide remove options
eval("\$remove_options = \"".$templates->get("usercp_subscriptions_remove")."\";");

	}
else
{

	}
else
{

		eval("\$threads = \"".$templates->get("usercp_subscriptions_none")."\";");
}


		eval("\$threads = \"".$templates->get("usercp_subscriptions_none")."\";");
}


Zeile 1492Zeile 1504
	eval("\$subscriptions = \"".$templates->get("usercp_subscriptions")."\";");
output_page($subscriptions);
}

	eval("\$subscriptions = \"".$templates->get("usercp_subscriptions")."\";");
output_page($subscriptions);
}

 


if($mybb->input['action'] == "forumsubscriptions")
{
$plugins->run_hooks("usercp_forumsubscriptions_start");

if($mybb->input['action'] == "forumsubscriptions")
{
$plugins->run_hooks("usercp_forumsubscriptions_start");

	$query = $db->simple_select("forumpermissions", "*", "gid='".$db->escape_string($mybb->user['usergroup'])."'");
while($permissions = $db->fetch_array($query))
{
$permissioncache[$permissions['gid']][$permissions['fid']] = $permissions;
}

 
	
if($mybb->user['uid'] == 0)
{

	
if($mybb->user['uid'] == 0)
{

Zeile 1511Zeile 1519
			ORDER BY pid, disporder
");


			ORDER BY pid, disporder
");


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

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

	}
else
{

	}
else
{

Zeile 1524Zeile 1532
			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)

Zeile 1535Zeile 1544
		}
$readforums[$forum['fid']] = $forum['lastread'];
}

		}
$readforums[$forum['fid']] = $forum['lastread'];
}

	
require_once MYBB_ROOT."inc/functions_forumlist.php";






	$fpermissions = forum_permissions();

	$fpermissions = forum_permissions();

 
	require_once MYBB_ROOT."inc/functions_forumlist.php";


	$query = $db->query("
SELECT fs.*, f.*, t.subject AS lastpostsubject, fr.dateline AS lastread
FROM ".TABLE_PREFIX."forumsubscriptions fs

	$query = $db->query("
SELECT fs.*, f.*, t.subject AS lastpostsubject, fr.dateline AS lastread
FROM ".TABLE_PREFIX."forumsubscriptions fs

Zeile 1548Zeile 1557
		WHERE f.type='f' AND fs.uid='".$mybb->user['uid']."'
ORDER BY f.name ASC
");

		WHERE f.type='f' AND fs.uid='".$mybb->user['uid']."'
ORDER BY f.name ASC
");

 


	$forums = '';
while($forum = $db->fetch_array($query))
{
$forum_url = get_forum_link($forum['fid']);
$forumpermissions = $fpermissions[$forum['fid']];

	$forums = '';
while($forum = $db->fetch_array($query))
{
$forum_url = get_forum_link($forum['fid']);
$forumpermissions = $fpermissions[$forum['fid']];

		if($forumpermissions['canview'] != 0)















if($forumpermissions['canview'] == 0)
{
continue;
}

$lightbulb = get_forum_lightbulb(array('open' => $forum['open'], 'lastread' => $forum['lastread']), array('lastpost' => $forum['lastpost']));
$folder = $lightbulb['folder'];

if($forum['lastpost'] == 0 || $forum['lastposter'] == "")
{
$lastpost = "<div align=\"center\">$lang->never</div>";
}
else

		{

		{

			$lightbulb = get_forum_lightbulb(array('open' => $forum['open'], 'lastread' => $forum['lastread']), array('lastpost' => $forum['lastpost']));
$folder = $lightbulb['folder'];
if($forum['lastpost'] == 0 || $forum['lastposter'] == "")






			$forum['lastpostsubject'] = $parser->parse_badwords($forum['lastpostsubject']);
$lastpost_date = my_date($mybb->settings['dateformat'], $forum['lastpost']);
$lastpost_time = my_date($mybb->settings['timeformat'], $forum['lastpost']);
$lastposttid = $forum['lastposttid'];
$lastposter = $forum['lastposter'];
$lastpost_profilelink = build_profile_link($lastposter, $forum['lastposteruid']);
$lastpost_subject = htmlspecialchars_uni($forum['lastpostsubject']);
if(my_strlen($lastpost_subject) > 25)

			{

			{

				$lastpost = "<div align=\"center\">$lang->never</div>";
}
else
{
$lastpost_date = my_date($mybb->settings['dateformat'], $forum['lastpost']);
$lastpost_time = my_date($mybb->settings['timeformat'], $forum['lastpost']);
$lastposttid = $forum['lastposttid'];
$lastposter = $forum['lastposter'];
$lastpost_profilelink = build_profile_link($lastposter, $forum['lastposteruid']);
$lastpost_subject = $forum['lastpostsubject'];
if(my_strlen($lastpost_subject) > 25)
{
$lastpost_subject = my_substr($lastpost_subject, 0, 25) . "...";
}
$lastpost_link = get_thread_link($forum['lastposttid'], 0, "lastpost");
eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost")."\";");

				$lastpost_subject = my_substr($lastpost_subject, 0, 25) . "...";
















			}

			}

 
			$lastpost_link = get_thread_link($forum['lastposttid'], 0, "lastpost");
eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost")."\";");

		}

		}

 


		$posts = my_number_format($forum['posts']);
$threads = my_number_format($forum['threads']);

		$posts = my_number_format($forum['posts']);
$threads = my_number_format($forum['threads']);

 


		if($mybb->settings['showdescriptions'] == 0)
{
$forum['description'] = "";
}

		if($mybb->settings['showdescriptions'] == 0)
{
$forum['description'] = "";
}

 


		eval("\$forums .= \"".$templates->get("usercp_forumsubscriptions_forum")."\";");

		eval("\$forums .= \"".$templates->get("usercp_forumsubscriptions_forum")."\";");

	}


	}


	if(!$forums)
{
eval("\$forums = \"".$templates->get("usercp_forumsubscriptions_none")."\";");
}

	if(!$forums)
{
eval("\$forums = \"".$templates->get("usercp_forumsubscriptions_none")."\";");
}

 


	$plugins->run_hooks("usercp_forumsubscriptions_end");

	$plugins->run_hooks("usercp_forumsubscriptions_end");

 


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

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

}


}


if($mybb->input['action'] == "do_editsig" && $mybb->request_method == "post")
{
// Verify incoming POST request

if($mybb->input['action'] == "do_editsig" && $mybb->request_method == "post")
{
// Verify incoming POST request

Zeile 1653Zeile 1674
	if($mybb->user['suspendsignature'] && ($mybb->user['suspendsigtime'] == 0 || $mybb->user['suspendsigtime'] > 0 && $mybb->user['suspendsigtime'] > TIME_NOW))
{
// User currently has no signature and they're suspended

	if($mybb->user['suspendsignature'] && ($mybb->user['suspendsigtime'] == 0 || $mybb->user['suspendsigtime'] > 0 && $mybb->user['suspendsigtime'] > TIME_NOW))
{
// User currently has no signature and they're suspended

 
		error($lang->sig_suspended);
}

if($mybb->usergroup['canusesig'] != 1)
{
// Usergroup has no permission to use this facility

		error_no_permission();

		error_no_permission();

 
	}
else if($mybb->usergroup['canusesig'] == 1 && $mybb->usergroup['canusesigxposts'] > 0 && $mybb->user['postnum'] < $mybb->usergroup['canusesigxposts'])
{
// Usergroup can use this facility, but only after x posts
error($lang->sprintf($lang->sig_suspended_posts, $mybb->usergroup['canusesigxposts']));

	}

if($sig && $template)

	}

if($sig && $template)

Zeile 1664Zeile 1696
			"allow_smilies" => $mybb->settings['sigsmilies'],
"allow_imgcode" => $mybb->settings['sigimgcode'],
"me_username" => $mybb->user['username'],

			"allow_smilies" => $mybb->settings['sigsmilies'],
"allow_imgcode" => $mybb->settings['sigimgcode'],
"me_username" => $mybb->user['username'],

 
			"filter_badwords" => 1

		);

$sigpreview = $parser->parse_message($sig, $sig_parser);

		);

$sigpreview = $parser->parse_message($sig, $sig_parser);

Zeile 2292Zeile 2325
	// Fetch out buddies
$buddy_count = 0;
if($mybb->user['buddylist'])

	// Fetch out buddies
$buddy_count = 0;
if($mybb->user['buddylist'])

	{

	{

		$type = "buddy";
$query = $db->simple_select("users", "*", "uid IN ({$mybb->user['buddylist']})", array("order_by" => "username"));
while($user = $db->fetch_array($query))

		$type = "buddy";
$query = $db->simple_select("users", "*", "uid IN ({$mybb->user['buddylist']})", array("order_by" => "username"));
while($user = $db->fetch_array($query))

Zeile 2408Zeile 2441
		$disable_delete_drafts = 'disabled="disabled"';
}
else

		$disable_delete_drafts = 'disabled="disabled"';
}
else

	{

	{

		eval("\$draftsubmit = \"".$templates->get("usercp_drafts_submit")."\";");
$disable_delete_drafts = '';
}

		eval("\$draftsubmit = \"".$templates->get("usercp_drafts_submit")."\";");
$disable_delete_drafts = '';
}

Zeile 2524Zeile 2557

// Joining a group
if($mybb->input['joingroup'])


// Joining a group
if($mybb->input['joingroup'])

	{

	{

		// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


		// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


Zeile 2533Zeile 2566
		$usergroup = $db->fetch_array($query);

if(($usergroup['type'] != 4 && $usergroup['type'] != 3) || !$usergroup['gid'])

		$usergroup = $db->fetch_array($query);

if(($usergroup['type'] != 4 && $usergroup['type'] != 3) || !$usergroup['gid'])

		{

		{

			error($lang->cannot_join_group);
}

if(my_strpos($ingroups, ",".intval($mybb->input['joingroup']).",") !== false)

			error($lang->cannot_join_group);
}

if(my_strpos($ingroups, ",".intval($mybb->input['joingroup']).",") !== false)

		{

		{

			error($lang->already_member_of_group);
}


			error($lang->already_member_of_group);
}


Zeile 2563Zeile 2596
			$plugins->run_hooks("usercp_usergroups_join_group_request");
redirect("usercp.php?action=usergroups", $lang->group_join_requestsent);
exit;

			$plugins->run_hooks("usercp_usergroups_join_group_request");
redirect("usercp.php?action=usergroups", $lang->group_join_requestsent);
exit;

		}

		}

		elseif($usergroup['type'] == 4)
{
$joingroup = $mybb->input['joingroup'];

		elseif($usergroup['type'] == 4)
{
$joingroup = $mybb->input['joingroup'];

Zeile 2602Zeile 2635
		case "sqlite":
$query = $db->query("
SELECT g.title, g.gid, g.type, COUNT(u.uid) AS users, COUNT(j.rid) AS joinrequests, l.canmanagerequests, l.canmanagemembers

		case "sqlite":
$query = $db->query("
SELECT g.title, g.gid, g.type, COUNT(u.uid) AS users, COUNT(j.rid) AS joinrequests, l.canmanagerequests, l.canmanagemembers

				FROM ".TABLE_PREFIX."groupleaders l
LEFT JOIN ".TABLE_PREFIX."usergroups g ON(g.gid=l.gid)

				FROM ".TABLE_PREFIX."groupleaders l
LEFT JOIN ".TABLE_PREFIX."usergroups g ON(g.gid=l.gid)

				LEFT JOIN ".TABLE_PREFIX."users u ON(((','|| u.additionalgroups|| ',' LIKE '%,'|| g.gid|| ',%') OR u.usergroup = g.gid))
LEFT JOIN ".TABLE_PREFIX."joinrequests j ON(j.gid=g.gid AND j.uid != 0)
WHERE l.uid='".$mybb->user['uid']."'
GROUP BY g.gid, g.title, g.type, l.canmanagerequests, l.canmanagemembers

				LEFT JOIN ".TABLE_PREFIX."users u ON(((','|| u.additionalgroups|| ',' LIKE '%,'|| g.gid|| ',%') OR u.usergroup = g.gid))
LEFT JOIN ".TABLE_PREFIX."joinrequests j ON(j.gid=g.gid AND j.uid != 0)
WHERE l.uid='".$mybb->user['uid']."'
GROUP BY g.gid, g.title, g.type, l.canmanagerequests, l.canmanagemembers

			");

			");

			break;
default:
$query = $db->query("

			break;
default:
$query = $db->query("

Zeile 2623Zeile 2656
	}

while($usergroup = $db->fetch_array($query))

	}

while($usergroup = $db->fetch_array($query))

	{

	{

		$memberlistlink = $moderaterequestslink = '';
$memberlistlink = " [<a href=\"managegroup.php?gid=".$usergroup['gid']."\">".$lang->view_members."</a>]";
if($usergroup['type'] != 4)

		$memberlistlink = $moderaterequestslink = '';
$memberlistlink = " [<a href=\"managegroup.php?gid=".$usergroup['gid']."\">".$lang->view_members."</a>]";
if($usergroup['type'] != 4)

Zeile 2641Zeile 2674
	if($groupsledlist)
{
eval("\$leadinggroups = \"".$templates->get("usercp_usergroups_leader")."\";");

	if($groupsledlist)
{
eval("\$leadinggroups = \"".$templates->get("usercp_usergroups_leader")."\";");

	}


	}


	// Fetch the list of groups the member is in
// Do the primary group first
$query = $db->simple_select("usergroups", "*", "gid='".$mybb->user['usergroup']."'");

	// Fetch the list of groups the member is in
// Do the primary group first
$query = $db->simple_select("usergroups", "*", "gid='".$mybb->user['usergroup']."'");

Zeile 2795Zeile 2828
if($mybb->input['action'] == "attachments")
{
$plugins->run_hooks("usercp_attachments_start");

if($mybb->input['action'] == "attachments")
{
$plugins->run_hooks("usercp_attachments_start");

	require_once MYBB_ROOT."inc/functions_upload.php";

$attachments = '';


	require_once MYBB_ROOT."inc/functions_upload.php";

$attachments = '';


	// Pagination
if(!$mybb->settings['threadsperpage'])
{

	// Pagination
if(!$mybb->settings['threadsperpage'])
{

Zeile 2839Zeile 2872
			$attachment['postlink'] = get_post_link($attachment['pid'], $attachment['tid']);
$attachment['threadlink'] = get_thread_link($attachment['tid']);
$attachment['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($attachment['threadsubject']));

			$attachment['postlink'] = get_post_link($attachment['pid'], $attachment['tid']);
$attachment['threadlink'] = get_thread_link($attachment['tid']);
$attachment['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($attachment['threadsubject']));

 


			$size = get_friendly_size($attachment['filesize']);
$icon = get_attachment_icon(get_extension($attachment['filename']));

			$size = get_friendly_size($attachment['filesize']);
$icon = get_attachment_icon(get_extension($attachment['filename']));

 
			$attachment['filename'] = htmlspecialchars_uni($attachment['filename']);


			$sizedownloads = $lang->sprintf($lang->attachment_size_downloads, $size, $attachment['downloads']);
$attachdate = my_date($mybb->settings['dateformat'], $attachment['dateline']);
$attachtime = my_date($mybb->settings['timeformat'], $attachment['dateline']);
$altbg = alt_trow();

			$sizedownloads = $lang->sprintf($lang->attachment_size_downloads, $size, $attachment['downloads']);
$attachdate = my_date($mybb->settings['dateformat'], $attachment['dateline']);
$attachtime = my_date($mybb->settings['timeformat'], $attachment['dateline']);
$altbg = alt_trow();

 


			eval("\$attachments .= \"".$templates->get("usercp_attachments_attachment")."\";");

			eval("\$attachments .= \"".$templates->get("usercp_attachments_attachment")."\";");

 


			// Add to bandwidth total
$bandwidth += ($attachment['filesize'] * $attachment['downloads']);
$totaldownloads += $attachment['downloads'];

			// Add to bandwidth total
$bandwidth += ($attachment['filesize'] * $attachment['downloads']);
$totaldownloads += $attachment['downloads'];

Zeile 2915Zeile 2953
{
// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

{
// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

 

// Cap at 60,000 chars; text will allow up to 65535?
if(my_strlen($mybb->input['notepad']) > 60000)
{
$mybb->input['notepad'] = my_substr($mybb->input['notepad'], 0, 60000);
}


$plugins->run_hooks("usercp_do_notepad_start");
$db->update_query("users", array('notepad' => $db->escape_string($mybb->input['notepad'])), "uid='".$mybb->user['uid']."'");


$plugins->run_hooks("usercp_do_notepad_start");
$db->update_query("users", array('notepad' => $db->escape_string($mybb->input['notepad'])), "uid='".$mybb->user['uid']."'");

Zeile 3155Zeile 3199
				{
$folder = '';
$folder_label = '';

				{
$folder = '';
$folder_label = '';

 
					$gotounread = '';


if($thread['tid'])
{


if($thread['tid'])
{