Vergleich member.php - 1.8.4 - 1.8.6

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 21Zeile 21
$templatelist .= ",member_profile_modoptions_manageuser,member_profile_modoptions_editprofile,member_profile_modoptions_banuser,member_profile_modoptions_viewnotes,member_profile_modoptions,member_profile_modoptions_editnotes,member_profile_modoptions_purgespammer,postbit_reputation_formatted,postbit_warninglevel_formatted";
$templatelist .= ",usercp_profile_profilefields_select_option,usercp_profile_profilefields_multiselect,usercp_profile_profilefields_select,usercp_profile_profilefields_textarea,usercp_profile_profilefields_radio,usercp_profile_profilefields_checkbox,usercp_profile_profilefields_text,usercp_options_tppselect_option";
$templatelist .= ",member_register_question,member_register_question_refresh,usercp_options_timezone,usercp_options_timezone_option,usercp_options_language_option,member_register_language,member_profile_userstar,member_profile_customfields_field_multi_item,member_profile_customfields_field_multi,member_register_day";

$templatelist .= ",member_profile_modoptions_manageuser,member_profile_modoptions_editprofile,member_profile_modoptions_banuser,member_profile_modoptions_viewnotes,member_profile_modoptions,member_profile_modoptions_editnotes,member_profile_modoptions_purgespammer,postbit_reputation_formatted,postbit_warninglevel_formatted";
$templatelist .= ",usercp_profile_profilefields_select_option,usercp_profile_profilefields_multiselect,usercp_profile_profilefields_select,usercp_profile_profilefields_textarea,usercp_profile_profilefields_radio,usercp_profile_profilefields_checkbox,usercp_profile_profilefields_text,usercp_options_tppselect_option";
$templatelist .= ",member_register_question,member_register_question_refresh,usercp_options_timezone,usercp_options_timezone_option,usercp_options_language_option,member_register_language,member_profile_userstar,member_profile_customfields_field_multi_item,member_profile_customfields_field_multi,member_register_day";

$templatelist .= ",member_profile_contact_fields_aim,member_profile_contact_fields_google,member_profile_contact_fields_icq,member_profile_contact_fields_skype,member_profile_contact_fields_yahoo,member_profile_pm,member_profile_contact_details,member_emailuser_hidden,member_profile_banned";

$templatelist .= ",member_profile_contact_fields_aim,member_profile_contact_fields_google,member_profile_contact_fields_icq,member_profile_contact_fields_skype,member_profile_contact_fields_yahoo,member_profile_pm,member_profile_contact_details,member_profile_banned";


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 125Zeile 125

if($mybb->settings['regtype'] == "randompass")
{


if($mybb->settings['regtype'] == "randompass")
{

		$mybb->input['password'] = random_str();









$password_length = (int)$mybb->settings['minpasswordlength'];
if($password_length < 8)
{
$password_length = min(8, (int)$mybb->settings['maxpasswordlength']);
}

$mybb->input['password'] = random_str($password_length, $mybb->settings['requirecomplexpasswords']);

		$mybb->input['password2'] = $mybb->input['password'];
}


		$mybb->input['password2'] = $mybb->input['password'];
}


Zeile 136Zeile 143
	else
{
$usergroup = 2;

	else
{
$usergroup = 2;

	}

	}


// Set up user handler.
require_once MYBB_ROOT."inc/datahandlers/user.php";
$userhandler = new UserDataHandler("insert");


// Set up user handler.
require_once MYBB_ROOT."inc/datahandlers/user.php";
$userhandler = new UserDataHandler("insert");





	$coppauser = 0;
if(isset($mybb->cookies['coppauser']))
{

	$coppauser = 0;
if(isset($mybb->cookies['coppauser']))
{

Zeile 165Zeile 172
		"regcheck1" => $mybb->get_input('regcheck1'),
"regcheck2" => $mybb->get_input('regcheck2'),
"registration" => true

		"regcheck1" => $mybb->get_input('regcheck1'),
"regcheck2" => $mybb->get_input('regcheck2'),
"registration" => true

	);


	);


	// Do we have a saved COPPA DOB?
if(isset($mybb->cookies['coppadob']))
{

	// Do we have a saved COPPA DOB?
if(isset($mybb->cookies['coppadob']))
{

Zeile 287Zeile 294
					"correct" => $question['correct'] + 1
);
$db->update_query("questions", $update_question, "qid='{$question['qid']}'");

					"correct" => $question['correct'] + 1
);
$db->update_query("questions", $update_question, "qid='{$question['qid']}'");

			}


			}


			$db->delete_query("questionsessions", "sid='{$sid}'");
}
}

			$db->delete_query("questionsessions", "sid='{$sid}'");
}
}

Zeile 299Zeile 306
		$email = htmlspecialchars_uni($mybb->get_input('email'));
$email2 = htmlspecialchars_uni($mybb->get_input('email2'));
$referrername = htmlspecialchars_uni($mybb->get_input('referrername'));

		$email = htmlspecialchars_uni($mybb->get_input('email'));
$email2 = htmlspecialchars_uni($mybb->get_input('email2'));
$referrername = htmlspecialchars_uni($mybb->get_input('referrername'));





		$allownoticescheck = $hideemailcheck = $no_auto_subscribe_selected = $instant_email_subscribe_selected = $instant_pm_subscribe_selected = $no_subscribe_selected = '';
$receivepmscheck = $pmnoticecheck = $pmnotifycheck = $invisiblecheck = $dst_auto_selected = $dst_enabled_selected = $dst_disabled_selected = '';

if($mybb->get_input('allownotices', MyBB::INPUT_INT) == 1)

		$allownoticescheck = $hideemailcheck = $no_auto_subscribe_selected = $instant_email_subscribe_selected = $instant_pm_subscribe_selected = $no_subscribe_selected = '';
$receivepmscheck = $pmnoticecheck = $pmnotifycheck = $invisiblecheck = $dst_auto_selected = $dst_enabled_selected = $dst_disabled_selected = '';

if($mybb->get_input('allownotices', MyBB::INPUT_INT) == 1)

		{

		{

			$allownoticescheck = "checked=\"checked\"";
}

if($mybb->get_input('hideemail', MyBB::INPUT_INT) == 1)

			$allownoticescheck = "checked=\"checked\"";
}

if($mybb->get_input('hideemail', MyBB::INPUT_INT) == 1)

		{

		{

			$hideemailcheck = "checked=\"checked\"";
}

if($mybb->get_input('subscriptionmethod', MyBB::INPUT_INT) == 1)

			$hideemailcheck = "checked=\"checked\"";
}

if($mybb->get_input('subscriptionmethod', MyBB::INPUT_INT) == 1)

		{

		{

			$no_subscribe_selected = "selected=\"selected\"";
}
else if($mybb->get_input('subscriptionmethod', MyBB::INPUT_INT) == 2)

			$no_subscribe_selected = "selected=\"selected\"";
}
else if($mybb->get_input('subscriptionmethod', MyBB::INPUT_INT) == 2)

Zeile 328Zeile 335
		else
{
$no_auto_subscribe_selected = "selected=\"selected\"";

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

		}


		}


		if($mybb->get_input('receivepms', MyBB::INPUT_INT) == 1)
{
$receivepmscheck = "checked=\"checked\"";

		if($mybb->get_input('receivepms', MyBB::INPUT_INT) == 1)
{
$receivepmscheck = "checked=\"checked\"";

Zeile 410Zeile 417
					break;
case 1:
$emailmessage = $lang->sprintf($lang->email_activateaccount1, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);

					break;
case 1:
$emailmessage = $lang->sprintf($lang->email_activateaccount1, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);

					break;

					break;

				case 2:
$emailmessage = $lang->sprintf($lang->email_activateaccount2, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);
break;
default:
$emailmessage = $lang->sprintf($lang->email_activateaccount, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);

				case 2:
$emailmessage = $lang->sprintf($lang->email_activateaccount2, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);
break;
default:
$emailmessage = $lang->sprintf($lang->email_activateaccount, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);

					break;
}
my_mail($user_info['email'], $emailsubject, $emailmessage);

$lang->redirect_registered_activation = $lang->sprintf($lang->redirect_registered_activation, $mybb->settings['bbname'], $user_info['username']);


					break;
}
my_mail($user_info['email'], $emailsubject, $emailmessage);

$lang->redirect_registered_activation = $lang->sprintf($lang->redirect_registered_activation, $mybb->settings['bbname'], $user_info['username']);


			$plugins->run_hooks("member_do_register_end");

error($lang->redirect_registered_activation);

			$plugins->run_hooks("member_do_register_end");

error($lang->redirect_registered_activation);

		}

		}

		else if($mybb->settings['regtype'] == "randompass")
{
$emailsubject = $lang->sprintf($lang->emailsubject_randompassword, $mybb->settings['bbname']);
switch($mybb->settings['username_method'])

		else if($mybb->settings['regtype'] == "randompass")
{
$emailsubject = $lang->sprintf($lang->emailsubject_randompassword, $mybb->settings['bbname']);
switch($mybb->settings['username_method'])

			{

			{

				case 0:
$emailmessage = $lang->sprintf($lang->email_randompassword, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']);
break;

				case 0:
$emailmessage = $lang->sprintf($lang->email_randompassword, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']);
break;

Zeile 445Zeile 452
					break;
}
my_mail($user_info['email'], $emailsubject, $emailmessage);

					break;
}
my_mail($user_info['email'], $emailsubject, $emailmessage);




























































































$plugins->run_hooks("member_do_register_end");

error($lang->redirect_registered_passwordsent);
}
else if($mybb->settings['regtype'] == "admin")
{
$groups = $cache->read("usergroups");
$admingroups = array();
if(!empty($groups)) // Shouldn't be...
{
foreach($groups as $group)
{
if($group['cancp'] == 1)
{
$admingroups[] = (int)$group['gid'];
}
}
}

if(!empty($admingroups))
{
$sqlwhere = 'usergroup IN ('.implode(',', $admingroups).')';
foreach($admingroups as $admingroup)
{
switch($db->type)
{
case 'pgsql':
case 'sqlite':
$sqlwhere .= " OR ','||additionalgroups||',' LIKE '%,{$admingroup},%'";
break;
default:
$sqlwhere .= " OR CONCAT(',',additionalgroups,',') LIKE '%,{$admingroup},%'";
break;
}
}
$q = $db->simple_select('users', 'uid,username,email,language', $sqlwhere);
while($recipient = $db->fetch_array($q))
{
// First we check if the user's a super admin: if yes, we don't care about permissions
$is_super_admin = is_super_admin($recipient['uid']);
if(!$is_super_admin)
{
// Include admin functions
if(!file_exists(MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php"))
{
continue;
}

require_once MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php";

// Verify if we have permissions to access user-users
require_once MYBB_ROOT.$mybb->config['admin_dir']."/modules/user/module_meta.php";
if(function_exists("user_admin_permissions"))
{
// Get admin permissions
$adminperms = get_admin_permissions($recipient['uid']);

$permissions = user_admin_permissions();
if(array_key_exists('users', $permissions['permissions']) && $adminperms['user']['users'] != 1)
{
continue; // No permissions
}
}
}

// Load language
if($recipient['language'] != $mybb->user['language'] && $lang->language_exists($recipient['language']))
{
$reset_lang = true;
$lang->set_language($recipient['language']);
$lang->load("member");
}

$subject = $lang->sprintf($lang->newregistration_subject, $mybb->settings['bbname']);
$message = $lang->sprintf($lang->newregistration_message, $recipient['username'], $mybb->settings['bbname'], $user['username']);
my_mail($recipient['email'], $subject, $message);
}

// Reset language
if(isset($reset_lang))
{
$lang->set_language($mybb->user['language']);
$lang->load("member");
}
}

$lang->redirect_registered_admin_activate = $lang->sprintf($lang->redirect_registered_admin_activate, $mybb->settings['bbname'], $user_info['username']);


			$plugins->run_hooks("member_do_register_end");


			$plugins->run_hooks("member_do_register_end");


			error($lang->redirect_registered_passwordsent);

			error($lang->redirect_registered_admin_activate);

		}

		}

		else if($mybb->settings['regtype'] == "admin")
{
$groups = $cache->read("usergroups");
$admingroups = array();
if(!empty($groups)) // Shouldn't be...
{
foreach($groups as $group)
{
if($group['cancp'] == 1)
{
$admingroups[] = (int)$group['gid'];
}
}
}

if(!empty($admingroups))
{
$sqlwhere = 'usergroup IN ('.implode(',', $admingroups).')';
foreach($admingroups as $admingroup)
{
switch($db->type)
{
case 'pgsql':
case 'sqlite':
$sqlwhere .= " OR ','||additionalgroups||',' LIKE '%,{$admingroup},%'";
break;
default:
$sqlwhere .= " OR CONCAT(',',additionalgroups,',') LIKE '%,{$admingroup},%'";
break;
}
}
$q = $db->simple_select('users', 'uid,username,email,language', $sqlwhere);
while($recipient = $db->fetch_array($q))
{
// First we check if the user's a super admin: if yes, we don't care about permissions
$is_super_admin = is_super_admin($recipient['uid']);
if(!$is_super_admin)
{
// Include admin functions
if(!file_exists(MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php"))
{
continue;
}

require_once MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php";

// Verify if we have permissions to access user-users
require_once MYBB_ROOT.$mybb->config['admin_dir']."/modules/user/module_meta.php";
if(function_exists("user_admin_permissions"))
{
// Get admin permissions
$adminperms = get_admin_permissions($recipient['uid']);

$permissions = user_admin_permissions();
if(array_key_exists('users', $permissions['permissions']) && $adminperms['user']['users'] != 1)
{
continue; // No permissions
}
}
}

// Load language
if($recipient['language'] != $mybb->user['language'] && $lang->language_exists($recipient['language']))
{
$reset_lang = true;
$lang->set_language($recipient['language']);
$lang->load("member");
}

$subject = $lang->sprintf($lang->newregistration_subject, $mybb->settings['bbname']);
$message = $lang->sprintf($lang->newregistration_message, $recipient['username'], $mybb->settings['bbname'], $user['username']);
my_mail($recipient['email'], $subject, $message);
}

// Reset language
if(isset($reset_lang))
{
$lang->set_language($mybb->user['language']);
$lang->load("member");
}
}

$lang->redirect_registered_admin_activate = $lang->sprintf($lang->redirect_registered_admin_activate, $mybb->settings['bbname'], $user_info['username']);

$plugins->run_hooks("member_do_register_end");

error($lang->redirect_registered_admin_activate);
}
else if($mybb->settings['regtype'] == "both")

		else if($mybb->settings['regtype'] == "both")

























































































		{
$groups = $cache->read("usergroups");
$admingroups = array();

		{
$groups = $cache->read("usergroups");
$admingroups = array();

Zeile 700Zeile 707
	foreach(range(1, 12) as $number)
{
$bdaymonthsel[$number] = '';

	foreach(range(1, 12) as $number)
{
$bdaymonthsel[$number] = '';

	}

	}

	$bdaymonthsel[$mybb->input['bday2']] = "selected=\"selected\"";
$mybb->input['bday3'] = $mybb->get_input('bday3', MyBB::INPUT_INT);

	$bdaymonthsel[$mybb->input['bday2']] = "selected=\"selected\"";
$mybb->input['bday3'] = $mybb->get_input('bday3', MyBB::INPUT_INT);





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

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

Zeile 716Zeile 723
		if($mybb->input['bday1'] && $mybb->input['bday2'] && $mybb->input['bday3'])
{
my_unsetcookie("coppauser");

		if($mybb->input['bday1'] && $mybb->input['bday2'] && $mybb->input['bday3'])
{
my_unsetcookie("coppauser");





			$months = get_bdays($mybb->input['bday3']);
if($mybb->input['bday2'] < 1 || $mybb->input['bday2'] > 12 || $mybb->input['bday3'] < (date("Y")-100) || $mybb->input['bday3'] > date("Y") || $mybb->input['bday1'] > $months[$mybb->input['bday2']-1])
{

			$months = get_bdays($mybb->input['bday3']);
if($mybb->input['bday2'] < 1 || $mybb->input['bday2'] > 12 || $mybb->input['bday3'] < (date("Y")-100) || $mybb->input['bday3'] > date("Y") || $mybb->input['bday1'] > $months[$mybb->input['bday2']-1])
{

Zeile 727Zeile 734

// Store DOB in cookie so we can save it with the registration
my_setcookie("coppadob", "{$mybb->input['bday1']}-{$mybb->input['bday2']}-{$mybb->input['bday3']}", -1);


// Store DOB in cookie so we can save it with the registration
my_setcookie("coppadob", "{$mybb->input['bday1']}-{$mybb->input['bday2']}-{$mybb->input['bday3']}", -1);





			// User is <= 13, we mark as a coppa user
if($bdaytime >= mktime(0, 0, 0, my_date('n'), my_date('d'), my_date('Y')-13))
{

			// User is <= 13, we mark as a coppa user
if($bdaytime >= mktime(0, 0, 0, my_date('n'), my_date('d'), my_date('Y')-13))
{

Zeile 740Zeile 747
		else
{
$plugins->run_hooks("member_register_coppa");

		else
{
$plugins->run_hooks("member_register_coppa");





			my_unsetcookie("coppauser");

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

			my_unsetcookie("coppauser");

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

Zeile 754Zeile 761
		$coppa_agreement = '';
// Is this user a COPPA user? We need to show the COPPA agreement too
if($mybb->settings['coppa'] != "disabled" && ($mybb->cookies['coppauser'] == 1 || $under_thirteen))

		$coppa_agreement = '';
// Is this user a COPPA user? We need to show the COPPA agreement too
if($mybb->settings['coppa'] != "disabled" && ($mybb->cookies['coppauser'] == 1 || $under_thirteen))

		{

		{

			if($mybb->settings['coppa'] == "deny")
{
error($lang->error_need_to_be_thirteen);

			if($mybb->settings['coppa'] == "deny")
{
error($lang->error_need_to_be_thirteen);

Zeile 764Zeile 771
		}

$plugins->run_hooks("member_register_agreement");

		}

$plugins->run_hooks("member_register_agreement");





		eval("\$agreement = \"".$templates->get("member_register_agreement")."\";");
output_page($agreement);
}

		eval("\$agreement = \"".$templates->get("member_register_agreement")."\";");
output_page($agreement);
}

Zeile 777Zeile 784
		if(isset($mybb->input['timezoneoffset']))
{
$timezoneoffset = $mybb->get_input('timezoneoffset');

		if(isset($mybb->input['timezoneoffset']))
{
$timezoneoffset = $mybb->get_input('timezoneoffset');

		}

		}

		else
{
$timezoneoffset = $mybb->settings['timezoneoffset'];

		else
{
$timezoneoffset = $mybb->settings['timezoneoffset'];

		}

		}

		$tzselect = build_timezone_select("timezoneoffset", $timezoneoffset, true);

$stylelist = build_theme_select("style");

if($mybb->settings['usertppoptions'])

		$tzselect = build_timezone_select("timezoneoffset", $timezoneoffset, true);

$stylelist = build_theme_select("style");

if($mybb->settings['usertppoptions'])

		{

		{

			$tppoptions = '';
$explodedtpp = explode(",", $mybb->settings['usertppoptions']);
if(is_array($explodedtpp))

			$tppoptions = '';
$explodedtpp = explode(",", $mybb->settings['usertppoptions']);
if(is_array($explodedtpp))

			{

			{

				foreach($explodedtpp as $val)
{
$val = trim($val);

				foreach($explodedtpp as $val)
{
$val = trim($val);

Zeile 808Zeile 815
			if(is_array($explodedppp))
{
foreach($explodedppp as $val)

			if(is_array($explodedppp))
{
foreach($explodedppp as $val)

				{

				{

					$val = trim($val);
$ppp_option = $lang->sprintf($lang->ppp_option, $val);
eval("\$pppoptions .= \"".$templates->get("usercp_options_pppselect_option")."\";");

					$val = trim($val);
$ppp_option = $lang->sprintf($lang->ppp_option, $val);
eval("\$pppoptions .= \"".$templates->get("usercp_options_pppselect_option")."\";");

				}

				}

			}
eval("\$pppselect = \"".$templates->get("usercp_options_pppselect")."\";");
}
if($mybb->settings['usereferrals'] == 1 && !$mybb->user['uid'])
{
if(isset($mybb->cookies['mybb']['referrer']))

			}
eval("\$pppselect = \"".$templates->get("usercp_options_pppselect")."\";");
}
if($mybb->settings['usereferrals'] == 1 && !$mybb->user['uid'])
{
if(isset($mybb->cookies['mybb']['referrer']))

			{

			{

				$query = $db->simple_select("users", "uid,username", "uid='".(int)$mybb->cookies['mybb']['referrer']."'");

				$query = $db->simple_select("users", "uid,username", "uid='".(int)$mybb->cookies['mybb']['referrer']."'");

				$ref = $db->fetch_array($query);
$referrername = $ref['username'];

				$ref = $db->fetch_array($query);
$referrername = $ref['username'];

			}
elseif(isset($referrer))

			}
elseif(isset($referrer))

			{

			{

				$query = $db->simple_select("users", "username", "uid='".(int)$referrer['uid']."'");
$ref = $db->fetch_array($query);
$referrername = $ref['username'];

				$query = $db->simple_select("users", "username", "uid='".(int)$referrer['uid']."'");
$ref = $db->fetch_array($query);
$referrername = $ref['username'];

			}

			}

			elseif(!empty($referrername))
{
$ref = get_user_by_username($referrername);
if(!$ref['uid'])
{
$errors[] = $lang->error_badreferrer;

			elseif(!empty($referrername))
{
$ref = get_user_by_username($referrername);
if(!$ref['uid'])
{
$errors[] = $lang->error_badreferrer;

				}
}
else

				}
}
else

			{
$referrername = '';
}

			{
$referrername = '';
}

Zeile 888Zeile 895
				$options = $thing[1];
$select = '';
$field = "fid{$profilefield['fid']}";

				$options = $thing[1];
$select = '';
$field = "fid{$profilefield['fid']}";

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

				if($errors && isset($mybb->input['profile_fields'][$field]))
{
$userfield = $mybb->input['profile_fields'][$field];

				if($errors && isset($mybb->input['profile_fields'][$field]))
{
$userfield = $mybb->input['profile_fields'][$field];

Zeile 897Zeile 906
					$userfield = '';
}
if($type == "multiselect")

					$userfield = '';
}
if($type == "multiselect")

				{
if($errors)
{
$useropts = $userfield;
}
else
{
$useropts = explode("\n", $userfield);
}
if(is_array($useropts))
{
foreach($useropts as $key => $val)
{
$seloptions[$val] = $val;
}
}
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)
{
$val = trim($val);
$val = str_replace("\n", "\\n", $val);

$sel = "";
if($val == $seloptions[$val])
{
$sel = ' selected="selected"';
}

eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
}
if(!$profilefield['length'])

				{
if($errors)
{
$useropts = $userfield;
}
else
{
$useropts = explode("\n", $userfield);
}
if(is_array($useropts))
{
foreach($useropts as $key => $val)
{
$seloptions[$val] = $val;
}
}
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)
{
$val = trim($val);
$val = str_replace("\n", "\\n", $val);

$sel = "";
if(isset($seloptions[$val]) && $val == $seloptions[$val])
{
$sel = ' selected="selected"';
}

eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
}
if(!$profilefield['length'])

						{
$profilefield['length'] = 3;
}

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

						{
$profilefield['length'] = 3;
}

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

					}

					}

				}
elseif($type == "select")

				}
elseif($type == "select")

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

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

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

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

Zeile 951Zeile 960
							{
$sel = ' selected="selected"';
}

							{
$sel = ' selected="selected"';
}





							eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
}
if(!$profilefield['length'])

							eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
}
if(!$profilefield['length'])

Zeile 971Zeile 980
						{
$checked = "";
if($val == $userfield)

						{
$checked = "";
if($val == $userfield)

							{
$checked = 'checked="checked"';
}

							{
$checked = 'checked="checked"';
}


eval("\$code .= \"".$templates->get("usercp_profile_profilefields_radio")."\";");
}


eval("\$code .= \"".$templates->get("usercp_profile_profilefields_radio")."\";");
}

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

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

							if($val == $seloptions[$val])

							if(isset($seloptions[$val]) && $val == $seloptions[$val])

							{
$checked = 'checked="checked"';
}

							{
$checked = 'checked="checked"';
}

Zeile 1035Zeile 1044
					{
if($type == "textarea")
{

					{
if($type == "textarea")
{

							$inp_selector = "$('textarea[name=\"profile_fields[{$field}]\"')";					

							$inp_selector = "$('textarea[name=\"profile_fields[{$field}]\"]')";					

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

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

							$inp_selector = "$('select[name=\"profile_fields[{$field}][]\"')";					

							$inp_selector = "$('select[name=\"profile_fields[{$field}][]\"]')";					

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

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

							$inp_selector = "$('input[name=\"profile_fields[{$field}][]\"')";	

							$inp_selector = "$('input[name=\"profile_fields[{$field}][]\"]')";	

						}
else
{

						}
else
{

							$inp_selector = "$('input[name=\"profile_fields[{$field}]\"')";

							$inp_selector = "$('input[name=\"profile_fields[{$field}]\"]')";

						}

$validator_extra .= "

						}

$validator_extra .= "

Zeile 1064Zeile 1073
				else
{
eval("\$customfields .= \"".$templates->get("member_register_customfield")."\";");

				else
{
eval("\$customfields .= \"".$templates->get("member_register_customfield")."\";");

				}
}
}

if(!empty($requiredfields))
{
eval("\$requiredfields = \"".$templates->get("member_register_requiredfields")."\";");
}
if(!empty($customfields))
{
eval("\$customfields = \"".$templates->get("member_register_additionalfields")."\";");


				}
}

if($requiredfields)
{
eval("\$requiredfields = \"".$templates->get("member_register_requiredfields")."\";");
}

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

		}

		}

 


		if(!isset($fromreg))
{
$allownoticescheck = "checked=\"checked\"";

		if(!isset($fromreg))
{
$allownoticescheck = "checked=\"checked\"";

Zeile 1161Zeile 1172
					required: true,
remote:{
url: 'xmlhttp.php?action=validate_question',

					required: true,
remote:{
url: 'xmlhttp.php?action=validate_question',

						type: 'post',

						type: 'post',

						dataType: 'json',
data:
{

						dataType: 'json',
data:
{

Zeile 1183Zeile 1194
		if($mybb->settings['hiddencaptchaimage'])
{
$captcha_field = $mybb->settings['hiddencaptchaimagefield'];

		if($mybb->settings['hiddencaptchaimage'])
{
$captcha_field = $mybb->settings['hiddencaptchaimagefield'];





			eval("\$hiddencaptcha = \"".$templates->get("member_register_hiddencaptcha")."\";");
}
if($mybb->settings['regtype'] != "randompass")

			eval("\$hiddencaptcha = \"".$templates->get("member_register_hiddencaptcha")."\";");
}
if($mybb->settings['regtype'] != "randompass")

Zeile 1205Zeile 1216
						type: 'post',
dataType: 'json',
data:

						type: 'post',
dataType: 'json',
data:

						{

						{

							my_post_key: my_post_key
},
},

							my_post_key: my_post_key
},
},

Zeile 1283Zeile 1294
if($mybb->input['action'] == "activate")
{
$plugins->run_hooks("member_activate_start");

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


if(isset($mybb->input['username']))
{
$mybb->input['username'] = $mybb->get_input('username');
$options = array(
'username_method' => $mybb->settings['username_method'],
'fields' => '*',
);
$user = get_user_by_username($mybb->input['username'], $options);
if(!$user)
{
switch($mybb->settings['username_method'])


if(isset($mybb->input['username']))
{
$mybb->input['username'] = $mybb->get_input('username');
$options = array(
'username_method' => $mybb->settings['username_method'],
'fields' => '*',
);
$user = get_user_by_username($mybb->input['username'], $options);
if(!$user)
{
switch($mybb->settings['username_method'])

			{
case 0:
error($lang->error_invalidpworusername);

			{
case 0:
error($lang->error_invalidpworusername);

Zeile 1311Zeile 1322
			}
}
$uid = $user['uid'];

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

	}

	}

	else
{
$user = get_user($mybb->get_input('uid', MyBB::INPUT_INT));

	else
{
$user = get_user($mybb->get_input('uid', MyBB::INPUT_INT));

Zeile 1323Zeile 1334
		if(!$activation['uid'])
{
error($lang->error_alreadyactivated);

		if(!$activation['uid'])
{
error($lang->error_alreadyactivated);

		}

		}

		if($activation['code'] != $mybb->get_input('code'))
{
error($lang->error_badactivationcode);

		if($activation['code'] != $mybb->get_input('code'))
{
error($lang->error_badactivationcode);

		}


		}


		if($activation['type'] == "b" && $activation['validated'] == 1)
{
error($lang->error_alreadyvalidated);

		if($activation['type'] == "b" && $activation['validated'] == 1)
{
error($lang->error_alreadyvalidated);

Zeile 1339Zeile 1350
		if($user['usergroup'] == 5 && $activation['type'] != "e" && $activation['type'] != "b")
{
$db->update_query("users", array("usergroup" => 2), "uid='".$user['uid']."'");

		if($user['usergroup'] == 5 && $activation['type'] != "e" && $activation['type'] != "b")
{
$db->update_query("users", array("usergroup" => 2), "uid='".$user['uid']."'");





			$cache->update_awaitingactivation();
}
if($activation['type'] == "e")

			$cache->update_awaitingactivation();
}
if($activation['type'] == "e")

Zeile 1349Zeile 1360
			);
$db->update_query("users", $newemail, "uid='".$user['uid']."'");
$plugins->run_hooks("member_activate_emailupdated");

			);
$db->update_query("users", $newemail, "uid='".$user['uid']."'");
$plugins->run_hooks("member_activate_emailupdated");





			redirect("usercp.php", $lang->redirect_emailupdated);
}
elseif($activation['type'] == "b")

			redirect("usercp.php", $lang->redirect_emailupdated);
}
elseif($activation['type'] == "b")

Zeile 1365Zeile 1376
		else
{
$plugins->run_hooks("member_activate_accountactivated");

		else
{
$plugins->run_hooks("member_activate_accountactivated");





			redirect("index.php", $lang->redirect_accountactivated);
}
}

			redirect("index.php", $lang->redirect_accountactivated);
}
}

Zeile 1382Zeile 1393

eval("\$activate = \"".$templates->get("member_activate")."\";");
output_page($activate);


eval("\$activate = \"".$templates->get("member_activate")."\";");
output_page($activate);

	}
}

	}
}


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


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


if($mybb->settings['regtype'] == "admin")
{
error($lang->error_activated_by_admin);
}
if($mybb->user['uid'] && $mybb->user['usergroup'] != 5)
{
error($lang->error_alreadyactivated);


if($mybb->settings['regtype'] == "admin")
{
error($lang->error_activated_by_admin);
}
if($mybb->user['uid'] && $mybb->user['usergroup'] != 5)
{
error($lang->error_alreadyactivated);

	}

$query = $db->simple_select("awaitingactivation", "*", "uid='".$user['uid']."' AND type='b'");

	}

$query = $db->simple_select("awaitingactivation", "*", "uid='".$user['uid']."' AND type='b'");

	$activation = $db->fetch_array($query);


	$activation = $db->fetch_array($query);


	if($activation['validated'] == 1)

	if($activation['validated'] == 1)

	{
error($lang->error_activated_by_admin);
}

$plugins->run_hooks("member_resendactivation_end");

	{
error($lang->error_activated_by_admin);
}

$plugins->run_hooks("member_resendactivation_end");


eval("\$activate = \"".$templates->get("member_resendactivation")."\";");
output_page($activate);


eval("\$activate = \"".$templates->get("member_resendactivation")."\";");
output_page($activate);

Zeile 1427Zeile 1438
		LEFT JOIN ".TABLE_PREFIX."awaitingactivation a ON (a.uid=u.uid AND a.type='r' OR a.type='b')
WHERE u.email='".$db->escape_string($mybb->get_input('email'))."'
");

		LEFT JOIN ".TABLE_PREFIX."awaitingactivation a ON (a.uid=u.uid AND a.type='r' OR a.type='b')
WHERE u.email='".$db->escape_string($mybb->get_input('email'))."'
");

	$numusers = $db->num_rows($query);
if($numusers < 1)

	$numusers = $db->num_rows($query);
if($numusers < 1)

	{
error($lang->error_invalidemail);
}

	{
error($lang->error_invalidemail);
}

Zeile 1561Zeile 1572
			switch($mybb->settings['username_method'])
{
case 0:

			switch($mybb->settings['username_method'])
{
case 0:

					error($lang->error_invalidpworusername);

					error($lang->error_invalidpworusername);

					break;
case 1:
error($lang->error_invalidpworusername1);
break;
case 2:
error($lang->error_invalidpworusername2);

					break;
case 1:
error($lang->error_invalidpworusername1);
break;
case 2:
error($lang->error_invalidpworusername2);

					break;

					break;

				default:
error($lang->error_invalidpworusername);
break;
}
}

				default:
error($lang->error_invalidpworusername);
break;
}
}

	}

	}

	else

	else

	{

	{

		$user = get_user($mybb->get_input('uid', MyBB::INPUT_INT));
}
if(isset($mybb->input['code']) && $user)
{

		$user = get_user($mybb->get_input('uid', MyBB::INPUT_INT));
}
if(isset($mybb->input['code']) && $user)
{

		$query = $db->simple_select("awaitingactivation", "*", "uid='".$user['uid']."' AND type='p'");
$activation = $db->fetch_array($query);

		$query = $db->simple_select("awaitingactivation", "code", "uid='".$user['uid']."' AND type='p'");
$activationcode = $db->fetch_field($query, 'code');

		$now = TIME_NOW;

		$now = TIME_NOW;

		if($activation['code'] != $mybb->get_input('code'))

		if(!$activationcode || $activationcode != $mybb->get_input('code'))

		{
error($lang->error_badlostpwcode);
}

		{
error($lang->error_badlostpwcode);
}

Zeile 1651Zeile 1662
if($mybb->input['action'] == "do_login" && $mybb->request_method == "post")
{
$plugins->run_hooks("member_do_login_start");

if($mybb->input['action'] == "do_login" && $mybb->request_method == "post")
{
$plugins->run_hooks("member_do_login_start");


// Is a fatal call if user has had too many tries


// Is a fatal call if user has had too many tries

	$errors = array();
$logins = login_attempt_check();


	$errors = array();
$logins = login_attempt_check();


Zeile 1740Zeile 1751
}

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

}

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

{

{

	$plugins->run_hooks("member_login");

$member_loggedin_notice = "";

	$plugins->run_hooks("member_login");

$member_loggedin_notice = "";

Zeile 1782Zeile 1793
				$captcha = $login_captcha->build_hidden_captcha();
}
}

				$captcha = $login_captcha->build_hidden_captcha();
}
}

		elseif($login_captcha->type == 2)

		elseif($login_captcha->type == 2 || $login_captcha->type == 4)

		{
$login_captcha->build_recaptcha();
}

		{
$login_captcha->build_recaptcha();
}

Zeile 1830Zeile 1841
	}

$plugins->run_hooks("member_login_end");

	}

$plugins->run_hooks("member_login_end");





	eval("\$login = \"".$templates->get("member_login")."\";");
output_page($login);
}

	eval("\$login = \"".$templates->get("member_login")."\";");
output_page($login);
}

Zeile 1919Zeile 1930
	else
{
$memprofile = false;

	else
{
$memprofile = false;

	}


	}


	if(!$memprofile)
{
error($lang->error_nomember);

	if(!$memprofile)
{
error($lang->error_nomember);

	}


	}


	$uid = $memprofile['uid'];

$lang->profile = $lang->sprintf($lang->profile, $memprofile['username']);

	$uid = $memprofile['uid'];

$lang->profile = $lang->sprintf($lang->profile, $memprofile['username']);

Zeile 1935Zeile 1946

$lang->nav_profile = $lang->sprintf($lang->nav_profile, $memprofile['username']);
add_breadcrumb($lang->nav_profile);


$lang->nav_profile = $lang->sprintf($lang->nav_profile, $memprofile['username']);
add_breadcrumb($lang->nav_profile);





	$lang->users_forum_info = $lang->sprintf($lang->users_forum_info, $memprofile['username']);
$lang->users_contact_details = $lang->sprintf($lang->users_contact_details, $memprofile['username']);

if($mybb->settings['enablepms'] != 0 && (($memprofile['receivepms'] != 0 && $memperms['canusepms'] != 0 && my_strpos(",".$memprofile['ignorelist'].",", ",".$mybb->user['uid'].",") === false) || $mybb->usergroup['canoverridepm'] == 1))

	$lang->users_forum_info = $lang->sprintf($lang->users_forum_info, $memprofile['username']);
$lang->users_contact_details = $lang->sprintf($lang->users_contact_details, $memprofile['username']);

if($mybb->settings['enablepms'] != 0 && (($memprofile['receivepms'] != 0 && $memperms['canusepms'] != 0 && my_strpos(",".$memprofile['ignorelist'].",", ",".$mybb->user['uid'].",") === false) || $mybb->usergroup['canoverridepm'] == 1))

	{

	{

		$lang->send_pm = $lang->sprintf($lang->send_pm, $memprofile['username']);
}
else
{
$lang->send_pm = '';

		$lang->send_pm = $lang->sprintf($lang->send_pm, $memprofile['username']);
}
else
{
$lang->send_pm = '';

	}

	}

	$lang->away_note = $lang->sprintf($lang->away_note, $memprofile['username']);
$lang->users_additional_info = $lang->sprintf($lang->users_additional_info, $memprofile['username']);
$lang->users_signature = $lang->sprintf($lang->users_signature, $memprofile['username']);
$lang->send_user_email = $lang->sprintf($lang->send_user_email, $memprofile['username']);

	$lang->away_note = $lang->sprintf($lang->away_note, $memprofile['username']);
$lang->users_additional_info = $lang->sprintf($lang->users_additional_info, $memprofile['username']);
$lang->users_signature = $lang->sprintf($lang->users_signature, $memprofile['username']);
$lang->send_user_email = $lang->sprintf($lang->send_user_email, $memprofile['username']);





	$useravatar = format_avatar($memprofile['avatar'], $memprofile['avatardimensions']);
eval("\$avatar = \"".$templates->get("member_profile_avatar")."\";");


	$useravatar = format_avatar($memprofile['avatar'], $memprofile['avatardimensions']);
eval("\$avatar = \"".$templates->get("member_profile_avatar")."\";");


Zeile 1962Zeile 1973
		$memprofile['website'] = htmlspecialchars_uni($memprofile['website']);
$bgcolor = alt_trow();
eval("\$website = \"".$templates->get("member_profile_website")."\";");

		$memprofile['website'] = htmlspecialchars_uni($memprofile['website']);
$bgcolor = alt_trow();
eval("\$website = \"".$templates->get("member_profile_website")."\";");

	}

	}

	
if($memprofile['hideemail'] != 1 && (my_strpos(",".$memprofile['ignorelist'].",", ",".$mybb->user['uid'].",") === false || $mybb->usergroup['cansendemailoverride'] != 0))
{

	
if($memprofile['hideemail'] != 1 && (my_strpos(",".$memprofile['ignorelist'].",", ",".$mybb->user['uid'].",") === false || $mybb->usergroup['cansendemailoverride'] != 0))
{

Zeile 1988Zeile 1999
			$any_contact_field = true;

if($field == 'icq')

			$any_contact_field = true;

if($field == 'icq')

			{

			{

				$memprofile[$field] = (int)$memprofile[$field];
}
else

				$memprofile[$field] = (int)$memprofile[$field];
}
else

Zeile 2005Zeile 2016
	if($any_contact_field || $sendemail || $sendpm || $website)
{
eval('$contact_details = "'.$templates->get("member_profile_contact_details").'";');

	if($any_contact_field || $sendemail || $sendpm || $website)
{
eval('$contact_details = "'.$templates->get("member_profile_contact_details").'";');

	}


	}


	$signature = '';
if($memprofile['signature'] && ($memprofile['suspendsignature'] == 0 || $memprofile['suspendsigtime'] < TIME_NOW) && !is_member($mybb->settings['hidesignatures']) && $memperms['canusesig'] && $memperms['canusesigxposts'] <= $memprofile['postnum'])
{

	$signature = '';
if($memprofile['signature'] && ($memprofile['suspendsignature'] == 0 || $memprofile['suspendsigtime'] < TIME_NOW) && !is_member($mybb->settings['hidesignatures']) && $memperms['canusesig'] && $memperms['canusesigxposts'] <= $memprofile['postnum'])
{

Zeile 2138Zeile 2149

// Check if our away status is set to 1, it may have been updated already (see a few lines above)
if($memprofile['away'] == 1)


// Check if our away status is set to 1, it may have been updated already (see a few lines above)
if($memprofile['away'] == 1)

		{

		{

			eval("\$awaybit = \"".$templates->get("member_profile_away")."\";");
}
}

if($memprofile['dst'] == 1)

			eval("\$awaybit = \"".$templates->get("member_profile_away")."\";");
}
}

if($memprofile['dst'] == 1)

	{

	{

		$memprofile['timezone']++;
if(my_substr($memprofile['timezone'], 0, 1) != "-")
{

		$memprofile['timezone']++;
if(my_substr($memprofile['timezone'], 0, 1) != "-")
{

Zeile 2155Zeile 2166
	$memregdate = my_date($mybb->settings['dateformat'], $memprofile['regdate']);
$memlocaldate = gmdate($mybb->settings['dateformat'], TIME_NOW + ($memprofile['timezone'] * 3600));
$memlocaltime = gmdate($mybb->settings['timeformat'], TIME_NOW + ($memprofile['timezone'] * 3600));

	$memregdate = my_date($mybb->settings['dateformat'], $memprofile['regdate']);
$memlocaldate = gmdate($mybb->settings['dateformat'], TIME_NOW + ($memprofile['timezone'] * 3600));
$memlocaltime = gmdate($mybb->settings['timeformat'], TIME_NOW + ($memprofile['timezone'] * 3600));





	$localtime = $lang->sprintf($lang->local_time_format, $memlocaldate, $memlocaltime);

if($memprofile['lastactive'])

	$localtime = $lang->sprintf($lang->local_time_format, $memlocaldate, $memlocaltime);

if($memprofile['lastactive'])

Zeile 2165Zeile 2176
		$memlastvisittime = my_date($mybb->settings['timeformat'], $memprofile['lastactive']);
}
else

		$memlastvisittime = my_date($mybb->settings['timeformat'], $memprofile['lastactive']);
}
else

	{

	{

		$memlastvisitdate = $lang->lastvisit_never;
$memlastvisitsep = '';
$memlastvisittime = '';

		$memlastvisitdate = $lang->lastvisit_never;
$memlastvisitsep = '';
$memlastvisittime = '';

Zeile 2181Zeile 2192
			{
$lang->membdayage = $lang->sprintf($lang->membdayage, get_age($memprofile['birthday']));


			{
$lang->membdayage = $lang->sprintf($lang->membdayage, get_age($memprofile['birthday']));


				if($membday[2] >= 1970)
{
$w_day = date("l", mktime(0, 0, 0, $membday[1], $membday[0], $membday[2]));
$membday = format_bdays($mybb->settings['dateformat'], $membday[1], $membday[0], $membday[2], $w_day);
}
else
{
$bdayformat = fix_mktime($mybb->settings['dateformat'], $membday[2]);
$membday = mktime(0, 0, 0, $membday[1], $membday[0], $membday[2]);
$membday = date($bdayformat, $membday);
}

				$bdayformat = fix_mktime($mybb->settings['dateformat'], $membday[2]);
$membday = mktime(0, 0, 0, $membday[1], $membday[0], $membday[2]);
$membday = date($bdayformat, $membday);









				$membdayage = $lang->membdayage;
}
elseif($membday[2])

				$membdayage = $lang->membdayage;
}
elseif($membday[2])

Zeile 2280Zeile 2284
	if($displaygroup['stars'] || $displaygroup['usertitle'])
{
// Set the number of stars if display group has constant number of stars

	if($displaygroup['stars'] || $displaygroup['usertitle'])
{
// Set the number of stars if display group has constant number of stars

		$stars = $displaygroup['stars'];
}
elseif(!$stars)

		$stars = $displaygroup['stars'];
}
elseif(!$stars)

	{
if(!is_array($usertitles))
{

	{
if(!is_array($usertitles))
{

Zeile 2371Zeile 2375
			eval("\$online_status = \"".$templates->get("member_profile_online")."\";");
}
// User is offline

			eval("\$online_status = \"".$templates->get("member_profile_online")."\";");
}
// User is offline

		else

		else

		{
eval("\$online_status = \"".$templates->get("member_profile_offline")."\";");
}

		{
eval("\$online_status = \"".$templates->get("member_profile_offline")."\";");
}

Zeile 2388Zeile 2392
			// We have had at least some active time, hide it instead
$memlastvisitdate = $lang->lastvisit_hidden;
}

			// We have had at least some active time, hide it instead
$memlastvisitdate = $lang->lastvisit_hidden;
}





		$timeonline = $lang->timeonline_hidden;
}


		$timeonline = $lang->timeonline_hidden;
}


Zeile 2398Zeile 2402
	// Build Referral
$referrals = '';
if($mybb->settings['usereferrals'] == 1)

	// Build Referral
$referrals = '';
if($mybb->settings['usereferrals'] == 1)

	{
$bg_color = alt_trow();


	{
$bg_color = alt_trow();


		eval("\$referrals = \"".$templates->get("member_profile_referrals")."\";");
}


		eval("\$referrals = \"".$templates->get("member_profile_referrals")."\";");
}


Zeile 2416Zeile 2420
		if($mybb->usergroup['cangivereputations'] == 1 && $memprofile['uid'] != $mybb->user['uid'] && ($mybb->settings['posrep'] || $mybb->settings['neurep'] || $mybb->settings['negrep']))
{
eval("\$vote_link = \"".$templates->get("member_profile_reputation_vote")."\";");

		if($mybb->usergroup['cangivereputations'] == 1 && $memprofile['uid'] != $mybb->user['uid'] && ($mybb->settings['posrep'] || $mybb->settings['neurep'] || $mybb->settings['negrep']))
{
eval("\$vote_link = \"".$templates->get("member_profile_reputation_vote")."\";");

		}

		}


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


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

Zeile 2425Zeile 2429
	if($mybb->settings['enablewarningsystem'] != 0 && $memperms['canreceivewarnings'] != 0 && ($mybb->usergroup['canwarnusers'] != 0 || ($mybb->user['uid'] == $memprofile['uid'] && $mybb->settings['canviewownwarning'] != 0)))
{
$bg_color = alt_trow();

	if($mybb->settings['enablewarningsystem'] != 0 && $memperms['canreceivewarnings'] != 0 && ($mybb->usergroup['canwarnusers'] != 0 || ($mybb->user['uid'] == $memprofile['uid'] && $mybb->settings['canviewownwarning'] != 0)))
{
$bg_color = alt_trow();

 

if($mybb->settings['maxwarningpoints'] < 1)
{
$mybb->settings['maxwarningpoints'] = 10;
}


		$warning_level = round($memprofile['warningpoints']/$mybb->settings['maxwarningpoints']*100);

if($warning_level > 100)

		$warning_level = round($memprofile['warningpoints']/$mybb->settings['maxwarningpoints']*100);

if($warning_level > 100)

Zeile 2449Zeile 2459

$query = $db->simple_select("userfields", "*", "ufid = '{$uid}'");
$userfields = $db->fetch_array($query);


$query = $db->simple_select("userfields", "*", "ufid = '{$uid}'");
$userfields = $db->fetch_array($query);





	// If this user is an Administrator or a Moderator then we wish to show all profile fields
$pfcache = $cache->read('profilefields');


	// If this user is an Administrator or a Moderator then we wish to show all profile fields
$pfcache = $cache->read('profilefields');


Zeile 2460Zeile 2470
			if($mybb->usergroup['cancp'] != 1 && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['canmodcp'] != 1 && !is_member($customfield['viewableby']))
{
continue;

			if($mybb->usergroup['cancp'] != 1 && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['canmodcp'] != 1 && !is_member($customfield['viewableby']))
{
continue;

			}

			}


$thing = explode("\n", $customfield['type'], "2");
$type = trim($thing[0]);


$thing = explode("\n", $customfield['type'], "2");
$type = trim($thing[0]);

Zeile 2505Zeile 2515
					else
{
$parser_options['nl2br'] = 0;

					else
{
$parser_options['nl2br'] = 0;

					}

					}


if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)
{


if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)
{

Zeile 2526Zeile 2536
	}

if($customfields)

	}

if($customfields)

	{

	{

		eval("\$profilefields = \"".$templates->get("member_profile_customfields")."\";");
}


		eval("\$profilefields = \"".$templates->get("member_profile_customfields")."\";");
}


Zeile 2537Zeile 2547
	$lang->tpd_percent_total = $lang->sprintf($lang->tpd_percent_total, my_number_format($tpd), $thread_percent);

$formattedname = format_name($memprofile['username'], $memprofile['usergroup'], $memprofile['displaygroup']);

	$lang->tpd_percent_total = $lang->sprintf($lang->tpd_percent_total, my_number_format($tpd), $thread_percent);

$formattedname = format_name($memprofile['username'], $memprofile['usergroup'], $memprofile['displaygroup']);





	$bannedbit = '';
if($memperms['isbannedgroup'] == 1 && $mybb->usergroup['canbanusers'] == 1)
{

	$bannedbit = '';
if($memperms['isbannedgroup'] == 1 && $mybb->usergroup['canbanusers'] == 1)
{

Zeile 2548Zeile 2558
		if($memban['reason'])
{
$memban['reason'] = htmlspecialchars_uni($parser->parse_badwords($memban['reason']));

		if($memban['reason'])
{
$memban['reason'] = htmlspecialchars_uni($parser->parse_badwords($memban['reason']));

		}
else

		}
else

		{
$memban['reason'] = $lang->na;
}

		{
$memban['reason'] = $lang->na;
}

Zeile 2637Zeile 2647
		if(!empty($editprofile) || !empty($banuser) || !empty($purgespammer))
{
eval("\$manageuser = \"".$templates->get("member_profile_modoptions_manageuser")."\";");

		if(!empty($editprofile) || !empty($banuser) || !empty($purgespammer))
{
eval("\$manageuser = \"".$templates->get("member_profile_modoptions_manageuser")."\";");

		}


		}


		eval("\$modoptions = \"".$templates->get("member_profile_modoptions")."\";");
}


		eval("\$modoptions = \"".$templates->get("member_profile_modoptions")."\";");
}


Zeile 2652Zeile 2662
		if(in_array($uid, $buddy_list))
{
$add_remove_options = array('url' => "usercp.php?action=do_editlists&amp;delete={$uid}&amp;my_post_key={$mybb->post_code}", 'class' => 'remove_buddy_button', 'lang' => $lang->remove_from_buddy_list);

		if(in_array($uid, $buddy_list))
{
$add_remove_options = array('url' => "usercp.php?action=do_editlists&amp;delete={$uid}&amp;my_post_key={$mybb->post_code}", 'class' => 'remove_buddy_button', 'lang' => $lang->remove_from_buddy_list);

		}
else

		}
else

		{
$add_remove_options = array('url' => "usercp.php?action=do_editlists&amp;add_username=".urlencode($memprofile['username'])."&amp;my_post_key={$mybb->post_code}", 'class' => 'add_buddy_button', 'lang' => $lang->add_to_buddy_list);
}

		{
$add_remove_options = array('url' => "usercp.php?action=do_editlists&amp;add_username=".urlencode($memprofile['username'])."&amp;my_post_key={$mybb->post_code}", 'class' => 'add_buddy_button', 'lang' => $lang->add_to_buddy_list);
}

Zeile 2664Zeile 2674
		}

if(in_array($uid, $ignore_list))

		}

if(in_array($uid, $ignore_list))

		{

		{

			$add_remove_options = array('url' => "usercp.php?action=do_editlists&amp;manage=ignored&amp;delete={$uid}&amp;my_post_key={$mybb->post_code}", 'class' => 'remove_ignore_button', 'lang' => $lang->remove_from_ignore_list);
}
else

			$add_remove_options = array('url' => "usercp.php?action=do_editlists&amp;manage=ignored&amp;delete={$uid}&amp;my_post_key={$mybb->post_code}", 'class' => 'remove_ignore_button', 'lang' => $lang->remove_from_ignore_list);
}
else

Zeile 2675Zeile 2685
		if(!in_array($uid, $buddy_list))
{
eval("\$ignore_options = \"".$templates->get("member_profile_addremove")."\";"); // Add/Remove Ignore

		if(!in_array($uid, $buddy_list))
{
eval("\$ignore_options = \"".$templates->get("member_profile_addremove")."\";"); // Add/Remove Ignore

		}


		}


		if(isset($memperms['canbereported']) && $memperms['canbereported'] == 1)
{
$add_remove_options = array('url' => "javascript:Report.reportUser({$memprofile['uid']});", 'class' => 'report_user_button', 'lang' => $lang->report_user);
eval("\$report_options = \"".$templates->get("member_profile_addremove")."\";"); // Report User

		if(isset($memperms['canbereported']) && $memperms['canbereported'] == 1)
{
$add_remove_options = array('url' => "javascript:Report.reportUser({$memprofile['uid']});", 'class' => 'report_user_button', 'lang' => $lang->report_user);
eval("\$report_options = \"".$templates->get("member_profile_addremove")."\";"); // Report User

		}
}

$plugins->run_hooks("member_profile_end");

		}
}

$plugins->run_hooks("member_profile_end");


eval("\$profile = \"".$templates->get("member_profile")."\";");
output_page($profile);


eval("\$profile = \"".$templates->get("member_profile")."\";");
output_page($profile);

Zeile 2694Zeile 2704
{
// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));

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





	$plugins->run_hooks("member_do_emailuser_start");

	$plugins->run_hooks("member_do_emailuser_start");


// Guests or those without permission can't email other users
if($mybb->usergroup['cansendemail'] == 0)
{
error_no_permission();
}

// Check group limits
if($mybb->usergroup['maxemails'] > 0)
{
if($mybb->user['uid'] > 0)
{
$user_check = "fromuid='{$mybb->user['uid']}'";
}
else
{
$user_check = "ipaddress=".$db->escape_binary($session->packedip);
}

$query = $db->simple_select("maillogs", "COUNT(*) AS sent_count", "{$user_check} AND dateline >= '".(TIME_NOW - (60*60*24))."'");
$sent_count = $db->fetch_field($query, "sent_count");
if($sent_count >= $mybb->usergroup['maxemails'])
{
$lang->error_max_emails_day = $lang->sprintf($lang->error_max_emails_day, $mybb->usergroup['maxemails']);
error($lang->error_max_emails_day);
}
}

// Check email flood control
if($mybb->usergroup['emailfloodtime'] > 0)
{
if($mybb->user['uid'] > 0)


// Guests or those without permission can't email other users
if($mybb->usergroup['cansendemail'] == 0)
{
error_no_permission();
}

// Check group limits
if($mybb->usergroup['maxemails'] > 0)
{
if($mybb->user['uid'] > 0)
{
$user_check = "fromuid='{$mybb->user['uid']}'";
}
else
{
$user_check = "ipaddress=".$db->escape_binary($session->packedip);
}

$query = $db->simple_select("maillogs", "COUNT(*) AS sent_count", "{$user_check} AND dateline >= '".(TIME_NOW - (60*60*24))."'");
$sent_count = $db->fetch_field($query, "sent_count");
if($sent_count >= $mybb->usergroup['maxemails'])
{
$lang->error_max_emails_day = $lang->sprintf($lang->error_max_emails_day, $mybb->usergroup['maxemails']);
error($lang->error_max_emails_day);
}
}

// Check email flood control
if($mybb->usergroup['emailfloodtime'] > 0)
{
if($mybb->user['uid'] > 0)

		{
$user_check = "fromuid='{$mybb->user['uid']}'";
}

		{
$user_check = "fromuid='{$mybb->user['uid']}'";
}

Zeile 2767Zeile 2777
			error($lang->error_emailflooding);
}
}

			error($lang->error_emailflooding);
}
}





	$query = $db->simple_select("users", "uid, username, email, hideemail", "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'");
$to_user = $db->fetch_array($query);

if(!$to_user['username'])

	$query = $db->simple_select("users", "uid, username, email, hideemail", "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'");
$to_user = $db->fetch_array($query);

if(!$to_user['username'])

	{

	{

		error($lang->error_invalidusername);
}

if($to_user['hideemail'] != 0)

		error($lang->error_invalidusername);
}

if($to_user['hideemail'] != 0)

	{

	{

		error($lang->error_hideemail);
}

		error($lang->error_hideemail);
}





	$errors = array();

	$errors = array();

 

if($mybb->user['uid'])
{
$mybb->input['fromemail'] = $mybb->user['email'];
$mybb->input['fromname'] = $mybb->user['username'];
}


if(!validate_email_format($mybb->input['fromemail']))


if(!validate_email_format($mybb->input['fromemail']))

	{

	{

		$errors[] = $lang->error_invalidfromemail;
}

if(empty($mybb->input['fromname']))

		$errors[] = $lang->error_invalidfromemail;
}

if(empty($mybb->input['fromname']))

	{

	{

		$errors[] = $lang->error_noname;
}

if(empty($mybb->input['subject']))

		$errors[] = $lang->error_noname;
}

if(empty($mybb->input['subject']))

	{

	{

		$errors[] = $lang->error_no_email_subject;
}


		$errors[] = $lang->error_no_email_subject;
}


Zeile 2811Zeile 2827
		if($captcha->validate_captcha() == false)
{
// CAPTCHA validation failed

		if($captcha->validate_captcha() == false)
{
// CAPTCHA validation failed

			foreach($captcha->get_errors() as $error)
{
$errors[] = $error;
}
}
}

			foreach($captcha->get_errors() as $error)
{
$errors[] = $error;
}
}
}


if(count($errors) == 0)
{


if(count($errors) == 0)
{

Zeile 2992Zeile 3008
	if($mybb->user['uid'] == 0)
{
eval("\$from_email = \"".$templates->get("member_emailuser_guest")."\";");

	if($mybb->user['uid'] == 0)
{
eval("\$from_email = \"".$templates->get("member_emailuser_guest")."\";");

	}
else
{
eval("\$from_email = \"".$templates->get("member_emailuser_hidden")."\";");

 
	}

$plugins->run_hooks("member_emailuser_end");

	}

$plugins->run_hooks("member_emailuser_end");