Vergleich usercp.php - 1.8.8 - 1.8.13

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 20Zeile 20
$templatelist .= ",usercp_editsig_suspended,usercp_editsig,usercp_avatar_current,usercp_options_timezone_option,usercp_drafts,usercp_options_language,usercp_options_date_format,usercp_profile_website,usercp_latest_subscribed,usercp_warnings";
$templatelist .= ",usercp_avatar,usercp_editlists_userusercp_editlists,usercp_drafts_draft,usercp_usergroups_joingroup,usercp_attachments_none,usercp_avatar_upload,usercp_options_timezone,usercp_usergroups_joinable_usergroup_join";
$templatelist .= ",usercp_warnings_warning,usercp_nav_messenger_tracking,multipage,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,multipage_start";

$templatelist .= ",usercp_editsig_suspended,usercp_editsig,usercp_avatar_current,usercp_options_timezone_option,usercp_drafts,usercp_options_language,usercp_options_date_format,usercp_profile_website,usercp_latest_subscribed,usercp_warnings";
$templatelist .= ",usercp_avatar,usercp_editlists_userusercp_editlists,usercp_drafts_draft,usercp_usergroups_joingroup,usercp_attachments_none,usercp_avatar_upload,usercp_options_timezone,usercp_usergroups_joinable_usergroup_join";
$templatelist .= ",usercp_warnings_warning,usercp_nav_messenger_tracking,multipage,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,multipage_start";

$templatelist .= ",codebuttons,usercp_nav_messenger_compose,usercp_options_language_option,usercp_editlists,usercp_profile_contact_fields_field,usercp_latest_subscribed_threads,usercp_profile_contact_fields,usercp_profile_day";

$templatelist .= ",codebuttons,usercp_nav_messenger_compose,usercp_options_language_option,usercp_editlists,usercp_profile_contact_fields_field,usercp_latest_subscribed_threads,usercp_profile_contact_fields,usercp_profile_day,usercp_nav_home";

$templatelist .= ",usercp_profile_profilefields_select_option,usercp_profile_profilefields_multiselect,usercp_profile_profilefields_select,usercp_profile_profilefields_textarea,usercp_profile_profilefields_radio,usercp_profile_profilefields_checkbox";
$templatelist .= ",usercp_options_tppselect_option,usercp_options_pppselect_option,forumbit_depth2_forum_lastpost_never,forumbit_depth2_forum_lastpost_hidden,usercp_avatar_auto_resize_auto,usercp_avatar_auto_resize_user,usercp_options";

$templatelist .= ",usercp_profile_profilefields_select_option,usercp_profile_profilefields_multiselect,usercp_profile_profilefields_select,usercp_profile_profilefields_textarea,usercp_profile_profilefields_radio,usercp_profile_profilefields_checkbox";
$templatelist .= ",usercp_options_tppselect_option,usercp_options_pppselect_option,forumbit_depth2_forum_lastpost_never,forumbit_depth2_forum_lastpost_hidden,usercp_avatar_auto_resize_auto,usercp_avatar_auto_resize_user,usercp_options";

$templatelist .= ",usercp_editlists_no_buddies,usercp_editlists_no_ignored,usercp_editlists_no_requests,usercp_editlists_received_requests,usercp_editlists_sent_requests,usercp_drafts_draft_thread,usercp_drafts_draft_forum";
$templatelist .= ",usercp_usergroups_leader_usergroup_memberlist,usercp_usergroups_leader_usergroup_moderaterequests,usercp_usergroups_memberof_usergroup_leaveprimary,usercp_usergroups_memberof_usergroup_display,usercp_email";

$templatelist .= ",usercp_editlists_no_buddies,usercp_editlists_no_ignored,usercp_editlists_no_requests,usercp_editlists_received_requests,usercp_editlists_sent_requests,usercp_drafts_draft_thread,usercp_drafts_draft_forum,usercp_editlists_user";
$templatelist .= ",usercp_usergroups_leader_usergroup_memberlist,usercp_usergroups_leader_usergroup_moderaterequests,usercp_usergroups_memberof_usergroup_leaveprimary,usercp_usergroups_memberof_usergroup_display,usercp_email,usercp_options_pms";

$templatelist .= ",usercp_usergroups_memberof_usergroup_leaveleader,usercp_usergroups_memberof_usergroup_leaveother,usercp_usergroups_memberof_usergroup_leave,usercp_usergroups_joinable_usergroup_description,usercp_options_time_format";

$templatelist .= ",usercp_usergroups_memberof_usergroup_leaveleader,usercp_usergroups_memberof_usergroup_leaveother,usercp_usergroups_memberof_usergroup_leave,usercp_usergroups_joinable_usergroup_description,usercp_options_time_format";

$templatelist .= ",usercp_editlists_sent_request,usercp_editlists_received_request,usercp_drafts_none,usercp_usergroups_memberof_usergroup_setdisplay,usercp_usergroups_memberof_usergroup_description,usercp_editlists_user";

$templatelist .= ",usercp_editlists_sent_request,usercp_editlists_received_request,usercp_drafts_none,usercp_usergroups_memberof_usergroup_setdisplay,usercp_usergroups_memberof_usergroup_description,usercp_options_quick_reply";


require_once "./global.php";
require_once MYBB_ROOT."inc/functions_post.php";


require_once "./global.php";
require_once MYBB_ROOT."inc/functions_post.php";

Zeile 70Zeile 70
	if(!$userhandler->verify_signature())
{
$error = inline_error($userhandler->get_friendly_errors());

	if(!$userhandler->verify_signature())
{
$error = inline_error($userhandler->get_friendly_errors());

 
	}

if(isset($error) || !empty($mybb->input['preview']))
{

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

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

Zeile 187Zeile 191
			"returndate" => '',
"awayreason" => ''
);

			"returndate" => '',
"awayreason" => ''
);

	}


	}


	$bday = array(
"day" => $mybb->get_input('bday1', MyBB::INPUT_INT),
"month" => $mybb->get_input('bday2', MyBB::INPUT_INT),
"year" => $mybb->get_input('bday3', MyBB::INPUT_INT)

	$bday = array(
"day" => $mybb->get_input('bday1', MyBB::INPUT_INT),
"month" => $mybb->get_input('bday2', MyBB::INPUT_INT),
"year" => $mybb->get_input('bday3', MyBB::INPUT_INT)

	);


	);


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

Zeile 213Zeile 217
	{
$csetting = 'allow'.$cfield.'field';
if($mybb->settings[$csetting] == '')

	{
$csetting = 'allow'.$cfield.'field';
if($mybb->settings[$csetting] == '')

		{
continue;
}


		{
continue;
}


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

if($cfield == 'icq')

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

if($cfield == 'icq')

		{

		{

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

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

		}

		}

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

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

		}
}


		}
}


	if($mybb->usergroup['canchangewebsite'] == 1)
{
$user['website'] = $mybb->get_input('website');

	if($mybb->usergroup['canchangewebsite'] == 1)
{
$user['website'] = $mybb->get_input('website');

Zeile 246Zeile 250
		else if(!empty($mybb->input['reverttitle']))
{
$user['usertitle'] = '';

		else if(!empty($mybb->input['reverttitle']))
{
$user['usertitle'] = '';

		}
}

		}
}

	$userhandler->set_data($user);

if(!$userhandler->validate_user())

	$userhandler->set_data($user);

if(!$userhandler->validate_user())

Zeile 486Zeile 490
			if(isset($thing[1]))
{
$options = $thing[1];

			if(isset($thing[1]))
{
$options = $thing[1];

			}
else

			}
else

			{
$options = array();
}

			{
$options = array();
}

Zeile 502Zeile 506
				$userfield = $mybb->input['profile_fields'][$field];
}
else

				$userfield = $mybb->input['profile_fields'][$field];
}
else

			{

			{

				$userfield = $user[$field];
}
if($type == "multiselect")

				$userfield = $user[$field];
}
if($type == "multiselect")

Zeile 510Zeile 514
				if($errors)
{
$useropts = $userfield;

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

				}

				}

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

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

Zeile 521Zeile 525
					{
$val = htmlspecialchars_uni($val);
$seloptions[$val] = $val;

					{
$val = htmlspecialchars_uni($val);
$seloptions[$val] = $val;

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

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

					foreach($expoptions as $key => $val)
{
$val = trim($val);

					foreach($expoptions as $key => $val)
{
$val = trim($val);

Zeile 548Zeile 552
				}
}
elseif($type == "select")

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

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

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

					foreach($expoptions as $key => $val)
{
$val = trim($val);

					foreach($expoptions as $key => $val)
{
$val = trim($val);

Zeile 653Zeile 657
			$options = "";
$expoptions = "";
$useropts = "";

			$options = "";
$expoptions = "";
$useropts = "";

			$seloptions = "";

			$seloptions = array();

		}
}
if($customfields)

		}
}
if($customfields)

Zeile 733Zeile 737
	verify_post_check($mybb->get_input('my_post_key'));

$plugins->run_hooks("usercp_do_options_start");

	verify_post_check($mybb->get_input('my_post_key'));

$plugins->run_hooks("usercp_do_options_start");





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

Zeile 747Zeile 751
		"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 782Zeile 786
	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);

if(!$userhandler->validate_user())

	$userhandler->set_data($user);

if(!$userhandler->validate_user())

	{

	{

		$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
{

	}
else
{

		$userhandler->update_user();

		$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);
}
}





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

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

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

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

	}

	}

	else
{
$user = $mybb->user;

	else
{
$user = $mybb->user;

Zeile 839Zeile 843
	if(isset($user['allownotices']) && $user['allownotices'] == 1)
{
$allownoticescheck = "checked=\"checked\"";

	if(isset($user['allownotices']) && $user['allownotices'] == 1)
{
$allownoticescheck = "checked=\"checked\"";

	}

	}

	else
{
$allownoticescheck = "";

	else
{
$allownoticescheck = "";

Zeile 852Zeile 856
	else
{
$invisiblecheck = "";

	else
{
$invisiblecheck = "";

	}

if(isset($user['hideemail']) && $user['hideemail'] == 1)

	}

if(isset($user['hideemail']) && $user['hideemail'] == 1)

	{
$hideemailcheck = "checked=\"checked\"";
}

	{
$hideemailcheck = "checked=\"checked\"";
}

Zeile 974Zeile 978
	else
{
$showcodebuttonscheck = "";

	else
{
$showcodebuttonscheck = "";

	}

	}


if(isset($user['sourceeditor']) && $user['sourceeditor'] == 1)


if(isset($user['sourceeditor']) && $user['sourceeditor'] == 1)

	{

	{

		$sourcemodecheck = "checked=\"checked\"";

		$sourcemodecheck = "checked=\"checked\"";

	}
else
{

	}
else
{

		$sourcemodecheck = "";
}

if(isset($user['showredirect']) && $user['showredirect'] != 0)
{
$showredirectcheck = "checked=\"checked\"";

		$sourcemodecheck = "";
}

if(isset($user['showredirect']) && $user['showredirect'] != 0)
{
$showredirectcheck = "checked=\"checked\"";

	}

	}

	else
{
$showredirectcheck = "";

	else
{
$showredirectcheck = "";

Zeile 1010Zeile 1014
	else
{
$buddyrequestspmcheck = '';

	else
{
$buddyrequestspmcheck = '';

	}

	}


if(isset($user['buddyrequestsauto']) && $user['buddyrequestsauto'] != 0)
{


if(isset($user['buddyrequestsauto']) && $user['buddyrequestsauto'] != 0)
{

Zeile 1024Zeile 1028
	if(!isset($user['threadmode']) || ($user['threadmode'] != "threaded" && $user['threadmode'] != "linear"))
{
$user['threadmode'] = ''; // Leave blank to show default

	if(!isset($user['threadmode']) || ($user['threadmode'] != "threaded" && $user['threadmode'] != "linear"))
{
$user['threadmode'] = ''; // Leave blank to show default

	}


	}


	if(isset($user['classicpostbit']) && $user['classicpostbit'] != 0)

	if(isset($user['classicpostbit']) && $user['classicpostbit'] != 0)

	{

	{

		$classicpostbitcheck = "checked=\"checked\"";

		$classicpostbitcheck = "checked=\"checked\"";

	}

	}

	else
{
$classicpostbitcheck = '';

	else
{
$classicpostbitcheck = '';

	}


	}


	$date_format_options = $dateformat = '';
foreach($date_formats as $key => $format)

	$date_format_options = $dateformat = '';
foreach($date_formats as $key => $format)

	{
$selected = '';

	{
$selected = '';

		if(isset($user['dateformat']) && $user['dateformat'] == $key)

		if(isset($user['dateformat']) && $user['dateformat'] == $key)

		{
$selected = " selected=\"selected\"";
}

		{
$selected = " selected=\"selected\"";
}


$dateformat = my_date($format, TIME_NOW, "", 0);
eval("\$date_format_options .= \"".$templates->get("usercp_options_date_format")."\";");


$dateformat = my_date($format, TIME_NOW, "", 0);
eval("\$date_format_options .= \"".$templates->get("usercp_options_date_format")."\";");

	}

	}


$time_format_options = $timeformat = '';
foreach($time_formats as $key => $format)


$time_format_options = $timeformat = '';
foreach($time_formats as $key => $format)

	{

	{

		$selected = '';
if(isset($user['timeformat']) && $user['timeformat'] == $key)
{

		$selected = '';
if(isset($user['timeformat']) && $user['timeformat'] == $key)
{

Zeile 1059Zeile 1063

$timeformat = my_date($format, TIME_NOW, "", 0);
eval("\$time_format_options .= \"".$templates->get("usercp_options_time_format")."\";");


$timeformat = my_date($format, TIME_NOW, "", 0);
eval("\$time_format_options .= \"".$templates->get("usercp_options_time_format")."\";");

	}

$tzselect = build_timezone_select("timezoneoffset", $mybb->user['timezone'], true);


	}

$tzselect = build_timezone_select("timezoneoffset", $mybb->user['timezone'], true);


	$pms_from_buddys = '';
if($mybb->settings['allowbuddyonly'] == 1)

	$pms_from_buddys = '';
if($mybb->settings['allowbuddyonly'] == 1)

	{

	{

		eval("\$pms_from_buddys = \"".$templates->get("usercp_options_pms_from_buddys")."\";");

		eval("\$pms_from_buddys = \"".$templates->get("usercp_options_pms_from_buddys")."\";");

 
	}

$pms = '';
if($mybb->settings['enablepms'] != 0 && $mybb->usergroup['canusepms'] == 1)
{
eval("\$pms = \"".$templates->get("usercp_options_pms")."\";");
}

$quick_reply = '';
if($mybb->settings['quickreply'] == 1)
{
eval("\$quick_reply = \"".$templates->get("usercp_options_quick_reply")."\";");

	}

$threadview = array('linear' => '', 'threaded' => '');

	}

$threadview = array('linear' => '', 'threaded' => '');

Zeile 1151Zeile 1167
	$errors = array();

$plugins->run_hooks("usercp_do_email_start");

	$errors = array();

$plugins->run_hooks("usercp_do_email_start");

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

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

	{
// Set up user handler.
require_once MYBB_ROOT."inc/datahandlers/user.php";

	{
// Set up user handler.
require_once MYBB_ROOT."inc/datahandlers/user.php";

Zeile 1272Zeile 1288
		else
{
$userhandler->update_user();

		else
{
$userhandler->update_user();

			my_setcookie("mybbuser", $mybb->user['uid']."_".$userhandler->data['loginkey']);

			my_setcookie("mybbuser", $mybb->user['uid']."_".$userhandler->data['loginkey'], null, true);


// Notify the user by email that their password has been changed
$mail_message = $lang->sprintf($lang->email_changepassword, $mybb->user['username'], $mybb->user['email'], $mybb->settings['bbname'], $mybb->settings['bburl']);


// Notify the user by email that their password has been changed
$mail_message = $lang->sprintf($lang->email_changepassword, $mybb->user['username'], $mybb->user['email'], $mybb->settings['bbname'], $mybb->settings['bburl']);

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

			$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);

	if(count($errors) > 0)
{
$errors = inline_error($errors);

Zeile 1505Zeile 1521
	{
$tids = implode(",", array_keys($subscriptions));
$readforums = array();

	{
$tids = implode(",", array_keys($subscriptions));
$readforums = array();

		



		// Build a forum cache.
$query = $db->query("
SELECT f.fid, fr.dateline AS lastread

		// Build a forum cache.
$query = $db->query("
SELECT f.fid, fr.dateline AS lastread

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

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

		



		while($forum = $db->fetch_array($query))
{
$readforums[$forum['fid']] = $forum['lastread'];

		while($forum = $db->fetch_array($query))
{
$readforums[$forum['fid']] = $forum['lastread'];

		}


		}


		// Check participation by the current user in any of these threads - for 'dot' folder icons
if($mybb->settings['dotfolders'] != 0)
{

		// Check participation by the current user in any of these threads - for 'dot' folder icons
if($mybb->settings['dotfolders'] != 0)
{

Zeile 1527Zeile 1543
			while($post = $db->fetch_array($query))
{
$subscriptions[$post['tid']]['doticon'] = 1;

			while($post = $db->fetch_array($query))
{
$subscriptions[$post['tid']]['doticon'] = 1;

			}

			}

		}

// Read threads

		}

// Read threads

Zeile 1535Zeile 1551
		{
$query = $db->simple_select("threadsread", "*", "uid='{$mybb->user['uid']}' AND tid IN ({$tids})");
while($readthread = $db->fetch_array($query))

		{
$query = $db->simple_select("threadsread", "*", "uid='{$mybb->user['uid']}' AND tid IN ({$tids})");
while($readthread = $db->fetch_array($query))

			{

			{

				$subscriptions[$readthread['tid']]['lastread'] = $readthread['dateline'];
}
}

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

				$subscriptions[$readthread['tid']]['lastread'] = $readthread['dateline'];
}
}

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





		$threads = '';

// Now we can build our subscription list

		$threads = '';

// Now we can build our subscription list

Zeile 1558Zeile 1574
			if($thread['prefix'] != 0 && !empty($threadprefixes[$thread['prefix']]))
{
$thread['threadprefix'] = $threadprefixes[$thread['prefix']]['displaystyle'].' ';

			if($thread['prefix'] != 0 && !empty($threadprefixes[$thread['prefix']]))
{
$thread['threadprefix'] = $threadprefixes[$thread['prefix']]['displaystyle'].' ';

			}

			}


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


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

Zeile 1580Zeile 1596
			else
{
$icon = " ";

			else
{
$icon = " ";

			}

			}


// Determine the folder
$folder = '';


// Determine the folder
$folder = '';

Zeile 1603Zeile 1619

$read_cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
if($forum_read == 0 || $forum_read < $read_cutoff)


$read_cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
if($forum_read == 0 || $forum_read < $read_cutoff)

				{

				{

					$forum_read = $read_cutoff;
}
}

$cutoff = 0;
if($mybb->settings['threadreadcut'] > 0 && $thread['lastpost'] > $forum_read)

					$forum_read = $read_cutoff;
}
}

$cutoff = 0;
if($mybb->settings['threadreadcut'] > 0 && $thread['lastpost'] > $forum_read)

			{

			{

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


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


Zeile 1623Zeile 1639
				else
{
$lastread = 1;

				else
{
$lastread = 1;

				}
}


				}
}


			if(!$lastread)
{
$readcookie = $threadread = my_get_array_cookie("threadread", $thread['tid']);

			if(!$lastread)
{
$readcookie = $threadread = my_get_array_cookie("threadread", $thread['tid']);

Zeile 1640Zeile 1656
			}

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

			}

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";

			}


			}


			if($thread['replies'] >= $mybb->settings['hottopic'] || $thread['views'] >= $mybb->settings['hottopicviews'])
{
$folder .= "hot";

			if($thread['replies'] >= $mybb->settings['hottopic'] || $thread['views'] >= $mybb->settings['hottopicviews'])
{
$folder .= "hot";

Zeile 1675Zeile 1691

// Build last post info
$lastpostdate = my_date('relative', $thread['lastpost']);


// Build last post info
$lastpostdate = my_date('relative', $thread['lastpost']);

			$lastposter = htmlspecialchars_uni($thread['lastposter']);








			if(!$lastposteruid && !$thread['lastposter'])
{
$lastposter = htmlspecialchars_uni($lang->guest);
}
else
{
$lastposter = htmlspecialchars_uni($thread['lastposter']);
}

			$lastposteruid = $thread['lastposteruid'];

// Don't link to guest's profiles (they have no profile).

			$lastposteruid = $thread['lastposteruid'];

// Don't link to guest's profiles (they have no profile).

Zeile 1778Zeile 1801
			$threads = my_number_format($forum['threads']);
}


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


		if($forum['lastpost'] == 0 || $forum['lastposter'] == "")

		if($forum['lastpost'] == 0)

		{
eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost_never")."\";");
}

		{
eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost_never")."\";");
}

Zeile 1792Zeile 1815
			$forum['lastpostsubject'] = $parser->parse_badwords($forum['lastpostsubject']);
$lastpost_date = my_date('relative', $forum['lastpost']);
$lastposttid = $forum['lastposttid'];

			$forum['lastpostsubject'] = $parser->parse_badwords($forum['lastpostsubject']);
$lastpost_date = my_date('relative', $forum['lastpost']);
$lastposttid = $forum['lastposttid'];

			$lastposter = htmlspecialchars_uni($forum['lastposter']);
$lastpost_profilelink = build_profile_link($lastposter, $forum['lastposteruid']);















			if(!$forum['lastposteruid'] && !$forum['lastposter'])
{
$lastposter = htmlspecialchars_uni($lang->guest);
}
else
{
$lastposter = htmlspecialchars_uni($forum['lastposter']);
}
if($forum['lastposteruid'] == 0)
{
$lastpost_profilelink = $lastposter;
}
else
{
$lastpost_profilelink = build_profile_link($lastposter, $forum['lastposteruid']);
}

			$full_lastpost_subject = $lastpost_subject = htmlspecialchars_uni($forum['lastpostsubject']);
if(my_strlen($lastpost_subject) > 25)
{

			$full_lastpost_subject = $lastpost_subject = htmlspecialchars_uni($forum['lastpostsubject']);
if(my_strlen($lastpost_subject) > 25)
{

Zeile 1801Zeile 1838
			}
$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 1809Zeile 1846
		}

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

		}

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

	}

	}


if(!$forums)
{


if(!$forums)
{

Zeile 1817Zeile 1854
	}

$plugins->run_hooks("usercp_forumsubscriptions_end");

	}

$plugins->run_hooks("usercp_forumsubscriptions_end");





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

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

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

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

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



$plugins->run_hooks("usercp_do_editsig_start");


Zeile 1943Zeile 1980
		if($mybb->settings['sigmycode'] == 1)
{
$sigmycode = $lang->on;

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

		}
else
{

		}
else
{

			$sigmycode = $lang->off;
}
if($mybb->settings['sightml'] == 1)
{
$sightml = $lang->on;

			$sigmycode = $lang->off;
}
if($mybb->settings['sightml'] == 1)
{
$sightml = $lang->on;

		}
else
{

		}
else
{

			$sightml = $lang->off;
}
if($mybb->settings['sigimgcode'] == 1)

			$sightml = $lang->off;
}
if($mybb->settings['sigimgcode'] == 1)

Zeile 1968Zeile 2005
		$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)

		$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)

		{

		{

			$codebuttons = build_mycode_inserter("signature");
}

			$codebuttons = build_mycode_inserter("signature");
}





		$plugins->run_hooks("usercp_editsig_end");

eval("\$editsig = \"".$templates->get("usercp_editsig")."\";");

		$plugins->run_hooks("usercp_editsig_end");

eval("\$editsig = \"".$templates->get("usercp_editsig")."\";");

	}

	}


output_page($editsig);
}


output_page($editsig);
}

Zeile 2005Zeile 2042
		if($mybb->usergroup['canuploadavatars'] == 0)
{
error_no_permission();

		if($mybb->usergroup['canuploadavatars'] == 0)
{
error_no_permission();

		}

		}

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

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

Zeile 2025Zeile 2062
			$db->update_query("users", $updated_avatar, "uid='".$mybb->user['uid']."'");
}
}

			$db->update_query("users", $updated_avatar, "uid='".$mybb->user['uid']."'");
}
}

	else // remote avatar

	elseif($mybb->settings['allowremoteavatars']) // remote avatar

	{
$mybb->input['avatarurl'] = trim($mybb->get_input('avatarurl'));
if(validate_email_format($mybb->input['avatarurl']) != false)

	{
$mybb->input['avatarurl'] = trim($mybb->get_input('avatarurl'));
if(validate_email_format($mybb->input['avatarurl']) != false)

Zeile 2125Zeile 2162
				remove_avatars($mybb->user['uid']);
}
}

				remove_avatars($mybb->user['uid']);
}
}

 
	}
else // remote avatar, but remote avatars are not allowed
{
$avatar_error = $lang->error_remote_avatar_not_allowed;

	}

if(empty($avatar_error))

	}

if(empty($avatar_error))

Zeile 2169Zeile 2210
		$maxsize = get_friendly_size($mybb->settings['avatarsize']*1024);
$lang->avatar_note .= "<br />".$lang->sprintf($lang->avatar_note_size, $maxsize);
}

		$maxsize = get_friendly_size($mybb->settings['avatarsize']*1024);
$lang->avatar_note .= "<br />".$lang->sprintf($lang->avatar_note_size, $maxsize);
}

 

$plugins->run_hooks("usercp_avatar_intermediate");


$auto_resize = '';
if($mybb->settings['avatarresizing'] == "auto")


$auto_resize = '';
if($mybb->settings['avatarresizing'] == "auto")

Zeile 2176Zeile 2219
		eval("\$auto_resize = \"".$templates->get("usercp_avatar_auto_resize_auto")."\";");
}
else if($mybb->settings['avatarresizing'] == "user")

		eval("\$auto_resize = \"".$templates->get("usercp_avatar_auto_resize_auto")."\";");
}
else if($mybb->settings['avatarresizing'] == "user")

	{

	{

		eval("\$auto_resize = \"".$templates->get("usercp_avatar_auto_resize_user")."\";");

		eval("\$auto_resize = \"".$templates->get("usercp_avatar_auto_resize_user")."\";");

	}

	}


$avatarupload = '';
if($mybb->usergroup['canuploadavatars'] == 1)


$avatarupload = '';
if($mybb->usergroup['canuploadavatars'] == 1)

	{

	{

		eval("\$avatarupload = \"".$templates->get("usercp_avatar_upload")."\";");

		eval("\$avatarupload = \"".$templates->get("usercp_avatar_upload")."\";");

 
	}

$avatar_remote = '';
if($mybb->settings['allowremoteavatars'] == 1)
{
eval("\$avatar_remote = \"".$templates->get("usercp_avatar_remote")."\";");

	}

$removeavatar = '';

	}

$removeavatar = '';

Zeile 2236Zeile 2285
		// Now we have the new list, so throw it all back together
$new_list = implode(",", $user['buddylist']);


		// Now we have the new list, so throw it all back together
$new_list = implode(",", $user['buddylist']);


		// And clean it up a little to ensure there is no possibility of bad values
$new_list = preg_replace("#,{2,}#", ",", $new_list);
$new_list = preg_replace("#[^0-9,]#", "", $new_list);

if(my_substr($new_list, 0, 1) == ",")
{
$new_list = my_substr($new_list, 1);
}
if(my_substr($new_list, -1) == ",")
{
$new_list = my_substr($new_list, 0, my_strlen($new_list)-2);
}


		// And clean it up a little to ensure there is no possibility of bad values
$new_list = preg_replace("#,{2,}#", ",", $new_list);
$new_list = preg_replace("#[^0-9,]#", "", $new_list);

if(my_substr($new_list, 0, 1) == ",")
{
$new_list = my_substr($new_list, 1);
}
if(my_substr($new_list, -1) == ",")
{
$new_list = my_substr($new_list, 0, my_strlen($new_list)-2);
}


		$user['buddylist'] = $db->escape_string($new_list);

$db->update_query("users", array('buddylist' => $user['buddylist']), "uid='".(int)$user['uid']."'");

		$user['buddylist'] = $db->escape_string($new_list);

$db->update_query("users", array('buddylist' => $user['buddylist']), "uid='".(int)$user['uid']."'");

Zeile 2428Zeile 2477
		// Get the requests we have sent that are still pending
$query = $db->simple_select('buddyrequests', 'touid', 'uid='.(int)$mybb->user['uid']);
$requests = array();

		// Get the requests we have sent that are still pending
$query = $db->simple_select('buddyrequests', 'touid', 'uid='.(int)$mybb->user['uid']);
$requests = array();

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

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

		{
$requests[$req['touid']] = true;
}

		{
$requests[$req['touid']] = true;
}

Zeile 2442Zeile 2491
		}

$sent = false;

		}

$sent = false;





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

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

Zeile 2471Zeile 2520
					else
{
$error_message = "buddy";

					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 2486Zeile 2535
				}

if(isset($requests[$user['uid']]))

				}

if(isset($requests[$user['uid']]))

				{
if($mybb->get_input('manage') != "ignored")
{

				{
if($mybb->get_input('manage') != "ignored")
{

						$error_message = $lang->users_already_sent_request;
}
elseif($mybb->get_input('manage') == "ignored")

						$error_message = $lang->users_already_sent_request;
}
elseif($mybb->get_input('manage') == "ignored")

Zeile 2669Zeile 2718
	if(my_substr($new_list, 0, 1) == ",")
{
$new_list = my_substr($new_list, 1);

	if(my_substr($new_list, 0, 1) == ",")
{
$new_list = my_substr($new_list, 1);

	}

	}

	if(my_substr($new_list, -1) == ",")
{
$new_list = my_substr($new_list, 0, my_strlen($new_list)-2);

	if(my_substr($new_list, -1) == ",")
{
$new_list = my_substr($new_list, 0, my_strlen($new_list)-2);

Zeile 2729Zeile 2778
				else
{
echo "\$(\"#buddy_list\").html(\"<li>{$lang->buddy_list_empty}</li>\");\n";

				else
{
echo "\$(\"#buddy_list\").html(\"<li>{$lang->buddy_list_empty}</li>\");\n";

				}

				}

			}
else
{

			}
else
{

Zeile 2743Zeile 2792
	else
{
if($error_message)

	else
{
if($error_message)

		{

		{

			$message .= "<br />".$error_message;
}
redirect("usercp.php?action=editlists#".$mybb->get_input('manage'), $message);

			$message .= "<br />".$error_message;
}
redirect("usercp.php?action=editlists#".$mybb->get_input('manage'), $message);

Zeile 2789Zeile 2838
	// Fetch out ignore list users
$ignore_count = 0;
$ignore_list = '';

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

	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 2839Zeile 2888
				{
$bgcolor = alt_trow();
$request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['touid']);

				{
$bgcolor = alt_trow();
$request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['touid']);

					$request['date'] = my_date($mybb->settings['dateformat'], $request['date'])." ".my_date($mybb->settings['timeformat'], $request['date']);

					$request['date'] = my_date('relative', $request['date']);

					eval("\$sent_rows .= \"".$templates->get("usercp_editlists_sent_request", 1, 0)."\";");
}


					eval("\$sent_rows .= \"".$templates->get("usercp_editlists_sent_request", 1, 0)."\";");
}


Zeile 2873Zeile 2922
	{
$bgcolor = alt_trow();
$request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['uid']);

	{
$bgcolor = alt_trow();
$request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['uid']);

		$request['date'] = my_date($mybb->settings['dateformat'], $request['date'])." ".my_date($mybb->settings['timeformat'], $request['date']);

		$request['date'] = my_date('relative', $request['date']);

		eval("\$received_rows .= \"".$templates->get("usercp_editlists_received_request")."\";");
}


		eval("\$received_rows .= \"".$templates->get("usercp_editlists_received_request")."\";");
}


Zeile 2895Zeile 2944
	{
$bgcolor = alt_trow();
$request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['touid']);

	{
$bgcolor = alt_trow();
$request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['touid']);

		$request['date'] = my_date($mybb->settings['dateformat'], $request['date'])." ".my_date($mybb->settings['timeformat'], $request['date']);

		$request['date'] = my_date('relative', $request['date']);

		eval("\$sent_rows .= \"".$templates->get("usercp_editlists_sent_request")."\";");
}


		eval("\$sent_rows .= \"".$templates->get("usercp_editlists_sent_request")."\";");
}


Zeile 2972Zeile 3021

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")
{
// Verify incoming POST request

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

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

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

		{

		{

			$tidin[] = "'".(int)$id."'";
}
}

			$tidin[] = "'".(int)$id."'";
}
}

Zeile 3008Zeile 3057
	{
$pidinq = $tidin = '';
if($pidin)

	{
$pidinq = $tidin = '';
if($pidin)

		{

		{

			$pidin = implode(",", $pidin);
$pidinq = "pid IN ($pidin)";
}

			$pidin = implode(",", $pidin);
$pidinq = "pid IN ($pidin)";
}

Zeile 3031Zeile 3080

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


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

	{
// 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(my_strpos($ingroups, ",".$mybb->input['displaygroup'].",") === false)
{
error($lang->not_member_of_group);

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

Zeile 3042Zeile 3091

$dispgroup = $usergroups[$mybb->get_input('displaygroup', MyBB::INPUT_INT)];
if($dispgroup['candisplaygroup'] != 1)


$dispgroup = $usergroups[$mybb->get_input('displaygroup', MyBB::INPUT_INT)];
if($dispgroup['candisplaygroup'] != 1)

		{

		{

			error($lang->cannot_set_displaygroup);
}
$db->update_query("users", array('displaygroup' => $mybb->get_input('displaygroup', MyBB::INPUT_INT)), "uid='".$mybb->user['uid']."'");
$cache->update_moderators();
$plugins->run_hooks("usercp_usergroups_change_displaygroup");
redirect("usercp.php?action=usergroups", $lang->display_group_changed);

			error($lang->cannot_set_displaygroup);
}
$db->update_query("users", array('displaygroup' => $mybb->get_input('displaygroup', MyBB::INPUT_INT)), "uid='".$mybb->user['uid']."'");
$cache->update_moderators();
$plugins->run_hooks("usercp_usergroups_change_displaygroup");
redirect("usercp.php?action=usergroups", $lang->display_group_changed);

		exit;

		exit;

	}

// Leaving a group

	}

// Leaving a group

Zeile 3057Zeile 3106
	{
// 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->get_input('leavegroup', MyBB::INPUT_INT).",") === false)
{
error($lang->not_member_of_group);

		if(my_strpos($ingroups, ",".$mybb->get_input('leavegroup', MyBB::INPUT_INT).",") === false)
{
error($lang->not_member_of_group);

Zeile 3094Zeile 3143

// Joining a group
if($mybb->get_input('joingroup', MyBB::INPUT_INT))


// Joining a group
if($mybb->get_input('joingroup', MyBB::INPUT_INT))

	{

	{

		// 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'));





		$usergroup = $usergroups[$mybb->get_input('joingroup', MyBB::INPUT_INT)];

if($usergroup['type'] == 5)

		$usergroup = $usergroups[$mybb->get_input('joingroup', MyBB::INPUT_INT)];

if($usergroup['type'] == 5)

		{

		{

			error($lang->cannot_join_invite_group);

			error($lang->cannot_join_invite_group);

		}

		}


if(($usergroup['type'] != 4 && $usergroup['type'] != 3) || !$usergroup['gid'])
{
error($lang->cannot_join_group);


if(($usergroup['type'] != 4 && $usergroup['type'] != 3) || !$usergroup['gid'])
{
error($lang->cannot_join_group);

		}

		}


if(my_strpos($ingroups, ",".$mybb->get_input('joingroup', MyBB::INPUT_INT).",") !== false)
{


if(my_strpos($ingroups, ",".$mybb->get_input('joingroup', MyBB::INPUT_INT).",") !== false)
{

Zeile 3130Zeile 3179
				"reason" => $db->escape_string($mybb->get_input('reason')),
"dateline" => TIME_NOW
);

				"reason" => $db->escape_string($mybb->get_input('reason')),
"dateline" => TIME_NOW
);





			$db->insert_query("joinrequests", $joinrequest);

if(array_key_exists($usergroup['gid'], $groupleaders))

			$db->insert_query("joinrequests", $joinrequest);

if(array_key_exists($usergroup['gid'], $groupleaders))

Zeile 3153Zeile 3202

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


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

			exit;
}

			exit;
}

		elseif($usergroup['type'] == 4)
{
$joingroup = $mybb->get_input('joingroup', MyBB::INPUT_INT);

		elseif($usergroup['type'] == 4)
{
$joingroup = $mybb->get_input('joingroup', MyBB::INPUT_INT);

Zeile 3166Zeile 3215
		{
join_usergroup($mybb->user['uid'], $mybb->get_input('joingroup', MyBB::INPUT_INT));
$plugins->run_hooks("usercp_usergroups_join_group");

		{
join_usergroup($mybb->user['uid'], $mybb->get_input('joingroup', MyBB::INPUT_INT));
$plugins->run_hooks("usercp_usergroups_join_group");

			redirect("usercp.php?action=usergroups", $lang->joined_group);
}

			redirect("usercp.php?action=usergroups", $lang->joined_group);
}

	}

// Accepting invitation

	}

// Accepting invitation

Zeile 3181Zeile 3230
		if(my_strpos($ingroups, ",".$mybb->get_input('acceptinvite', MyBB::INPUT_INT).",") !== false)
{
error($lang->already_accepted_invite);

		if(my_strpos($ingroups, ",".$mybb->get_input('acceptinvite', MyBB::INPUT_INT).",") !== false)
{
error($lang->already_accepted_invite);

		}

		}


$query = $db->simple_select("joinrequests", "*", "uid='".$mybb->user['uid']."' AND gid='".$mybb->get_input('acceptinvite', MyBB::INPUT_INT)."' AND invite='1'");
$joinrequest = $db->fetch_array($query);


$query = $db->simple_select("joinrequests", "*", "uid='".$mybb->user['uid']."' AND gid='".$mybb->get_input('acceptinvite', MyBB::INPUT_INT)."' AND invite='1'");
$joinrequest = $db->fetch_array($query);

Zeile 3211Zeile 3260
				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))

				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, l.caninvitemembers
");

				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, l.caninvitemembers
");

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

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

Zeile 3260Zeile 3309
	eval("\$leavelink = \"".$templates->get("usercp_usergroups_memberof_usergroup_leaveprimary")."\";");
$trow = alt_trow();
if($usergroup['candisplaygroup'] == 1 && $usergroup['gid'] == $mybb->user['displaygroup'])

	eval("\$leavelink = \"".$templates->get("usercp_usergroups_memberof_usergroup_leaveprimary")."\";");
$trow = alt_trow();
if($usergroup['candisplaygroup'] == 1 && $usergroup['gid'] == $mybb->user['displaygroup'])

	{

	{

		eval("\$displaycode = \"".$templates->get("usercp_usergroups_memberof_usergroup_display")."\";");
}
elseif($usergroup['candisplaygroup'] == 1)

		eval("\$displaycode = \"".$templates->get("usercp_usergroups_memberof_usergroup_display")."\";");
}
elseif($usergroup['candisplaygroup'] == 1)

Zeile 3274Zeile 3323

eval("\$memberoflist = \"".$templates->get("usercp_usergroups_memberof_usergroup")."\";");
$showmemberof = false;


eval("\$memberoflist = \"".$templates->get("usercp_usergroups_memberof_usergroup")."\";");
$showmemberof = false;

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

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

		$query = $db->simple_select("usergroups", "*", "gid IN (".$mybb->user['additionalgroups'].") AND gid !='".$mybb->user['usergroup']."'", array('order_by' => 'title'));
while($usergroup = $db->fetch_array($query))
{

		$query = $db->simple_select("usergroups", "*", "gid IN (".$mybb->user['additionalgroups'].") AND gid !='".$mybb->user['usergroup']."'", array('order_by' => 'title'));
while($usergroup = $db->fetch_array($query))
{

Zeile 3455Zeile 3504
	");

$bandwidth = $totaldownloads = 0;

	");

$bandwidth = $totaldownloads = 0;

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

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

	{
if($attachment['dateline'] && $attachment['tid'])
{

	{
if($attachment['dateline'] && $attachment['tid'])
{

Zeile 3463Zeile 3512
			$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 3471Zeile 3520
			$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

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

// Add to bandwidth total

Zeile 3501Zeile 3550
		$percent = $lang->unlimited;
$attachquota = $lang->unlimited;
$usagenote = $lang->sprintf($lang->attachments_usage, $friendlyusage, $totalattachments);

		$percent = $lang->unlimited;
$attachquota = $lang->unlimited;
$usagenote = $lang->sprintf($lang->attachments_usage, $friendlyusage, $totalattachments);

	}

	}


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


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

Zeile 3516Zeile 3565

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


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

}

}


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


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

Zeile 3546Zeile 3595

// Cap at 60,000 chars; text will allow up to 65535?
if(my_strlen($mybb->get_input('notepad')) > 60000)


// Cap at 60,000 chars; text will allow up to 65535?
if(my_strlen($mybb->get_input('notepad')) > 60000)

	{

	{

		$mybb->input['notepad'] = my_substr($mybb->get_input('notepad'), 0, 60000);
}


		$mybb->input['notepad'] = my_substr($mybb->get_input('notepad'), 0, 60000);
}


Zeile 3576Zeile 3625
	$stats = $cache->read("stats");
$posts = $stats['numposts'];
if($posts == 0)

	$stats = $cache->read("stats");
$posts = $stats['numposts'];
if($posts == 0)

	{

	{

		$percent = "0";
}
else

		$percent = "0";
}
else

Zeile 3687Zeile 3736
				}
else
{

				}
else
{

					$expires = my_date('relative', $warning['expires']);

					$expires = nice_time($warning['expires']-TIME_NOW);

				}

$alt_bg = alt_trow();

				}

$alt_bg = alt_trow();

Zeile 3696Zeile 3745
			if($warnings)
{
eval("\$latest_warnings = \"".$templates->get("usercp_warnings")."\";");

			if($warnings)
{
eval("\$latest_warnings = \"".$templates->get("usercp_warnings")."\";");

			}
}

			}
}

	}

// Format username

	}

// Format username

Zeile 3818Zeile 3867
							$icon['path'] = htmlspecialchars_uni($icon['path']);
$icon['name'] = htmlspecialchars_uni($icon['name']);
eval("\$icon = \"".$templates->get("usercp_subscriptions_thread_icon")."\";");

							$icon['path'] = htmlspecialchars_uni($icon['path']);
$icon['name'] = htmlspecialchars_uni($icon['name']);
eval("\$icon = \"".$templates->get("usercp_subscriptions_thread_icon")."\";");

						}

						}

						else
{
$icon = "&nbsp;";

						else
{
$icon = "&nbsp;";

Zeile 3848Zeile 3897
						$folder .= "folder";

if($thread['visible'] == 0)

						$folder .= "folder";

if($thread['visible'] == 0)

						{

						{

							$bgcolor = "trow_shaded";

							$bgcolor = "trow_shaded";

						}


						}


						$lastpostdate = my_date('relative', $thread['lastpost']);

						$lastpostdate = my_date('relative', $thread['lastpost']);

						$lastposter = htmlspecialchars_uni($thread['lastposter']);

 
						$lastposteruid = $thread['lastposteruid'];

						$lastposteruid = $thread['lastposteruid'];

 
						if(!$lastposteruid && !$thread['lastposter'])
{
$lastposter = htmlspecialchars_uni($lang->guest);
}
else
{
$lastposter = htmlspecialchars_uni($thread['lastposter']);
}


if($lastposteruid == 0)


if($lastposteruid == 0)

						{

						{

							$lastposterlink = $lastposter;

							$lastposterlink = $lastposter;

						}

						}

						else
{
$lastposterlink = build_profile_link($lastposter, $lastposteruid);
}

						else
{
$lastposterlink = build_profile_link($lastposter, $lastposteruid);
}





						$thread['replies'] = my_number_format($thread['replies']);
$thread['views'] = my_number_format($thread['views']);
$thread['username'] = htmlspecialchars_uni($thread['username']);

						$thread['replies'] = my_number_format($thread['replies']);
$thread['views'] = my_number_format($thread['views']);
$thread['username'] = htmlspecialchars_uni($thread['username']);

Zeile 3875Zeile 3931
				}
eval("\$latest_subscribed = \"".$templates->get("usercp_latest_subscribed")."\";");
}

				}
eval("\$latest_subscribed = \"".$templates->get("usercp_latest_subscribed")."\";");
}

		}
}

// User's Latest Threads


		}
}

// User's Latest Threads


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

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

Zeile 3887Zeile 3943
	if($unviewable_forums)
{
$f_perm_sql = " AND t.fid NOT IN ($unviewable_forums)";

	if($unviewable_forums)
{
$f_perm_sql = " AND t.fid NOT IN ($unviewable_forums)";

	}

	}

	if($inactiveforums)
{
$f_perm_sql .= " AND t.fid NOT IN ($inactiveforums)";

	if($inactiveforums)
{
$f_perm_sql .= " AND t.fid NOT IN ($inactiveforums)";

Zeile 3917Zeile 3973
		if($thread['visible'] == 0 && is_moderator($thread['fid'], "canviewunapprove") === false)
{
continue;

		if($thread['visible'] == 0 && is_moderator($thread['fid'], "canviewunapprove") === false)
{
continue;

		}

		}


$forumpermissions = $fpermissions[$thread['fid']];
if($forumpermissions['canview'] != 0 || $forumpermissions['canviewthreads'] != 0)


$forumpermissions = $fpermissions[$thread['fid']];
if($forumpermissions['canview'] != 0 || $forumpermissions['canviewthreads'] != 0)

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

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

		



		while($forum = $db->fetch_array($query))
{
$readforums[$forum['fid']] = $forum['lastread'];

		while($forum = $db->fetch_array($query))
{
$readforums[$forum['fid']] = $forum['lastread'];