Vergleich usercp.php - 1.6.7 - 1.6.10

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: usercp.php 5765 2012-03-27 09:52:45Z Tomm $

 * $Id$

 */

define("IN_MYBB", 1);
define('THIS_SCRIPT', 'usercp.php');


 */

define("IN_MYBB", 1);
define('THIS_SCRIPT', 'usercp.php');


$templatelist = "usercp,usercp_home,usercp_nav,usercp_profile,error_nopermission,buddy_online,buddy_offline,usercp_changename,usercp_nav_changename";

$templatelist = "usercp,usercp_nav,usercp_profile,usercp_changename,usercp_email,usercp_password,usercp_subscriptions_thread,forumbit_depth2_forum_lastpost,usercp_forumsubscriptions_forum";

$templatelist .= ",usercp_usergroups_memberof_usergroup,usercp_usergroups_memberof,usercp_usergroups_joinable_usergroup,usercp_usergroups_joinable,usercp_usergroups";
$templatelist .= ",usercp_nav_messenger,usercp_nav_changename,usercp_nav_profile,usercp_nav_misc,usercp_usergroups_leader_usergroup,usercp_usergroups_leader,usercp_currentavatar,usercp_reputation";

$templatelist .= ",usercp_usergroups_memberof_usergroup,usercp_usergroups_memberof,usercp_usergroups_joinable_usergroup,usercp_usergroups_joinable,usercp_usergroups";
$templatelist .= ",usercp_nav_messenger,usercp_nav_changename,usercp_nav_profile,usercp_nav_misc,usercp_usergroups_leader_usergroup,usercp_usergroups_leader,usercp_currentavatar,usercp_reputation";

$templatelist .= ",usercp_attachments_attachment,usercp_attachments,usercp_profile_away,usercp_profile_customfield,usercp_profile_profilefields,usercp_profile_customtitle,usercp_forumsubscriptions_none,usercp_forumsubscriptions,usercp_subscriptions_none,usercp_subscriptions,usercp_options_pms_from_buddys,usercp_options_tppselect,usercp_options_pppselect,usercp_options";


$templatelist .= ",usercp_attachments_attachment,usercp_attachments,usercp_profile_away,usercp_profile_customfield,usercp_profile_profilefields,usercp_profile_customtitle,usercp_forumsubscriptions_none";
$templatelist .= ",usercp_forumsubscriptions,usercp_subscriptions_none,usercp_subscriptions,usercp_options_pms_from_buddys,usercp_options_tppselect,usercp_options_pppselect,usercp_options";

$templatelist .= ",usercp_nav_editsignature,usercp_referrals,usercp_notepad,usercp_latest_threads_threads,forumdisplay_thread_gotounread,usercp_latest_threads,usercp_subscriptions_remove";

$templatelist .= ",usercp_nav_editsignature,usercp_referrals,usercp_notepad,usercp_latest_threads_threads,forumdisplay_thread_gotounread,usercp_latest_threads,usercp_subscriptions_remove";

 
$templatelist .= ",usercp_editsig_suspended,usercp_editsig,usercp_avatar_gallery_avatar,usercp_avatar_gallery_blankblock,usercp_avatar_gallery_noavatars,usercp_avatar_gallery,usercp_avatar_current";
$templatelist .= ",usercp_avatar,usercp_editlists_userusercp_editlists,usercp_drafts_draft,usercp_drafts_none,usercp_drafts_submit,usercp_drafts,usercp_usergroups_joingroup,usercp_attachments_none";
$templatelist .= ",usercp_warnings_warning,usercp_warnings,usercp_latest_subscribed_threads,usercp_latest_subscribed,usercp_nav_messenger_tracking,multipage_prevpage,multipage_start,multipage_end";
$templatelist .= ",multipage_nextpage,multipage,multipage_page_current,codebuttons,smilieinsert_getmore,smilieinsert";


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


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

Zeile 39Zeile 44
}

$errors = '';

}

$errors = '';

 

if(!isset($mybb->input['action']))
{
$mybb->input['action'] = '';
}

$collapse_options = array('usercppms', 'usercpprofile', 'usercpmisc');
foreach($collapse_options as $option)
{
if(!isset($collapsedimg[$option]))
{
$collapsedimg[$option] = '';
}
if(!isset($collapsed[$option.'_e']))
{
$collapsed[$option.'_e'] = '';
}
}


usercp_menu();



usercp_menu();


Zeile 59Zeile 82
		(($mybb->settings['sigimgcode'] == 1 || $mybb->settings['sigsmilies'] == 1) &&
substr_count($parsed_sig, "<img") > $mybb->settings['maxsigimages'])
)

		(($mybb->settings['sigimgcode'] == 1 || $mybb->settings['sigsmilies'] == 1) &&
substr_count($parsed_sig, "<img") > $mybb->settings['maxsigimages'])
)

	{

	{

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

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

Zeile 79Zeile 102
			$parsed_sig = $parser->text_parse_message($mybb->input['signature']);
}
else

			$parsed_sig = $parser->text_parse_message($mybb->input['signature']);
}
else

		{

		{

			$parsed_sig = $mybb->input['signature'];
}
$parsed_sig = preg_replace("#\s#", "", $parsed_sig);

			$parsed_sig = $mybb->input['signature'];
}
$parsed_sig = preg_replace("#\s#", "", $parsed_sig);

Zeile 90Zeile 113
			if($sig_length - $mybb->settings['siglength'] > 1)
{
$lang->sig_too_long .= $lang->sprintf($lang->sig_remove_chars_plural, $sig_length-$mybb->settings['siglength']);

			if($sig_length - $mybb->settings['siglength'] > 1)
{
$lang->sig_too_long .= $lang->sprintf($lang->sig_remove_chars_plural, $sig_length-$mybb->settings['siglength']);

			}
else
{

			}
else
{

				$lang->sig_too_long .= $lang->sig_remove_chars_singular;
}
$error = inline_error($lang->sig_too_long);

				$lang->sig_too_long .= $lang->sig_remove_chars_singular;
}
$error = inline_error($lang->sig_too_long);

Zeile 197Zeile 220
			}

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

			}

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

		}

		}

		else
{
$returndate = "";

		else
{
$returndate = "";

Zeile 258Zeile 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';
}


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

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

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

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

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

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

			}
$returndate = array();
$returndate[0] = $mybb->input['awayday'];

			}
$returndate = array();
$returndate[0] = $mybb->input['awayday'];

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

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

				}

				}

				$code = "<select name=\"profile_fields[$field][]\" size=\"{$profilefield['length']}\" multiple=\"multiple\">$select</select>";
}
}

				$code = "<select name=\"profile_fields[$field][]\" size=\"{$profilefield['length']}\" multiple=\"multiple\">$select</select>";
}
}

Zeile 475Zeile 505
					$val = str_replace("\n", "\\n", $val);
$sel = "";
if($val == htmlspecialchars_uni($userfield))

					$val = str_replace("\n", "\\n", $val);
$sel = "";
if($val == htmlspecialchars_uni($userfield))

					{

					{

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

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

				}

				}

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

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

Zeile 488Zeile 518
			}
}
elseif($type == "radio")

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

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

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

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

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

Zeile 531Zeile 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")

		}
elseif($type == "textarea")

		{
$value = htmlspecialchars_uni($userfield);

		{
$value = htmlspecialchars_uni($userfield);

			$code = "<textarea name=\"profile_fields[$field]\" rows=\"6\" cols=\"30\" style=\"width: 95%\">$value</textarea>";
}
else

			$code = "<textarea name=\"profile_fields[$field]\" rows=\"6\" cols=\"30\" style=\"width: 95%\">$value</textarea>";
}
else

Zeile 546Zeile 576
			if($profilefield['maxlength'] > 0)
{
$maxlength = " maxlength=\"{$profilefield['maxlength']}\"";

			if($profilefield['maxlength'] > 0)
{
$maxlength = " maxlength=\"{$profilefield['maxlength']}\"";

			}

			}

			$code = "<input type=\"text\" name=\"profile_fields[$field]\" class=\"textbox\" size=\"{$profilefield['length']}\"{$maxlength} value=\"$value\" />";
}
if($profilefield['required'] == 1)

			$code = "<input type=\"text\" name=\"profile_fields[$field]\" class=\"textbox\" size=\"{$profilefield['length']}\"{$maxlength} value=\"$value\" />";
}
if($profilefield['required'] == 1)

Zeile 575Zeile 605
	{
if($mybb->usergroup['usertitle'] == "")
{

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

			$query = $db->simple_select("usertitles", "*", "posts <='".$mybb->user['postnum']."'", array('order_by' => 'posts', 'order_dir' => 'DESC', 'limit' => 1));
$utitle = $db->fetch_array($query);
$defaulttitle = $utitle['title'];









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

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

		}
else
{

		}
else
{

Zeile 1242Zeile 1280
	{
$forumpermissions = $fpermissions[$subscription['fid']];


	{
$forumpermissions = $fpermissions[$subscription['fid']];


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

		if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0 || ($forumpermissions['canonlyviewownthreads'] != 0 && $subscription['uid'] != $mybb->user['uid']))
{

			// Hmm, you don't have permission to view this thread - unsubscribe!

			// Hmm, you don't have permission to view this thread - unsubscribe!

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

			$del_subscriptions[] = $subscription['sid'];
}

		else if($subscription['tid'])
{
$subscriptions[$subscription['tid']] = $subscription;

		else if($subscription['tid'])
{
$subscriptions[$subscription['tid']] = $subscription;

		}
}

if(is_array($del_subscriptions))
{
$tids = implode(',', $del_subscriptions);

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

		}
}

if(is_array($del_subscriptions))
{
$sids = implode(',', $del_subscriptions);

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

		}

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

		}

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

Zeile 1275Zeile 1313
		$tids = implode(",", array_keys($subscriptions));

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

		$tids = implode(",", array_keys($subscriptions));

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

		{

		{

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

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

Zeile 1305Zeile 1343
				if($forumsread[$forum['fid']])
{
$forum['lastread'] = $forumsread[$forum['fid']];

				if($forumsread[$forum['fid']])
{
$forum['lastread'] = $forumsread[$forum['fid']];

				}
}
$readforums[$forum['fid']] = $forum['lastread'];
}

				}
}
$readforums[$forum['fid']] = $forum['lastread'];
}


// Check participation by the current user in any of these threads - for 'dot' folder icons
if($mybb->settings['dotfolders'] != 0)
{
$query = $db->simple_select("posts", "tid,uid", "uid='{$mybb->user['uid']}' AND tid IN ({$tids})");
while($post = $db->fetch_array($query))


// Check participation by the current user in any of these threads - for 'dot' folder icons
if($mybb->settings['dotfolders'] != 0)
{
$query = $db->simple_select("posts", "tid,uid", "uid='{$mybb->user['uid']}' AND tid IN ({$tids})");
while($post = $db->fetch_array($query))

			{

			{

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

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

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

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

		{

		{

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

Zeile 1342Zeile 1380
			
// If this thread has a prefix, insert a space between prefix and subject
if($thread['prefix'] != 0)

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

			{

			{

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


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


Zeile 1359Zeile 1397
			{
$icon = $icon_cache[$thread['icon']];
$icon = "<img src=\"{$icon['path']}\" alt=\"{$icon['name']}\" />";

			{
$icon = $icon_cache[$thread['icon']];
$icon = "<img src=\"{$icon['path']}\" alt=\"{$icon['name']}\" />";

			}
else
{

			}
else
{

				$icon = "&nbsp;";
}


				$icon = "&nbsp;";
}


Zeile 1564Zeile 1602
		$forum_url = get_forum_link($forum['fid']);
$forumpermissions = $fpermissions[$forum['fid']];


		$forum_url = get_forum_link($forum['fid']);
$forumpermissions = $fpermissions[$forum['fid']];


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

		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 = '-';
}
else
{
$posts = my_number_format($forum['posts']);
$threads = my_number_format($forum['threads']);
}


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


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

		{
$lastpost = "<div align=\"center\">$lang->never</div>";






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

		}
else
{

 
			$forum['lastpostsubject'] = $parser->parse_badwords($forum['lastpostsubject']);

			$lastpost_date = my_date($mybb->settings['dateformat'], $forum['lastpost']);
$lastpost_time = my_date($mybb->settings['timeformat'], $forum['lastpost']);
$lastposttid = $forum['lastposttid'];

			$lastpost_date = my_date($mybb->settings['dateformat'], $forum['lastpost']);
$lastpost_time = my_date($mybb->settings['timeformat'], $forum['lastpost']);
$lastposttid = $forum['lastposttid'];

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

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


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

 

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


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

Zeile 1601Zeile 1653
		}

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

	}

$plugins->run_hooks("usercp_forumsubscriptions_end");


	}

$plugins->run_hooks("usercp_forumsubscriptions_end");


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

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

Zeile 1628Zeile 1680
	}

if($mybb->input['updateposts'] == "enable")

	}

if($mybb->input['updateposts'] == "enable")

	{

	{

		$update_signature = array(
"includesig" => 1
);

		$update_signature = array(
"includesig" => 1
);

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

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

		}

		}

		else
{
$sightml = $lang->off;

		else
{
$sightml = $lang->off;

Zeile 1753Zeile 1805
		{
$codebuttons = build_mycode_inserter("signature");
}

		{
$codebuttons = build_mycode_inserter("signature");
}

		

		

		$plugins->run_hooks("usercp_editsig_end");

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

		$plugins->run_hooks("usercp_editsig_end");

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

Zeile 1785Zeile 1837
	elseif($mybb->input['gallery']) // Gallery avatar
{
if(empty($mybb->input['avatar']))

	elseif($mybb->input['gallery']) // Gallery avatar
{
if(empty($mybb->input['avatar']))

		{

		{

			$avatar_error = $lang->error_noavatar;
}


			$avatar_error = $lang->error_noavatar;
}


Zeile 1890Zeile 1942
		if(empty($avatar_error))
{
if($width > 0 && $height > 0)

		if(empty($avatar_error))
{
if($width > 0 && $height > 0)

			{

			{

				$avatar_dimensions = intval($width)."|".intval($height);
}
$updated_avatar = array(

				$avatar_dimensions = intval($width)."|".intval($height);
}
$updated_avatar = array(

Zeile 1900Zeile 1952
			);
$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']);

		}
}


		}
}


	if(empty($avatar_error))
{
$plugins->run_hooks("usercp_do_avatar_end");
redirect("usercp.php", $lang->redirect_avatarupdated);
}
else

	if(empty($avatar_error))
{
$plugins->run_hooks("usercp_do_avatar_end");
redirect("usercp.php", $lang->redirect_avatarupdated);
}
else

	{

	{

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

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

Zeile 1941Zeile 1993
		}
$galleries .= "<option value=\"$dir\" $selected>$friendlyname</option>\n";
$selected = "";

		}
$galleries .= "<option value=\"$dir\" $selected>$friendlyname</option>\n";
$selected = "";

	}


	}


	// Check to see if we're in a gallery or not
if($activegallery)
{

	// Check to see if we're in a gallery or not
if($activegallery)
{

Zeile 1987Zeile 2039
				}
++$count;
eval("\$avatarlist .= \"".$templates->get("usercp_avatar_gallery_avatar")."\";");

				}
++$count;
eval("\$avatarlist .= \"".$templates->get("usercp_avatar_gallery_avatar")."\";");

			}

			}

			if($count != 0)
{
for($i = $count; $i <= 5; ++$i)
{
eval("\$avatarlist .= \"".$templates->get("usercp_avatar_gallery_blankblock")."\";");
}

			if($count != 0)
{
for($i = $count; $i <= 5; ++$i)
{
eval("\$avatarlist .= \"".$templates->get("usercp_avatar_gallery_blankblock")."\";");
}

			}
}

			}
}

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

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

Zeile 2153Zeile 2205
					if(in_array($user['uid'], $selected_list))
{
$string .= "_alt";

					if(in_array($user['uid'], $selected_list))
{
$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;

Zeile 2164Zeile 2216
			}
}


			}
}


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

		if($found_users < count($users))

		{

		{

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











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

$error_message .= $lang->invalid_user_selected;
}

if(($adding_self != true || ($adding_self == true && count($users) > 0)) && ($error_message == "" || count($users) > 1))
{
if($mybb->input['manage'] == "ignored")

			{
$message = $lang->users_added_to_ignore_list;
}

			{
$message = $lang->users_added_to_ignore_list;
}

Zeile 2177Zeile 2239
		}

if($adding_self == true)

		}

if($adding_self == true)

		{

		{

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

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

Zeile 2191Zeile 2253
		if(count($existing_users) == 0)
{
$message = "";

		if(count($existing_users) == 0)
{
$message = "";

		}

if($found_users < count($users))
{
if($error_message)
{
$error_message .= "<br />";
}

$error_message .= $lang->invalid_user_selected;

 
		}
}


		}
}


Zeile 2424Zeile 2476
		}
elseif($draft['threadvisible'] == -2) // We're looking at a draft thread
{

		}
elseif($draft['threadvisible'] == -2) // We're looking at a draft thread
{

			$detail = $lang->forum." <a href=\"".get_forum_link($draft['fid'])."\">".htmlspecialchars_uni($draft['forumname'])."</a>";

			$detail = $lang->forum." <a href=\"".get_forum_link($draft['fid'])."\">{$draft['forumname']}</a>";

			$editurl = "newthread.php?action=editdraft&amp;tid={$draft['tid']}";
$id = $draft['tid'];
$type = "thread";

			$editurl = "newthread.php?action=editdraft&amp;tid={$draft['tid']}";
$id = $draft['tid'];
$type = "thread";

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

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

 

// Cap at 60,000 chars; text will allow up to 65535?
if(my_strlen($mybb->input['notepad']) > 60000)
{
$mybb->input['notepad'] = my_substr($mybb->input['notepad'], 0, 60000);
}


$plugins->run_hooks("usercp_do_notepad_start");
$db->update_query("users", array('notepad' => $db->escape_string($mybb->input['notepad'])), "uid='".$mybb->user['uid']."'");
$plugins->run_hooks("usercp_do_notepad_end");
redirect("usercp.php", $lang->redirect_notepadupdated);
}


$plugins->run_hooks("usercp_do_notepad_start");
$db->update_query("users", array('notepad' => $db->escape_string($mybb->input['notepad'])), "uid='".$mybb->user['uid']."'");
$plugins->run_hooks("usercp_do_notepad_end");
redirect("usercp.php", $lang->redirect_notepadupdated);
}





if(!$mybb->input['action'])
{
// Get posts per day
$daysreg = (TIME_NOW - $mybb->user['regdate']) / (24*3600);

if(!$mybb->input['action'])
{
// Get posts per day
$daysreg = (TIME_NOW - $mybb->user['regdate']) / (24*3600);





	if($daysreg < 1)
{
$daysreg = 1;

	if($daysreg < 1)
{
$daysreg = 1;

Zeile 2974Zeile 3032
	if($perday > $mybb->user['postnum'])
{
$perday = $mybb->user['postnum'];

	if($perday > $mybb->user['postnum'])
{
$perday = $mybb->user['postnum'];

	}

	}


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


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

Zeile 2996Zeile 3054
	{
$avatar_dimensions = explode("|", $mybb->user['avatardimensions']);
if($avatar_dimensions[0] && $avatar_dimensions[1])

	{
$avatar_dimensions = explode("|", $mybb->user['avatardimensions']);
if($avatar_dimensions[0] && $avatar_dimensions[1])

		{

		{

			$avatar_width_height = "width=\"{$avatar_dimensions[0]}\" height=\"{$avatar_dimensions[1]}\"";
}

			$avatar_width_height = "width=\"{$avatar_dimensions[0]}\" height=\"{$avatar_dimensions[1]}\"";
}

		$mybb->user['avatar'] = htmlspecialchars($mybb->user['avatar']);

		$mybb->user['avatar'] = htmlspecialchars_uni($mybb->user['avatar']);

		eval("\$avatar = \"".$templates->get("usercp_currentavatar")."\";");
$colspan = 2;
}

		eval("\$avatar = \"".$templates->get("usercp_currentavatar")."\";");
$colspan = 2;
}

Zeile 3021Zeile 3079
		eval("\$reputation = \"".$templates->get("usercp_reputation")."\";");
}


		eval("\$reputation = \"".$templates->get("usercp_reputation")."\";");
}


 
	$latest_warnings = '';

	if($mybb->settings['enablewarningsystem'] != 0 && $mybb->settings['canviewownwarning'] != 0)
{
$warning_level = round($mybb->user['warningpoints']/$mybb->settings['maxwarningpoints']*100);

	if($mybb->settings['enablewarningsystem'] != 0 && $mybb->settings['canviewownwarning'] != 0)
{
$warning_level = round($mybb->user['warningpoints']/$mybb->settings['maxwarningpoints']*100);

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

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

			}
}
}

			}
}
}


// Format username
$username = format_name($mybb->user['username'], $mybb->user['usergroup'], $mybb->user['displaygroup']);


// Format username
$username = format_name($mybb->user['username'], $mybb->user['usergroup'], $mybb->user['displaygroup']);

Zeile 3125Zeile 3184
	$plugins->run_hooks("usercp_notepad_end");

// Thread Subscriptions with New Posts

	$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));
if($db->num_rows($query))
{

	$query = $db->simple_select("threadsubscriptions", "sid", "uid = '".$mybb->user['uid']."'", array("limit" => 1));
if($db->num_rows($query))
{

Zeile 3148Zeile 3208
		while($subscription = $db->fetch_array($query))
{
$forumpermissions = $fpermissions[$subscription['fid']];

		while($subscription = $db->fetch_array($query))
{
$forumpermissions = $fpermissions[$subscription['fid']];

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

			if($forumpermissions['canview'] != 0 && $forumpermissions['canviewthreads'] != 0 && ($forumpermissions['canonlyviewownthreads'] == 0 || $subscription['uid'] == $mybb->user['uid']))

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

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

Zeile 3283Zeile 3343
	// User's Latest Threads

// Get unviewable forums

	// User's Latest Threads

// Get unviewable forums

 
	$f_perm_sql = '';

	$unviewable_forums = get_unviewable_forums();
if($unviewable_forums)
{

	$unviewable_forums = get_unviewable_forums();
if($unviewable_forums)
{

Zeile 3313Zeile 3374
		if($thread['visible'] == 0 && is_moderator($thread['fid']) === false)
{
continue;

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

		}

		}


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


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

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

// Run the threads...

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

// Run the threads...

 
		$latest_threads_threads = '';

		foreach($threadcache as $thread)
{
if($thread['tid'])

		foreach($threadcache as $thread)
{
if($thread['tid'])

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

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

	



$cutoff = 0;

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

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