Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: member.php 5126 2010-07-27 07:48:04Z RyanGordon $
| * $Id: member.php 5616 2011-09-20 13:24:59Z Tomm $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
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";
| $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"; require_once "./global.php";
| $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"; require_once "./global.php";
|
Zeile 80 | Zeile 80 |
---|
if($mybb->input['action'] == "do_register" && $mybb->request_method == "post") { $plugins->run_hooks("member_do_register_start");
|
if($mybb->input['action'] == "do_register" && $mybb->request_method == "post") { $plugins->run_hooks("member_do_register_start");
|
| // If we have hidden CATPCHA enabled and it's filled, deny registration if($mybb->settings['hiddencaptchaimage']) { $string = $mybb->settings['hiddencaptchaimagefield'];
if($mybb->input[$string] != '') { error($lang->error_spam_deny); } }
|
if($mybb->settings['regtype'] == "randompass") {
| if($mybb->settings['regtype'] == "randompass") {
|
Zeile 132 | Zeile 143 |
---|
"month" => $dob_month, "year" => $dob_year );
|
"month" => $dob_month, "year" => $dob_year );
|
}
| }
|
$user['options'] = array( "allownotices" => $mybb->input['allownotices'],
| $user['options'] = array( "allownotices" => $mybb->input['allownotices'],
|
Zeile 152 | Zeile 163 |
---|
if(!$userhandler->validate_user()) { $errors = $userhandler->get_friendly_errors();
|
if(!$userhandler->validate_user()) { $errors = $userhandler->get_friendly_errors();
|
}
if($mybb->settings['captchaimage'] == 1 && function_exists("imagecreatefrompng"))
| }
if($mybb->settings['captchaimage'])
|
{
|
{
|
$imagehash = $db->escape_string($mybb->input['imagehash']); $imagestring = $db->escape_string(my_strtolower($mybb->input['imagestring'])); $query = $db->simple_select("captcha", "*", "imagehash='$imagehash' AND LOWER(imagestring)='$imagestring'"); $imgcheck = $db->fetch_array($query); if(!$imgcheck['dateline'])
| require_once MYBB_ROOT.'inc/class_captcha.php'; $captcha = new captcha;
if($captcha->validate_captcha() == false)
|
{
|
{
|
$errors[] = $lang->error_regimageinvalid;
| // CAPTCHA validation failed foreach($captcha->get_errors() as $error) { $errors[] = $error; }
|
}
|
}
|
$db->delete_query("captcha", "imagehash='$imagehash'");
| |
}
|
}
|
|
|
if(is_array($errors)) { $username = htmlspecialchars_uni($mybb->input['username']);
| if(is_array($errors)) { $username = htmlspecialchars_uni($mybb->input['username']);
|
Zeile 175 | Zeile 188 |
---|
$referrername = htmlspecialchars_uni($mybb->input['referrername']);
if($mybb->input['allownotices'] == 1)
|
$referrername = htmlspecialchars_uni($mybb->input['referrername']);
if($mybb->input['allownotices'] == 1)
|
{
| {
|
$allownoticescheck = "checked=\"checked\"";
|
$allownoticescheck = "checked=\"checked\"";
|
}
| }
|
if($mybb->input['hideemail'] == 1) { $hideemailcheck = "checked=\"checked\"";
| if($mybb->input['hideemail'] == 1) { $hideemailcheck = "checked=\"checked\"";
|
Zeile 187 | Zeile 200 |
---|
if($mybb->input['subscriptionmethod'] == 1) { $no_email_subscribe_selected = "selected=\"selected\"";
|
if($mybb->input['subscriptionmethod'] == 1) { $no_email_subscribe_selected = "selected=\"selected\"";
|
}
| }
|
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) { $receivepmscheck = "checked=\"checked\"";
| if($mybb->input['receivepms'] == 1) { $receivepmscheck = "checked=\"checked\"";
|
Zeile 205 | Zeile 218 |
---|
if($mybb->input['pmnotice'] == 1) { $pmnoticecheck = " checked=\"checked\"";
|
if($mybb->input['pmnotice'] == 1) { $pmnoticecheck = " checked=\"checked\"";
|
}
| }
|
if($mybb->input['emailpmnotify'] == 1) {
| if($mybb->input['emailpmnotify'] == 1) {
|
Zeile 218 | Zeile 231 |
---|
}
if($mybb->input['dstcorrection'] == 2)
|
}
if($mybb->input['dstcorrection'] == 2)
|
{
| {
|
$dst_auto_selected = "selected=\"selected\""; } else if($mybb->input['dstcorrection'] == 1)
| $dst_auto_selected = "selected=\"selected\""; } else if($mybb->input['dstcorrection'] == 1)
|
Zeile 268 | Zeile 281 |
---|
my_mail($user_info['email'], $emailsubject, $emailmessage); $lang->redirect_registered_activation = $lang->sprintf($lang->redirect_registered_activation, $mybb->settings['bbname'], $user_info['username']);
|
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");
| $plugins->run_hooks("member_do_register_end");
|
error($lang->redirect_registered_activation); } else if($mybb->settings['regtype'] == "randompass")
|
error($lang->redirect_registered_activation); } else if($mybb->settings['regtype'] == "randompass")
|
{
| {
|
$emailsubject = $lang->sprintf($lang->emailsubject_randompassword, $mybb->settings['bbname']); $emailmessage = $lang->sprintf($lang->email_randompassword, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']); my_mail($user_info['email'], $emailsubject, $emailmessage);
|
$emailsubject = $lang->sprintf($lang->emailsubject_randompassword, $mybb->settings['bbname']); $emailmessage = $lang->sprintf($lang->email_randompassword, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']); my_mail($user_info['email'], $emailsubject, $emailmessage);
|
$plugins->run_hooks("member_do_register_end");
| $plugins->run_hooks("member_do_register_end");
|
error($lang->redirect_registered_passwordsent); } else if($mybb->settings['regtype'] == "admin")
| error($lang->redirect_registered_passwordsent); } else if($mybb->settings['regtype'] == "admin")
|
Zeile 294 | Zeile 307 |
---|
else { $lang->redirect_registered = $lang->sprintf($lang->redirect_registered, $mybb->settings['bbname'], $user_info['username']);
|
else { $lang->redirect_registered = $lang->sprintf($lang->redirect_registered, $mybb->settings['bbname'], $user_info['username']);
|
$plugins->run_hooks("member_do_register_end");
| $plugins->run_hooks("member_do_register_end");
|
redirect("index.php", $lang->redirect_registered); } }
| redirect("index.php", $lang->redirect_registered); } }
|
Zeile 477 | Zeile 490 |
---|
} // Custom profile fields baby! $altbg = "trow1";
|
} // Custom profile fields baby! $altbg = "trow1";
|
$query = $db->simple_select("profilefields", "*", "editable=1", array('order_by' => 'disporder'));
| $query = $db->simple_select("profilefields", "*", "required=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 661 | Zeile 674 |
---|
} // Spambot registration image thingy
|
} // Spambot registration image thingy
|
if($mybb->settings['captchaimage'] == 1 && function_exists("imagecreatefrompng"))
| if($mybb->settings['captchaimage'])
|
{
|
{
|
$randomstr = random_str(5); $imagehash = md5(random_str(12)); $regimagearray = array( "imagehash" => $imagehash, "imagestring" => $randomstr, "dateline" => TIME_NOW ); $db->insert_query("captcha", $regimagearray); eval("\$regimage = \"".$templates->get("member_register_regimage")."\";");
| require_once MYBB_ROOT.'inc/class_captcha.php'; $captcha = new captcha(true, "member_register_regimage");
|
|
|
// JS validator extra $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";
| if($captcha->html) { $regimage = $captcha->html;
if($mybb->settings['captchaimage'] == 1) { // 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']) { $captcha_field = $mybb->settings['hiddencaptchaimagefield'];
eval("\$hiddencaptcha = \"".$templates->get("member_register_hiddencaptcha")."\";");
|
} if($mybb->settings['regtype'] != "randompass") {
| } if($mybb->settings['regtype'] != "randompass") {
|
Zeile 684 | Zeile 705 |
---|
// See if the board has "require complex passwords" enabled. if($mybb->settings['requirecomplexpasswords'] == 1)
|
// See if the board has "require complex passwords" enabled. if($mybb->settings['requirecomplexpasswords'] == 1)
|
{
| {
|
$lang->password = $lang->complex_password = $lang->sprintf($lang->complex_password, $mybb->settings['minpasswordlength']); $validator_extra .= "\tregValidator.register('password', 'ajax', {url:'xmlhttp.php?action=complex_password', loading_message:'{$lang->js_validator_password_complexity}'});\n"; } $validator_extra .= "\tregValidator.register('password2', 'matches', {match_field:'password', status_field:'password_status', failure_message:'{$lang->js_validator_password_matches}'});\n";
eval("\$passboxes = \"".$templates->get("member_register_password")."\";");
|
$lang->password = $lang->complex_password = $lang->sprintf($lang->complex_password, $mybb->settings['minpasswordlength']); $validator_extra .= "\tregValidator.register('password', 'ajax', {url:'xmlhttp.php?action=complex_password', loading_message:'{$lang->js_validator_password_complexity}'});\n"; } $validator_extra .= "\tregValidator.register('password2', 'matches', {match_field:'password', status_field:'password_status', failure_message:'{$lang->js_validator_password_matches}'});\n";
eval("\$passboxes = \"".$templates->get("member_register_password")."\";");
|
}
| }
|
// JS validator extra if($mybb->settings['maxnamelength'] > 0 && $mybb->settings['minnamelength'] > 0)
| // JS validator extra if($mybb->settings['maxnamelength'] > 0 && $mybb->settings['minnamelength'] > 0)
|
Zeile 723 | Zeile 744 |
---|
}
if($mybb->input['action'] == "activate")
|
}
if($mybb->input['action'] == "activate")
|
{
| {
|
$plugins->run_hooks("member_activate_start");
if($mybb->input['username'])
|
$plugins->run_hooks("member_activate_start");
if($mybb->input['username'])
|
{
| {
|
$query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."'", array('limit' => 1)); $user = $db->fetch_array($query); if(!$user['username'])
| $query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."'", array('limit' => 1)); $user = $db->fetch_array($query); if(!$user['username'])
|
Zeile 749 | Zeile 770 |
---|
if(!$activation['uid']) { error($lang->error_alreadyactivated);
|
if(!$activation['uid']) { error($lang->error_alreadyactivated);
|
}
| }
|
if($activation['code'] != $mybb->input['code']) { error($lang->error_badactivationcode);
| if($activation['code'] != $mybb->input['code']) { error($lang->error_badactivationcode);
|
Zeile 758 | Zeile 779 |
---|
if($user['usergroup'] == 5 && $activation['type'] != "e") { $db->update_query("users", array("usergroup" => 2), "uid='".$user['uid']."'");
|
if($user['usergroup'] == 5 && $activation['type'] != "e") { $db->update_query("users", array("usergroup" => 2), "uid='".$user['uid']."'");
|
}
| }
|
if($activation['type'] == "e") { $newemail = array(
| if($activation['type'] == "e") { $newemail = array(
|
Zeile 774 | Zeile 795 |
---|
$plugins->run_hooks("member_activate_accountactivated");
redirect("index.php", $lang->redirect_accountactivated);
|
$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);
|
eval("\$activate = \"".$templates->get("member_activate")."\";"); output_page($activate);
|
}
| }
|
}
if($mybb->input['action'] == "resendactivation")
| }
if($mybb->input['action'] == "resendactivation")
|
Zeile 793 | Zeile 814 |
---|
{ error($lang->error_activated_by_admin); }
|
{ error($lang->error_activated_by_admin); }
|
| if($mybb->user['uid'] && $mybb->user['usergroup'] != 5) { error($lang->error_alreadyactivated); }
|
eval("\$activate = \"".$templates->get("member_resendactivation")."\";"); output_page($activate); }
| eval("\$activate = \"".$templates->get("member_resendactivation")."\";"); output_page($activate); }
|
Zeile 801 | Zeile 826 |
---|
if($mybb->input['action'] == "do_resendactivation" && $mybb->request_method == "post") { $plugins->run_hooks("member_do_resendactivation_start");
|
if($mybb->input['action'] == "do_resendactivation" && $mybb->request_method == "post") { $plugins->run_hooks("member_do_resendactivation_start");
|
|
|
if($mybb->settings['regtype'] == "admin") { error($lang->error_activated_by_admin);
| if($mybb->settings['regtype'] == "admin") { error($lang->error_activated_by_admin);
|
Zeile 905 | Zeile 930 |
---|
if($mybb->input['username']) { $query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."'");
|
if($mybb->input['username']) { $query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."'");
|
$user = $db->fetch_array($query);
| $user = $db->fetch_array($query);
|
if(!$user['uid']) { error($lang->error_invalidpworusername);
|
if(!$user['uid']) { error($lang->error_invalidpworusername);
|
}
| }
|
} else
|
} else
|
{
| {
|
$query = $db->simple_select("users", "*", "uid='".intval($mybb->input['uid'])."'"); $user = $db->fetch_array($query); }
| $query = $db->simple_select("users", "*", "uid='".intval($mybb->input['uid'])."'"); $user = $db->fetch_array($query); }
|
Zeile 924 | Zeile 949 |
---|
if($activation['code'] != $mybb->input['code']) { error($lang->error_badlostpwcode);
|
if($activation['code'] != $mybb->input['code']) { error($lang->error_badlostpwcode);
|
}
| }
|
$db->delete_query("awaitingactivation", "uid='".$user['uid']."' AND type='p'"); $username = $user['username'];
|
$db->delete_query("awaitingactivation", "uid='".$user['uid']."' AND type='p'"); $username = $user['username'];
|
|
|
// Generate a new password, then update it
|
// Generate a new password, then update it
|
$password = random_str(); $logindetails = update_password($user['uid'], md5($password), $user['salt']);
| $password_length = intval($mybb->settings['minpasswordlength']);
if($password_length < 8) { $password_length = 8; }
$password = random_str($password_length); $logindetails = update_password($user['uid'], md5($password), $user['salt']);
|
$email = $user['email'];
| $email = $user['email'];
|
Zeile 1002 | Zeile 1034 |
---|
else { $correct = true;
|
else { $correct = true;
|
}
| }
|
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 1027 | Zeile 1059 |
---|
} } else if($mybb->input['quick_login'] == 1 && $mybb->input['quick_password'] && $mybb->input['quick_username'])
|
} } else if($mybb->input['quick_login'] == 1 && $mybb->input['quick_password'] && $mybb->input['quick_username'])
|
{
| {
|
$errors[] = $lang->error_regimagerequired; } else
| $errors[] = $lang->error_regimagerequired; } else
|
Zeile 1051 | Zeile 1083 |
---|
if($user['coppauser']) { error($lang->error_awaitingcoppa);
|
if($user['coppauser']) { error($lang->error_awaitingcoppa);
|
}
| }
|
my_setcookie('loginattempts', 1); $db->delete_query("sessions", "ip='".$db->escape_string($session->ipaddress)."' AND sid != '".$session->sid."'");
| my_setcookie('loginattempts', 1); $db->delete_query("sessions", "ip='".$db->escape_string($session->ipaddress)."' AND sid != '".$session->sid."'");
|
Zeile 1117 | Zeile 1149 |
---|
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.
|
if($mybb->input['url'] && !preg_match("/action=login/i", $mybb->input['url'])) { $redirect_url = htmlentities($mybb->input['url']); } elseif($_SERVER['HTTP_REFERER'])
| if($_SERVER['HTTP_REFERER'] && strpos($_SERVER['HTTP_REFERER'], "action=login") === false)
|
{ $redirect_url = htmlentities($_SERVER['HTTP_REFERER']); }
|
{ $redirect_url = htmlentities($_SERVER['HTTP_REFERER']); }
|
| else { $redirect_url = ''; }
|
$captcha = ""; // Show captcha image for guests if enabled if($mybb->settings['captchaimage'] == 1 && function_exists("imagepng") && $do_captcha == true)
| $captcha = ""; // Show captcha image for guests if enabled if($mybb->settings['captchaimage'] == 1 && function_exists("imagepng") && $do_captcha == true)
|
Zeile 1252 | Zeile 1284 |
---|
if($mybb->user['uid'] != $uid) {
|
if($mybb->user['uid'] != $uid) {
|
$query = $db->simple_select("users", "*", "uid='$uid'"); $memprofile = $db->fetch_array($query);
| $memprofile = get_user($uid);
|
} else {
| } else {
|
Zeile 1351 | Zeile 1382 |
---|
$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);
|
$daysreg = (TIME_NOW - $memprofile['regdate']) / (24*3600);
|
| if($daysreg < 1) { $daysreg = 1; }
|
$ppd = $memprofile['postnum'] / $daysreg; $ppd = round($ppd, 2); if($ppd > $memprofile['postnum'])
| $ppd = $memprofile['postnum'] / $daysreg; $ppd = round($ppd, 2); if($ppd > $memprofile['postnum'])
|
Zeile 1365 | Zeile 1402 |
---|
if($numposts == 0) { $percent = "0";
|
if($numposts == 0) { $percent = "0";
|
} else {
| } else {
|
$percent = $memprofile['postnum']*100/$numposts; $percent = round($percent, 2); } if($percent > 100)
|
$percent = $memprofile['postnum']*100/$numposts; $percent = round($percent, 2); } if($percent > 100)
|
{
| {
|
$percent = 100; }
if(!empty($memprofile['icq'])) { $memprofile['icq'] = intval($memprofile['icq']);
|
$percent = 100; }
if(!empty($memprofile['icq'])) { $memprofile['icq'] = intval($memprofile['icq']);
|
} else
| } else
|
{ $memprofile['icq'] = ''; }
| { $memprofile['icq'] = ''; }
|
Zeile 1391 | Zeile 1428 |
---|
$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']))
|
{
| {
|
$awayreason = htmlspecialchars_uni($memprofile['awayreason']); }
|
$awayreason = htmlspecialchars_uni($memprofile['awayreason']); }
|
else { $awayreason = $lang->away_no_reason; }
| else { $awayreason = $lang->away_no_reason; }
|
if($memprofile['returndate'] == '')
|
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) { require_once MYBB_ROOT."inc/functions_time.php";
| if($returnhome[2] >= 2038) { require_once MYBB_ROOT."inc/functions_time.php";
|
Zeile 1416 | Zeile 1456 |
---|
$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); }
|
| // 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']).'\''); // 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) { eval("\$awaybit = \"".$templates->get("member_profile_away")."\";");
|
}
|
}
|
eval("\$awaybit = \"".$templates->get("member_profile_away")."\";");
| |
} if($memprofile['dst'] == 1) {
| } if($memprofile['dst'] == 1) {
|
Zeile 1438 | Zeile 1492 |
---|
$memlastvisitdate = my_date($mybb->settings['dateformat'], $memprofile['lastactive']); $memlastvisitsep = $lang->comma; $memlastvisittime = my_date($mybb->settings['timeformat'], $memprofile['lastactive']);
|
$memlastvisitdate = my_date($mybb->settings['dateformat'], $memprofile['lastactive']); $memlastvisitsep = $lang->comma; $memlastvisittime = my_date($mybb->settings['timeformat'], $memprofile['lastactive']);
|
}
| }
|
else
|
else
|
{
| {
|
$memlastvisitdate = $lang->lastvisit_never; $memlastvisitsep = ''; $memlastvisittime = '';
| $memlastvisitdate = $lang->lastvisit_never; $memlastvisitsep = ''; $memlastvisittime = '';
|
Zeile 1452 | Zeile 1506 |
---|
if($memprofile['birthdayprivacy'] != 'none') {
|
if($memprofile['birthdayprivacy'] != 'none') {
|
if($membday[2]) {
| if($membday[0] && $membday[1] && $membday[2]) {
|
$lang->membdayage = $lang->sprintf($lang->membdayage, get_age($memprofile['birthday'])); if($membday[2] >= 1970)
|
$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);
|
$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]);
| else { $bdayformat = fix_mktime($mybb->settings['dateformat'], $membday[2]);
|
Zeile 1468 | Zeile 1522 |
---|
$membday = date($bdayformat, $membday); } $membdayage = $lang->membdayage;
|
$membday = date($bdayformat, $membday); } $membdayage = $lang->membdayage;
|
| } elseif($membday[2]) { $membday = mktime(0, 0, 0, 1, 1, $membday[2]); $membday = date("Y", $membday); $membdayage = '';
|
} else {
| } else {
|
Zeile 1626 | Zeile 1686 |
---|
}
// Fetch the reputation for this user
|
}
// Fetch the reputation for this user
|
if($memperms['usereputationsystem'] == 1 && $displaygroup['usereputationsystem'] == 1 && $mybb->settings['enablereputation'] == 1)
| if($memperms['usereputationsystem'] == 1 && $displaygroup['usereputationsystem'] == 1 && $mybb->settings['enablereputation'] == 1 && ($mybb->settings['posrep'] || $mybb->settings['neurep'] || $mybb->settings['negrep']))
|
{ $bg_color = alt_trow(); $reputation = get_reputation($memprofile['reputation']);
| { $bg_color = alt_trow(); $reputation = get_reputation($memprofile['reputation']);
|
Zeile 1709 | Zeile 1769 |
---|
$customfieldval = htmlspecialchars_uni($userfields[$field]); } }
|
$customfieldval = htmlspecialchars_uni($userfields[$field]); } }
|
| $customfield['name'] = htmlspecialchars_uni($customfield['name']);
|
eval("\$customfields .= \"".$templates->get("member_profile_customfields_field")."\";"); $bgcolor = alt_trow(); }
| eval("\$customfields .= \"".$templates->get("member_profile_customfields_field")."\";"); $bgcolor = alt_trow(); }
|
Zeile 1722 | Zeile 1784 |
---|
if($memprofile['timeonline'] > 0) { $timeonline = nice_time($memprofile['timeonline']);
|
if($memprofile['timeonline'] > 0) { $timeonline = nice_time($memprofile['timeonline']);
|
} else {
| } else {
|
$timeonline = $lang->none_registered; } if($mybb->usergroup['cancp'] == 1 && $mybb->config['hide_admin_links'] != 1) { eval("\$adminoptions = \"".$templates->get("member_profile_adminoptions")."\";");
|
$timeonline = $lang->none_registered; } if($mybb->usergroup['cancp'] == 1 && $mybb->config['hide_admin_links'] != 1) { eval("\$adminoptions = \"".$templates->get("member_profile_adminoptions")."\";");
|
} else
| } else
|
{ $adminoptions = ''; }
| { $adminoptions = ''; }
|
Zeile 1747 | Zeile 1809 |
---|
{ $memprofile['usernotes'] = my_substr($memprofile['usernotes'], 0, 100).'...'; }
|
{ $memprofile['usernotes'] = my_substr($memprofile['usernotes'], 0, 100).'...'; }
|
}
| }
|
else { $memprofile['usernotes'] = $lang->no_usernotes;
| else { $memprofile['usernotes'] = $lang->no_usernotes;
|
Zeile 1762 | Zeile 1824 |
---|
$buddy_options = '';
|
$buddy_options = '';
|
if($mybb->user['uid'] != $mybb->input['uid'] && $mybb->user['uid'] != 0)
| 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_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\" /> {$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 {
|
} 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\" /> {$lang->add_to_buddy_list}</a>";
| $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\" /> {$lang->remove_from_ignore_list}</a>";
| $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 {
|
} else {
|
$buddy_options .= "<br /><a href=\"./usercp.php?action=do_editlists&manage=ignored&add_username=".urlencode($memprofile['username'])."&my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/add_ignore.gif\" /> {$lang->add_to_ignore_list}</a>";
| $buddy_options .= "<br /><a href=\"./usercp.php?action=do_editlists&manage=ignored&add_username=".urlencode($memprofile['username'])."&my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/add_ignore.gif\" alt=\"{$lang->add_to_ignore_list}\" /> {$lang->add_to_ignore_list}</a>";
|
} }
| } }
|