Vergleich usercp.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: usercp.php 5616 2011-09-20 13:24:59Z Tomm $

 * $Id$

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 1256Zeile 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 1267Zeile 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 1276Zeile 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 1289Zeile 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 1495Zeile 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)

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

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

			SELECT fid
FROM ".TABLE_PREFIX."forums
WHERE active != 0
ORDER BY pid, disporder
");


			SELECT fid
FROM ".TABLE_PREFIX."forums
WHERE active != 0
ORDER BY pid, disporder
");


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

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

	}
else
{

	}
else
{

Zeile 1526Zeile 1531
			WHERE f.active != 0
ORDER BY pid, disporder
");

			WHERE f.active != 0
ORDER BY pid, disporder
");

	}
while($forum = $db->fetch_array($query))
{


	}

while($forum = $db->fetch_array($query))
{

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

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

Zeile 1537Zeile 1543
			}
}
$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 1551Zeile 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);
}

Zeile 1678Zeile 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 1894Zeile 1913
	{
$mybb->input['action'] = "avatar";
$avatar_error = inline_error($avatar_error);

	{
$mybb->input['action'] = "avatar";
$avatar_error = inline_error($avatar_error);

	}
}

	}
}


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


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

Zeile 2025Zeile 2044
			$lang->avatar_note .= "<br />".$lang->sprintf($lang->avatar_note_dimensions, $maxwidth, $maxheight);
}
if($mybb->settings['avatarsize'])

			$lang->avatar_note .= "<br />".$lang->sprintf($lang->avatar_note_dimensions, $maxwidth, $maxheight);
}
if($mybb->settings['avatarsize'])

		{

		{

			$maxsize = get_friendly_size($mybb->settings['avatarsize']*1024);
$lang->avatar_note .= "<br />".$lang->sprintf($lang->avatar_note_size, $maxsize);
}
if($mybb->settings['avatarresizing'] == "auto")
{
$auto_resize = "<br /><span class=\"smalltext\">{$lang->avatar_auto_resize_note}</span>\n";

			$maxsize = get_friendly_size($mybb->settings['avatarsize']*1024);
$lang->avatar_note .= "<br />".$lang->sprintf($lang->avatar_note_size, $maxsize);
}
if($mybb->settings['avatarresizing'] == "auto")
{
$auto_resize = "<br /><span class=\"smalltext\">{$lang->avatar_auto_resize_note}</span>\n";

		}

		}

		else if($mybb->settings['avatarresizing'] == "user")
{
$auto_resize = "<br /><span class=\"smalltext\"><input type=\"checkbox\" name=\"auto_resize\" value=\"1\" checked=\"checked\" id=\"auto_resize\" /> <label for=\"auto_resize\">{$lang->avatar_auto_resize_option}</label></span>";

		else if($mybb->settings['avatarresizing'] == "user")
{
$auto_resize = "<br /><span class=\"smalltext\"><input type=\"checkbox\" name=\"auto_resize\" value=\"1\" checked=\"checked\" id=\"auto_resize\" /> <label for=\"auto_resize\">{$lang->avatar_auto_resize_option}</label></span>";

Zeile 2051Zeile 2070
	verify_post_check($mybb->input['my_post_key']);

$plugins->run_hooks("usercp_do_editlists_start");

	verify_post_check($mybb->input['my_post_key']);

$plugins->run_hooks("usercp_do_editlists_start");





	$existing_users = array();
$selected_list = array();
if($mybb->input['manage'] == "ignored")

	$existing_users = array();
$selected_list = array();
if($mybb->input['manage'] == "ignored")

Zeile 2102Zeile 2121
			}

if(my_strtoupper($mybb->user['username']) == my_strtoupper($username))

			}

if(my_strtoupper($mybb->user['username']) == my_strtoupper($username))

			{

			{

				$adding_self = true;
unset($users[$key]);
continue;
}
$users[$key] = $db->escape_string($username);
}

				$adding_self = true;
unset($users[$key]);
continue;
}
$users[$key] = $db->escape_string($username);
}





		// Fetch out new users
if(count($users) > 0)
{

		// Fetch out new users
if(count($users) > 0)
{

Zeile 2122Zeile 2141
				if(in_array($user['uid'], $existing_users) || in_array($user['uid'], $selected_list))
{
if($mybb->input['manage'] == "ignored")

				if(in_array($user['uid'], $existing_users) || in_array($user['uid'], $selected_list))
{
if($mybb->input['manage'] == "ignored")

					{

					{

						$error_message = "ignore";
}
else
{
$error_message = "buddy";

						$error_message = "ignore";
}
else
{
$error_message = "buddy";

					}

					}


// On another list?
$string = "users_already_on_".$error_message."_list";


// On another list?
$string = "users_already_on_".$error_message."_list";

Zeile 2180Zeile 2199
			if($error_message)
{
$error_message .= "<br />";

			if($error_message)
{
$error_message .= "<br />";

			}

			}


$error_message .= $lang->invalid_user_selected;


$error_message .= $lang->invalid_user_selected;

		}
}


		}
}


	// Removing a user from this list
else if($mybb->input['delete'])
{

	// Removing a user from this list
else if($mybb->input['delete'])
{

Zeile 2204Zeile 2223
				$message = $lang->removed_from_buddy_list;
}
$message = $lang->sprintf($message, $user['username']);

				$message = $lang->removed_from_buddy_list;
}
$message = $lang->sprintf($message, $user['username']);

		}
}


		}
}


	// Now we have the new list, so throw it all back together
$new_list = implode(",", $existing_users);


	// Now we have the new list, so throw it all back together
$new_list = implode(",", $existing_users);


Zeile 2255Zeile 2274
		if($message)
{
$message_js = "var success = document.createElement('div'); var element = \$('{$list}_list'); element.parentNode.insertBefore(success, element); success.innerHTML = '{$message}'; success.className = 'success_message'; window.setTimeout(function() { Element.remove(success) }, 5000);";

		if($message)
{
$message_js = "var success = document.createElement('div'); var element = \$('{$list}_list'); element.parentNode.insertBefore(success, element); success.innerHTML = '{$message}'; success.className = 'success_message'; window.setTimeout(function() { Element.remove(success) }, 5000);";

		}

if($error_message)
{

		}

if($error_message)
{

			$message_js .= " var error = document.createElement('div'); var element = \$('{$list}_list'); element.parentNode.insertBefore(error, element); 	error.innerHTML = '{$error_message}'; error.className = 'error_message'; window.setTimeout(function() { Element.remove(error) }, 5000);";
}


			$message_js .= " var error = document.createElement('div'); var element = \$('{$list}_list'); element.parentNode.insertBefore(error, element); 	error.innerHTML = '{$error_message}'; error.className = 'error_message'; window.setTimeout(function() { Element.remove(error) }, 5000);";
}


Zeile 2284Zeile 2303
			}
echo $message_js;
exit;

			}
echo $message_js;
exit;

		}

		}

		$mybb->input['action'] = "editlists";
}
else

		$mybb->input['action'] = "editlists";
}
else

	{

	{

		if($error_message)
{
$message .= "<br />".$error_message;

		if($error_message)
{
$message .= "<br />".$error_message;

Zeile 2300Zeile 2319
if($mybb->input['action'] == "editlists")
{
$plugins->run_hooks("usercp_editlists_start");

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





	$timecut = TIME_NOW - $mybb->settings['wolcutoff'];

// Fetch out buddies

	$timecut = TIME_NOW - $mybb->settings['wolcutoff'];

// Fetch out buddies

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

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

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

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

		{
$profile_link = build_profile_link(format_name($user['username'], $user['usergroup'], $user['displaygroup']), $user['uid']);
if($user['lastactive'] > $timecut && ($user['invisible'] == 0 || $mybb->usergroup['canviewwolinvis'] == 1) && $user['lastvisit'] != $user['lastactive'])
{
$status = "online";

		{
$profile_link = build_profile_link(format_name($user['username'], $user['usergroup'], $user['displaygroup']), $user['uid']);
if($user['lastactive'] > $timecut && ($user['invisible'] == 0 || $mybb->usergroup['canviewwolinvis'] == 1) && $user['lastvisit'] != $user['lastactive'])
{
$status = "online";

			}

			}

			else
{
$status = "offline";

			else
{
$status = "offline";

Zeile 2323Zeile 2342
			eval("\$buddy_list .= \"".$templates->get("usercp_editlists_user")."\";");
++$buddy_count;
}

			eval("\$buddy_list .= \"".$templates->get("usercp_editlists_user")."\";");
++$buddy_count;
}

	}


	}


	$lang->current_buddies = $lang->sprintf($lang->current_buddies, $buddy_count);
if(!$buddy_list)

	$lang->current_buddies = $lang->sprintf($lang->current_buddies, $buddy_count);
if(!$buddy_list)

	{

	{

		$buddy_list = "<li>{$lang->buddy_list_empty}</li>";
}

// Fetch out ignore list users
$ignore_count = 0;

		$buddy_list = "<li>{$lang->buddy_list_empty}</li>";
}

// Fetch out ignore list users
$ignore_count = 0;

	if($mybb->user['ignorelist'])
{

	if($mybb->user['ignorelist'])
{

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

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

Zeile 2410Zeile 2429
			$editurl = "newthread.php?action=editdraft&amp;tid={$draft['tid']}";
$id = $draft['tid'];
$type = "thread";

			$editurl = "newthread.php?action=editdraft&amp;tid={$draft['tid']}";
$id = $draft['tid'];
$type = "thread";

		}

		}

		$draft['subject'] = htmlspecialchars_uni($draft['subject']);
$savedate = my_date($mybb->settings['dateformat'], $draft['dateline']);
$savetime = my_date($mybb->settings['timeformat'], $draft['dateline']);

		$draft['subject'] = htmlspecialchars_uni($draft['subject']);
$savedate = my_date($mybb->settings['dateformat'], $draft['dateline']);
$savetime = my_date($mybb->settings['timeformat'], $draft['dateline']);

Zeile 2435Zeile 2454
	
eval("\$draftlist = \"".$templates->get("usercp_drafts")."\";");
output_page($draftlist);

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





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

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

Zeile 2444Zeile 2463

$plugins->run_hooks("usercp_do_drafts_start");
if(!$mybb->input['deletedraft'])


$plugins->run_hooks("usercp_do_drafts_start");
if(!$mybb->input['deletedraft'])

	{

	{

		error($lang->no_drafts_selected);
}
$pidin = array();

		error($lang->no_drafts_selected);
}
$pidin = array();

Zeile 2454Zeile 2473
		if($val == "post")
{
$pidin[] = "'".intval($id)."'";

		if($val == "post")
{
$pidin[] = "'".intval($id)."'";

		}

		}

		elseif($val == "thread")
{
$tidin[] = "'".intval($id)."'";
}
}
if($tidin)

		elseif($val == "thread")
{
$tidin[] = "'".intval($id)."'";
}
}
if($tidin)

	{

	{

		$tidin = implode(",", $tidin);
$db->delete_query("threads", "tid IN ($tidin) AND visible='-2' AND uid='".$mybb->user['uid']."'");
$tidinp = "OR tid IN ($tidin)";

		$tidin = implode(",", $tidin);
$db->delete_query("threads", "tid IN ($tidin) AND visible='-2' AND uid='".$mybb->user['uid']."'");
$tidinp = "OR tid IN ($tidin)";

Zeile 2486Zeile 2505
{
$plugins->run_hooks("usercp_usergroups_start");
$ingroups = ",".$mybb->user['usergroup'].",".$mybb->user['additionalgroups'].",".$mybb->user['displaygroup'].",";

{
$plugins->run_hooks("usercp_usergroups_start");
$ingroups = ",".$mybb->user['usergroup'].",".$mybb->user['additionalgroups'].",".$mybb->user['displaygroup'].",";





	// Changing our display group
if($mybb->input['displaygroup'])

	// Changing our display group
if($mybb->input['displaygroup'])

	{
// Verify incoming POST request

	{
// Verify incoming POST request

		verify_post_check($mybb->input['my_post_key']);

if(my_strpos($ingroups, ",".$mybb->input['displaygroup'].",") === false)
{
error($lang->not_member_of_group);

		verify_post_check($mybb->input['my_post_key']);

if(my_strpos($ingroups, ",".$mybb->input['displaygroup'].",") === false)
{
error($lang->not_member_of_group);

		}

		}

		$query = $db->simple_select("usergroups", "*", "gid='".intval($mybb->input['displaygroup'])."'");
$dispgroup = $db->fetch_array($query);
if($dispgroup['candisplaygroup'] != 1)

		$query = $db->simple_select("usergroups", "*", "gid='".intval($mybb->input['displaygroup'])."'");
$dispgroup = $db->fetch_array($query);
if($dispgroup['candisplaygroup'] != 1)

Zeile 2512Zeile 2531

// Leaving a group
if($mybb->input['leavegroup'])


// Leaving a group
if($mybb->input['leavegroup'])

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


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


		if(my_strpos($ingroups, ",".$mybb->input['leavegroup'].",") === false)
{
error($lang->not_member_of_group);

		if(my_strpos($ingroups, ",".$mybb->input['leavegroup'].",") === false)
{
error($lang->not_member_of_group);

Zeile 2853Zeile 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 2881Zeile 2905
		$percent = round(($totalusage/($mybb->usergroup['attachquota']*1024))*100)."%";
$attachquota = get_friendly_size($mybb->usergroup['attachquota']*1024);
$usagenote = $lang->sprintf($lang->attachments_usage_quota, $friendlyusage, $attachquota, $percent, $totalattachments);

		$percent = round(($totalusage/($mybb->usergroup['attachquota']*1024))*100)."%";
$attachquota = get_friendly_size($mybb->usergroup['attachquota']*1024);
$usagenote = $lang->sprintf($lang->attachments_usage_quota, $friendlyusage, $attachquota, $percent, $totalattachments);

	}

	}

	else
{
$percent = $lang->unlimited;

	else
{
$percent = $lang->unlimited;

Zeile 2929Zeile 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']."'");