Vergleich member.php - 1.8.4 - 1.8.7

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 15Zeile 15

$nosession['avatar'] = 1;
$templatelist = "member_register,member_register_hiddencaptcha,member_coppa_form,member_register_coppa,member_register_agreement_coppa,member_register_agreement,usercp_options_tppselect,usercp_options_pppselect,member_register_referrer,member_register_customfield,member_register_requiredfields";


$nosession['avatar'] = 1;
$templatelist = "member_register,member_register_hiddencaptcha,member_coppa_form,member_register_coppa,member_register_agreement_coppa,member_register_agreement,usercp_options_tppselect,usercp_options_pppselect,member_register_referrer,member_register_customfield,member_register_requiredfields";

$templatelist .= ",member_resetpassword,member_loggedin_notice,member_profile_away,member_emailuser,member_register_regimage,member_register_regimage_recaptcha,member_register_regimage_nocaptcha,member_register_regimage_ayah,post_captcha_hidden,post_captcha,post_captcha_recaptcha,post_captcha_ayah,member_profile_addremove,member_emailuser_guest";

$templatelist .= ",member_resetpassword,member_loggedin_notice,member_profile_away,member_emailuser,member_register_regimage,member_register_regimage_recaptcha,member_register_regimage_nocaptcha,post_captcha_hidden,post_captcha,post_captcha_recaptcha,member_profile_addremove,member_emailuser_guest";

$templatelist .= ",member_profile_email,member_profile_offline,member_profile_reputation,member_profile_warn,member_profile_warninglevel,member_profile_customfields_field,member_profile_customfields,member_profile_adminoptions,member_profile,member_login,member_profile_online,member_viewnotes";
$templatelist .= ",member_profile_signature,member_profile_avatar,member_profile_groupimage,member_profile_referrals,member_profile_website,member_profile_reputation_vote,member_activate,member_resendactivation,member_lostpw,member_register_additionalfields,member_register_password,usercp_options_pppselect_option";
$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_email,member_profile_offline,member_profile_reputation,member_profile_warn,member_profile_warninglevel,member_profile_customfields_field,member_profile_customfields,member_profile_adminoptions,member_profile,member_login,member_profile_online,member_viewnotes";
$templatelist .= ",member_profile_signature,member_profile_avatar,member_profile_groupimage,member_profile_referrals,member_profile_website,member_profile_reputation_vote,member_activate,member_resendactivation,member_lostpw,member_register_additionalfields,member_register_password,usercp_options_pppselect_option";
$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,member_profile_findposts,member_profile_findthreads";


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

			else
{
$referrername = '';

			}

			}

			if(isset($quickreg))
{
$refbg = "trow1";

			if(isset($quickreg))
{
$refbg = "trow1";

			}

			}

			else
{
$refbg = "trow2";
}
eval("\$referrer = \"".$templates->get("member_register_referrer")."\";");

			else
{
$refbg = "trow2";
}
eval("\$referrer = \"".$templates->get("member_register_referrer")."\";");

		}
else

		}
else

		{
$referrer = '';
}

		{
$referrer = '';
}

Zeile 866Zeile 873
			$usergroup = 5;
}
else

			$usergroup = 5;
}
else

		{

		{

			$usergroup = 2;
}


			$usergroup = 2;
}


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

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

							}

eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");

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

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

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

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

						}
}
}

						}
}
}

				elseif($type == "textarea")
{
$value = htmlspecialchars_uni($userfield);

				elseif($type == "textarea")
{
$value = htmlspecialchars_uni($userfield);

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 1065Zeile 1074
				{
eval("\$customfields .= \"".$templates->get("member_register_customfield")."\";");
}

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

 
			}

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

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

			}
}


			}
}


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

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

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

Zeile 1373Zeile 1384
	{
$plugins->run_hooks("member_activate_form");


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


		$code = $mybb->get_input('code');

		$code = htmlspecialchars_uni($mybb->get_input('code'));


if(!isset($user['username']))
{


if(!isset($user['username']))
{

Zeile 1388Zeile 1399
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)

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

	{
error($lang->error_alreadyactivated);
}


	{
error($lang->error_alreadyactivated);
}


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

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





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

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

	{
error($lang->error_activated_by_admin);

	{
error($lang->error_activated_by_admin);

	}

$plugins->run_hooks("member_resendactivation_end");

	}

$plugins->run_hooks("member_resendactivation_end");

Zeile 1419Zeile 1430
	if($mybb->settings['regtype'] == "admin")
{
error($lang->error_activated_by_admin);

	if($mybb->settings['regtype'] == "admin")
{
error($lang->error_activated_by_admin);

	}


	}


	$query = $db->query("
SELECT u.uid, u.username, u.usergroup, u.email, a.code, a.type, a.validated
FROM ".TABLE_PREFIX."users u

	$query = $db->query("
SELECT u.uid, u.username, u.usergroup, u.email, a.code, a.type, a.validated
FROM ".TABLE_PREFIX."users u

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

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

						break;

						break;

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

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

Zeile 1489Zeile 1500

eval("\$lostpw = \"".$templates->get("member_lostpw")."\";");
output_page($lostpw);


eval("\$lostpw = \"".$templates->get("member_lostpw")."\";");
output_page($lostpw);

}

}


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


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

Zeile 1559Zeile 1570
		if(!$user)
{
switch($mybb->settings['username_method'])

		if(!$user)
{
switch($mybb->settings['username_method'])

			{

			{

				case 0:
error($lang->error_invalidpworusername);
break;
case 1:
error($lang->error_invalidpworusername1);

				case 0:
error($lang->error_invalidpworusername);
break;
case 1:
error($lang->error_invalidpworusername1);

					break;

					break;

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

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

Zeile 1576Zeile 1587
		}
}
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 1593Zeile 1604

// Generate a new password, then update it
$password_length = (int)$mybb->settings['minpasswordlength'];


// Generate a new password, then update it
$password_length = (int)$mybb->settings['minpasswordlength'];





		if($password_length < 8)
{
$password_length = 8;

		if($password_length < 8)
{
$password_length = 8;

Zeile 1605Zeile 1616
		$email = $user['email'];

$plugins->run_hooks("member_resetpassword_process");

		$email = $user['email'];

$plugins->run_hooks("member_resetpassword_process");





		$emailsubject = $lang->sprintf($lang->emailsubject_passwordreset, $mybb->settings['bbname']);
$emailmessage = $lang->sprintf($lang->email_passwordreset, $username, $mybb->settings['bbname'], $password);
my_mail($email, $emailsubject, $emailmessage);

		$emailsubject = $lang->sprintf($lang->emailsubject_passwordreset, $mybb->settings['bbname']);
$emailmessage = $lang->sprintf($lang->email_passwordreset, $username, $mybb->settings['bbname'], $password);
my_mail($email, $emailsubject, $emailmessage);

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

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

				$lang_username = $lang->username;

				$lang_username = $lang->username;

				break;
case 1:
$lang_username = $lang->username1;

				break;
case 1:
$lang_username = $lang->username1;

Zeile 1632Zeile 1643
			default:
$lang_username = $lang->username;
break;

			default:
$lang_username = $lang->username;
break;

		}

		}


$code = $mybb->get_input('code');



$code = $mybb->get_input('code');


Zeile 1649Zeile 1660
$do_captcha = $correct = false;
$inline_errors = "";
if($mybb->input['action'] == "do_login" && $mybb->request_method == "post")

$do_captcha = $correct = false;
$inline_errors = "";
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

	$plugins->run_hooks("member_do_login_start");

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

Zeile 1665Zeile 1676
		$mybb->input['username'] = $mybb->get_input('quick_username');
$mybb->input['remember'] = $mybb->get_input('quick_remember');
}

		$mybb->input['username'] = $mybb->get_input('quick_username');
$mybb->input['remember'] = $mybb->get_input('quick_remember');
}





	$user = array(
'username' => $mybb->get_input('username'),
'password' => $mybb->get_input('password'),

	$user = array(
'username' => $mybb->get_input('username'),
'password' => $mybb->get_input('password'),

Zeile 1693Zeile 1704
		$db->update_query("users", array('loginattempts' => 'loginattempts+1'), "uid='".(int)$loginhandler->login_data['uid']."'", 1, true);

$errors = $loginhandler->get_friendly_errors();

		$db->update_query("users", array('loginattempts' => 'loginattempts+1'), "uid='".(int)$loginhandler->login_data['uid']."'", 1, true);

$errors = $loginhandler->get_friendly_errors();





		$user['loginattempts'] = (int)$loginhandler->login_data['loginattempts'];

// If we need a captcha set it here
if($mybb->settings['failedcaptchalogincount'] > 0 && ($user['loginattempts'] > $mybb->settings['failedcaptchalogincount'] || (int)$mybb->cookies['loginattempts'] > $mybb->settings['failedcaptchalogincount']))

		$user['loginattempts'] = (int)$loginhandler->login_data['loginattempts'];

// If we need a captcha set it here
if($mybb->settings['failedcaptchalogincount'] > 0 && ($user['loginattempts'] > $mybb->settings['failedcaptchalogincount'] || (int)$mybb->cookies['loginattempts'] > $mybb->settings['failedcaptchalogincount']))

		{

		{

			$do_captcha = true;
$correct = $loginhandler->captcha_verified;
}

			$do_captcha = true;
$correct = $loginhandler->captcha_verified;
}

Zeile 1709Zeile 1720
		if($loginhandler->login_data['coppauser'])
{
error($lang->error_awaitingcoppa);

		if($loginhandler->login_data['coppauser'])
{
error($lang->error_awaitingcoppa);

		}


		}


		$loginhandler->complete_login();

$plugins->run_hooks("member_do_login_end");

		$loginhandler->complete_login();

$plugins->run_hooks("member_do_login_end");





		$mybb->input['url'] = $mybb->get_input('url');


		$mybb->input['url'] = $mybb->get_input('url');


		if(!empty($mybb->input['url']) && my_strpos(basename($mybb->input['url']), 'member.php') === false)

		if(!empty($mybb->input['url']) && my_strpos(basename($mybb->input['url']), 'member.php') === false && !preg_match('#^javascript:#i', $mybb->input['url']))

		{
if((my_strpos(basename($mybb->input['url']), 'newthread.php') !== false || my_strpos(basename($mybb->input['url']), 'newreply.php') !== false) && my_strpos($mybb->input['url'], '&processed=1') !== false)
{

		{
if((my_strpos(basename($mybb->input['url']), 'newthread.php') !== false || my_strpos(basename($mybb->input['url']), 'newreply.php') !== false) && my_strpos($mybb->input['url'], '&processed=1') !== false)
{

Zeile 1731Zeile 1742
		}
else
{

		}
else
{





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

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





	$plugins->run_hooks("member_do_login_end");

	$plugins->run_hooks("member_do_login_end");

}


}


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

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





	$member_loggedin_notice = "";
if($mybb->user['uid'] != 0)
{

	$member_loggedin_notice = "";
if($mybb->user['uid'] != 0)
{

Zeile 1753Zeile 1764
	// Checks to make sure the user can login; they haven't had too many tries at logging in.
// Is a fatal call if user has had too many tries
login_attempt_check();

	// Checks to make sure the user can login; they haven't had too many tries at logging in.
// Is a fatal call if user has had too many tries
login_attempt_check();





	// Redirect to the page where the user came from, but not if that was the login page.
if(isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], "action=login") === false)
{
$redirect_url = htmlentities($_SERVER['HTTP_REFERER']);

	// Redirect to the page where the user came from, but not if that was the login page.
if(isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], "action=login") === false)
{
$redirect_url = htmlentities($_SERVER['HTTP_REFERER']);

	}

	}

	else
{
$redirect_url = '';

	else
{
$redirect_url = '';

Zeile 1781Zeile 1792
			{
$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();

		}
elseif($login_captcha->type == 3)
{
$login_captcha->build_ayah();

 
		}

if($login_captcha->html)

		}

if($login_captcha->html)

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

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





	// Make sure we are looking at a real user here.
if(!$user)
{
error($lang->error_nomember);

	// Make sure we are looking at a real user here.
if(!$user)
{
error($lang->error_nomember);

	}

if($mybb->user['uid'] == 0 || $mybb->usergroup['canmodcp'] != 1)
{
error_no_permission();

	}

if($mybb->user['uid'] == 0 || $mybb->usergroup['canmodcp'] != 1)
{
error_no_permission();

	}

$lang->view_notes_for = $lang->sprintf($lang->view_notes_for, $user['username']);

$user['usernotes'] = nl2br(htmlspecialchars_uni($user['usernotes']));

	}

$lang->view_notes_for = $lang->sprintf($lang->view_notes_for, $user['username']);

$user['usernotes'] = nl2br(htmlspecialchars_uni($user['usernotes']));


$plugins->run_hooks('member_viewnotes');



$plugins->run_hooks('member_viewnotes');


	eval("\$viewnotes = \"".$templates->get("member_viewnotes", 1, 0)."\";");
echo $viewnotes;
exit;
}

	eval("\$viewnotes = \"".$templates->get("member_viewnotes", 1, 0)."\";");
echo $viewnotes;
exit;
}





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

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

Zeile 1913Zeile 1920
		$memprofile = get_user($uid);
}
elseif($mybb->user['uid'])

		$memprofile = get_user($uid);
}
elseif($mybb->user['uid'])

	{

	{

		$memprofile = $mybb->user;

		$memprofile = $mybb->user;

	}

	}

	else
{
$memprofile = false;

	else
{
$memprofile = false;

	}


	}


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

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

Zeile 1946Zeile 1953
	else
{
$lang->send_pm = '';

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

$website = $sendemail = $sendpm = $contact_details = '';

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

$website = $sendemail = $sendpm = $contact_details = '';

	

	

	if($memprofile['website'] && !is_member($mybb->settings['hidewebsite']) && $memperms['canchangewebsite'] == 1)
{
$memprofile['website'] = htmlspecialchars_uni($memprofile['website']);
$bgcolor = alt_trow();
eval("\$website = \"".$templates->get("member_profile_website")."\";");

	if($memprofile['website'] && !is_member($mybb->settings['hidewebsite']) && $memperms['canchangewebsite'] == 1)
{
$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))
{
$bgcolor = alt_trow();

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

Zeile 2088Zeile 2095
	if($thread_percent > 100)
{
$thread_percent = 100;

	if($thread_percent > 100)
{
$thread_percent = 100;

 
	}

$findposts = $findthreads = '';
if($mybb->usergroup['cansearch'] == 1)
{
eval("\$findposts = \"".$templates->get("member_profile_findposts")."\";");
eval("\$findthreads = \"".$templates->get("member_profile_findthreads")."\";");

	}

$awaybit = '';
if($memprofile['away'] == 1 && $mybb->settings['allowaway'] != 0)

	}

$awaybit = '';
if($memprofile['away'] == 1 && $mybb->settings['allowaway'] != 0)

	{

	{

		$lang->away_note = $lang->sprintf($lang->away_note, $memprofile['username']);
$awaydate = my_date($mybb->settings['dateformat'], $memprofile['awaydate']);
if(!empty($memprofile['awayreason']))

		$lang->away_note = $lang->sprintf($lang->away_note, $memprofile['username']);
$awaydate = my_date($mybb->settings['dateformat'], $memprofile['awaydate']);
if(!empty($memprofile['awayreason']))

Zeile 2180Zeile 2194
			if($membday[0] && $membday[1] && $membday[2])
{
$lang->membdayage = $lang->sprintf($lang->membdayage, get_age($memprofile['birthday']));

			if($membday[0] && $membday[1] && $membday[2])
{
$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 2287
	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 2378
			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 2395
			// 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 2405
	// 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 2423
		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 2432
	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 2462

$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 2473
			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 2518
					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 2539
	}

if($customfields)

	}

if($customfields)

	{

	{

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


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


Zeile 2537Zeile 2550
	$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 2561
		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 2650
		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 2665
		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 2677
		}

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 2688
		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 2707
{
// 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 2780
			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 2830
		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 3011
	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");