Vergleich usercp.php - 1.8.21 - 1.8.24

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 42Zeile 42
if($mybb->user['uid'] == 0 || $mybb->usergroup['canusercp'] == 0)
{
error_no_permission();

if($mybb->user['uid'] == 0 || $mybb->usergroup['canusercp'] == 0)
{
error_no_permission();

}

if(!$mybb->user['pmfolders'])
{
$mybb->user['pmfolders'] = '1**$%%$2**$%%$3**$%%$4**';
$db->update_query('users', array('pmfolders' => $mybb->user['pmfolders']), "uid = {$mybb->user['uid']}");

 
}

$errors = '';


}

$errors = '';


$mybb->input['action'] = $mybb->get_input('action');


$mybb->input['action'] = $mybb->get_input('action');


usercp_menu();

usercp_menu();





$server_http_referer = htmlentities($_SERVER['HTTP_REFERER']);

$server_http_referer = htmlentities($_SERVER['HTTP_REFERER']);

 

if(my_strpos($server_http_referer, $mybb->settings['bburl'].'/') !== 0)
{
if(my_strpos($server_http_referer, '/') === 0)
{
$server_http_referer = my_substr($server_http_referer, 1);
}
$url_segments = explode('/', $server_http_referer);
$server_http_referer = $mybb->settings['bburl'].'/'.end($url_segments);
}


$plugins->run_hooks("usercp_start");
if($mybb->input['action'] == "do_editsig" && $mybb->request_method == "post")


$plugins->run_hooks("usercp_start");
if($mybb->input['action'] == "do_editsig" && $mybb->request_method == "post")

Zeile 144Zeile 148
{
// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));

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

 

$user = array();


$plugins->run_hooks("usercp_do_profile_start");



$plugins->run_hooks("usercp_do_profile_start");


Zeile 207Zeile 213
	require_once MYBB_ROOT."inc/datahandlers/user.php";
$userhandler = new UserDataHandler("update");


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


	$user = array(

	$user = array_merge($user, array(

		"uid" => $mybb->user['uid'],
"postnum" => $mybb->user['postnum'],
"usergroup" => $mybb->user['usergroup'],

		"uid" => $mybb->user['uid'],
"postnum" => $mybb->user['postnum'],
"usergroup" => $mybb->user['usergroup'],

Zeile 216Zeile 222
		"birthdayprivacy" => $mybb->get_input('birthdayprivacy'),
"away" => $away,
"profile_fields" => $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY)

		"birthdayprivacy" => $mybb->get_input('birthdayprivacy'),
"away" => $away,
"profile_fields" => $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY)

	);
foreach(array('icq', 'yahoo', 'skype', 'google') as $cfield)
{
$csetting = 'allow'.$cfield.'field';
if($mybb->settings[$csetting] == '')
{
continue;
}

if(!is_member($mybb->settings[$csetting]))
{
continue;
}


	));
foreach(array('icq', 'skype', 'google') as $cfield)
{
$csetting = 'allow'.$cfield.'field';
if($mybb->settings[$csetting] == '')
{
continue;
}

if(!is_member($mybb->settings[$csetting]))
{
continue;
}


		if($cfield == 'icq')

		if($cfield == 'icq')

		{

		{

			$user[$cfield] = $mybb->get_input($cfield, 1);

			$user[$cfield] = $mybb->get_input($cfield, 1);

 

if(my_strlen($user[$cfield]) > 10)
{
error($lang->contact_field_icqerror);
}

		}
else
{
$user[$cfield] = $mybb->get_input($cfield);

		}
else
{
$user[$cfield] = $mybb->get_input($cfield);

 

if(my_strlen($user[$cfield]) > 75)
{
error($lang->contact_field_error);
}

		}
}


		}
}


Zeile 366Zeile 382
	{
$user['skype'] = htmlspecialchars_uni($user['skype']);
$user['google'] = htmlspecialchars_uni($user['google']);

	{
$user['skype'] = htmlspecialchars_uni($user['skype']);
$user['google'] = htmlspecialchars_uni($user['google']);

		$user['yahoo'] = htmlspecialchars_uni($user['yahoo']);

 
	}

$contact_fields = array();
$contactfields = '';
$cfieldsshow = false;


	}

$contact_fields = array();
$contactfields = '';
$cfieldsshow = false;


	foreach(array('icq', 'yahoo', 'skype', 'google') as $cfield)

	foreach(array('icq', 'skype', 'google') as $cfield)

	{
$contact_fields[$cfield] = '';
$csetting = 'allow'.$cfield.'field';

	{
$contact_fields[$cfield] = '';
$csetting = 'allow'.$cfield.'field';

Zeile 407Zeile 422
		if($errors)
{
if($user['away'] == 1)

		if($errors)
{
if($user['away'] == 1)

			{
$awaycheck[1] = "checked=\"checked\"";
}
else
{

			{
$awaycheck[1] = "checked=\"checked\"";
}
else
{

				$awaycheck[0] = "checked=\"checked\"";
}
$returndate = array();

				$awaycheck[0] = "checked=\"checked\"";
}
$returndate = array();

Zeile 528Zeile 543
					foreach($useropts as $key => $val)
{
$val = htmlspecialchars_uni($val);

					foreach($useropts as $key => $val)
{
$val = htmlspecialchars_uni($val);

						$seloptions[$val] = $val;
}
}
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)
{
$val = trim($val);

						$seloptions[$val] = $val;
}
}
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)
{
$val = trim($val);

						$val = str_replace("\n", "\\n", $val);

$sel = "";
if(isset($seloptions[$val]) && $val == $seloptions[$val])

						$val = str_replace("\n", "\\n", $val);

$sel = "";
if(isset($seloptions[$val]) && $val == $seloptions[$val])

						{

						{

							$sel = " selected=\"selected\"";
}


							$sel = " selected=\"selected\"";
}


Zeile 568Zeile 583
						if($val == htmlspecialchars_uni($userfield))
{
$sel = " selected=\"selected\"";

						if($val == htmlspecialchars_uni($userfield))
{
$sel = " selected=\"selected\"";

						}

						}


eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
}
if(!$profilefield['length'])


eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
}
if(!$profilefield['length'])

					{

					{

						$profilefield['length'] = 1;
}


						$profilefield['length'] = 1;
}


Zeile 581Zeile 596
				}
}
elseif($type == "radio")

				}
}
elseif($type == "radio")

			{
$userfield = htmlspecialchars_uni($userfield);

			{
$userfield = htmlspecialchars_uni($userfield);

				$expoptions = explode("\n", $options);
if(is_array($expoptions))
{

				$expoptions = explode("\n", $options);
if(is_array($expoptions))
{

Zeile 604Zeile 619
				if($errors)
{
$useropts = $userfield;

				if($errors)
{
$useropts = $userfield;

				}

				}

				else
{
$useropts = explode("\n", $userfield);

				else
{
$useropts = explode("\n", $userfield);

Zeile 614Zeile 629
					foreach($useropts as $key => $val)
{
$seloptions[$val] = $val;

					foreach($useropts as $key => $val)
{
$seloptions[$val] = $val;

					}

					}

				}
$expoptions = explode("\n", $options);
if(is_array($expoptions))

				}
$expoptions = explode("\n", $options);
if(is_array($expoptions))

Zeile 632Zeile 647
				}
}
elseif($type == "textarea")

				}
}
elseif($type == "textarea")

			{

			{

				$value = htmlspecialchars_uni($userfield);
eval("\$code = \"".$templates->get("usercp_profile_profilefields_textarea")."\";");
}

				$value = htmlspecialchars_uni($userfield);
eval("\$code = \"".$templates->get("usercp_profile_profilefields_textarea")."\";");
}

Zeile 641Zeile 656
				$value = htmlspecialchars_uni($userfield);
$maxlength = "";
if($profilefield['maxlength'] > 0)

				$value = htmlspecialchars_uni($userfield);
$maxlength = "";
if($profilefield['maxlength'] > 0)

				{

				{

					$maxlength = " maxlength=\"{$profilefield['maxlength']}\"";
}

eval("\$code = \"".$templates->get("usercp_profile_profilefields_text")."\";");

					$maxlength = " maxlength=\"{$profilefield['maxlength']}\"";
}

eval("\$code = \"".$templates->get("usercp_profile_profilefields_text")."\";");

			}

			}


if($profilefield['required'] == 1)
{


if($profilefield['required'] == 1)
{

Zeile 677Zeile 692
		{
$defaulttitle = '';
$usertitles = $cache->read('usertitles');

		{
$defaulttitle = '';
$usertitles = $cache->read('usertitles');





			foreach($usertitles as $title)
{
if($title['posts'] <= $mybb->user['postnum'])

			foreach($usertitles as $title)
{
if($title['posts'] <= $mybb->user['postnum'])

Zeile 741Zeile 756
{
// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));

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

 

$user = array();


$plugins->run_hooks("usercp_do_options_start");



$plugins->run_hooks("usercp_do_options_start");


Zeile 748Zeile 765
	require_once MYBB_ROOT."inc/datahandlers/user.php";
$userhandler = new UserDataHandler("update");


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


	$user = array(

	$user = array_merge($user, array(

		"uid" => $mybb->user['uid'],
"style" => $mybb->get_input('style', MyBB::INPUT_INT),
"dateformat" => $mybb->get_input('dateformat', MyBB::INPUT_INT),

		"uid" => $mybb->user['uid'],
"style" => $mybb->get_input('style', MyBB::INPUT_INT),
"dateformat" => $mybb->get_input('dateformat', MyBB::INPUT_INT),

Zeile 757Zeile 774
		"language" => $mybb->get_input('language'),
'usergroup' => $mybb->user['usergroup'],
'additionalgroups' => $mybb->user['additionalgroups']

		"language" => $mybb->get_input('language'),
'usergroup' => $mybb->user['usergroup'],
'additionalgroups' => $mybb->user['additionalgroups']

	);

	));


$user['options'] = array(
"allownotices" => $mybb->get_input('allownotices', MyBB::INPUT_INT),


$user['options'] = array(
"allownotices" => $mybb->get_input('allownotices', MyBB::INPUT_INT),

Zeile 787Zeile 804
	if($mybb->settings['usertppoptions'])
{
$user['options']['tpp'] = $mybb->get_input('tpp', MyBB::INPUT_INT);

	if($mybb->settings['usertppoptions'])
{
$user['options']['tpp'] = $mybb->get_input('tpp', MyBB::INPUT_INT);

	}

	}


if($mybb->settings['userpppoptions'])
{
$user['options']['ppp'] = $mybb->get_input('ppp', MyBB::INPUT_INT);


if($mybb->settings['userpppoptions'])
{
$user['options']['ppp'] = $mybb->get_input('ppp', MyBB::INPUT_INT);

	}

	}


$userhandler->set_data($user);



$userhandler->set_data($user);


Zeile 801Zeile 818
		$errors = $userhandler->get_friendly_errors();
$errors = inline_error($errors);
$mybb->input['action'] = "options";

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

	}

	}

	else
{
$userhandler->update_user();

	else
{
$userhandler->update_user();





		$plugins->run_hooks("usercp_do_options_end");

redirect("usercp.php?action=options", $lang->redirect_optionsupdated);

		$plugins->run_hooks("usercp_do_options_end");

redirect("usercp.php?action=options", $lang->redirect_optionsupdated);

Zeile 814Zeile 831

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


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

	$plugins->run_hooks("usercp_options_start");


 
	if($errors != '')
{
$user = $mybb->input;

	if($errors != '')
{
$user = $mybb->input;

	}

	}

	else
{
$user = $mybb->user;
}

	else
{
$user = $mybb->user;
}

 

$plugins->run_hooks("usercp_options_start");


$languages = $lang->get_languages();
$board_language = $langoptions = '';


$languages = $lang->get_languages();
$board_language = $langoptions = '';

Zeile 1309Zeile 1326
	// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


	// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


 
	$user = array();

	$errors = array();

	$errors = array();





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

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

Zeile 1322Zeile 1340
		require_once MYBB_ROOT."inc/datahandlers/user.php";
$userhandler = new UserDataHandler("update");


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


		$user = array(

		$user = array_merge($user, array(

			"uid" => $mybb->user['uid'],
"password" => $mybb->get_input('password'),
"password2" => $mybb->get_input('password2')

			"uid" => $mybb->user['uid'],
"password" => $mybb->get_input('password'),
"password2" => $mybb->get_input('password2')

		);

$userhandler->set_data($user);

if(!$userhandler->validate_user())
{
$errors = $userhandler->get_friendly_errors();

		));

$userhandler->set_data($user);

if(!$userhandler->validate_user())
{
$errors = $userhandler->get_friendly_errors();

		}
else
{

		}
else
{

Zeile 1368Zeile 1386
	// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


	// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


	$plugins->run_hooks("usercp_do_changename_start");


	$errors = array();


	if($mybb->usergroup['canchangename'] != 1)

	if($mybb->usergroup['canchangename'] != 1)

	{

	{

		error_no_permission();
}

		error_no_permission();
}

 

$user = array();

$plugins->run_hooks("usercp_do_changename_start");


if(validate_password_from_uid($mybb->user['uid'], $mybb->get_input('password')) == false)
{
$errors[] = $lang->error_invalidpassword;


if(validate_password_from_uid($mybb->user['uid'], $mybb->get_input('password')) == false)
{
$errors[] = $lang->error_invalidpassword;

	}
else

	}
else

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


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


		$user = array(

		$user = array_merge($user, array(

			"uid" => $mybb->user['uid'],
"username" => $mybb->get_input('username')

			"uid" => $mybb->user['uid'],
"username" => $mybb->get_input('username')

		);

		));


$userhandler->set_data($user);

if(!$userhandler->validate_user())


$userhandler->set_data($user);

if(!$userhandler->validate_user())

		{

		{

			$errors = $userhandler->get_friendly_errors();

			$errors = $userhandler->get_friendly_errors();

		}

		}

		else
{
$userhandler->update_user();
$plugins->run_hooks("usercp_do_changename_end");
redirect("usercp.php?action=changename", $lang->redirect_namechanged);

		else
{
$userhandler->update_user();
$plugins->run_hooks("usercp_do_changename_end");
redirect("usercp.php?action=changename", $lang->redirect_namechanged);


}

		}


	}
if(count($errors) > 0)
{
$errors = inline_error($errors);
$mybb->input['action'] = "changename";

	}
if(count($errors) > 0)
{
$errors = inline_error($errors);
$mybb->input['action'] = "changename";

	}

	}

}

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

}

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

	{

	{

		error_no_permission();

		error_no_permission();

 
	}

// Coming back to this page after one or more errors were experienced, show field the user previously entered (with the exception of the password)
if($errors)
{
$username = htmlspecialchars_uni($mybb->get_input('username'));
}
else
{
$username = '';

	}

$plugins->run_hooks("usercp_changename_end");

	}

$plugins->run_hooks("usercp_changename_end");

Zeile 1428Zeile 1460
{
// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));

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


$plugins->run_hooks("usercp_do_subscriptions_start");

 

if(!isset($mybb->input['check']) || !is_array($mybb->input['check']))
{
error($lang->no_subscriptions_selected);


if(!isset($mybb->input['check']) || !is_array($mybb->input['check']))
{
error($lang->no_subscriptions_selected);

	}



	}

$plugins->run_hooks("usercp_do_subscriptions_start");


// Clean input - only accept integers thanks!
$mybb->input['check'] = array_map('intval', $mybb->get_input('check', MyBB::INPUT_ARRAY));


// Clean input - only accept integers thanks!
$mybb->input['check'] = array_map('intval', $mybb->get_input('check', MyBB::INPUT_ARRAY));

Zeile 1442Zeile 1474

// Deleting these subscriptions?
if($mybb->get_input('do') == "delete")


// Deleting these subscriptions?
if($mybb->get_input('do') == "delete")

	{

	{

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

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

	{

	{

		if($mybb->get_input('do') == "no_notification")
{
$new_notification = 0;

		if($mybb->get_input('do') == "no_notification")
{
$new_notification = 0;

Zeile 1490Zeile 1522
	");
$threadcount = $db->fetch_field($query, "threads");


	");
$threadcount = $db->fetch_field($query, "threads");


	if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1)
{
$mybb->settings['threadsperpage'] = 20;
}


	if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1)
{
$mybb->settings['threadsperpage'] = 20;
}


	$perpage = $mybb->settings['threadsperpage'];
$page = $mybb->get_input('page', MyBB::INPUT_INT);
if($page > 0)

	$perpage = $mybb->settings['threadsperpage'];
$page = $mybb->get_input('page', MyBB::INPUT_INT);
if($page > 0)

Zeile 1606Zeile 1638
		}

$icon_cache = $cache->read("posticons");

		}

$icon_cache = $cache->read("posticons");

		$threadprefixes = build_prefixes();


		$threadprefixes = build_prefixes();


		$threads = '';

// Now we can build our subscription list
foreach($subscriptions as $thread)
{
$bgcolor = alt_trow();

		$threads = '';

// Now we can build our subscription list
foreach($subscriptions as $thread)
{
$bgcolor = alt_trow();





			$folder = '';
$prefix = '';
$thread['threadprefix'] = '';

// If this thread has a prefix, insert a space between prefix and subject
if($thread['prefix'] != 0 && !empty($threadprefixes[$thread['prefix']]))

			$folder = '';
$prefix = '';
$thread['threadprefix'] = '';

// If this thread has a prefix, insert a space between prefix and subject
if($thread['prefix'] != 0 && !empty($threadprefixes[$thread['prefix']]))

			{

			{

				$thread['threadprefix'] = $threadprefixes[$thread['prefix']]['displaystyle'].'&nbsp;';
}

// Sanitize
$thread['subject'] = $parser->parse_badwords($thread['subject']);
$thread['subject'] = htmlspecialchars_uni($thread['subject']);

				$thread['threadprefix'] = $threadprefixes[$thread['prefix']]['displaystyle'].'&nbsp;';
}

// Sanitize
$thread['subject'] = $parser->parse_badwords($thread['subject']);
$thread['subject'] = htmlspecialchars_uni($thread['subject']);





			// Build our links
$thread['threadlink'] = get_thread_link($thread['tid']);
$thread['lastpostlink'] = get_thread_link($thread['tid'], 0, "lastpost");

// Fetch the thread icon if we have one
if($thread['icon'] > 0 && $icon_cache[$thread['icon']])

			// Build our links
$thread['threadlink'] = get_thread_link($thread['tid']);
$thread['lastpostlink'] = get_thread_link($thread['tid'], 0, "lastpost");

// Fetch the thread icon if we have one
if($thread['icon'] > 0 && $icon_cache[$thread['icon']])

			{

			{

				$icon = $icon_cache[$thread['icon']];
$icon['path'] = str_replace("{theme}", $theme['imgdir'], $icon['path']);
$icon['path'] = htmlspecialchars_uni($icon['path']);

				$icon = $icon_cache[$thread['icon']];
$icon['path'] = str_replace("{theme}", $theme['imgdir'], $icon['path']);
$icon['path'] = htmlspecialchars_uni($icon['path']);

Zeile 1656Zeile 1688
				$folder = "dot_";
$folder_label .= $lang->icon_dot;
}

				$folder = "dot_";
$folder_label .= $lang->icon_dot;
}





			$gotounread = '';
$isnew = 0;
$donenew = 0;
$lastread = 0;

if($mybb->settings['threadreadcut'] > 0)

			$gotounread = '';
$isnew = 0;
$donenew = 0;
$lastread = 0;

if($mybb->settings['threadreadcut'] > 0)

			{

			{

				$forum_read = $readforums[$thread['fid']];

$read_cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;

				$forum_read = $readforums[$thread['fid']];

$read_cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;

Zeile 1774Zeile 1806
					break;
default: // No notification
$notification_type = $lang->no_notification;

					break;
default: // No notification
$notification_type = $lang->no_notification;

			}


			}


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


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


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

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

		}

		}


if($mybb->settings['showdescriptions'] == 0)
{


if($mybb->settings['showdescriptions'] == 0)
{

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

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

	}


	}


	$plugins->run_hooks("usercp_forumsubscriptions_end");

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

	$plugins->run_hooks("usercp_forumsubscriptions_end");

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

Zeile 1915Zeile 1947

$thread = get_thread($mybb->get_input('tid'));
if(!$thread || $thread['visible'] == -1)


$thread = get_thread($mybb->get_input('tid'));
if(!$thread || $thread['visible'] == -1)

	{

	{

		error($lang->error_invalidthread);
}


		error($lang->error_invalidthread);
}


Zeile 1936Zeile 1968

// check if the forum requires a password to view. If so, we need to show a form to the user
check_forum_password($thread['fid']);


// check if the forum requires a password to view. If so, we need to show a form to the user
check_forum_password($thread['fid']);





	// Naming of the hook retained for backward compatibility while dropping usercp2.php
$plugins->run_hooks("usercp2_do_addsubscription");

	// Naming of the hook retained for backward compatibility while dropping usercp2.php
$plugins->run_hooks("usercp2_do_addsubscription");





	add_subscribed_thread($thread['tid'], $mybb->get_input('notification', MyBB::INPUT_INT));

	add_subscribed_thread($thread['tid'], $mybb->get_input('notification', MyBB::INPUT_INT));





	if($mybb->get_input('referrer'))
{

	if($mybb->get_input('referrer'))
{

		$url = htmlspecialchars_uni($mybb->get_input('referrer'));













		$mybb->input['referrer'] = $mybb->get_input('referrer');

if(my_strpos($mybb->input['referrer'], $mybb->settings['bburl'].'/') !== 0)
{
if(my_strpos($mybb->input['referrer'], '/') === 0)
{
$mybb->input['referrer'] = my_substr($mybb->input['url'], 1);
}
$url_segments = explode('/', $mybb->input['referrer']);
$mybb->input['referrer'] = $mybb->settings['bburl'].'/'.end($url_segments);
}

$url = htmlspecialchars_uni($mybb->input['referrer']);

	}
else
{

	}
else
{

Zeile 2052Zeile 2096
	}
}


	}
}


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

if($mybb->input['action'] == "removesubscription" && ($mybb->request_method == "post" || verify_post_check($mybb->get_input('my_post_key'), true)))

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

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


if($mybb->get_input('type') == "forum")
{
$forum = get_forum($mybb->get_input('fid', MyBB::INPUT_INT));
if(!$forum)
{
error($lang->error_invalidforum);
}



if($mybb->get_input('type') == "forum")
{
$forum = get_forum($mybb->get_input('fid', MyBB::INPUT_INT));
if(!$forum)
{
error($lang->error_invalidforum);
}


		// check if the forum requires a password to view. If so, we need to show a form to the user
check_forum_password($forum['fid']);

// Naming of the hook retained for backward compatibility while dropping usercp2.php
$plugins->run_hooks("usercp2_removesubscription_forum");

		// check if the forum requires a password to view. If so, we need to show a form to the user
check_forum_password($forum['fid']);

// Naming of the hook retained for backward compatibility while dropping usercp2.php
$plugins->run_hooks("usercp2_removesubscription_forum");





		remove_subscribed_forum($forum['fid']);
if($server_http_referer && $mybb->request_method != 'post')
{
$url = $server_http_referer;

		remove_subscribed_forum($forum['fid']);
if($server_http_referer && $mybb->request_method != 'post')
{
$url = $server_http_referer;

		}
else



























































		}
else
{
$url = "usercp.php?action=forumsubscriptions";
}
redirect($url, $lang->redirect_forumsubscriptionremoved);
}
else
{
$thread = get_thread($mybb->get_input('tid', MyBB::INPUT_INT));
if(!$thread)
{
error($lang->error_invalidthread);
}

// Is the currently logged in user a moderator of this forum?
$ismod = is_moderator($thread['fid']);

// Make sure we are looking at a real thread here.
if(($thread['visible'] != 1 && $ismod == false) || ($thread['visible'] > 1 && $ismod == true))
{
error($lang->error_invalidthread);
}

// check if the forum requires a password to view. If so, we need to show a form to the user
check_forum_password($thread['fid']);

// Naming of the hook retained for backward compatibility while dropping usercp2.php
$plugins->run_hooks("usercp2_removesubscription_thread");

remove_subscribed_thread($thread['tid']);
if($server_http_referer && $mybb->request_method != 'post')
{
$url = $server_http_referer;
}
else
{
$url = "usercp.php?action=subscriptions";
}
redirect($url, $lang->redirect_subscriptionremoved);
}
}

// Show remove subscription form when GET method and without valid my_post_key
if($mybb->input['action'] == "removesubscription")
{
$referrer = '';
if($mybb->get_input('type') == "forum")
{
$forum = get_forum($mybb->get_input('fid', MyBB::INPUT_INT));
if(!$forum)
{
error($lang->error_invalidforum);
}

add_breadcrumb($lang->nav_forumsubscriptions, "usercp.php?action=forumsubscriptions");
add_breadcrumb($lang->nav_removesubscription);

$forumpermissions = forum_permissions($forum['fid']);
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0)

		{

		{

			$url = "usercp.php?action=forumsubscriptions";

			error_no_permission();

		}

		}

		redirect($url, $lang->redirect_forumsubscriptionremoved);













// check if the forum requires a password to view. If so, we need to show a form to the user
check_forum_password($forum['fid']);

$lang->unsubscribe_from_forum = $lang->sprintf($lang->unsubscribe_from_forum, $forum['name']);

// Naming of the hook retained for backward compatibility while dropping usercp2.php
$plugins->run_hooks("usercp2_removesubscription_display_forum");

eval("\$remove_forum_subscription = \"".$templates->get("usercp_removesubscription_forum")."\";");
output_page($remove_forum_subscription);
exit;

	}
else
{

	}
else
{

		$thread = get_thread($mybb->get_input('tid', MyBB::INPUT_INT));
if(!$thread)
{
error($lang->error_invalidthread);
}

		$thread  = get_thread($mybb->get_input('tid', MyBB::INPUT_INT));
if(!$thread || $thread['visible'] == -1)
{
error($lang->error_invalidthread);
}


// Is the currently logged in user a moderator of this forum?
$ismod = is_moderator($thread['fid']);


// Is the currently logged in user a moderator of this forum?
$ismod = is_moderator($thread['fid']);

Zeile 2097Zeile 2210
		if(($thread['visible'] != 1 && $ismod == false) || ($thread['visible'] > 1 && $ismod == true))
{
error($lang->error_invalidthread);

		if(($thread['visible'] != 1 && $ismod == false) || ($thread['visible'] > 1 && $ismod == true))
{
error($lang->error_invalidthread);

 
		}

add_breadcrumb($lang->nav_subthreads, "usercp.php?action=subscriptions");
add_breadcrumb($lang->nav_removesubscription);

$forumpermissions = forum_permissions($thread['fid']);
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0 || (isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] != 0 && $thread['uid'] != $mybb->user['uid']))
{
error_no_permission();

		}

// check if the forum requires a password to view. If so, we need to show a form to the user

		}

// check if the forum requires a password to view. If so, we need to show a form to the user

		check_forum_password($thread['fid']);

// Naming of the hook retained for backward compatibility while dropping usercp2.php
$plugins->run_hooks("usercp2_removesubscription_thread");

remove_subscribed_thread($thread['tid']);
if($server_http_referer && $mybb->request_method != 'post')
{
$url = $server_http_referer;
}
else
{
$url = "usercp.php?action=subscriptions";
}
redirect($url, $lang->redirect_subscriptionremoved);
}

		check_forum_password($thread['fid']);

require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser;
$thread['subject'] = $parser->parse_badwords($thread['subject']);
$thread['subject'] = htmlspecialchars_uni($thread['subject']);
$lang->unsubscribe_from_thread = $lang->sprintf($lang->unsubscribe_from_thread, $thread['subject']);

// Naming of the hook retained for backward compatibility while dropping usercp2.php
$plugins->run_hooks("usercp2_removesubscription_display_thread");

eval("\$remove_thread_subscription = \"".$templates->get("usercp_removesubscription_thread")."\";");
output_page($remove_thread_subscription);
exit;
}


}

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

}

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

Zeile 2129Zeile 2250
		$plugins->run_hooks("usercp2_removesubscriptions_forum");

$db->delete_query("forumsubscriptions", "uid='".$mybb->user['uid']."'");

		$plugins->run_hooks("usercp2_removesubscriptions_forum");

$db->delete_query("forumsubscriptions", "uid='".$mybb->user['uid']."'");

		if($server_http_referer)
{
$url = $server_http_referer;

		if($server_http_referer)
{
$url = $server_http_referer;

		}
else
{

		}
else
{

Zeile 2148Zeile 2269
		if($server_http_referer)
{
$url = $server_http_referer;

		if($server_http_referer)
{
$url = $server_http_referer;

		}
else

		}
else

		{
$url = "usercp.php?action=subscriptions";
}
redirect($url, $lang->redirect_subscriptionsremoved);

		{
$url = "usercp.php?action=subscriptions";
}
redirect($url, $lang->redirect_subscriptionsremoved);

	}
}


	}
}


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

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


$plugins->run_hooks("usercp_do_editsig_start");

 

// User currently has a suspended signature
if($mybb->user['suspendsignature'] == 1 && $mybb->user['suspendsigtime'] > TIME_NOW)
{
error_no_permission();


// User currently has a suspended signature
if($mybb->user['suspendsignature'] == 1 && $mybb->user['suspendsigtime'] > TIME_NOW)
{
error_no_permission();

	}



	}

$plugins->run_hooks("usercp_do_editsig_start");


if($mybb->get_input('updateposts') == "enable")
{
$update_signature = array(
"includesig" => 1


if($mybb->get_input('updateposts') == "enable")
{
$update_signature = array(
"includesig" => 1

		);

		);

		$db->update_query("posts", $update_signature, "uid='".$mybb->user['uid']."'");
}
elseif($mybb->get_input('updateposts') == "disable")

		$db->update_query("posts", $update_signature, "uid='".$mybb->user['uid']."'");
}
elseif($mybb->get_input('updateposts') == "disable")

Zeile 2197Zeile 2318
{
$plugins->run_hooks("usercp_editsig_start");
if(!empty($mybb->input['preview']) && empty($error))

{
$plugins->run_hooks("usercp_editsig_start");
if(!empty($mybb->input['preview']) && empty($error))

	{
$sig = $mybb->get_input('signature');

	{
$sig = $mybb->get_input('signature');

		$template = "usercp_editsig_preview";
}
elseif(empty($error))

		$template = "usercp_editsig_preview";
}
elseif(empty($error))

Zeile 2294Zeile 2415
		if($mybb->settings['sigimgcode'] == 1)
{
$sigimgcode = $lang->on;

		if($mybb->settings['sigimgcode'] == 1)
{
$sigimgcode = $lang->on;

		}
else

		}
else

		{
$sigimgcode = $lang->off;
}
$sig = htmlspecialchars_uni($sig);
$lang->edit_sig_note2 = $lang->sprintf($lang->edit_sig_note2, $sigsmilies, $sigmycode, $sigimgcode, $sightml, $mybb->settings['siglength']);

		{
$sigimgcode = $lang->off;
}
$sig = htmlspecialchars_uni($sig);
$lang->edit_sig_note2 = $lang->sprintf($lang->edit_sig_note2, $sigsmilies, $sigmycode, $sigimgcode, $sightml, $mybb->settings['siglength']);


if($mybb->settings['bbcodeinserter'] != 0 || $mybb->user['showcodebuttons'] != 0)
{


if($mybb->settings['sigmycode'] != 0 && $mybb->settings['bbcodeinserter'] != 0 && $mybb->user['showcodebuttons'] != 0)
{

			$codebuttons = build_mycode_inserter("signature");
}


			$codebuttons = build_mycode_inserter("signature");
}


Zeile 2345Zeile 2466
		if($avatar['error'])
{
$avatar_error = $avatar['error'];

		if($avatar['error'])
{
$avatar_error = $avatar['error'];

		}

		}

		else
{
if($avatar['width'] > 0 && $avatar['height'] > 0)

		else
{
if($avatar['width'] > 0 && $avatar['height'] > 0)

Zeile 2443Zeile 2564
						$avatar_error = $lang->error_avatartoobig;
}
}

						$avatar_error = $lang->error_avatartoobig;
}
}

 
			}

// Limiting URL string to stay within database limit
if(strlen($mybb->input['avatarurl']) > 200)
{
$avatar_error = $lang->error_avatarurltoolong;

			}

if(empty($avatar_error))

			}

if(empty($avatar_error))

Zeile 3328Zeile 3455
	// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


	// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


	$plugins->run_hooks("usercp_do_drafts_start");

 
	$mybb->input['deletedraft'] = $mybb->get_input('deletedraft', MyBB::INPUT_ARRAY);
if(empty($mybb->input['deletedraft']))
{
error($lang->no_drafts_selected);
}

	$mybb->input['deletedraft'] = $mybb->get_input('deletedraft', MyBB::INPUT_ARRAY);
if(empty($mybb->input['deletedraft']))
{
error($lang->no_drafts_selected);
}

 

$plugins->run_hooks("usercp_do_drafts_start");


	$pidin = array();
$tidin = array();

	$pidin = array();
$tidin = array();

 


	foreach($mybb->input['deletedraft'] as $id => $val)
{
if($val == "post")

	foreach($mybb->input['deletedraft'] as $id => $val)
{
if($val == "post")

		{

		{

			$pidin[] = "'".(int)$id."'";
}
elseif($val == "thread")

			$pidin[] = "'".(int)$id."'";
}
elseif($val == "thread")

Zeile 3362Zeile 3492
			$pidinq = "pid IN ($pidin)";
}
else

			$pidinq = "pid IN ($pidin)";
}
else

		{

		{

			$pidinq = "1=0";
}
$db->delete_query("posts", "($pidinq $tidinp) AND visible='-2' AND uid='".$mybb->user['uid']."'");

			$pidinq = "1=0";
}
$db->delete_query("posts", "($pidinq $tidinp) AND visible='-2' AND uid='".$mybb->user['uid']."'");

Zeile 3373Zeile 3503

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


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

	$plugins->run_hooks("usercp_usergroups_start");

 
	$ingroups = ",".$mybb->user['usergroup'].",".$mybb->user['additionalgroups'].",".$mybb->user['displaygroup'].",";

$usergroups = $mybb->cache->read('usergroups');

	$ingroups = ",".$mybb->user['usergroup'].",".$mybb->user['additionalgroups'].",".$mybb->user['displaygroup'].",";

$usergroups = $mybb->cache->read('usergroups');

 

$plugins->run_hooks("usercp_usergroups_start");


// Changing our display group
if($mybb->get_input('displaygroup', MyBB::INPUT_INT))


// Changing our display group
if($mybb->get_input('displaygroup', MyBB::INPUT_INT))

Zeile 3418Zeile 3549

$usergroup = $usergroups[$mybb->get_input('leavegroup', MyBB::INPUT_INT)];
if($usergroup['type'] != 4 && $usergroup['type'] != 3 && $usergroup['type'] != 5)


$usergroup = $usergroups[$mybb->get_input('leavegroup', MyBB::INPUT_INT)];
if($usergroup['type'] != 4 && $usergroup['type'] != 3 && $usergroup['type'] != 5)

		{

		{

			error($lang->cannot_leave_group);
}
leave_usergroup($mybb->user['uid'], $mybb->get_input('leavegroup', MyBB::INPUT_INT));

			error($lang->cannot_leave_group);
}
leave_usergroup($mybb->user['uid'], $mybb->get_input('leavegroup', MyBB::INPUT_INT));

Zeile 3598Zeile 3729
		if($usergroup['joinrequests'] > 0 && $usergroup['canmanagerequests'] == 1)
{
eval("\$moderaterequestslink = \"".$templates->get("usercp_usergroups_leader_usergroup_moderaterequests")."\";");

		if($usergroup['joinrequests'] > 0 && $usergroup['canmanagerequests'] == 1)
{
eval("\$moderaterequestslink = \"".$templates->get("usercp_usergroups_leader_usergroup_moderaterequests")."\";");

		}

		}

		$groupleader[$usergroup['gid']] = 1;
$trow = alt_trow();
eval("\$groupsledlist .= \"".$templates->get("usercp_usergroups_leader_usergroup")."\";");

		$groupleader[$usergroup['gid']] = 1;
$trow = alt_trow();
eval("\$groupsledlist .= \"".$templates->get("usercp_usergroups_leader_usergroup")."\";");

Zeile 3718Zeile 3849
		else
{
$conditions = $lang->usergroup_joins_anyone;

		else
{
$conditions = $lang->usergroup_joins_anyone;

		}

		}


if(isset($appliedjoin[$usergroup['gid']]) && $usergroup['type'] != 5)
{


if(isset($appliedjoin[$usergroup['gid']]) && $usergroup['type'] != 5)
{

Zeile 3732Zeile 3863
		elseif($usergroup['type'] == 5)
{
$joinlink = "--";

		elseif($usergroup['type'] == 5)
{
$joinlink = "--";

		}

		}

		else
{
eval("\$joinlink = \"".$templates->get("usercp_usergroups_joinable_usergroup_join")."\";");

		else
{
eval("\$joinlink = \"".$templates->get("usercp_usergroups_joinable_usergroup_join")."\";");

Zeile 3761Zeile 3892
	if($joinablegrouplist)
{
eval("\$joinablegroups = \"".$templates->get("usercp_usergroups_joinable")."\";");

	if($joinablegrouplist)
{
eval("\$joinablegroups = \"".$templates->get("usercp_usergroups_joinable")."\";");

	}


	}


	$plugins->run_hooks("usercp_usergroups_end");

	$plugins->run_hooks("usercp_usergroups_end");





	eval("\$groupmemberships = \"".$templates->get("usercp_usergroups")."\";");
output_page($groupmemberships);
}

	eval("\$groupmemberships = \"".$templates->get("usercp_usergroups")."\";");
output_page($groupmemberships);
}





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

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

	$plugins->run_hooks("usercp_attachments_start");

 
	require_once MYBB_ROOT."inc/functions_upload.php";

	require_once MYBB_ROOT."inc/functions_upload.php";





	if($mybb->settings['enableattachments'] == 0)
{
error($lang->attachments_disabled);

	if($mybb->settings['enableattachments'] == 0)
{
error($lang->attachments_disabled);

	}




	}

$plugins->run_hooks("usercp_attachments_start");


	// Get unviewable forums
$f_perm_sql = '';
$unviewable_forums = get_unviewable_forums(true);

	// Get unviewable forums
$f_perm_sql = '';
$unviewable_forums = get_unviewable_forums(true);

Zeile 3793Zeile 3925
	}

$attachments = '';

	}

$attachments = '';


$query = $db->simple_select("attachments", "SUM(filesize) AS ausage, COUNT(aid) AS acount", "uid='".$mybb->user['uid']."'");
$usage = $db->fetch_array($query);
$totalattachments = $usage['acount'];

 

// Pagination
if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1)


// Pagination
if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1)

	{

	{

		$mybb->settings['threadsperpage'] = 20;
}


		$mybb->settings['threadsperpage'] = 20;
}


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

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

		$pages = ceil($totalattachments / $perpage);
if($page > $pages)
{
$start = 0;
$page = 1;
}

 
	}
else
{

	}
else
{

Zeile 3835Zeile 3957
		ORDER BY p.dateline DESC LIMIT {$start}, {$perpage}
");


		ORDER BY p.dateline DESC LIMIT {$start}, {$perpage}
");


	$bandwidth = $totaldownloads = 0;

	$bandwidth = $totaldownloads = $totalusage = $totalattachments = $processedattachments = 0;

	while($attachment = $db->fetch_array($query))
{
if($attachment['dateline'] && $attachment['tid'])

	while($attachment = $db->fetch_array($query))
{
if($attachment['dateline'] && $attachment['tid'])

Zeile 3844Zeile 3966
			$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']));
$attachment['filename'] = htmlspecialchars_uni($attachment['filename']);

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

Zeile 3852Zeile 3974
			$sizedownloads = $lang->sprintf($lang->attachment_size_downloads, $size, $attachment['downloads']);
$attachdate = my_date('relative', $attachment['dateline']);
$altbg = alt_trow();

			$sizedownloads = $lang->sprintf($lang->attachment_size_downloads, $size, $attachment['downloads']);
$attachdate = my_date('relative', $attachment['dateline']);
$altbg = alt_trow();





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

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

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

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

 
			$totalusage += $attachment['filesize'];
++$totalattachments;

		}
else
{
// This little thing delets attachments without a thread/post
remove_attachment($attachment['pid'], $attachment['posthash'], $attachment['aid']);
}

		}
else
{
// This little thing delets attachments without a thread/post
remove_attachment($attachment['pid'], $attachment['posthash'], $attachment['aid']);
}

 
		++$processedattachments;
}

if($processedattachments >= $perpage || $page > 1)
{
$query = $db->query("
SELECT SUM(a.filesize) AS ausage, COUNT(a.aid) AS acount
FROM ".TABLE_PREFIX."attachments a
LEFT JOIN ".TABLE_PREFIX."posts p ON (a.pid=p.pid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
WHERE a.uid='".$mybb->user['uid']."' {$f_perm_sql}
");
$usage = $db->fetch_array($query);
$totalusage = $usage['ausage'];
$totalattachments = $usage['acount'];

$multipage = multipage($totalattachments, $perpage, $page, "usercp.php?action=attachments");

	}


	}


	$totalusage = $usage['ausage'];

 
	$friendlyusage = get_friendly_size((int)$totalusage);
if($mybb->usergroup['attachquota'])
{

	$friendlyusage = get_friendly_size((int)$totalusage);
if($mybb->usergroup['attachquota'])
{

Zeile 3881Zeile 4021
		$usagenote = $lang->sprintf($lang->attachments_usage, $friendlyusage, $totalattachments);
}


		$usagenote = $lang->sprintf($lang->attachments_usage, $friendlyusage, $totalattachments);
}


	$multipage = multipage($totalattachments, $perpage, $page, "usercp.php?action=attachments");

 
	$bandwidth = get_friendly_size($bandwidth);

if(!$attachments)
{
eval("\$attachments = \"".$templates->get("usercp_attachments_none")."\";");
$usagenote = '';

	$bandwidth = get_friendly_size($bandwidth);

if(!$attachments)
{
eval("\$attachments = \"".$templates->get("usercp_attachments_none")."\";");
$usagenote = '';

	}

$plugins->run_hooks("usercp_attachments_end");


	}

$plugins->run_hooks("usercp_attachments_end");


	eval("\$manageattachments = \"".$templates->get("usercp_attachments")."\";");
output_page($manageattachments);
}

	eval("\$manageattachments = \"".$templates->get("usercp_attachments")."\";");
output_page($manageattachments);
}

Zeile 3901Zeile 4040
	// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


	// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


	$plugins->run_hooks("usercp_do_attachments_start");

 
	require_once MYBB_ROOT."inc/functions_upload.php";
if(!isset($mybb->input['attachments']) || !is_array($mybb->input['attachments']))
{
error($lang->no_attachments_selected);
}

	require_once MYBB_ROOT."inc/functions_upload.php";
if(!isset($mybb->input['attachments']) || !is_array($mybb->input['attachments']))
{
error($lang->no_attachments_selected);
}

 

$plugins->run_hooks("usercp_do_attachments_start");


// Get unviewable forums
$f_perm_sql = '';


// Get unviewable forums
$f_perm_sql = '';