Vergleich usercp.php - 1.6.4 - 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 5459 2011-05-10 10:47:56Z 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)

		if($mybb->settings['sigimgcode'] == 1)

		{

		{

			$imgsallowed = $mybb->settings['maxsigimages'];

			$imgsallowed = $mybb->settings['maxsigimages'];

		}
else
{

		}
else
{

			$imgsallowed = 0;
}
$lang->too_many_sig_images2 = $lang->sprintf($lang->too_many_sig_images2, $imgsallowed);

			$imgsallowed = 0;
}
$lang->too_many_sig_images2 = $lang->sprintf($lang->too_many_sig_images2, $imgsallowed);

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

			{
$lang->sig_too_long .= $lang->sig_remove_chars_singular;
}

Zeile 194Zeile 217
			if($return_year < my_date('Y', $awaydate) || ($returntimestamp < $awaytimestamp && $return_year == my_date('Y', $awaydate)))
{
error($lang->error_usercp_return_date_past);

			if($return_year < my_date('Y', $awaydate) || ($returntimestamp < $awaytimestamp && $return_year == my_date('Y', $awaydate)))
{
error($lang->error_usercp_return_date_past);

			}

			}

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

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

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 273Zeile 303
if($mybb->input['action'] == "profile")
{
if($errors)

if($mybb->input['action'] == "profile")
{
if($errors)

	{

	{

		$user = $mybb->input;
$bday = array();
$bday[0] = $mybb->input['bday1'];

		$user = $mybb->input;
$bday = array();
$bday[0] = $mybb->input['bday1'];

Zeile 298Zeile 328
		else
{
$bdaydaysel .= "<option value=\"$i\">$i</option>\n";

		else
{
$bdaydaysel .= "<option value=\"$i\">$i</option>\n";

		}

		}

	}
$bdaymonthsel[$bday[1]] = 'selected="selected"';


	}
$bdaymonthsel[$bday[1]] = 'selected="selected"';


Zeile 402Zeile 432
	$query = $db->simple_select("profilefields", "*", "editable=1", array('order_by' => 'disporder'));
while($profilefield = $db->fetch_array($query))
{

	$query = $db->simple_select("profilefields", "*", "editable=1", array('order_by' => 'disporder'));
while($profilefield = $db->fetch_array($query))
{

 
		// Does this field have a minimum post count?
if($profilefield['postnum'] && $profilefield['postnum'] > $user['postnum'])
{
continue;
}


		$profilefield['type'] = htmlspecialchars_uni($profilefield['type']);
$profilefield['name'] = htmlspecialchars_uni($profilefield['name']);
$profilefield['description'] = htmlspecialchars_uni($profilefield['description']);

		$profilefield['type'] = htmlspecialchars_uni($profilefield['type']);
$profilefield['name'] = htmlspecialchars_uni($profilefield['name']);
$profilefield['description'] = htmlspecialchars_uni($profilefield['description']);

Zeile 421Zeile 457
		if($type == "multiselect")
{
if($errors)

		if($type == "multiselect")
{
if($errors)

			{

			{

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

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

			}

			}

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

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

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

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

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

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

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

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

		{

		{

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

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

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

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

			{

			{

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

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

Zeile 502Zeile 538
			if($errors)
{
$useropts = $userfield;

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

			}
else
{

			}
else
{

				$useropts = explode("\n", $userfield);
}
if(is_array($useropts))

				$useropts = explode("\n", $userfield);
}
if(is_array($useropts))

Zeile 569Zeile 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 661Zeile 705
		$errors = $userhandler->get_friendly_errors();
$errors = inline_error($errors);
$mybb->input['action'] = "options";

		$errors = $userhandler->get_friendly_errors();
$errors = inline_error($errors);
$mybb->input['action'] = "options";

	}
else

	}
else

	{
$userhandler->update_user();

	{
$userhandler->update_user();





		$plugins->run_hooks("usercp_do_options_end");

redirect("usercp.php", $lang->redirect_optionsupdated);

		$plugins->run_hooks("usercp_do_options_end");

redirect("usercp.php", $lang->redirect_optionsupdated);

	}

	}

}

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

}

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





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

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

Zeile 694Zeile 738
			$sel = " selected=\"selected\"";
}
$langoptions .= "<option value=\"$lname\"$sel>".htmlspecialchars_uni($language)."</option>\n";

			$sel = " selected=\"selected\"";
}
$langoptions .= "<option value=\"$lname\"$sel>".htmlspecialchars_uni($language)."</option>\n";

	}


	}


	// Lets work out which options the user has selected and check the boxes
if($user['allownotices'] == 1)
{
$allownoticescheck = "checked=\"checked\"";

	// Lets work out which options the user has selected and check the boxes
if($user['allownotices'] == 1)
{
$allownoticescheck = "checked=\"checked\"";

	}
else

	}
else

	{
$allownoticescheck = "";
}

	{
$allownoticescheck = "";
}

Zeile 713Zeile 757
	else
{
$invisiblecheck = "";

	else
{
$invisiblecheck = "";

	}


	}


	if($user['hideemail'] == 1)
{
$hideemailcheck = "checked=\"checked\"";

	if($user['hideemail'] == 1)
{
$hideemailcheck = "checked=\"checked\"";

Zeile 817Zeile 861
	if($user['showredirect'] != 0)
{
$showredirectcheck = "checked=\"checked\"";

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

	}

	}

	else
{
$showredirectcheck = "";

	else
{
$showredirectcheck = "";

Zeile 841Zeile 885
	if($user['classicpostbit'] != 0)
{
$classicpostbitcheck = "checked=\"checked\"";

	if($user['classicpostbit'] != 0)
{
$classicpostbitcheck = "checked=\"checked\"";

	}

	}

	else
{
$classicpostbitcheck = '';

	else
{
$classicpostbitcheck = '';

Zeile 854Zeile 898
		if($user['dateformat'] == $key)
{
$date_format_options .= "<option value=\"$key\" selected=\"selected\">".my_date($format, TIME_NOW, "", 0)."</option>";

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

		}

		}

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

Zeile 867Zeile 911
		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>";

		}
else

		}
else

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

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

Zeile 1020Zeile 1064
}

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

}

if($mybb->input['action'] == "do_password" && $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']);


	$errors = array();

$plugins->run_hooks("usercp_do_password_start");
if(validate_password_from_uid($mybb->user['uid'], $mybb->input['oldpassword']) == false)
{
$errors[] = $lang->error_invalidpassword;

	$errors = array();

$plugins->run_hooks("usercp_do_password_start");
if(validate_password_from_uid($mybb->user['uid'], $mybb->input['oldpassword']) == false)
{
$errors[] = $lang->error_invalidpassword;

	}

	}

	else
{
// Set up user handler.
require_once "inc/datahandlers/user.php";
$userhandler = new UserDataHandler("update");

	else
{
// Set up user handler.
require_once "inc/datahandlers/user.php";
$userhandler = new UserDataHandler("update");





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

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

Zeile 1056Zeile 1100
			$plugins->run_hooks("usercp_do_password_end");
redirect("usercp.php", $lang->redirect_passwordupdated);
}

			$plugins->run_hooks("usercp_do_password_end");
redirect("usercp.php", $lang->redirect_passwordupdated);
}

	}

	}

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

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

}

}


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


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

Zeile 1073Zeile 1117
}

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

}

if($mybb->input['action'] == "do_changename" && $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']);


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


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

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

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





	// Thread visiblity
$visible = "AND t.visible != 0";
if(is_moderator() == true)

	// Thread visiblity
$visible = "AND t.visible != 0";
if(is_moderator() == true)

Zeile 1236Zeile 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'])

		}
else if($subscription['tid'])

		{

		{

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

if(is_array($del_subscriptions))

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

if(is_array($del_subscriptions))

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









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

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

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

if($threadcount < 0)

		{

		{

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

			$threadcount = 0;

		}
}


		}
}


Zeile 1261Zeile 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.

		{
// Build a forum cache.

			$query = $db->query("
SELECT fid
FROM ".TABLE_PREFIX."forums
WHERE active != 0

			$query = $db->query("
SELECT fid
FROM ".TABLE_PREFIX."forums
WHERE active != 0

				ORDER BY pid, disporder
");

				ORDER BY pid, disporder
");

			

			

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

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

		}
else
{

		}
else
{

Zeile 1283Zeile 1335
				ORDER BY pid, disporder
");
}

				ORDER BY pid, disporder
");
}

 


		while($forum = $db->fetch_array($query))
{
if($mybb->user['uid'] == 0)

		while($forum = $db->fetch_array($query))
{
if($mybb->user['uid'] == 0)

			{

			{

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

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

		}

		}


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


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

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

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

			}

			}

		}

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

		}

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

Zeile 1338Zeile 1391
			// Build our links
$thread['threadlink'] = get_thread_link($thread['tid']);
$thread['lastpostlink'] = get_thread_link($thread['tid'], 0, "lastpost");

			// Build our links
$thread['threadlink'] = get_thread_link($thread['tid']);
$thread['lastpostlink'] = get_thread_link($thread['tid'], 0, "lastpost");





			// Fetch the thread icon if we have one
if($thread['icon'] > 0 && $icon_cache[$thread['icon']])
{

			// Fetch the thread icon if we have one
if($thread['icon'] > 0 && $icon_cache[$thread['icon']])
{

Zeile 1348Zeile 1401
			else
{
$icon = "&nbsp;";

			else
{
$icon = "&nbsp;";

			}


			}


			// Determine the folder
$folder = '';
$folder_label = '';

if($thread['doticon'])

			// Determine the folder
$folder = '';
$folder_label = '';

if($thread['doticon'])

			{

			{

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

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

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

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

			}


			}


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

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

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

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

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

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




				}
}

if(!$lastread)

				}
}

if(!$lastread)

			{

			{

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

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

Zeile 1413Zeile 1463
				}
}


				}
}


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

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

			{
$folder .= "new";
$folder_label .= $lang->icon_new;

			{
$folder .= "new";
$folder_label .= $lang->icon_new;

Zeile 1421Zeile 1471
				$thread['newpostlink'] = get_thread_link($thread['tid'], 0, "newpost");
eval("\$gotounread = \"".$templates->get("forumdisplay_thread_gotounread")."\";");
$unreadpost = 1;

				$thread['newpostlink'] = get_thread_link($thread['tid'], 0, "newpost");
eval("\$gotounread = \"".$templates->get("forumdisplay_thread_gotounread")."\";");
$unreadpost = 1;

			}

			}

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

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

			}


			}


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

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

Zeile 1445Zeile 1495
			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 1459Zeile 1509
				$lastposterlink = $lastposter;
}
else

				$lastposterlink = $lastposter;
}
else

			{

			{

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

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

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

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





			// What kind of notification type do we have here?
switch($thread['notification'])
{

			// What kind of notification type do we have here?
switch($thread['notification'])
{

Zeile 1478Zeile 1528

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


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





		// Provide remove options
eval("\$remove_options = \"".$templates->get("usercp_subscriptions_remove")."\";");
}

		// Provide remove options
eval("\$remove_options = \"".$templates->get("usercp_subscriptions_remove")."\";");
}

Zeile 1492Zeile 1542
	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");

	$query = $db->simple_select("forumpermissions", "*", "gid='".$db->escape_string($mybb->user['usergroup'])."'");
while($permissions = $db->fetch_array($query))
{
$permissioncache[$permissions['gid']][$permissions['fid']] = $permissions;
}

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

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

Zeile 1511Zeile 1557
			ORDER BY pid, disporder
");


			ORDER BY pid, disporder
");


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

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

	}
else
{

	}
else
{

Zeile 1524Zeile 1570
			ORDER BY pid, disporder
");
}

			ORDER BY pid, disporder
");
}

 


	while($forum = $db->fetch_array($query))
{
if($mybb->user['uid'] == 0)

	while($forum = $db->fetch_array($query))
{
if($mybb->user['uid'] == 0)

		{

		{

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

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

Zeile 1535Zeile 1582
		}
$readforums[$forum['fid']] = $forum['lastread'];
}

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

	
require_once MYBB_ROOT."inc/functions_forumlist.php";






	$fpermissions = forum_permissions();

	$fpermissions = forum_permissions();

 
	require_once MYBB_ROOT."inc/functions_forumlist.php";


	$query = $db->query("
SELECT fs.*, f.*, t.subject AS lastpostsubject, fr.dateline AS lastread
FROM ".TABLE_PREFIX."forumsubscriptions fs

	$query = $db->query("
SELECT fs.*, f.*, t.subject AS lastpostsubject, fr.dateline AS lastread
FROM ".TABLE_PREFIX."forumsubscriptions fs

Zeile 1548Zeile 1595
		WHERE f.type='f' AND fs.uid='".$mybb->user['uid']."'
ORDER BY f.name ASC
");

		WHERE f.type='f' AND fs.uid='".$mybb->user['uid']."'
ORDER BY f.name ASC
");

 


	$forums = '';
while($forum = $db->fetch_array($query))
{
$forum_url = get_forum_link($forum['fid']);
$forumpermissions = $fpermissions[$forum['fid']];

	$forums = '';
while($forum = $db->fetch_array($query))
{
$forum_url = get_forum_link($forum['fid']);
$forumpermissions = $fpermissions[$forum['fid']];

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































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

$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'] == "")
{
$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

		{

		{

			$lightbulb = get_forum_lightbulb(array('open' => $forum['open'], 'lastread' => $forum['lastread']), array('lastpost' => $forum['lastpost']));
$folder = $lightbulb['folder'];
if($forum['lastpost'] == 0 || $forum['lastposter'] == "")






			$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'];
$lastposter = $forum['lastposter'];
$lastpost_profilelink = build_profile_link($lastposter, $forum['lastposteruid']);
$lastpost_subject = htmlspecialchars_uni($forum['lastpostsubject']);
if(my_strlen($lastpost_subject) > 25)

			{

			{

				$lastpost = "<div align=\"center\">$lang->never</div>";
}
else
{
$lastpost_date = my_date($mybb->settings['dateformat'], $forum['lastpost']);
$lastpost_time = my_date($mybb->settings['timeformat'], $forum['lastpost']);
$lastposttid = $forum['lastposttid'];
$lastposter = $forum['lastposter'];
$lastpost_profilelink = build_profile_link($lastposter, $forum['lastposteruid']);
$lastpost_subject = $forum['lastpostsubject'];
if(my_strlen($lastpost_subject) > 25)
{
$lastpost_subject = my_substr($lastpost_subject, 0, 25) . "...";
}
$lastpost_link = get_thread_link($forum['lastposttid'], 0, "lastpost");
eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost")."\";");

				$lastpost_subject = my_substr($lastpost_subject, 0, 25) . "...";
















			}

			}

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

 


	$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 1653Zeile 1725
	if($mybb->user['suspendsignature'] && ($mybb->user['suspendsigtime'] == 0 || $mybb->user['suspendsigtime'] > 0 && $mybb->user['suspendsigtime'] > TIME_NOW))
{
// User currently has no signature and they're suspended

	if($mybb->user['suspendsignature'] && ($mybb->user['suspendsigtime'] == 0 || $mybb->user['suspendsigtime'] > 0 && $mybb->user['suspendsigtime'] > TIME_NOW))
{
// User currently has no signature and they're suspended

		error_no_permission();












		error($lang->sig_suspended);
}

if($mybb->usergroup['canusesig'] != 1)
{
// Usergroup has no permission to use this facility
error_no_permission();
}
else if($mybb->usergroup['canusesig'] == 1 && $mybb->usergroup['canusesigxposts'] > 0 && $mybb->user['postnum'] < $mybb->usergroup['canusesigxposts'])
{
// Usergroup can use this facility, but only after x posts
error($lang->sprintf($lang->sig_suspended_posts, $mybb->usergroup['canusesigxposts']));

	}

if($sig && $template)

	}

if($sig && $template)

Zeile 1664Zeile 1747
			"allow_smilies" => $mybb->settings['sigsmilies'],
"allow_imgcode" => $mybb->settings['sigimgcode'],
"me_username" => $mybb->user['username'],

			"allow_smilies" => $mybb->settings['sigsmilies'],
"allow_imgcode" => $mybb->settings['sigimgcode'],
"me_username" => $mybb->user['username'],

 
			"filter_badwords" => 1

		);

$sigpreview = $parser->parse_message($sig, $sig_parser);

		);

$sigpreview = $parser->parse_message($sig, $sig_parser);

Zeile 1672Zeile 1756

// User has a current signature, so let's display it (but show an error message)
if($mybb->user['suspendsignature'] && $mybb->user['suspendsigtime'] > TIME_NOW)


// User has a current signature, so let's display it (but show an error message)
if($mybb->user['suspendsignature'] && $mybb->user['suspendsigtime'] > TIME_NOW)

	{
$plugins->run_hooks("usercp_editsig_end");


	{
$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 1685Zeile 1769
		{
$sigsmilies = $lang->on;
$smilieinserter = build_clickable_smilies();

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

		}
else
{

		}
else
{

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

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

		}
else

		}
else

		{
$sigmycode = $lang->off;
}

		{
$sigmycode = $lang->off;
}

Zeile 1713Zeile 1797
		else
{
$sigimgcode = $lang->off;

		else
{
$sigimgcode = $lang->off;

		}

		}

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


Zeile 1725Zeile 1809
		$plugins->run_hooks("usercp_editsig_end");

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

		$plugins->run_hooks("usercp_editsig_end");

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

	}

	}

	
output_page($editsig);
}

	
output_page($editsig);
}

Zeile 1880Zeile 1964
	{
$mybb->input['action'] = "avatar";
$avatar_error = inline_error($avatar_error);

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

	}

	}

}

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

}

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

Zeile 1906Zeile 1990
		{
$activegallery = $friendlyname;
$selected = "selected=\"selected\"";

		{
$activegallery = $friendlyname;
$selected = "selected=\"selected\"";

		}

		}

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

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

Zeile 1919Zeile 2003
		// Get a listing of avatars in this gallery
$avatardir = $mybb->settings['avatardir'];
if($gallery != "default")

		// Get a listing of avatars in this gallery
$avatardir = $mybb->settings['avatardir'];
if($gallery != "default")

		{

		{

			$avatardir .= "/$gallery";
}
$opendir = opendir($avatardir);

			$avatardir .= "/$gallery";
}
$opendir = opendir($avatardir);

Zeile 1932Zeile 2016
			}
}
@closedir($opendir);

			}
}
@closedir($opendir);





		if(is_array($avatars))
{
natcasesort($avatars);

		if(is_array($avatars))
{
natcasesort($avatars);

Zeile 1945Zeile 2029
				$avatarname = preg_replace("#\.(jpg|jpeg|gif|bmp|png)$#i", "", $avatar);
$avatarname = ucwords(str_replace("_", " ", $avatarname));
if($mybb->user['avatar'] == $avatarpath)

				$avatarname = preg_replace("#\.(jpg|jpeg|gif|bmp|png)$#i", "", $avatar);
$avatarname = ucwords(str_replace("_", " ", $avatarname));
if($mybb->user['avatar'] == $avatarpath)

				{

				{

					$checked = "checked=\"checked\"";
}
if($count == 5)
{
$avatarlist .= "</tr>\n<tr>\n";
$count = 0;

					$checked = "checked=\"checked\"";
}
if($count == 5)
{
$avatarlist .= "</tr>\n<tr>\n";
$count = 0;

				}

				}

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

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

Zeile 1965Zeile 2049
			}
}
else

			}
}
else

		{

		{

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


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


Zeile 1978Zeile 2062
	else
{
if($mybb->user['avatartype'] == "upload" || stristr($mybb->user['avatar'], $mybb->settings['avataruploadpath']))

	else
{
if($mybb->user['avatartype'] == "upload" || stristr($mybb->user['avatar'], $mybb->settings['avataruploadpath']))

		{

		{

			$avatarmsg = "<br /><strong>".$lang->already_uploaded_avatar."</strong>";
}
elseif($mybb->user['avatartype'] == "gallery" || stristr($mybb->user['avatar'], $mybb->settings['avatardir']))
{
$avatarmsg = "<br /><strong>".$lang->using_gallery_avatar."</strong>";

			$avatarmsg = "<br /><strong>".$lang->already_uploaded_avatar."</strong>";
}
elseif($mybb->user['avatartype'] == "gallery" || stristr($mybb->user['avatar'], $mybb->settings['avatardir']))
{
$avatarmsg = "<br /><strong>".$lang->using_gallery_avatar."</strong>";

		}

		}

		elseif($mybb->user['avatartype'] == "remote" || my_strpos(my_strtolower($mybb->user['avatar']), "http://") !== false)
{
$avatarmsg = "<br /><strong>".$lang->using_remote_avatar."</strong>";

		elseif($mybb->user['avatartype'] == "remote" || my_strpos(my_strtolower($mybb->user['avatar']), "http://") !== false)
{
$avatarmsg = "<br /><strong>".$lang->using_remote_avatar."</strong>";

Zeile 2004Zeile 2088
		else
{
$colspan = 2;

		else
{
$colspan = 2;

		}

		}

		if($mybb->settings['maxavatardims'] != "")
{
list($maxwidth, $maxheight) = explode("x", my_strtolower($mybb->settings['maxavatardims']));

		if($mybb->settings['maxavatardims'] != "")
{
list($maxwidth, $maxheight) = explode("x", my_strtolower($mybb->settings['maxavatardims']));

Zeile 2016Zeile 2100
			$lang->avatar_note .= "<br />".$lang->sprintf($lang->avatar_note_size, $maxsize);
}
if($mybb->settings['avatarresizing'] == "auto")

			$lang->avatar_note .= "<br />".$lang->sprintf($lang->avatar_note_size, $maxsize);
}
if($mybb->settings['avatarresizing'] == "auto")

		{

		{

			$auto_resize = "<br /><span class=\"smalltext\">{$lang->avatar_auto_resize_note}</span>\n";

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

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

		$plugins->run_hooks("usercp_avatar_end");

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

Zeile 2035Zeile 2119
{
// 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_editlists_start");

$existing_users = array();

	$plugins->run_hooks("usercp_do_editlists_start");

$existing_users = array();

Zeile 2130Zeile 2214
				
$existing_users[] = $user['uid'];
}

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

 
		}

if($found_users < count($users))
{
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(($adding_self != true || ($adding_self == true && count($users) > 0)) && ($error_message == "" || count($users) > 1))

Zeile 2137Zeile 2231
			if($mybb->input['manage'] == "ignored")
{
$message = $lang->users_added_to_ignore_list;

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

			}
else
{

			}
else
{

				$message = $lang->users_added_to_buddy_list;

				$message = $lang->users_added_to_buddy_list;

			}
}

			}
}


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

				$error_message = $lang->cant_add_self_to_ignore_list;
}
else
{
$error_message = $lang->cant_add_self_to_buddy_list;

			}

			}

		}

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 2392Zeile 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 2839Zeile 2923
			$attachment['postlink'] = get_post_link($attachment['pid'], $attachment['tid']);
$attachment['threadlink'] = get_thread_link($attachment['tid']);
$attachment['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($attachment['threadsubject']));

			$attachment['postlink'] = get_post_link($attachment['pid'], $attachment['tid']);
$attachment['threadlink'] = get_thread_link($attachment['tid']);
$attachment['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($attachment['threadsubject']));

 


			$size = get_friendly_size($attachment['filesize']);
$icon = get_attachment_icon(get_extension($attachment['filename']));

			$size = get_friendly_size($attachment['filesize']);
$icon = get_attachment_icon(get_extension($attachment['filename']));

 
			$attachment['filename'] = htmlspecialchars_uni($attachment['filename']);


			$sizedownloads = $lang->sprintf($lang->attachment_size_downloads, $size, $attachment['downloads']);
$attachdate = my_date($mybb->settings['dateformat'], $attachment['dateline']);
$attachtime = my_date($mybb->settings['timeformat'], $attachment['dateline']);
$altbg = alt_trow();

			$sizedownloads = $lang->sprintf($lang->attachment_size_downloads, $size, $attachment['downloads']);
$attachdate = my_date($mybb->settings['dateformat'], $attachment['dateline']);
$attachtime = my_date($mybb->settings['timeformat'], $attachment['dateline']);
$altbg = alt_trow();

 


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

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

 


			// Add to bandwidth total
$bandwidth += ($attachment['filesize'] * $attachment['downloads']);
$totaldownloads += $attachment['downloads'];

			// Add to bandwidth total
$bandwidth += ($attachment['filesize'] * $attachment['downloads']);
$totaldownloads += $attachment['downloads'];

Zeile 2867Zeile 2956
		$percent = round(($totalusage/($mybb->usergroup['attachquota']*1024))*100)."%";
$attachquota = get_friendly_size($mybb->usergroup['attachquota']*1024);
$usagenote = $lang->sprintf($lang->attachments_usage_quota, $friendlyusage, $attachquota, $percent, $totalattachments);

		$percent = round(($totalusage/($mybb->usergroup['attachquota']*1024))*100)."%";
$attachquota = get_friendly_size($mybb->usergroup['attachquota']*1024);
$usagenote = $lang->sprintf($lang->attachments_usage_quota, $friendlyusage, $attachquota, $percent, $totalattachments);

	}

	}

	else
{
$percent = $lang->unlimited;

	else
{
$percent = $lang->unlimited;

Zeile 2915Zeile 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_start");
$db->update_query("users", array('notepad' => $db->escape_string($mybb->input['notepad'])), "uid='".$mybb->user['uid']."'");

Zeile 2962Zeile 3057
		{
$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 2984Zeile 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 3088Zeile 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 3111Zeile 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 3155Zeile 3252
				{
$folder = '';
$folder_label = '';

				{
$folder = '';
$folder_label = '';

 
					$gotounread = '';


if($thread['tid'])
{


if($thread['tid'])
{

Zeile 3245Zeile 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 3324Zeile 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 3380Zeile 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'])