Vergleich usercp.php - 1.6.10 - 1.6.12

  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 1307Zeile 1314
			$threadcount = 0;
}
}

			$threadcount = 0;
}
}





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


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


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


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





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

				}

				}

			}
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'])


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

				{

				{

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

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

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

				else
{
$lastread = $forum_read;

				}

				}

			}

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

			}

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

Zeile 1488Zeile 1495
			{
$folder .= "lock";
$folder_label .= $lang->icon_lock;

			{
$folder .= "lock";
$folder_label .= $lang->icon_lock;

			}

$folder .= "folder";

			}

$folder .= "folder";


if($thread['visible'] == 0)
{
$bgcolor = "trow_shaded";
}


if($thread['visible'] == 0)
{
$bgcolor = "trow_shaded";
}





			// Build last post info
$lastpostdate = my_date($mybb->settings['dateformat'], $thread['lastpost']);
$lastposttime = my_date($mybb->settings['timeformat'], $thread['lastpost']);

			// Build last post info
$lastpostdate = my_date($mybb->settings['dateformat'], $thread['lastpost']);
$lastposttime = my_date($mybb->settings['timeformat'], $thread['lastpost']);

Zeile 1507Zeile 1514
			if($lastposteruid == 0)
{
$lastposterlink = $lastposter;

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

			}

			}

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

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

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

Zeile 1546Zeile 1553
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 1603Zeile 1610
		$forumpermissions = $fpermissions[$forum['fid']];

if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0)

		$forumpermissions = $fpermissions[$forum['fid']];

if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0)

		{

		{

			continue;
}

			continue;
}





		$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 = '-';
$threads = '-';

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

		}
else
{

		}
else
{

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

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

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

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

		{

		{

			$lastpost = "<div align=\"center\">{$lang->never}</div>";
}
// Hide last post
elseif($forumpermissions['canonlyviewownthreads'] != 0 && $forum['lastposteruid'] != $mybb->user['uid'])

			$lastpost = "<div align=\"center\">{$lang->never}</div>";
}
// Hide last post
elseif($forumpermissions['canonlyviewownthreads'] != 0 && $forum['lastposteruid'] != $mybb->user['uid'])

		{

		{

			$lastpost = "<div align=\"center\">{$lang->na}</div>";
}
else

			$lastpost = "<div align=\"center\">{$lang->na}</div>";
}
else

Zeile 1650Zeile 1657
		if($mybb->settings['showdescriptions'] == 0)
{
$forum['description'] = "";

		if($mybb->settings['showdescriptions'] == 0)
{
$forum['description'] = "";

		}

		}


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


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

	}


	}


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

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

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

		{
$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 1823Zeile 1830
	require_once MYBB_ROOT."inc/functions_upload.php";

$avatar_error = "";

	require_once MYBB_ROOT."inc/functions_upload.php";

$avatar_error = "";





	if($mybb->input['remove']) // remove avatar
{
$updated_avatar = array(

	if($mybb->input['remove']) // remove avatar
{
$updated_avatar = array(

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 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 2084Zeile 2091
			}
eval("\$currentavatar = \"".$templates->get("usercp_avatar_current")."\";");
$colspan = 1;

			}
eval("\$currentavatar = \"".$templates->get("usercp_avatar_current")."\";");
$colspan = 1;

		}

		}

		else
{
$colspan = 2;
}
if($mybb->settings['maxavatardims'] != "")

		else
{
$colspan = 2;
}
if($mybb->settings['maxavatardims'] != "")

		{

		{

			list($maxwidth, $maxheight) = explode("x", my_strtolower($mybb->settings['maxavatardims']));
$lang->avatar_note .= "<br />".$lang->sprintf($lang->avatar_note_dimensions, $maxwidth, $maxheight);

			list($maxwidth, $maxheight) = explode("x", my_strtolower($mybb->settings['maxavatardims']));
$lang->avatar_note .= "<br />".$lang->sprintf($lang->avatar_note_dimensions, $maxwidth, $maxheight);

		}

		}

		if($mybb->settings['avatarsize'])
{
$maxsize = get_friendly_size($mybb->settings['avatarsize']*1024);

		if($mybb->settings['avatarsize'])
{
$maxsize = get_friendly_size($mybb->settings['avatarsize']*1024);

Zeile 2102Zeile 2109
		if($mybb->settings['avatarresizing'] == "auto")
{
$auto_resize = "<br /><span class=\"smalltext\">{$lang->avatar_auto_resize_note}</span>\n";

		if($mybb->settings['avatarresizing'] == "auto")
{
$auto_resize = "<br /><span class=\"smalltext\">{$lang->avatar_auto_resize_note}</span>\n";

		}

		}

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

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

		



		$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 2178Zeile 2185
				continue;
}
$users[$key] = $db->escape_string($username);

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

		}


		}


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

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

Zeile 2211Zeile 2218
					array_pop($users); // To maintain a proper count when we call count($users)
continue;
}

					array_pop($users); // To maintain a proper count when we call count($users)
continue;
}

				



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

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

			}
}

			}
}


if($found_users < count($users))


if($found_users < count($users))

		{

		{

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

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

			}

			}


$error_message .= $lang->invalid_user_selected;


$error_message .= $lang->invalid_user_selected;

		}

		}


if(($adding_self != true || ($adding_self == true && count($users) > 0)) && ($error_message == "" || count($users) > 1))


if(($adding_self != true || ($adding_self == true && count($users) > 0)) && ($error_message == "" || count($users) > 1))

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

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

			{
$message = $lang->users_added_to_ignore_list;

			{
$message = $lang->users_added_to_ignore_list;

			}

			}

			else
{
$message = $lang->users_added_to_buddy_list;

			else
{
$message = $lang->users_added_to_buddy_list;

Zeile 2239Zeile 2246
		}

if($adding_self == true)

		}

if($adding_self == true)

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

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

				$error_message = $lang->cant_add_self_to_ignore_list;
}
else

				$error_message = $lang->cant_add_self_to_ignore_list;
}
else

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'])
{
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 2566

// 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 2641
		}
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 2692
		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 2718
		$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 2726
			$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 2745
		$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 2769
			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 2879
	}

$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 2979
		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 3033
	{
$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 3141
					$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 3159
				{
$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 3176

// 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 3210
			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 3220
				$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 3230
			{
$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 3250
					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 3268
						$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 3291
						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 3313
							$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 3346
			}
}
}

			}
}
}

	



	// User's Latest Threads

// Get unviewable forums

	// User's Latest Threads

// Get unviewable forums

Zeile 3407Zeile 3414
			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 3426
				$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 3443
				$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 3456
				{
$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 3470
				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 3496
						$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 3576

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