Vergleich usercp.php - 1.6.10 - 1.6.11

  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 281Zeile 281
	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 455Zeile 455
			$userfield = $user[$field];
}
if($type == "multiselect")

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

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

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

				$useropts = explode("\n", $userfield);
}
if(is_array($useropts))
{
foreach($useropts as $key => $val)

				$useropts = explode("\n", $userfield);
}
if(is_array($useropts))
{
foreach($useropts as $key => $val)

				{

				{

					$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);
$val = str_replace("\n", "\\n", $val);


			{
foreach($expoptions as $key => $val)
{
$val = trim($val);
$val = str_replace("\n", "\\n", $val);


					$sel = "";

					$sel = "";

					if($val == $seloptions[$val])
{
$sel = " selected=\"selected\"";
}
$select .= "<option value=\"$val\"$sel>$val</option>\n";

					if($val == $seloptions[$val])
{
$sel = " selected=\"selected\"";
}
$select .= "<option value=\"$val\"$sel>$val</option>\n";

				}

				}

				if(!$profilefield['length'])
{
$profilefield['length'] = 3;

				if(!$profilefield['length'])
{
$profilefield['length'] = 3;

Zeile 509Zeile 509
						$sel = " selected=\"selected\"";
}
$select .= "<option value=\"$val\"$sel>$val</option>";

						$sel = " selected=\"selected\"";
}
$select .= "<option value=\"$val\"$sel>$val</option>";

				}
if(!$profilefield['length'])
{

				}
if(!$profilefield['length'])
{

					$profilefield['length'] = 1;
}
$code = "<select name=\"profile_fields[$field]\" size=\"{$profilefield['length']}\">$select</select>";
}
}
elseif($type == "radio")

					$profilefield['length'] = 1;
}
$code = "<select name=\"profile_fields[$field]\" size=\"{$profilefield['length']}\">$select</select>";
}
}
elseif($type == "radio")

		{
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)
{
$checked = "";

		{
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)
{
$checked = "";

					if($val == $userfield)
{
$checked = " checked=\"checked\"";
}
$code .= "<input type=\"radio\" class=\"radio\" name=\"profile_fields[$field]\" value=\"$val\"$checked /> <span class=\"smalltext\">$val</span><br />";

					if($val == $userfield)
{
$checked = " checked=\"checked\"";
}
$code .= "<input type=\"radio\" class=\"radio\" name=\"profile_fields[$field]\" value=\"$val\"$checked /> <span class=\"smalltext\">$val</span><br />";

				}
}

				}
}

		}
elseif($type == "checkbox")
{

		}
elseif($type == "checkbox")
{

Zeile 561Zeile 561
						$checked = " checked=\"checked\"";
}
$code .= "<input type=\"checkbox\" class=\"checkbox\" name=\"profile_fields[$field][]\" value=\"$val\"$checked /> <span class=\"smalltext\">$val</span><br />";

						$checked = " checked=\"checked\"";
}
$code .= "<input type=\"checkbox\" class=\"checkbox\" name=\"profile_fields[$field][]\" value=\"$val\"$checked /> <span class=\"smalltext\">$val</span><br />";

				}
}
}

				}
}
}

		elseif($type == "textarea")
{
$value = htmlspecialchars_uni($userfield);
$code = "<textarea name=\"profile_fields[$field]\" rows=\"6\" cols=\"30\" style=\"width: 95%\">$value</textarea>";

		elseif($type == "textarea")
{
$value = htmlspecialchars_uni($userfield);
$code = "<textarea name=\"profile_fields[$field]\" rows=\"6\" cols=\"30\" style=\"width: 95%\">$value</textarea>";

		}
else

		}
else

		{
$value = htmlspecialchars_uni($userfield);
$maxlength = "";

		{
$value = htmlspecialchars_uni($userfield);
$maxlength = "";

Zeile 600Zeile 600
	{
eval("\$customfields = \"".$templates->get("usercp_profile_profilefields")."\";");
}

	{
eval("\$customfields = \"".$templates->get("usercp_profile_profilefields")."\";");
}





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

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

Zeile 613Zeile 613
				if($title['posts'] <= $mybb->user['postnum'])
{
$defaulttitle = $title['title'];

				if($title['posts'] <= $mybb->user['postnum'])
{
$defaulttitle = $title['title'];

					break;
}
}
}
else
{
$defaulttitle = $mybb->usergroup['usertitle'];
}


					break;
}
}
}
else
{
$defaulttitle = $mybb->usergroup['usertitle'];
}


		if(trim($user['usertitle']) == '')
{
$lang->current_custom_usertitle = '';

		if(trim($user['usertitle']) == '')
{
$lang->current_custom_usertitle = '';

Zeile 640Zeile 640
	{
$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 665
		"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 751Zeile 751
	}

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

	}

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

	{

	{

		$invisiblecheck = "checked=\"checked\"";
}
else

		$invisiblecheck = "checked=\"checked\"";
}
else

Zeile 817Zeile 817
	{
$receivepmscheck = "";
}

	{
$receivepmscheck = "";
}

	



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

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

	}
else

	}
else

	{
$receivefrombuddycheck = "";

	{
$receivefrombuddycheck = "";

	}

	}


if($user['pmnotice'] == 1 || $user['pmnotice'] == 2)
{
$pmnoticecheck = " checked=\"checked\"";


if($user['pmnotice'] == 1 || $user['pmnotice'] == 2)
{
$pmnoticecheck = " checked=\"checked\"";

	}

	}

	else
{
$pmnoticecheck = "";
}

if($user['dstcorrection'] == 2)

	else
{
$pmnoticecheck = "";
}

if($user['dstcorrection'] == 2)

	{

	{

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

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

	}

	}

	else
{
$dst_disabled_selected = "selected=\"selected\"";

	else
{
$dst_disabled_selected = "selected=\"selected\"";

	}


	}


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

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

	}
else

	}
else

	{
$showcodebuttonscheck = "";
}

	{
$showcodebuttonscheck = "";
}

Zeile 876Zeile 876
		$pmnotifycheck = '';
}


		$pmnotifycheck = '';
}


	



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

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

	}

	}


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


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

Zeile 889Zeile 889
	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 902
		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)

	}

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

		if($user['timeformat'] == $key)
{
$time_format_options .= "<option value=\"$key\" selected=\"selected\">".my_date($format, TIME_NOW, "", 0)."</option>";

Zeile 919Zeile 919
	}

$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")."\";");

	}


	}


	$threadview[$user['threadmode']] = 'selected="selected"';
$daysprunesel[$user['daysprune']] = 'selected="selected"';
$stylelist = build_theme_select("style", $user['style']);

	$threadview[$user['threadmode']] = 'selected="selected"';
$daysprunesel[$user['daysprune']] = 'selected="selected"';
$stylelist = build_theme_select("style", $user['style']);

Zeile 935Zeile 935
		if(is_array($explodedtpp))
{
foreach($explodedtpp as $key => $val)

		if(is_array($explodedtpp))
{
foreach($explodedtpp as $key => $val)

			{

			{

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

Zeile 966Zeile 966
		}
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 1058Zeile 1058
	}

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

Zeile 1111Zeile 1111
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 1170Zeile 1170
	{
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);
}





if($mybb->input['action'] == "do_subscriptions")
{
// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

if($mybb->input['action'] == "do_subscriptions")
{
// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);





	$plugins->run_hooks("usercp_do_subscriptions_start");

if(!is_array($mybb->input['check']))

	$plugins->run_hooks("usercp_do_subscriptions_start");

if(!is_array($mybb->input['check']))

Zeile 1195Zeile 1195

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


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

	{

	{

		$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

Zeile 1208Zeile 1208
		else if($mybb->input['do'] == "instant_notification")
{
$new_notification = 1;

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

		}


		}


		// Update
$update_array = array("notification" => $new_notification);
$db->update_query("threadsubscriptions", $update_array, "tid IN ($tids) AND uid='{$mybb->user['uid']}'");

		// Update
$update_array = array("notification" => $new_notification);
$db->update_query("threadsubscriptions", $update_array, "tid IN ($tids) AND uid='{$mybb->user['uid']}'");

	}


	}


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

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

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

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

	}


	}


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

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

Zeile 1248Zeile 1248
	$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 1311Zeile 1318
	if(is_array($subscriptions))
{
$tids = implode(",", array_keys($subscriptions));

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

		



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

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

Zeile 1321Zeile 1328
				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 1367Zeile 1374
				$subscriptions[$readthread['tid']]['lastread'] = $readthread['dateline'];
}
}

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

		



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

// Now we can build our subscription list

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

// Now we can build our subscription list

Zeile 1377Zeile 1384

$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 1411Zeile 1418
			{
$folder = "dot_";
$folder_label .= $lang->icon_dot;

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

			}

			}


$gotounread = '';
$isnew = 0;


$gotounread = '';
$isnew = 0;

Zeile 1421Zeile 1428
			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 1431Zeile 1438
			else
{
$forum_read = $forumsread[$thread['fid']];

			else
{
$forum_read = $forumsread[$thread['fid']];

			}


			}


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

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

			}


			}


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

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

				}

				}

				else
{
$lastread = 1;

				else
{
$lastread = 1;

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

				else
{
$lastread = $forum_read;

				}
}

				}
}


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


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

Zeile 1536Zeile 1543
	{
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 1563
			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 1616

$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 1674
}

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 1765
	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 1773
	{
// 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 1784
		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 1807
		}
$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 1847
		{
$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 1858
				$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 1874
				$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 1890
		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 1942
				{
$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 2059
		{
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 2114
		{
$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 2157
			$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 2173
		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 2205
					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 2213
					{
$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 2306
	{
$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 2321
	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 2347
			{
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 2410

// 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 2451
		}
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 2503
		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 2518
{
// 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'])
{

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

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

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

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

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

			$reason = $db->escape_string($reason);
$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")."\";");