Vergleich usercp.php - 1.6.10 - 1.6.14

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 206Zeile 206
			{
$mybb->input['awayyear'] = my_date('Y', $awaydate);
}

			{
$mybb->input['awayyear'] = my_date('Y', $awaydate);
}

			



			$return_month = intval(substr($mybb->input['awaymonth'], 0, 2));
$return_day = intval(substr($mybb->input['awayday'], 0, 2));
$return_year = min(intval($mybb->input['awayyear']), 9999);

			$return_month = intval(substr($mybb->input['awaymonth'], 0, 2));
$return_day = intval(substr($mybb->input['awayday'], 0, 2));
$return_year = min(intval($mybb->input['awayyear']), 9999);

Zeile 218Zeile 218
			{
error($lang->error_usercp_return_date_past);
}

			{
error($lang->error_usercp_return_date_past);
}

			



			$returndate = "{$return_day}-{$return_month}-{$return_year}";
}
else

			$returndate = "{$return_day}-{$return_month}-{$return_year}";
}
else

Zeile 246Zeile 246
		"day" => $mybb->input['bday1'],
"month" => $mybb->input['bday2'],
"year" => $mybb->input['bday3']

		"day" => $mybb->input['bday1'],
"month" => $mybb->input['bday2'],
"year" => $mybb->input['bday3']

	);

	);


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


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

Zeile 254Zeile 254

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


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

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

		"website" => $mybb->input['website'],
"icq" => intval($mybb->input['icq']),
"aim" => $mybb->input['aim'],

		"website" => $mybb->input['website'],
"icq" => intval($mybb->input['icq']),
"aim" => $mybb->input['aim'],

Zeile 266Zeile 267
	);

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

	);

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

	{

	{

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

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

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

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

		



		// Set allowed value otherwise select options disappear
if(in_array($lang->userdata_invalid_birthday_privacy, $errors))
{
$mybb->input['birthdayprivacy'] = 'none';
}

		// Set allowed value otherwise select options disappear
if(in_array($lang->userdata_invalid_birthday_privacy, $errors))
{
$mybb->input['birthdayprivacy'] = 'none';
}

		



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

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

Zeile 433Zeile 434
	while($profilefield = $db->fetch_array($query))
{
// Does this field have a minimum post count?

	while($profilefield = $db->fetch_array($query))
{
// Does this field have a minimum post count?

		if($profilefield['postnum'] && $profilefield['postnum'] > $user['postnum'])

		if($profilefield['postnum'] && $profilefield['postnum'] > $mybb->user['postnum'])

		{
continue;
}

		{
continue;
}

Zeile 640Zeile 641
	{
$customtitle = "";
}

	{
$customtitle = "";
}

	



	$plugins->run_hooks("usercp_profile_end");

	$plugins->run_hooks("usercp_profile_end");

	



	eval("\$editprofile = \"".$templates->get("usercp_profile")."\";");
output_page($editprofile);
}

	eval("\$editprofile = \"".$templates->get("usercp_profile")."\";");
output_page($editprofile);
}

Zeile 665Zeile 666
		"timeformat" => intval($mybb->input['timeformat']),
"timezone" => $db->escape_string($mybb->input['timezoneoffset']),
"language" => $mybb->input['language']

		"timeformat" => intval($mybb->input['timeformat']),
"timezone" => $db->escape_string($mybb->input['timezoneoffset']),
"language" => $mybb->input['language']

	);


	);


	$user['options'] = array(
"allownotices" => $mybb->input['allownotices'],
"hideemail" => $mybb->input['hideemail'],

	$user['options'] = array(
"allownotices" => $mybb->input['allownotices'],
"hideemail" => $mybb->input['hideemail'],

Zeile 690Zeile 691
	if($mybb->settings['usertppoptions'])
{
$user['options']['tpp'] = intval($mybb->input['tpp']);

	if($mybb->settings['usertppoptions'])
{
$user['options']['tpp'] = intval($mybb->input['tpp']);

	}


	}


	if($mybb->settings['userpppoptions'])
{
$user['options']['ppp'] = intval($mybb->input['ppp']);

	if($mybb->settings['userpppoptions'])
{
$user['options']['ppp'] = intval($mybb->input['ppp']);

Zeile 789Zeile 790
	else
{
$showsigscheck = "";

	else
{
$showsigscheck = "";

	}

	}


if($user['showavatars'] == 1)


if($user['showavatars'] == 1)

	{

	{

		$showavatarscheck = "checked=\"checked\"";

		$showavatarscheck = "checked=\"checked\"";

	}
else
{

	}
else
{

		$showavatarscheck = "";
}


		$showavatarscheck = "";
}


Zeile 807Zeile 808
	else
{
$showquickreplycheck = "";

	else
{
$showquickreplycheck = "";

	}


	}


	if($user['receivepms'] == 1)

	if($user['receivepms'] == 1)

	{

	{

		$receivepmscheck = "checked=\"checked\"";

		$receivepmscheck = "checked=\"checked\"";

	}
else
{

	}
else
{

		$receivepmscheck = "";
}

		$receivepmscheck = "";
}

	



	if($user['receivefrombuddy'] == 1)
{
$receivefrombuddycheck = "checked=\"checked\"";

	if($user['receivefrombuddy'] == 1)
{
$receivefrombuddycheck = "checked=\"checked\"";

	}

	}

	else
{
$receivefrombuddycheck = "";

	else
{
$receivefrombuddycheck = "";

Zeile 839Zeile 840
	if($user['dstcorrection'] == 2)
{
$dst_auto_selected = "selected=\"selected\"";

	if($user['dstcorrection'] == 2)
{
$dst_auto_selected = "selected=\"selected\"";

	}

	}

	else if($user['dstcorrection'] == 1)
{
$dst_enabled_selected = "selected=\"selected\"";

	else if($user['dstcorrection'] == 1)
{
$dst_enabled_selected = "selected=\"selected\"";

Zeile 852Zeile 853
	if($user['showcodebuttons'] == 1)
{
$showcodebuttonscheck = "checked=\"checked\"";

	if($user['showcodebuttons'] == 1)
{
$showcodebuttonscheck = "checked=\"checked\"";

	}

	}

	else
{
$showcodebuttonscheck = "";

	else
{
$showcodebuttonscheck = "";

	}

if($user['showredirect'] != 0)

	}

if($user['showredirect'] != 0)

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

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

Zeile 871Zeile 872
	{
$pmnotifycheck = "checked=\"checked\"";
}

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

	else
{
$pmnotifycheck = '';
}


if($user['threadmode'] != "threaded" && $user['threadmode'] != "linear")

	else
{
$pmnotifycheck = '';
}


if($user['threadmode'] != "threaded" && $user['threadmode'] != "linear")

	{
$user['threadmode'] = ''; // Leave blank to show default
}

	{
$user['threadmode'] = ''; // Leave blank to show default
}

Zeile 889Zeile 890
	else
{
$classicpostbitcheck = '';

	else
{
$classicpostbitcheck = '';

	}


	}



$date_format_options = "<option value=\"0\">{$lang->use_default}</option>";
foreach($date_formats as $key => $format)


$date_format_options = "<option value=\"0\">{$lang->use_default}</option>";
foreach($date_formats as $key => $format)

Zeile 902Zeile 903
		else
{
$date_format_options .= "<option value=\"$key\">".my_date($format, TIME_NOW, "", 0)."</option>";

		else
{
$date_format_options .= "<option value=\"$key\">".my_date($format, TIME_NOW, "", 0)."</option>";

		}
}

		}
}


$time_format_options = "<option value=\"0\">{$lang->use_default}</option>";
foreach($time_formats as $key => $format)
{
if($user['timeformat'] == $key)


$time_format_options = "<option value=\"0\">{$lang->use_default}</option>";
foreach($time_formats as $key => $format)
{
if($user['timeformat'] == $key)

		{

		{

			$time_format_options .= "<option value=\"$key\" selected=\"selected\">".my_date($format, TIME_NOW, "", 0)."</option>";
}
else

			$time_format_options .= "<option value=\"$key\" selected=\"selected\">".my_date($format, TIME_NOW, "", 0)."</option>";
}
else

Zeile 919Zeile 920
	}

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

	}

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

	



	if($mybb->settings['allowbuddyonly'] == 1)
{
eval("\$pms_from_buddys = \"".$templates->get("usercp_options_pms_from_buddys")."\";");

	if($mybb->settings['allowbuddyonly'] == 1)
{
eval("\$pms_from_buddys = \"".$templates->get("usercp_options_pms_from_buddys")."\";");

Zeile 939Zeile 940
				$val = trim($val);
$selected = "";
if($user['tpp'] == $val)

				$val = trim($val);
$selected = "";
if($user['tpp'] == $val)

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

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

				}
$tppoptions .= "<option value=\"$val\" $selected>".$lang->sprintf($lang->tpp_option, $val)."</option>\n";

				}
$tppoptions .= "<option value=\"$val\" $selected>".$lang->sprintf($lang->tpp_option, $val)."</option>\n";

			}
}

			}
}

		eval("\$tppselect = \"".$templates->get("usercp_options_tppselect")."\";");
}
if($mybb->settings['userpppoptions'])

		eval("\$tppselect = \"".$templates->get("usercp_options_tppselect")."\";");
}
if($mybb->settings['userpppoptions'])

Zeile 966Zeile 967
		}
eval("\$pppselect = \"".$templates->get("usercp_options_pppselect")."\";");
}

		}
eval("\$pppselect = \"".$templates->get("usercp_options_pppselect")."\";");
}

	



	$plugins->run_hooks("usercp_options_end");

	$plugins->run_hooks("usercp_options_end");

	



	eval("\$editprofile = \"".$templates->get("usercp_options")."\";");
output_page($editprofile);
}

	eval("\$editprofile = \"".$templates->get("usercp_options")."\";");
output_page($editprofile);
}

Zeile 1040Zeile 1041
	if(count($errors) > 0)
{
$mybb->input['action'] = "email";

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

			$errors = inline_error($errors);

			$errors = inline_error($errors);

	}
}

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

	}
}

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

{

{

	// Coming back to this page after one or more errors were experienced, show fields the user previously entered (with the exception of the password)
if($errors)
{
$email = htmlspecialchars_uni($mybb->input['email']);
$email2 = htmlspecialchars_uni($mybb->input['email2']);

	// Coming back to this page after one or more errors were experienced, show fields the user previously entered (with the exception of the password)
if($errors)
{
$email = htmlspecialchars_uni($mybb->input['email']);
$email2 = htmlspecialchars_uni($mybb->input['email2']);

	}

	}

	else
{
$email = $email2 = '';

	else
{
$email = $email2 = '';

	}


	}


	$plugins->run_hooks("usercp_email");

	$plugins->run_hooks("usercp_email");

	



	eval("\$changemail = \"".$templates->get("usercp_email")."\";");
output_page($changemail);
}

	eval("\$changemail = \"".$templates->get("usercp_email")."\";");
output_page($changemail);
}





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

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

Zeile 1085Zeile 1086
			"uid" => $mybb->user['uid'],
"password" => $mybb->input['password'],
"password2" => $mybb->input['password2']

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

		);

$userhandler->set_data($user);

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

		);

$userhandler->set_data($user);

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

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

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

	}

	}

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

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

	}
}


	}
}


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

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

	



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

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

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

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





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

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

	}


	}


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

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

Zeile 1145Zeile 1146
		$userhandler->set_data($user);

if(!$userhandler->validate_user())

		$userhandler->set_data($user);

if(!$userhandler->validate_user())

		{

		{

			$errors = $userhandler->get_friendly_errors();
}
else

			$errors = $userhandler->get_friendly_errors();
}
else

Zeile 1170Zeile 1171
	{
error_no_permission();
}

	{
error_no_permission();
}

	



	$plugins->run_hooks("usercp_changename_end");

	$plugins->run_hooks("usercp_changename_end");

	



	eval("\$changename = \"".$templates->get("usercp_changename")."\";");
output_page($changename);
}

	eval("\$changename = \"".$templates->get("usercp_changename")."\";");
output_page($changename);
}

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

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

	else

	else

	{
if($mybb->input['do'] == "no_notification")
{
$new_notification = 0;
}
else if($mybb->input['do'] == "instant_notification")

	{
if($mybb->input['do'] == "no_notification")
{
$new_notification = 0;
}
else if($mybb->input['do'] == "instant_notification")

		{

		{

			$new_notification = 1;
}


			$new_notification = 1;
}


Zeile 1218Zeile 1219
	// Done, redirect
redirect("usercp.php?action=subscriptions", $lang->redirect_subscriptions_updated);
}

	// Done, redirect
redirect("usercp.php?action=subscriptions", $lang->redirect_subscriptions_updated);
}





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

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

Zeile 1248Zeile 1249
	$page = intval($mybb->input['page']);
if($page > 0)
{

	$page = intval($mybb->input['page']);
if($page > 0)
{

		$start = ($page-1) *$perpage;








		$start = ($page-1) * $perpage;
$pages = $threadcount / $perpage;
$pages = ceil($pages);
if($page > $pages || $page <= 0)
{
$start = 0;
$page = 1;
}

	}
else
{

	}
else
{

Zeile 1298Zeile 1306
		if($sids)
{
$db->delete_query("threadsubscriptions", "sid IN ({$sids}) AND uid='{$mybb->user['uid']}'");

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

		}

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


		}

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


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

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

Zeile 1311Zeile 1319
	if(is_array($subscriptions))
{
$tids = implode(",", array_keys($subscriptions));

	if(is_array($subscriptions))
{
$tids = implode(",", array_keys($subscriptions));

		



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

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

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

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

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

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

			



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

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

		}

		}

		else
{
// Build a forum cache.

		else
{
// Build a forum cache.

Zeile 1355Zeile 1363
			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 1365Zeile 1373
			while($readthread = $db->fetch_array($query))
{
$subscriptions[$readthread['tid']]['lastread'] = $readthread['dateline'];

			while($readthread = $db->fetch_array($query))
{
$subscriptions[$readthread['tid']]['lastread'] = $readthread['dateline'];

			}

			}

		}

		}

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


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


// Now we can build our subscription list
foreach($subscriptions as $thread)


// Now we can build our subscription list
foreach($subscriptions as $thread)

Zeile 1377Zeile 1385

$folder = '';
$prefix = '';


$folder = '';
$prefix = '';

			



			// If this thread has a prefix, insert a space between prefix and subject
if($thread['prefix'] != 0)
{
$thread['threadprefix'] .= '&nbsp;';
}

			// If this thread has a prefix, insert a space between prefix and subject
if($thread['prefix'] != 0)
{
$thread['threadprefix'] .= '&nbsp;';
}

			



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

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

Zeile 1421Zeile 1429
			if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'])
{
$forum_read = $readforums[$thread['fid']];

			if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'])
{
$forum_read = $readforums[$thread['fid']];

			



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

Zeile 1443Zeile 1451
				if($thread['lastread'])
{
$lastread = $thread['lastread'];

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

				}
else
{

				}
else
{

					$lastread = 1;
}
}

					$lastread = 1;
}
}

Zeile 1460Zeile 1468
				else
{
$lastread = $forum_read;

				else
{
$lastread = $forum_read;

				}
}

				}
}


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


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

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

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

	



	$plugins->run_hooks("usercp_subscriptions_end");

	$plugins->run_hooks("usercp_subscriptions_end");

	



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

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





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

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

	



	if($mybb->user['uid'] == 0)
{
// Build a forum cache.

	if($mybb->user['uid'] == 0)
{
// Build a forum cache.

Zeile 1556Zeile 1564
			WHERE active != 0
ORDER BY pid, disporder
");

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

		



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

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

Zeile 1609Zeile 1617

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


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

		



		if($forumpermissions['canonlyviewownthreads'] != 0)
{
$posts = '-';

		if($forumpermissions['canonlyviewownthreads'] != 0)
{
$posts = '-';

Zeile 1667Zeile 1675
}

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

}

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

{	

{

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


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


Zeile 1758Zeile 1766
	if($mybb->user['suspendsignature'] && $mybb->user['suspendsigtime'] > TIME_NOW)
{
$plugins->run_hooks("usercp_editsig_end");

	if($mybb->user['suspendsignature'] && $mybb->user['suspendsigtime'] > TIME_NOW)
{
$plugins->run_hooks("usercp_editsig_end");

		



		// User either doesn't have permission, or has their signature suspended
eval("\$editsig = \"".$templates->get("usercp_editsig_suspended")."\";");
}

		// User either doesn't have permission, or has their signature suspended
eval("\$editsig = \"".$templates->get("usercp_editsig_suspended")."\";");
}

Zeile 1766Zeile 1774
	{
// User is allowed to edit their signature
if($mybb->settings['sigsmilies'] == 1)

	{
// User is allowed to edit their signature
if($mybb->settings['sigsmilies'] == 1)

		{

		{

			$sigsmilies = $lang->on;
$smilieinserter = build_clickable_smilies();
}

			$sigsmilies = $lang->on;
$smilieinserter = build_clickable_smilies();
}

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

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

		}

		}

		else
{
$sigmycode = $lang->off;

		else
{
$sigmycode = $lang->off;

		}

		}

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

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

		}

		}

		else
{
$sightml = $lang->off;

		else
{
$sightml = $lang->off;

		}

		}

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

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

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

		}
$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)
{
$codebuttons = build_mycode_inserter("signature");
}

		if($mybb->settings['bbcodeinserter'] != 0 || $mybb->user['showcodebuttons'] != 0)
{
$codebuttons = build_mycode_inserter("signature");
}

		



		$plugins->run_hooks("usercp_editsig_end");

		$plugins->run_hooks("usercp_editsig_end");

		



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

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

	



	output_page($editsig);
}


	output_page($editsig);
}


Zeile 1840Zeile 1848
		{
$avatar_error = $lang->error_noavatar;
}

		{
$avatar_error = $lang->error_noavatar;
}

		



		$mybb->input['gallery'] = str_replace(array("./", ".."), "", $mybb->input['gallery']);
$mybb->input['avatar'] = str_replace(array("./", ".."), "", $mybb->input['avatar']);


		$mybb->input['gallery'] = str_replace(array("./", ".."), "", $mybb->input['gallery']);
$mybb->input['avatar'] = str_replace(array("./", ".."), "", $mybb->input['avatar']);


Zeile 1851Zeile 1859
				$avatarpath = $db->escape_string($mybb->settings['avatardir']."/".$mybb->input['avatar']);
}
else

				$avatarpath = $db->escape_string($mybb->settings['avatardir']."/".$mybb->input['avatar']);
}
else

			{

			{

				$avatarpath = $db->escape_string($mybb->settings['avatardir']."/".$mybb->input['gallery']."/".$mybb->input['avatar']);
}


				$avatarpath = $db->escape_string($mybb->settings['avatardir']."/".$mybb->input['gallery']."/".$mybb->input['avatar']);
}


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

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

		}

		}

	}
elseif($_FILES['avatarupload']['name']) // upload avatar
{

	}
elseif($_FILES['avatarupload']['name']) // upload avatar
{

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

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

			{

			{

				$avatar_dimensions = $avatar['width']."|".$avatar['height'];
}
$updated_avatar = array(

				$avatar_dimensions = $avatar['width']."|".$avatar['height'];
}
$updated_avatar = array(

Zeile 1935Zeile 1943
				{
$lang->error_avatartoobig = $lang->sprintf($lang->error_avatartoobig, $maxwidth, $maxheight);
$avatar_error = $lang->error_avatartoobig;

				{
$lang->error_avatartoobig = $lang->sprintf($lang->error_avatartoobig, $maxwidth, $maxheight);
$avatar_error = $lang->error_avatartoobig;

				}

				}

			}
}


			}
}


Zeile 2052Zeile 2060
		{
eval("\$avatarlist = \"".$templates->get("usercp_avatar_gallery_noavatars")."\";");
}

		{
eval("\$avatarlist = \"".$templates->get("usercp_avatar_gallery_noavatars")."\";");
}

		



		$plugins->run_hooks("usercp_avatar_end");

		$plugins->run_hooks("usercp_avatar_end");

		



		eval("\$gallery = \"".$templates->get("usercp_avatar_gallery")."\";");
output_page($gallery);
}

		eval("\$gallery = \"".$templates->get("usercp_avatar_gallery")."\";");
output_page($gallery);
}

Zeile 2107Zeile 2115
		{
$auto_resize = "<br /><span class=\"smalltext\"><input type=\"checkbox\" name=\"auto_resize\" value=\"1\" checked=\"checked\" id=\"auto_resize\" /> <label for=\"auto_resize\">{$lang->avatar_auto_resize_option}</label></span>";
}

		{
$auto_resize = "<br /><span class=\"smalltext\"><input type=\"checkbox\" name=\"auto_resize\" value=\"1\" checked=\"checked\" id=\"auto_resize\" /> <label for=\"auto_resize\">{$lang->avatar_auto_resize_option}</label></span>";
}

		



		$plugins->run_hooks("usercp_avatar_end");

		$plugins->run_hooks("usercp_avatar_end");

		



		eval("\$avatar = \"".$templates->get("usercp_avatar")."\";");
output_page($avatar);
}

		eval("\$avatar = \"".$templates->get("usercp_avatar")."\";");
output_page($avatar);
}

Zeile 2150Zeile 2158
			$selected_list = explode(",", $mybb->user['ignorelist']);
}
}

			$selected_list = explode(",", $mybb->user['ignorelist']);
}
}

	



	$error_message = "";
$message = "";

	$error_message = "";
$message = "";

	



	// Adding one or more users to this list
if($mybb->input['add_username'])
{

	// Adding one or more users to this list
if($mybb->input['add_username'])
{

Zeile 2166Zeile 2174
		foreach($users as $key => $username)
{
if(empty($username))

		foreach($users as $key => $username)
{
if(empty($username))

			{
unset($users[$key]);
continue;
}

			{
unset($users[$key]);
continue;
}


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


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

Zeile 2198Zeile 2206
					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 2206Zeile 2214
					{
$string .= "_alt";
}

					{
$string .= "_alt";
}





					$error_message = $lang->$string;
array_pop($users); // To maintain a proper count when we call count($users)
continue;
}

					$error_message = $lang->$string;
array_pop($users); // To maintain a proper count when we call count($users)
continue;
}

				



				$existing_users[] = $user['uid'];
}
}

				$existing_users[] = $user['uid'];
}
}

Zeile 2299Zeile 2307
	{
$user['ignorelist'] = $db->escape_string($new_list);
$mybb->user['ignorelist'] = $user['ignorelist'];

	{
$user['ignorelist'] = $db->escape_string($new_list);
$mybb->user['ignorelist'] = $user['ignorelist'];

	}
else
{

	}
else
{

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

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

Zeile 2314Zeile 2322
	if($mybb->input['ajax'])
{
if($mybb->input['manage'] == "ignored")

	if($mybb->input['ajax'])
{
if($mybb->input['manage'] == "ignored")

		{

		{

			$list = "ignore";

			$list = "ignore";

		}

		}

		else
{
$list = "buddy";

		else
{
$list = "buddy";

		}


		}


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

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

Zeile 2340Zeile 2348
			{
echo "\$('{$mybb->input['manage']}_count').innerHTML = '0';\n";
if($mybb->input['manage'] == "ignored")

			{
echo "\$('{$mybb->input['manage']}_count').innerHTML = '0';\n";
if($mybb->input['manage'] == "ignored")

				{

				{

					echo "\$('ignore_list').innerHTML = '<li>{$lang->ignore_list_empty}</li>';\n";

					echo "\$('ignore_list').innerHTML = '<li>{$lang->ignore_list_empty}</li>';\n";

				}

				}

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

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

			}

			}

			else
{
echo "\$('{$mybb->input['manage']}_count').innerHTML = '".count(explode(",", $new_list))."';\n";
}
echo $message_js;

			else
{
echo "\$('{$mybb->input['manage']}_count').innerHTML = '".count(explode(",", $new_list))."';\n";
}
echo $message_js;

			exit;

			exit;

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

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

Zeile 2403Zeile 2411

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


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

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

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

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

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

Zeile 2444Zeile 2452
		}
exit;
}

		}
exit;
}

	



	$plugins->run_hooks("usercp_editlists_end");

eval("\$listpage = \"".$templates->get("usercp_editlists")."\";");

	$plugins->run_hooks("usercp_editlists_end");

eval("\$listpage = \"".$templates->get("usercp_editlists")."\";");

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

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

	



	$query = $db->simple_select("posts", "COUNT(*) AS draftcount", "visible='-2' AND uid='".$mybb->user['uid']."'");
$count = $db->fetch_array($query);
$draftcount = "(".my_number_format($count['draftcount']).")";

	$query = $db->simple_select("posts", "COUNT(*) AS draftcount", "visible='-2' AND uid='".$mybb->user['uid']."'");
$count = $db->fetch_array($query);
$draftcount = "(".my_number_format($count['draftcount']).")";

	



	$plugins->run_hooks("usercp_drafts_end");

	$plugins->run_hooks("usercp_drafts_end");

	



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


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


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

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





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

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

	}

	}

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

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

		{

		{

			$pidin[] = "'".intval($id)."'";

			$pidin[] = "'".intval($id)."'";

		}

		}

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

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

		}

		}

	}
if($tidin)
{

	}
if($tidin)
{

Zeile 2559Zeile 2567

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


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

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


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


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

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

Zeile 2634Zeile 2642
		}
if($mybb->input['do'] == "joingroup" && $usergroup['type'] == 4)
{

		}
if($mybb->input['do'] == "joingroup" && $usergroup['type'] == 4)
{

			$reason = $db->escape_string($reason);

			$reason = $db->escape_string($mybb->input['reason']);

			$now = TIME_NOW;
$joinrequest = array(
"uid" => $mybb->user['uid'],
"gid" => intval($mybb->input['joingroup']),

			$now = TIME_NOW;
$joinrequest = array(
"uid" => $mybb->user['uid'],
"gid" => intval($mybb->input['joingroup']),

				"reason" => $db->escape_string($mybb->input['reason']),

				"reason" => $reason,

				"dateline" => TIME_NOW
);


				"dateline" => TIME_NOW
);


Zeile 2685Zeile 2693
		case "pgsql":
case "sqlite":
$query = $db->query("

		case "pgsql":
case "sqlite":
$query = $db->query("

				SELECT g.title, g.gid, g.type, COUNT(u.uid) AS users, COUNT(j.rid) AS joinrequests, l.canmanagerequests, l.canmanagemembers

				SELECT g.title, g.gid, g.type, COUNT(DISTINCT u.uid) AS users, COUNT(DISTINCT j.rid) AS joinrequests, l.canmanagerequests, l.canmanagemembers

				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']."'

				LEFT JOIN ".TABLE_PREFIX."joinrequests j ON(j.gid=g.gid AND j.uid != 0)
WHERE l.uid='".$mybb->user['uid']."'

				GROUP BY g.gid, g.title, g.type, l.canmanagerequests, l.canmanagemembers
");
break;

				GROUP BY g.gid, g.title, g.type, l.canmanagerequests, l.canmanagemembers
");
break;

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

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

		{

		{

			$usergroup['joinrequests'] = '--';
}
if($usergroup['joinrequests'] > 0 && $usergroup['canmanagerequests'] == 1)

			$usergroup['joinrequests'] = '--';
}
if($usergroup['joinrequests'] > 0 && $usergroup['canmanagerequests'] == 1)

Zeile 2719Zeile 2727
			$moderaterequestslink = " [<a href=\"managegroup.php?action=joinrequests&amp;gid={$usergroup['gid']}\">{$lang->view_requests}</a>]";
}
$groupleader[$usergroup['gid']] = 1;

			$moderaterequestslink = " [<a href=\"managegroup.php?action=joinrequests&amp;gid={$usergroup['gid']}\">{$lang->view_requests}</a>]";
}
$groupleader[$usergroup['gid']] = 1;

		$trow = alt_trow();

		$trow = alt_trow();

		eval("\$groupsledlist .= \"".$templates->get("usercp_usergroups_leader_usergroup")."\";");

		eval("\$groupsledlist .= \"".$templates->get("usercp_usergroups_leader_usergroup")."\";");

	}

	}

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

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

	}

	}


// Fetch the list of groups the member is in
// Do the primary group first


// Fetch the list of groups the member is in
// Do the primary group first

Zeile 2738Zeile 2746
		$displaycode = " ({$lang->display_group})";
}
elseif($usergroup['candisplaygroup'] == 1)

		$displaycode = " ({$lang->display_group})";
}
elseif($usergroup['candisplaygroup'] == 1)

	{

	{

		$displaycode = " (<a href=\"usercp.php?action=usergroups&amp;displaygroup={$usergroup['gid']}&amp;my_post_key={$mybb->post_code}\">{$lang->set_as_display_group}</a>)";
}
else

		$displaycode = " (<a href=\"usercp.php?action=usergroups&amp;displaygroup={$usergroup['gid']}&amp;my_post_key={$mybb->post_code}\">{$lang->set_as_display_group}</a>)";
}
else

Zeile 2762Zeile 2770
			elseif($usergroup['type'] != 4 && $usergroup['type'] != 3)
{
$leavelink = "<div style=\"text-align: center;\"><span class=\"smalltext\">{$lang->usergroup_cannot_leave}</span></div>";

			elseif($usergroup['type'] != 4 && $usergroup['type'] != 3)
{
$leavelink = "<div style=\"text-align: center;\"><span class=\"smalltext\">{$lang->usergroup_cannot_leave}</span></div>";

			}
else
{

			}
else
{

				$leavelink = "<div style=\"text-align: center;\"><a href=\"usercp.php?action=usergroups&amp;leavegroup=".$usergroup['gid']."&amp;my_post_key={$mybb->post_code}\">".$lang->usergroup_leave."</a></div>";

				$leavelink = "<div style=\"text-align: center;\"><a href=\"usercp.php?action=usergroups&amp;leavegroup=".$usergroup['gid']."&amp;my_post_key={$mybb->post_code}\">".$lang->usergroup_leave."</a></div>";

			}

			}

			if($usergroup['description'])
{
$description = "<br /><span class=\"smalltext\">".$usergroup['description']."</span>";

			if($usergroup['description'])
{
$description = "<br /><span class=\"smalltext\">".$usergroup['description']."</span>";

			}
else

			}
else

			{
$description = '';
}

			{
$description = '';
}

Zeile 2872Zeile 2880
	}

$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")
{
$plugins->run_hooks("usercp_attachments_start");

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

Zeile 2972Zeile 2980
		eval("\$attachments = \"".$templates->get("usercp_attachments_none")."\";");
$usagenote = '';
}

		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 3026Zeile 3034
	{
$daysreg = 1;
}

	{
$daysreg = 1;
}

	



	$perday = $mybb->user['postnum'] / $daysreg;
$perday = round($perday, 2);
if($perday > $mybb->user['postnum'])
{
$perday = $mybb->user['postnum'];

	$perday = $mybb->user['postnum'] / $daysreg;
$perday = round($perday, 2);
if($perday > $mybb->user['postnum'])
{
$perday = $mybb->user['postnum'];

	}

	}


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


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

Zeile 3134Zeile 3142
					$warning['points'] = "+{$warning['points']}";
}
$points = $lang->sprintf($lang->warning_points, $warning['points']);

					$warning['points'] = "+{$warning['points']}";
}
$points = $lang->sprintf($lang->warning_points, $warning['points']);





				// Figure out expiration time
if($warning['daterevoked'])
{

				// Figure out expiration time
if($warning['daterevoked'])
{

Zeile 3152Zeile 3160
				{
$expires = my_date($mybb->settings['dateformat'], $warning['expires']).", ".my_date($mybb->settings['timeformat'], $warning['expires']);
}

				{
$expires = my_date($mybb->settings['dateformat'], $warning['expires']).", ".my_date($mybb->settings['timeformat'], $warning['expires']);
}





				$alt_bg = alt_trow();
eval("\$warnings .= \"".$templates->get("usercp_warnings_warning")."\";");
}

				$alt_bg = alt_trow();
eval("\$warnings .= \"".$templates->get("usercp_warnings_warning")."\";");
}

Zeile 3169Zeile 3177

// Format post numbers
$mybb->user['posts'] = my_number_format($mybb->user['postnum']);


// Format post numbers
$mybb->user['posts'] = my_number_format($mybb->user['postnum']);

	



	// Build referral link
if($mybb->settings['usereferrals'] == 1)
{
$referral_link = $lang->sprintf($lang->referral_link, $settings['bburl'], $mybb->user['uid']);
eval("\$referral_info = \"".$templates->get("usercp_referrals")."\";");
}

	// Build referral link
if($mybb->settings['usereferrals'] == 1)
{
$referral_link = $lang->sprintf($lang->referral_link, $settings['bburl'], $mybb->user['uid']);
eval("\$referral_info = \"".$templates->get("usercp_referrals")."\";");
}





	// User Notepad
$plugins->run_hooks("usercp_notepad_start");
$mybb->user['notepad'] = htmlspecialchars_uni($mybb->user['notepad']);
eval("\$user_notepad = \"".$templates->get("usercp_notepad")."\";");
$plugins->run_hooks("usercp_notepad_end");

	// User Notepad
$plugins->run_hooks("usercp_notepad_start");
$mybb->user['notepad'] = htmlspecialchars_uni($mybb->user['notepad']);
eval("\$user_notepad = \"".$templates->get("usercp_notepad")."\";");
$plugins->run_hooks("usercp_notepad_end");

	



	// Thread Subscriptions with New Posts
$latest_subscribed = '';
$query = $db->simple_select("threadsubscriptions", "sid", "uid = '".$mybb->user['uid']."'", array("limit" => 1));

	// Thread Subscriptions with New Posts
$latest_subscribed = '';
$query = $db->simple_select("threadsubscriptions", "sid", "uid = '".$mybb->user['uid']."'", array("limit" => 1));

Zeile 3203Zeile 3211
			ORDER BY t.lastpost DESC
LIMIT 0, 10
");

			ORDER BY t.lastpost DESC
LIMIT 0, 10
");

		



		$fpermissions = forum_permissions();
while($subscription = $db->fetch_array($query))
{

		$fpermissions = forum_permissions();
while($subscription = $db->fetch_array($query))
{

Zeile 3213Zeile 3221
				$subscriptions[$subscription['tid']] = $subscription;
}
}

				$subscriptions[$subscription['tid']] = $subscription;
}
}

		



		if(is_array($subscriptions))
{
$tids = implode(",", array_keys($subscriptions));

		if(is_array($subscriptions))
{
$tids = implode(",", array_keys($subscriptions));

Zeile 3223Zeile 3231
			{
$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))

				{

				{

					if($readthread['dateline'] >= $subscriptions[$readthread['tid']]['lastpost'])
{
unset($subscriptions[$readthread['tid']]); // If it's already been read, then don't display the thread
}
else

					if($readthread['dateline'] >= $subscriptions[$readthread['tid']]['lastpost'])
{
unset($subscriptions[$readthread['tid']]); // If it's already been read, then don't display the thread
}
else

					{			

					{

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

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

			



			if($subscriptions)
{
if($mybb->settings['dotfolders'] != 0)

			if($subscriptions)
{
if($mybb->settings['dotfolders'] != 0)

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

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

					}

					}

				}

				}





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

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

				



				foreach($subscriptions as $thread)
{
$folder = '';

				foreach($subscriptions as $thread)
{
$folder = '';

Zeile 3261Zeile 3269
						$thread['subject'] = htmlspecialchars_uni($thread['subject']);
$thread['threadlink'] = get_thread_link($thread['tid']);
$thread['lastpostlink'] = get_thread_link($thread['tid'], 0, "lastpost");

						$thread['subject'] = htmlspecialchars_uni($thread['subject']);
$thread['threadlink'] = get_thread_link($thread['tid']);
$thread['lastpostlink'] = get_thread_link($thread['tid'], 0, "lastpost");





						// If this thread has a prefix...
if($thread['prefix'] != 0)
{
$query = $db->simple_select('threadprefixes', 'prefix, displaystyle', "pid='{$thread['prefix']}'");
$threadprefix = $db->fetch_array($query);

						// If this thread has a prefix...
if($thread['prefix'] != 0)
{
$query = $db->simple_select('threadprefixes', 'prefix, displaystyle', "pid='{$thread['prefix']}'");
$threadprefix = $db->fetch_array($query);

	



							$thread['displayprefix'] = $threadprefix['displaystyle'].'&nbsp;';
}
else
{
$thread['displayprefix'] = '';

							$thread['displayprefix'] = $threadprefix['displaystyle'].'&nbsp;';
}
else
{
$thread['displayprefix'] = '';

						}

						}


// Icons
if($thread['icon'] > 0 && $icon_cache[$thread['icon']])


// Icons
if($thread['icon'] > 0 && $icon_cache[$thread['icon']])

Zeile 3284Zeile 3292
						else
{
$icon = "&nbsp;";

						else
{
$icon = "&nbsp;";

						}


						}


						if($thread['doticon'])
{
$folder = "dot_";
$folder_label .= $lang->icon_dot;
}

						if($thread['doticon'])
{
$folder = "dot_";
$folder_label .= $lang->icon_dot;
}

						



						// Check to see which icon we display
if($thread['lastread'] && $thread['lastread'] < $thread['lastpost'])
{

						// Check to see which icon we display
if($thread['lastread'] && $thread['lastread'] < $thread['lastpost'])
{

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

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

						



						$folder .= "folder";

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

						$folder .= "folder";

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

						{

						{

							$bgcolor = "trow_shaded";
}

							$bgcolor = "trow_shaded";
}

		



						$lastpostdate = my_date($mybb->settings['dateformat'], $thread['lastpost']);
$lastposttime = my_date($mybb->settings['timeformat'], $thread['lastpost']);
$lastposter = $thread['lastposter'];
$lastposteruid = $thread['lastposteruid'];

						$lastpostdate = my_date($mybb->settings['dateformat'], $thread['lastpost']);
$lastposttime = my_date($mybb->settings['timeformat'], $thread['lastpost']);
$lastposter = $thread['lastposter'];
$lastposteruid = $thread['lastposteruid'];

		



						if($lastposteruid == 0)
{
$lastposterlink = $lastposter;

						if($lastposteruid == 0)
{
$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['author'] = build_profile_link($thread['username'], $thread['uid']);

						$thread['replies'] = my_number_format($thread['replies']);
$thread['views'] = my_number_format($thread['views']);
$thread['author'] = build_profile_link($thread['username'], $thread['uid']);

	



						eval("\$latest_subscribed_threads .= \"".$templates->get("usercp_latest_subscribed_threads")."\";");
}
}

						eval("\$latest_subscribed_threads .= \"".$templates->get("usercp_latest_subscribed_threads")."\";");
}
}

Zeile 3339Zeile 3347
			}
}
}

			}
}
}

	



	// User's Latest Threads

// Get unviewable forums

	// User's Latest Threads

// Get unviewable forums

Zeile 3407Zeile 3415
			while($readthread = $db->fetch_array($query))
{
$threadcache[$readthread['tid']]['lastread'] = $readthread['dateline'];

			while($readthread = $db->fetch_array($query))
{
$threadcache[$readthread['tid']]['lastread'] = $readthread['dateline'];

			}

			}

		}

// Icon Stuff

		}

// Icon Stuff

Zeile 3419Zeile 3427
				$threadcache[$post['tid']]['doticon'] = 1;
}
}

				$threadcache[$post['tid']]['doticon'] = 1;
}
}

		



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

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

		



		// Run the threads...
$latest_threads_threads = '';
foreach($threadcache as $thread)

		// Run the threads...
$latest_threads_threads = '';
foreach($threadcache as $thread)

Zeile 3436Zeile 3444
				$isnew = 0;
$donenew = 0;
$lastread = 0;

				$isnew = 0;
$donenew = 0;
$lastread = 0;

				



				// If this thread has a prefix...
if($thread['prefix'] != 0)
{

				// If this thread has a prefix...
if($thread['prefix'] != 0)
{

Zeile 3449Zeile 3457
				{
$thread['displayprefix'] = '';
}

				{
$thread['displayprefix'] = '';
}

				



				$thread['subject'] = $parser->parse_badwords($thread['subject']);
$thread['subject'] = htmlspecialchars_uni($thread['subject']);
$thread['threadlink'] = get_thread_link($thread['tid']);

				$thread['subject'] = $parser->parse_badwords($thread['subject']);
$thread['subject'] = htmlspecialchars_uni($thread['subject']);
$thread['threadlink'] = get_thread_link($thread['tid']);

Zeile 3463Zeile 3471
				else
{
$icon = "&nbsp;";

				else
{
$icon = "&nbsp;";

				}

				}


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


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

				{

				{

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

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

				



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

					}

					}

				}

				}

	



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

				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;

				}


				}


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

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

Zeile 3489Zeile 3497
						$lastread = $thread['lastread'];
}
}

						$lastread = $thread['lastread'];
}
}

	



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

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

Zeile 3569Zeile 3577

eval("\$latest_threads = \"".$templates->get("usercp_latest_threads")."\";");
}


eval("\$latest_threads = \"".$templates->get("usercp_latest_threads")."\";");
}

	



	$plugins->run_hooks("usercp_end");

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

	$plugins->run_hooks("usercp_end");

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