Zeile 14 | Zeile 14 |
---|
define("ALLOWABLE_PAGE", "register,do_register,login,do_login,logout,lostpw,do_lostpw,activate,resendactivation,do_resendactivation,resetpassword");
$nosession['avatar'] = 1;
|
define("ALLOWABLE_PAGE", "register,do_register,login,do_login,logout,lostpw,do_lostpw,activate,resendactivation,do_resendactivation,resetpassword");
$nosession['avatar'] = 1;
|
$templatelist = "member_register,error_nousername,error_nopassword,error_passwordmismatch,error_invalidemail,error_usernametaken,error_emailmismatch,error_noemail,redirect_registered,member_register_hiddencaptcha"; $templatelist .= ",redirect_loggedout,login,redirect_loggedin,error_invalidusername,error_invalidpassword,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_profile_modoptions,member_profile_signature,member_profile_groupimage,member_profile_referrals";
| $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,member_register_password,member_activate,member_resendactivation,member_lostpw"; $templatelist .= ",member_resetpassword,member_loggedin_notice,member_profile_away,member_emailuser,member_register_regimage,member_register_regimage_recaptcha,post_captcha_hidden,post_captcha,post_captcha_recaptcha"; $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_profile_modoptions,member_profile_signature,member_profile_groupimage,member_profile_referrals";
|
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 126 | Zeile 127 |
---|
"regip" => $session->ipaddress, "longregip" => my_ip2long($session->ipaddress), "coppa_user" => intval($mybb->cookies['coppauser']),
|
"regip" => $session->ipaddress, "longregip" => my_ip2long($session->ipaddress), "coppa_user" => intval($mybb->cookies['coppauser']),
|
| "regcheck1" => $mybb->input['regcheck1'], "regcheck2" => $mybb->input['regcheck2']
|
);
|
);
|
if(isset($mybb->input['regcheck1']) && isset($mybb->input['regcheck2'])) { $user['regcheck1'] = $mybb->input['regcheck1']; $user['regcheck2'] = $mybb->input['regcheck2']; }
| |
// Do we have a saved COPPA DOB? if($mybb->cookies['coppadob'])
| // Do we have a saved COPPA DOB? if($mybb->cookies['coppadob'])
|
Zeile 143 | Zeile 140 |
---|
"month" => $dob_month, "year" => $dob_year );
|
"month" => $dob_month, "year" => $dob_year );
|
}
| }
|
$user['options'] = array( "allownotices" => $mybb->input['allownotices'], "hideemail" => $mybb->input['hideemail'], "subscriptionmethod" => $mybb->input['subscriptionmethod'], "receivepms" => $mybb->input['receivepms'], "pmnotice" => $mybb->input['pmnotice'],
|
$user['options'] = array( "allownotices" => $mybb->input['allownotices'], "hideemail" => $mybb->input['hideemail'], "subscriptionmethod" => $mybb->input['subscriptionmethod'], "receivepms" => $mybb->input['receivepms'], "pmnotice" => $mybb->input['pmnotice'],
|
"emailpmnotify" => $mybb->input['emailpmnotify'],
| "pmnotify" => $mybb->input['pmnotify'],
|
"invisible" => $mybb->input['invisible'], "dstcorrection" => $mybb->input['dstcorrection'] );
| "invisible" => $mybb->input['invisible'], "dstcorrection" => $mybb->input['dstcorrection'] );
|
Zeile 204 | Zeile 201 |
---|
else if($mybb->input['subscriptionmethod'] == 2) { $instant_email_subscribe_selected = "selected=\"selected\"";
|
else if($mybb->input['subscriptionmethod'] == 2) { $instant_email_subscribe_selected = "selected=\"selected\"";
|
}
| }
|
else
|
else
|
{
| {
|
$no_subscribe_selected = "selected=\"selected\"";
|
$no_subscribe_selected = "selected=\"selected\"";
|
}
| }
|
if($mybb->input['receivepms'] == 1)
|
if($mybb->input['receivepms'] == 1)
|
{
| {
|
$receivepmscheck = "checked=\"checked\""; }
| $receivepmscheck = "checked=\"checked\""; }
|
Zeile 220 | Zeile 217 |
---|
$pmnoticecheck = " checked=\"checked\""; }
|
$pmnoticecheck = " checked=\"checked\""; }
|
if($mybb->input['emailpmnotify'] == 1) { $emailpmnotifycheck = "checked=\"checked\""; }
| if($mybb->input['pmnotify'] == 1) { $pmnotifycheck = "checked=\"checked\""; }
|
if($mybb->input['invisible'] == 1)
|
if($mybb->input['invisible'] == 1)
|
{
| {
|
$invisiblecheck = "checked=\"checked\"";
|
$invisiblecheck = "checked=\"checked\"";
|
}
| }
|
if($mybb->input['dstcorrection'] == 2) { $dst_auto_selected = "selected=\"selected\""; } else if($mybb->input['dstcorrection'] == 1)
|
if($mybb->input['dstcorrection'] == 2) { $dst_auto_selected = "selected=\"selected\""; } else if($mybb->input['dstcorrection'] == 1)
|
{
| {
|
$dst_enabled_selected = "selected=\"selected\"";
|
$dst_enabled_selected = "selected=\"selected\"";
|
}
| }
|
else
|
else
|
{
| {
|
$dst_disabled_selected = "selected=\"selected\"";
|
$dst_disabled_selected = "selected=\"selected\"";
|
}
| }
|
$regerrors = inline_error($errors); $mybb->input['action'] = "register"; $fromreg = 1;
| $regerrors = inline_error($errors); $mybb->input['action'] = "register"; $fromreg = 1;
|
Zeile 250 | Zeile 247 |
---|
else { $user_info = $userhandler->insert_user();
|
else { $user_info = $userhandler->insert_user();
|
| // Invalidate solved captcha if($mybb->settings['captchaimage']) { $captcha->invalidate_captcha(); }
|
if($mybb->settings['regtype'] != "randompass" && !$mybb->cookies['coppauser']) {
| if($mybb->settings['regtype'] != "randompass" && !$mybb->cookies['coppauser']) {
|
Zeile 385 | Zeile 388 |
---|
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");
|
| $mybb->input['bday1'] = intval($mybb->input['bday1']); $mybb->input['bday2'] = intval($mybb->input['bday2']); $mybb->input['bday3'] = intval($mybb->input['bday3']); $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]) { error($lang->error_invalid_birthday); }
|
$bdaytime = @mktime(0, 0, 0, $mybb->input['bday2'], $mybb->input['bday1'], $mybb->input['bday3']);
| $bdaytime = @mktime(0, 0, 0, $mybb->input['bday2'], $mybb->input['bday1'], $mybb->input['bday3']);
|
Zeile 439 | Zeile 451 |
---|
if(isset($mybb->input['timezoneoffset'])) { $timezoneoffset = $mybb->input['timezoneoffset'];
|
if(isset($mybb->input['timezoneoffset'])) { $timezoneoffset = $mybb->input['timezoneoffset'];
|
}
| }
|
else { $timezoneoffset = $mybb->settings['timezoneoffset'];
| else { $timezoneoffset = $mybb->settings['timezoneoffset'];
|
Zeile 518 | Zeile 530 |
---|
} // Custom profile fields baby! $altbg = "trow1";
|
} // Custom profile fields baby! $altbg = "trow1";
|
$query = $db->simple_select("profilefields", "*", "required=1", array('order_by' => 'disporder'));
| $query = $db->simple_select("profilefields", "*", "required='1' AND editable='1'", array('order_by' => 'disporder'));
|
while($profilefield = $db->fetch_array($query)) { $profilefield['type'] = htmlspecialchars_uni($profilefield['type']);
| while($profilefield = $db->fetch_array($query)) { $profilefield['type'] = htmlspecialchars_uni($profilefield['type']);
|
Zeile 572 | Zeile 584 |
---|
$profilefield['length'] = 3; } $code = "<select name=\"profile_fields[$field][]\" id=\"{$field}\" size=\"{$profilefield['length']}\" multiple=\"multiple\">$select</select>";
|
$profilefield['length'] = 3; } $code = "<select name=\"profile_fields[$field][]\" id=\"{$field}\" size=\"{$profilefield['length']}\" multiple=\"multiple\">$select</select>";
|
} }
| } }
|
elseif($type == "select") { $expoptions = explode("\n", $options); if(is_array($expoptions)) { foreach($expoptions as $key => $val)
|
elseif($type == "select") { $expoptions = explode("\n", $options); if(is_array($expoptions)) { foreach($expoptions as $key => $val)
|
{
| {
|
$val = trim($val); $val = str_replace("\n", "\\n", $val); $sel = "";
| $val = trim($val); $val = str_replace("\n", "\\n", $val); $sel = "";
|
Zeile 598 | Zeile 610 |
---|
} } elseif($type == "radio")
|
} } elseif($type == "radio")
|
{ $expoptions = explode("\n", $options);
| { $expoptions = explode("\n", $options);
|
if(is_array($expoptions)) { foreach($expoptions as $key => $val)
|
if(is_array($expoptions)) { foreach($expoptions as $key => $val)
|
{
| {
|
$checked = ""; if($val == $userfield) {
| $checked = ""; if($val == $userfield) {
|
Zeile 618 | Zeile 630 |
---|
if($errors) { $useropts = $userfield;
|
if($errors) { $useropts = $userfield;
|
}
| }
|
else { $useropts = explode("\n", $userfield);
| else { $useropts = explode("\n", $userfield);
|
Zeile 628 | Zeile 640 |
---|
foreach($useropts as $key => $val) { $seloptions[$val] = $val;
|
foreach($useropts as $key => $val) { $seloptions[$val] = $val;
|
}
| }
|
} $expoptions = explode("\n", $options); if(is_array($expoptions))
| } $expoptions = explode("\n", $options); if(is_array($expoptions))
|
Zeile 693 | Zeile 705 |
---|
$emailnotifycheck = ''; $receivepmscheck = "checked=\"checked\""; $pmnoticecheck = " checked=\"checked\"";
|
$emailnotifycheck = ''; $receivepmscheck = "checked=\"checked\""; $pmnoticecheck = " checked=\"checked\"";
|
$emailpmnotifycheck = '';
| $pmnotifycheck = '';
|
$invisiblecheck = ''; if($mybb->settings['dstcorrection'] == 1) {
| $invisiblecheck = ''; if($mybb->settings['dstcorrection'] == 1) {
|
Zeile 716 | Zeile 728 |
---|
// JS validator extra for our default CAPTCHA $validator_extra .= "\tregValidator.register('imagestring', 'ajax', { url: 'xmlhttp.php?action=validate_captcha', extra_body: 'imagehash', loading_message: '{$lang->js_validator_captcha_valid}', failure_message: '{$lang->js_validator_no_image_text}'} );\n"; }
|
// JS validator extra for our default CAPTCHA $validator_extra .= "\tregValidator.register('imagestring', 'ajax', { url: 'xmlhttp.php?action=validate_captcha', extra_body: 'imagehash', loading_message: '{$lang->js_validator_captcha_valid}', failure_message: '{$lang->js_validator_no_image_text}'} );\n"; }
|
}
| }
|
} // Hidden CAPTCHA for Spambots if($mybb->settings['hiddencaptchaimage'])
| } // Hidden CAPTCHA for Spambots if($mybb->settings['hiddencaptchaimage'])
|
Zeile 754 | Zeile 766 |
---|
foreach($languages as $lname => $language) { $language = htmlspecialchars_uni($language);
|
foreach($languages as $lname => $language) { $language = htmlspecialchars_uni($language);
|
if($user['language'] == $lname)
| if(isset($user['language']) && $user['language'] == $lname)
|
{ $langoptions .= "<option value=\"$lname\" selected=\"selected\">$language</option>\n"; }
| { $langoptions .= "<option value=\"$lname\" selected=\"selected\">$language</option>\n"; }
|
Zeile 833 | Zeile 845 |
---|
} $db->delete_query("awaitingactivation", "uid='".$user['uid']."' AND (type='r' OR type='e')"); if($user['usergroup'] == 5 && $activation['type'] != "e")
|
} $db->delete_query("awaitingactivation", "uid='".$user['uid']."' AND (type='r' OR type='e')"); if($user['usergroup'] == 5 && $activation['type'] != "e")
|
{
| {
|
$db->update_query("users", array("usergroup" => 2), "uid='".$user['uid']."'"); } if($activation['type'] == "e")
|
$db->update_query("users", array("usergroup" => 2), "uid='".$user['uid']."'"); } if($activation['type'] == "e")
|
{
| {
|
$newemail = array( "email" => $db->escape_string($activation['misc']), );
| $newemail = array( "email" => $db->escape_string($activation['misc']), );
|
Zeile 845 | Zeile 857 |
---|
$plugins->run_hooks("member_activate_emailupdated");
redirect("usercp.php", $lang->redirect_emailupdated);
|
$plugins->run_hooks("member_activate_emailupdated");
redirect("usercp.php", $lang->redirect_emailupdated);
|
}
| }
|
else { $plugins->run_hooks("member_activate_accountactivated");
redirect("index.php", $lang->redirect_accountactivated); }
|
else { $plugins->run_hooks("member_activate_accountactivated");
redirect("index.php", $lang->redirect_accountactivated); }
|
}
| }
|
else { $plugins->run_hooks("member_activate_form");
|
else { $plugins->run_hooks("member_activate_form");
|
|
|
eval("\$activate = \"".$templates->get("member_activate")."\";"); output_page($activate); } }
if($mybb->input['action'] == "resendactivation")
|
eval("\$activate = \"".$templates->get("member_activate")."\";"); output_page($activate); } }
if($mybb->input['action'] == "resendactivation")
|
{
| {
|
$plugins->run_hooks("member_resendactivation");
if($mybb->settings['regtype'] == "admin")
| $plugins->run_hooks("member_resendactivation");
if($mybb->settings['regtype'] == "admin")
|
Zeile 1066 | Zeile 1078 |
---|
$username = $user['username'];
// Generate a new password, then update it
|
$username = $user['username'];
// Generate a new password, then update it
|
$password_length = intval($mybb->settings['minpasswordlength']);
| $password_length = intval($mybb->settings['minpasswordlength']);
|
if($password_length < 8)
|
if($password_length < 8)
|
{
| {
|
$password_length = 8; }
|
$password_length = 8; }
|
|
|
$password = random_str($password_length); $logindetails = update_password($user['uid'], md5($password), $user['salt']);
|
$password = random_str($password_length); $logindetails = update_password($user['uid'], md5($password), $user['salt']);
|
|
|
$email = $user['email'];
$plugins->run_hooks("member_resetpassword_process");
| $email = $user['email'];
$plugins->run_hooks("member_resetpassword_process");
|
Zeile 1091 | Zeile 1103 |
---|
else { $plugins->run_hooks("member_resetpassword_form");
|
else { $plugins->run_hooks("member_resetpassword_form");
|
switch($mybb->settings['username_method']) { case 0: $lang_username = $lang->username; break;
| switch($mybb->settings['username_method']) { case 0: $lang_username = $lang->username; break;
|
case 1: $lang_username = $lang->username1; break;
| case 1: $lang_username = $lang->username1; break;
|
Zeile 1112 | Zeile 1124 |
---|
output_page($activate); } }
|
output_page($activate); } }
|
$do_captcha = $correct = false; $inline_errors = "";
| $correct = false; $inline_errors = '';
|
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");
|
|
|
// 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 $logins = login_attempt_check(); $login_text = '';
|
// 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 $logins = login_attempt_check(); $login_text = '';
|
|
|
// Did we come from the quick login form if($mybb->input['quick_login'] == "1" && $mybb->input['quick_password'] && $mybb->input['quick_username']) {
| // Did we come from the quick login form if($mybb->input['quick_login'] == "1" && $mybb->input['quick_password'] && $mybb->input['quick_username']) {
|
Zeile 1156 | Zeile 1168 |
---|
$loginattempts = $db->fetch_field($query, "loginattempts");
$errors = array();
|
$loginattempts = $db->fetch_field($query, "loginattempts");
$errors = array();
|
| $login_captcha = false;
|
if($mybb->settings['failedcaptchalogincount'] > 0 && ($loginattempts > $mybb->settings['failedcaptchalogincount'] || intval($mybb->cookies['loginattempts']) > $mybb->settings['failedcaptchalogincount'])) { // Show captcha image if enabled
| if($mybb->settings['failedcaptchalogincount'] > 0 && ($loginattempts > $mybb->settings['failedcaptchalogincount'] || intval($mybb->cookies['loginattempts']) > $mybb->settings['failedcaptchalogincount'])) { // Show captcha image if enabled
|
Zeile 1171 | Zeile 1185 |
---|
{ $correct = true; $do_captcha = true;
|
{ $correct = true; $do_captcha = true;
|
|
|
// CAPTCHA validation failed foreach($login_captcha->get_errors() as $error) {
| // CAPTCHA validation failed foreach($login_captcha->get_errors() as $error) {
|
Zeile 1212 | Zeile 1226 |
---|
default: $errors[] = $lang->error_invalidpworusername.$login_text; break;
|
default: $errors[] = $lang->error_invalidpworusername.$login_text; break;
|
} } else
| } } else
|
{ $correct = true;
|
{ $correct = true;
|
} }
| } }
|
if(!empty($errors)) { $mybb->input['action'] = "login";
| if(!empty($errors)) { $mybb->input['action'] = "login";
|
Zeile 1233 | Zeile 1247 |
---|
{ error($lang->error_awaitingcoppa); }
|
{ error($lang->error_awaitingcoppa); }
|
| // Invalidate captcha if($login_captcha !== false) { $login_captcha->invalidate_captcha(); }
|
my_setcookie('loginattempts', 1); $db->delete_query("sessions", "ip='".$db->escape_string($session->ipaddress)."' AND sid != '".$session->sid."'"); $newsession = array(
| my_setcookie('loginattempts', 1); $db->delete_query("sessions", "ip='".$db->escape_string($session->ipaddress)."' AND sid != '".$session->sid."'"); $newsession = array(
|
Zeile 1253 | Zeile 1273 |
---|
} my_setcookie("mybbuser", $user['uid']."_".$user['loginkey'], $remember, true); my_setcookie("sid", $session->sid, -1, true);
|
} my_setcookie("mybbuser", $user['uid']."_".$user['loginkey'], $remember, true); my_setcookie("sid", $session->sid, -1, true);
|
|
|
$plugins->run_hooks("member_do_login_end");
|
$plugins->run_hooks("member_do_login_end");
|
|
|
if($mybb->input['url'] != "" && my_strpos(basename($mybb->input['url']), 'member.php') === false)
|
if($mybb->input['url'] != "" && my_strpos(basename($mybb->input['url']), 'member.php') === 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) { $mybb->input['url'] = str_replace('&processed=1', '', $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) { $mybb->input['url'] = str_replace('&processed=1', '', $mybb->input['url']); }
|
|
|
$mybb->input['url'] = str_replace('&', '&', $mybb->input['url']); // Redirect to the URL if it is not member.php redirect(htmlentities($mybb->input['url']), $lang->redirect_loggedin);
|
$mybb->input['url'] = str_replace('&', '&', $mybb->input['url']); // Redirect to the URL if it is not member.php redirect(htmlentities($mybb->input['url']), $lang->redirect_loggedin);
|
}
| }
|
else { redirect("index.php", $lang->redirect_loggedin); }
|
else { redirect("index.php", $lang->redirect_loggedin); }
|
}
| }
|
else { $mybb->input['action'] = "login"; $mybb->input['request_method'] = "get"; }
|
else { $mybb->input['action'] = "login"; $mybb->input['request_method'] = "get"; }
|
|
|
$plugins->run_hooks("member_do_login_end"); }
if($mybb->input['action'] == "login") { $plugins->run_hooks("member_login");
|
$plugins->run_hooks("member_do_login_end"); }
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 1298 | Zeile 1318 |
---|
login_attempt_check();
// Redirect to the page where the user came from, but not if that was the login page.
|
login_attempt_check();
// Redirect to the page where the user came from, but not if that was the login page.
|
| $redirect_url = '';
|
if($_SERVER['HTTP_REFERER'] && strpos($_SERVER['HTTP_REFERER'], "action=login") === false) { $redirect_url = htmlentities($_SERVER['HTTP_REFERER']);
|
if($_SERVER['HTTP_REFERER'] && strpos($_SERVER['HTTP_REFERER'], "action=login") === false) { $redirect_url = htmlentities($_SERVER['HTTP_REFERER']);
|
} else { $redirect_url = '';
| |
}
|
}
|
$captcha = ""; // Show captcha image for guests if enabled if($mybb->settings['captchaimage']) { require_once MYBB_ROOT.'inc/class_captcha.php';
| $captcha = ''; // Show captcha image for guests if enabled and only if we have to do if($mybb->settings['captchaimage'] && isset($do_captcha)) { $correct = false; require_once MYBB_ROOT.'inc/class_captcha.php'; $login_captcha = new captcha(false, "post_captcha");
if($do_captcha == false && $login_captcha->type == 1) { if($login_captcha->validate_captcha() == true) { $correct = true; $captcha = $login_captcha->build_hidden_captcha(); } }
if(!$correct) { if($login_captcha->type == 1) { $login_captcha->build_captcha(); } elseif($login_captcha->type == 2) { $login_captcha->build_recaptcha(); }
|
|
|
if($do_captcha == true)
| if($login_captcha->html) { $captcha = $login_captcha->html; } } elseif($correct && $login_captcha->type == 2)
|
{
|
{
|
$login_captcha = new captcha(true, "post_captcha");
| $login_captcha->build_recaptcha();
|
if($login_captcha->html) { $captcha = $login_captcha->html; }
|
if($login_captcha->html) { $captcha = $login_captcha->html; }
|
} else { $login_captcha = new captcha; $captcha = $login_captcha->build_hidden_captcha();
| |
} }
|
} }
|
$username = ''; $password = '';
| $username = ""; $password = "";
|
if($mybb->input['username'] && $mybb->request_method == "post")
|
if($mybb->input['username'] && $mybb->request_method == "post")
|
{ $username = htmlspecialchars_uni($mybb->input['username']); } if($mybb->input['password'] && $mybb->request_method == "post") {
| { $username = htmlspecialchars_uni($mybb->input['username']); } if($mybb->input['password'] && $mybb->request_method == "post") {
|
$password = htmlspecialchars_uni($mybb->input['password']); }
| $password = htmlspecialchars_uni($mybb->input['password']); }
|
Zeile 1348 | Zeile 1387 |
---|
break; case 2: $lang->username = $lang->username2;
|
break; case 2: $lang->username = $lang->username2;
|
break;
| break;
|
default: break; }
| default: break; }
|
Zeile 1363 | Zeile 1402 |
---|
if(!$mybb->user['uid']) { redirect("index.php", $lang->redirect_alreadyloggedout);
|
if(!$mybb->user['uid']) { redirect("index.php", $lang->redirect_alreadyloggedout);
|
}
| }
|
// Check session ID if we have one if($mybb->input['sid'] && $mybb->input['sid'] != $session->sid)
|
// Check session ID if we have one if($mybb->input['sid'] && $mybb->input['sid'] != $session->sid)
|
{ error($lang->error_notloggedout); }
| { error($lang->error_notloggedout); }
|
// Otherwise, check logoutkey else if(!$mybb->input['sid'] && $mybb->input['logoutkey'] != $mybb->user['logoutkey']) {
| // Otherwise, check logoutkey else if(!$mybb->input['sid'] && $mybb->input['logoutkey'] != $mybb->user['logoutkey']) {
|
Zeile 1381 | Zeile 1420 |
---|
if($mybb->user['uid']) { $time = TIME_NOW;
|
if($mybb->user['uid']) { $time = TIME_NOW;
|
$lastvisit = array( "lastactive" => $time-900, "lastvisit" => $time, ); $db->update_query("users", $lastvisit, "uid='".$mybb->user['uid']."'");
| // Run this after the shutdown query from session system $db->shutdown_query("UPDATE ".TABLE_PREFIX."users SET lastvisit='{$time}', lastactive='{$time}' WHERE uid='{$mybb->user['uid']}'");
|
$db->delete_query("sessions", "sid='".$session->sid."'"); } $plugins->run_hooks("member_logout_end");
| $db->delete_query("sessions", "sid='".$session->sid."'"); } $plugins->run_hooks("member_logout_end");
|
Zeile 1477 | Zeile 1513 |
---|
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']);
|
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
| } else
|
{ $lang->send_pm = ''; }
| { $lang->send_pm = ''; }
|
Zeile 1527 | Zeile 1563 |
---|
$bgcolors[$cat] = alt_trow(); }
|
$bgcolors[$cat] = alt_trow(); }
|
| $website = '';
|
if($memprofile['website']) { $memprofile['website'] = htmlspecialchars_uni($memprofile['website']); $website = "<a href=\"{$memprofile['website']}\" target=\"_blank\">{$memprofile['website']}</a>";
|
if($memprofile['website']) { $memprofile['website'] = htmlspecialchars_uni($memprofile['website']); $website = "<a href=\"{$memprofile['website']}\" target=\"_blank\">{$memprofile['website']}</a>";
|
} else { $website = '';
| |
}
|
}
|
| $signature = '';
|
if($memprofile['signature'] && ($memprofile['suspendsignature'] == 0 || $memprofile['suspendsigtime'] < TIME_NOW)) { $sig_parser = array(
| if($memprofile['signature'] && ($memprofile['suspendsignature'] == 0 || $memprofile['suspendsigtime'] < TIME_NOW)) { $sig_parser = array(
|
Zeile 1547 | Zeile 1581 |
---|
"me_username" => $memprofile['username'], "filter_badwords" => 1 );
|
"me_username" => $memprofile['username'], "filter_badwords" => 1 );
|
| if($memperms['signofollow']) { $sig_parser['nofollow_on'] = 1; }
|
$memprofile['signature'] = $parser->parse_message($memprofile['signature'], $sig_parser); eval("\$signature = \"".$templates->get("member_profile_signature")."\";");
|
$memprofile['signature'] = $parser->parse_message($memprofile['signature'], $sig_parser); eval("\$signature = \"".$templates->get("member_profile_signature")."\";");
|
}
| }
|
$daysreg = (TIME_NOW - $memprofile['regdate']) / (24*3600);
if($daysreg < 1)
|
$daysreg = (TIME_NOW - $memprofile['regdate']) / (24*3600);
if($daysreg < 1)
|
{
| {
|
$daysreg = 1; }
$ppd = $memprofile['postnum'] / $daysreg; $ppd = round($ppd, 2); if($ppd > $memprofile['postnum'])
|
$daysreg = 1; }
$ppd = $memprofile['postnum'] / $daysreg; $ppd = round($ppd, 2); if($ppd > $memprofile['postnum'])
|
{
| {
|
$ppd = $memprofile['postnum']; } $stats = $cache->read("stats");
| $ppd = $memprofile['postnum']; } $stats = $cache->read("stats");
|
Zeile 1575 | Zeile 1614 |
---|
{ $percent = $memprofile['postnum']*100/$numposts; $percent = round($percent, 2);
|
{ $percent = $memprofile['postnum']*100/$numposts; $percent = round($percent, 2);
|
}
| }
|
if($percent > 100) { $percent = 100;
|
if($percent > 100) { $percent = 100;
|
}
| }
|
if(!empty($memprofile['icq'])) { $memprofile['icq'] = intval($memprofile['icq']); } else
|
if(!empty($memprofile['icq'])) { $memprofile['icq'] = intval($memprofile['icq']); } else
|
{
| {
|
$memprofile['icq'] = ''; }
|
$memprofile['icq'] = ''; }
|
| $awaybit = '';
|
if($memprofile['away'] == 1 && $mybb->settings['allowaway'] != 0) { $lang->away_note = $lang->sprintf($lang->away_note, $memprofile['username']);
| if($memprofile['away'] == 1 && $mybb->settings['allowaway'] != 0) { $lang->away_note = $lang->sprintf($lang->away_note, $memprofile['username']);
|
Zeile 1605 | Zeile 1645 |
---|
$awayreason = $lang->away_no_reason; } if($memprofile['returndate'] == '')
|
$awayreason = $lang->away_no_reason; } if($memprofile['returndate'] == '')
|
{
| {
|
$returndate = "$lang->unknown"; } else { $returnhome = explode("-", $memprofile['returndate']);
|
$returndate = "$lang->unknown"; } else { $returnhome = explode("-", $memprofile['returndate']);
|
|
|
// PHP native date functions use integers so timestamps for years after 2038 will not work // Thus we use adodb_mktime if($returnhome[2] >= 2038)
|
// PHP native date functions use integers so timestamps for years after 2038 will not work // Thus we use adodb_mktime if($returnhome[2] >= 2038)
|
{
| {
|
require_once MYBB_ROOT."inc/functions_time.php"; $returnmkdate = adodb_mktime(0, 0, 0, $returnhome[1], $returnhome[0], $returnhome[2]); $returndate = my_date($mybb->settings['dateformat'], $returnmkdate, "", 1, true); } else
|
require_once MYBB_ROOT."inc/functions_time.php"; $returnmkdate = adodb_mktime(0, 0, 0, $returnhome[1], $returnhome[0], $returnhome[2]); $returndate = my_date($mybb->settings['dateformat'], $returnmkdate, "", 1, true); } else
|
{
| {
|
$returnmkdate = mktime(0, 0, 0, $returnhome[1], $returnhome[0], $returnhome[2]); $returndate = my_date($mybb->settings['dateformat'], $returnmkdate); }
| $returnmkdate = mktime(0, 0, 0, $returnhome[1], $returnhome[0], $returnhome[2]); $returndate = my_date($mybb->settings['dateformat'], $returnmkdate); }
|
Zeile 1629 | Zeile 1669 |
---|
// If our away time has expired already, we should be back, right? if($returnmkdate < TIME_NOW) {
|
// If our away time has expired already, we should be back, right? if($returnmkdate < TIME_NOW) {
|
$db->update_query('users', array('away' => '0', 'awaydate' => '', 'returndate' => '', 'awayreason' => ''), 'uid=\''.intval($memprofile['uid']).'\'');
| $db->update_query('users', array('away' => '0', 'awaydate' => '0', 'returndate' => '', 'awayreason' => ''), 'uid=\''.intval($memprofile['uid']).'\'');
|
// Update our status to "not away" $memprofile['away'] = 0;
|
// Update our status to "not away" $memprofile['away'] = 0;
|
} }
| } }
|
// 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) {
|
Zeile 1693 | Zeile 1733 |
---|
$membdayage = $lang->membdayage; } elseif($membday[2])
|
$membdayage = $lang->membdayage; } elseif($membday[2])
|
{
| {
|
$membday = mktime(0, 0, 0, 1, 1, $membday[2]); $membday = date("Y", $membday); $membdayage = '';
| $membday = mktime(0, 0, 0, 1, 1, $membday[2]); $membday = date("Y", $membday); $membdayage = '';
|
Zeile 1741 | Zeile 1781 |
---|
// Get the user title for this user unset($usertitle); unset($stars);
|
// Get the user title for this user unset($usertitle); unset($stars);
|
| $starimage = '';
|
if(trim($memprofile['usertitle']) != '') { // User has custom user title
| if(trim($memprofile['usertitle']) != '') { // User has custom user title
|
Zeile 1780 | Zeile 1821 |
---|
elseif(!$stars) { if(!is_array($usertitles))
|
elseif(!$stars) { if(!is_array($usertitles))
|
{
| {
|
$usertitles = $cache->read('usertitles'); }
| $usertitles = $cache->read('usertitles'); }
|
Zeile 1799 | Zeile 1840 |
---|
} }
|
} }
|
| $groupimage = '';
|
if(!empty($displaygroup['image'])) { if(!empty($mybb->user['language'])) { $language = $mybb->user['language'];
|
if(!empty($displaygroup['image'])) { if(!empty($mybb->user['language'])) { $language = $mybb->user['language'];
|
}
| }
|
else { $language = $mybb->settings['bblanguage'];
|
else { $language = $mybb->settings['bblanguage'];
|
}
| }
|
$displaygroup['image'] = str_replace("{lang}", $language, $displaygroup['image']); $displaygroup['image'] = str_replace("{theme}", $theme['imgdir'], $displaygroup['image']); eval("\$groupimage = \"".$templates->get("member_profile_groupimage")."\";"); }
|
$displaygroup['image'] = str_replace("{lang}", $language, $displaygroup['image']); $displaygroup['image'] = str_replace("{theme}", $theme['imgdir'], $displaygroup['image']); eval("\$groupimage = \"".$templates->get("member_profile_groupimage")."\";"); }
|
if(!$starimage)
| if(empty($starimage))
|
{ $starimage = $displaygroup['starimage']; }
|
{ $starimage = $displaygroup['starimage']; }
|
if($starimage)
| if(!empty($starimage))
|
{ // Only display stars if we have an image to use... $starimage = str_replace("{theme}", $theme['imgdir'], $starimage);
| { // Only display stars if we have an image to use... $starimage = str_replace("{theme}", $theme['imgdir'], $starimage);
|
Zeile 1867 | Zeile 1909 |
---|
}
// Fetch the reputation for this user
|
}
// Fetch the reputation for this user
|
if($memperms['usereputationsystem'] == 1 && $displaygroup['usereputationsystem'] == 1 && $mybb->settings['enablereputation'] == 1 && ($mybb->settings['posrep'] || $mybb->settings['neurep'] || $mybb->settings['negrep'])) {
| if($memperms['usereputationsystem'] == 1 && $displaygroup['usereputationsystem'] == 1 && $mybb->settings['enablereputation'] == 1) {
|
$bg_color = alt_trow(); $reputation = get_reputation($memprofile['reputation']);
// If this user has permission to give reputations show the vote link
|
$bg_color = alt_trow(); $reputation = get_reputation($memprofile['reputation']);
// If this user has permission to give reputations show the vote link
|
if($mybb->usergroup['cangivereputations'] == 1 && $memprofile['uid'] != $mybb->user['uid'])
| $vote_link = ''; if($mybb->usergroup['cangivereputations'] == 1 && $memprofile['uid'] != $mybb->user['uid'] && ($mybb->settings['posrep'] || $mybb->settings['neurep'] || $mybb->settings['negrep']))
|
{ $vote_link = "[<a href=\"javascript:MyBB.reputation({$memprofile['uid']});\">{$lang->reputation_vote}</a>]"; }
| { $vote_link = "[<a href=\"javascript:MyBB.reputation({$memprofile['uid']});\">{$lang->reputation_vote}</a>]"; }
|
Zeile 1897 | Zeile 1940 |
---|
} else {
|
} else {
|
$warning_link = "usercp.php";
| $warn_user = ''; $warning_link = 'usercp.php';
|
} eval("\$warning_level = \"".$templates->get("member_profile_warninglevel")."\";"); }
| } eval("\$warning_level = \"".$templates->get("member_profile_warninglevel")."\";"); }
|
Zeile 1922 | Zeile 1966 |
---|
$thing = explode("\n", $customfield['type'], "2"); $type = trim($thing[0]);
|
$thing = explode("\n", $customfield['type'], "2"); $type = trim($thing[0]);
|
| $customfieldval = '';
|
$field = "fid{$customfield['fid']}";
|
$field = "fid{$customfield['fid']}";
|
$useropts = explode("\n", $userfields[$field]); $customfieldval = $comma = ''; if(is_array($useropts) && ($type == "multiselect" || $type == "checkbox"))
| if(isset($userfields[$field]))
|
{
|
{
|
foreach($useropts as $val)
| $useropts = explode("\n", $userfields[$field]); $customfieldval = $comma = ''; if(is_array($useropts) && ($type == "multiselect" || $type == "checkbox"))
|
{
|
{
|
if($val != '')
| foreach($useropts as $val)
|
{
|
{
|
$customfieldval .= "<li style=\"margin-left: 0;\">{$val}</li>";
| if($val != '') { $customfieldval .= "<li style=\"margin-left: 0;\">{$val}</li>"; } } if($customfieldval != '') { $customfieldval = "<ul style=\"margin: 0; padding-left: 15px;\">{$customfieldval}</ul>";
|
}
|
}
|
} if($customfieldval != '') { $customfieldval = "<ul style=\"margin: 0; padding-left: 15px;\">{$customfieldval}</ul>"; } } else { $userfields[$field] = $parser->parse_badwords($userfields[$field]);
if($customfield['type'] == "textarea") { $customfieldval = nl2br(htmlspecialchars_uni($userfields[$field]));
| |
} else {
|
} else {
|
$customfieldval = htmlspecialchars_uni($userfields[$field]);
| $userfields[$field] = $parser->parse_badwords($userfields[$field]); if($customfield['type'] == "textarea") { $customfieldval = nl2br(htmlspecialchars_uni($userfields[$field])); } else { $customfieldval = htmlspecialchars_uni($userfields[$field]); }
|
} }
| } }
|
Zeile 1958 | Zeile 2007 |
---|
$bgcolor = alt_trow(); } if($customfields)
|
$bgcolor = alt_trow(); } if($customfields)
|
{
| {
|
eval("\$profilefields = \"".$templates->get("member_profile_customfields")."\";"); } $memprofile['postnum'] = my_number_format($memprofile['postnum']); $lang->ppd_percent_total = $lang->sprintf($lang->ppd_percent_total, my_number_format($ppd), $percent); $formattedname = format_name($memprofile['username'], $memprofile['usergroup'], $memprofile['displaygroup']); if($memprofile['timeonline'] > 0)
|
eval("\$profilefields = \"".$templates->get("member_profile_customfields")."\";"); } $memprofile['postnum'] = my_number_format($memprofile['postnum']); $lang->ppd_percent_total = $lang->sprintf($lang->ppd_percent_total, my_number_format($ppd), $percent); $formattedname = format_name($memprofile['username'], $memprofile['usergroup'], $memprofile['displaygroup']); if($memprofile['timeonline'] > 0)
|
{
| {
|
$timeonline = nice_time($memprofile['timeonline']);
|
$timeonline = nice_time($memprofile['timeonline']);
|
} else
| } else
|
{ $timeonline = $lang->none_registered;
|
{ $timeonline = $lang->none_registered;
|
}
| }
$adminoptions = '';
|
if($mybb->usergroup['cancp'] == 1 && $mybb->config['hide_admin_links'] != 1)
|
if($mybb->usergroup['cancp'] == 1 && $mybb->config['hide_admin_links'] != 1)
|
{
| {
|
eval("\$adminoptions = \"".$templates->get("member_profile_adminoptions")."\";"); }
|
eval("\$adminoptions = \"".$templates->get("member_profile_adminoptions")."\";"); }
|
else { $adminoptions = ''; }
| $modoptions = '';
|
if($mybb->usergroup['canmodcp'] == 1) { $memprofile['usernotes'] = nl2br(htmlspecialchars_uni($memprofile['usernotes']));
| if($mybb->usergroup['canmodcp'] == 1) { $memprofile['usernotes'] = nl2br(htmlspecialchars_uni($memprofile['usernotes']));
|
Zeile 2000 | Zeile 2047 |
---|
eval("\$modoptions = \"".$templates->get("member_profile_modoptions")."\";"); }
|
eval("\$modoptions = \"".$templates->get("member_profile_modoptions")."\";"); }
|
else { $modoptions = ''; }
|
|
$buddy_options = '';
|
$buddy_options = '';
|
| |
if($mybb->user['uid'] != $memprofile['uid'] && $mybb->user['uid'] != 0) { $buddy_list = explode(',', $mybb->user['buddylist']); if(in_array($mybb->input['uid'], $buddy_list))
|
if($mybb->user['uid'] != $memprofile['uid'] && $mybb->user['uid'] != 0) { $buddy_list = explode(',', $mybb->user['buddylist']); if(in_array($mybb->input['uid'], $buddy_list))
|
{
| {
|
$buddy_options = "<br /><a href=\"./usercp.php?action=do_editlists&delete={$mybb->input['uid']}&my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/remove_buddy.gif\" alt=\"{$lang->remove_from_buddy_list}\" /> {$lang->remove_from_buddy_list}</a>"; }
|
$buddy_options = "<br /><a href=\"./usercp.php?action=do_editlists&delete={$mybb->input['uid']}&my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/remove_buddy.gif\" alt=\"{$lang->remove_from_buddy_list}\" /> {$lang->remove_from_buddy_list}</a>"; }
|
else { $buddy_options = "<br /><a href=\"./usercp.php?action=do_editlists&add_username=".urlencode($memprofile['username'])."&my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/add_buddy.gif\" alt=\"{$lang->add_to_buddy_list}\" /> {$lang->add_to_buddy_list}</a>"; }
| else { $buddy_options = "<br /><a href=\"./usercp.php?action=do_editlists&add_username=".urlencode($memprofile['username'])."&my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/add_buddy.gif\" alt=\"{$lang->add_to_buddy_list}\" /> {$lang->add_to_buddy_list}</a>"; }
|
$ignore_list = explode(',', $mybb->user['ignorelist']); if(in_array($mybb->input['uid'], $ignore_list))
|
$ignore_list = explode(',', $mybb->user['ignorelist']); if(in_array($mybb->input['uid'], $ignore_list))
|
{
| {
|
$buddy_options .= "<br /><a href=\"./usercp.php?action=do_editlists&manage=ignored&delete={$mybb->input['uid']}&my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/remove_ignore.gif\" alt=\"{$lang->remove_from_ignore_list}\" /> {$lang->remove_from_ignore_list}</a>"; } else
| $buddy_options .= "<br /><a href=\"./usercp.php?action=do_editlists&manage=ignored&delete={$mybb->input['uid']}&my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/remove_ignore.gif\" alt=\"{$lang->remove_from_ignore_list}\" /> {$lang->remove_from_ignore_list}</a>"; } else
|
Zeile 2031 | Zeile 2073 |
---|
}
$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); }
|