Zeile 3 | Zeile 3 |
---|
* MyBB 1.2 * Copyright � 2006 MyBB Group, All Rights Reserved *
|
* MyBB 1.2 * Copyright � 2006 MyBB Group, All Rights Reserved *
|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html
| * Website: http://www.mybboard.net * License: http://www.mybboard.net/eula.html
|
*
|
*
|
* $Id: member.php 2193 2006-09-03 12:33:03Z chris $
| * $Id: member.php 3739 2008-03-22 02:38:56Z dennis $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 210 | Zeile 210 |
---|
if($mybb->settings['regtype'] != "randompass") { // Log them in
|
if($mybb->settings['regtype'] != "randompass") { // Log them in
|
my_setcookie("mybbuser", $user_info['uid']."_".$user_info['loginkey']);
| my_setcookie("mybbuser", $user_info['uid']."_".$user_info['loginkey'], null, true);
|
}
if($mybb->settings['regtype'] == "verify")
| }
if($mybb->settings['regtype'] == "verify")
|
Zeile 381 | Zeile 381 |
---|
} elseif($referrername) {
|
} elseif($referrername) {
|
$query = $db->simple_select(TABLE_PREFIX."users", "uid", "username='".$db->escape_string($referrername)."'");
| $query = $db->simple_select(TABLE_PREFIX."users", "uid", "LOWER(username)='".$db->escape_string(my_strtolower($referrername))."'");
|
$ref = $db->fetch_array($query); if(!$ref['uid']) {
| $ref = $db->fetch_array($query); if(!$ref['uid']) {
|
Zeile 563 | Zeile 563 |
---|
$emailnotifycheck = ''; $receivepmscheck = "checked=\"checked\""; $pmpopupcheck = "checked=\"checked\"";
|
$emailnotifycheck = ''; $receivepmscheck = "checked=\"checked\""; $pmpopupcheck = "checked=\"checked\"";
|
$pmnotifycheck = '';
| $emailpmnotifycheck = '';
|
$invisiblecheck = ''; if($mybb->settings['dstcorrection'] == "yes") {
| $invisiblecheck = ''; if($mybb->settings['dstcorrection'] == "yes") {
|
Zeile 615 | Zeile 615 |
---|
if($mybb->input['username']) {
|
if($mybb->input['username']) {
|
$query = $db->simple_select(TABLE_PREFIX."users", "*", "username='".$db->escape_string($mybb->input['username'])."'");
| $query = $db->simple_select(TABLE_PREFIX."users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."'");
|
$user = $db->fetch_array($query); if(!$user['username']) {
| $user = $db->fetch_array($query); if(!$user['username']) {
|
Zeile 799 | Zeile 799 |
---|
if($mybb->input['username']) {
|
if($mybb->input['username']) {
|
$query = $db->simple_select(TABLE_PREFIX."users", "*", "username='".$db->escape_string($mybb->input['username'])."'");
| $query = $db->simple_select(TABLE_PREFIX."users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."'");
|
$user = $db->fetch_array($query); if(!$user['uid']) {
| $user = $db->fetch_array($query); if(!$user['uid']) {
|
Zeile 902 | Zeile 902 |
---|
}
my_setcookie('loginattempts', 1);
|
}
my_setcookie('loginattempts', 1);
|
$db->delete_query(TABLE_PREFIX."sessions", "ip='".$session->ipaddress."' AND sid != '".$session->sid."'");
| $db->delete_query(TABLE_PREFIX."sessions", "ip='".$db->escape_string($session->ipaddress)."' AND sid != '".$session->sid."'");
|
$newsession = array( "uid" => $user['uid'], "loginattempts" => 1,
| $newsession = array( "uid" => $user['uid'], "loginattempts" => 1,
|
Zeile 912 | Zeile 912 |
---|
// Temporarily set the cookie remember option for the login cookies $mybb->user['remember'] = $user['remember'];
|
// Temporarily set the cookie remember option for the login cookies $mybb->user['remember'] = $user['remember'];
|
my_setcookie("mybbuser", $user['uid']."_".$user['loginkey']); my_setcookie("sid", $session->sid, -1);
| my_setcookie("mybbuser", $user['uid']."_".$user['loginkey'], null, true); my_setcookie("sid", $session->sid, -1, true);
|
if(function_exists("loggedIn")) {
| if(function_exists("loggedIn")) {
|
Zeile 940 | Zeile 940 |
---|
{ redirect("index.php", $lang->redirect_alreadyloggedout); }
|
{ redirect("index.php", $lang->redirect_alreadyloggedout); }
|
if($mybb->input['uid'] == $mybb->user['uid'])
| // Check session ID if we have one if($mybb->input['sid'] && $mybb->input['sid'] != $session->sid)
|
{
|
{
|
my_unsetcookie("mybbuser"); my_setcookie("sid", 0, -1); if($mybb->user['uid']) { $time = time(); $lastvisit = array( "lastactive" => $time-900, "lastvisit" => $time, ); $db->update_query(TABLE_PREFIX."users", $lastvisit, "uid='".$mybb->user['uid']."'"); $db->delete_query(TABLE_PREFIX."sessions", "sid='".$session->sid."'");
if(function_exists("loggedOut")) { loggedOut($mybb->user['uid']); } }
$plugins->run_hooks("member_logout_end");
redirect("index.php", $lang->redirect_loggedout); } else
| error($lang->error_notloggedout); } // Otherwise, check logoutkey else if(!$mybb->input['sid'] && $mybb->input['logoutkey'] != $mybb->user['logoutkey'])
|
{ error($lang->error_notloggedout); }
|
{ error($lang->error_notloggedout); }
|
| my_unsetcookie("mybbuser"); my_unsetcookie("sid"); if($mybb->user['uid']) { $time = time(); $lastvisit = array( "lastactive" => $time-900, "lastvisit" => $time, ); $db->update_query(TABLE_PREFIX."users", $lastvisit, "uid='".$mybb->user['uid']."'"); $db->delete_query(TABLE_PREFIX."sessions", "sid='".$session->sid."'"); } $plugins->run_hooks("member_logout_end");
redirect("index.php", $lang->redirect_loggedout);
|
} elseif($mybb->input['action'] == "profile") {
| } elseif($mybb->input['action'] == "profile") {
|
Zeile 1046 | Zeile 1045 |
---|
$lang->users_additional_info = sprintf($lang->users_additional_info, $memprofile['username']); $lang->users_signature = sprintf($lang->users_signature, $memprofile['username']); $lang->send_user_email = sprintf($lang->send_user_email, $memprofile['username']);
|
$lang->users_additional_info = sprintf($lang->users_additional_info, $memprofile['username']); $lang->users_signature = sprintf($lang->users_signature, $memprofile['username']); $lang->send_user_email = sprintf($lang->send_user_email, $memprofile['username']);
|
if(!empty($memprofile['awayreason'])) { $awayreason = $memprofile['awayreason']; } else { $awayreason = $lang->away_no_reason; }
| |
if($memprofile['avatar']) {
| if($memprofile['avatar']) {
|
Zeile 1065 | Zeile 1055 |
---|
$avatar_width_height = "width=\"{$avatar_dimensions[0]}\" height=\"{$avatar_dimensions[1]}\""; } $avatar = "<img src=\"$memprofile[avatar]\" alt=\"\" $avatar_width_height />";
|
$avatar_width_height = "width=\"{$avatar_dimensions[0]}\" height=\"{$avatar_dimensions[1]}\""; } $avatar = "<img src=\"$memprofile[avatar]\" alt=\"\" $avatar_width_height />";
|
}
| }
|
else { $avatar = '';
| else { $avatar = '';
|
Zeile 1074 | Zeile 1064 |
---|
if($memprofile['hideemail'] != "yes") { eval("\$sendemail = \"".$templates->get("member_profile_email")."\";");
|
if($memprofile['hideemail'] != "yes") { eval("\$sendemail = \"".$templates->get("member_profile_email")."\";");
|
} else
| } else
|
{ $sendemail = ''; }
| { $sendemail = ''; }
|
Zeile 1084 | Zeile 1074 |
---|
{ $memprofile['website'] = htmlspecialchars_uni($memprofile['website']); $website = "<a href=\"$memprofile[website]\" target=\"_blank\">$memprofile[website]</a>";
|
{ $memprofile['website'] = htmlspecialchars_uni($memprofile['website']); $website = "<a href=\"$memprofile[website]\" target=\"_blank\">$memprofile[website]</a>";
|
}
| }
|
else { $website = '';
|
else { $website = '';
|
}
| }
|
if($memprofile['signature']) { $sig_parser = array(
| if($memprofile['signature']) { $sig_parser = array(
|
Zeile 1098 | Zeile 1088 |
---|
"allow_smilies" => $mybb->settings['sigsmilies'], "allow_imgcode" => $mybb->settings['sigimgcode'] );
|
"allow_smilies" => $mybb->settings['sigsmilies'], "allow_imgcode" => $mybb->settings['sigimgcode'] );
|
|
|
$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")."\";"); }
|
Zeile 1110 | Zeile 1100 |
---|
{ $ppd = $memprofile['postnum']; }
|
{ $ppd = $memprofile['postnum']; }
|
$query = $db->simple_select(TABLE_PREFIX."posts", "COUNT(pid) AS posts", "visible > 0"); $posts = $db->fetch_field($query, "posts");
| $stats = $cache->read("stats"); $posts = $stats['numposts'];
|
if($posts == 0)
|
if($posts == 0)
|
{
| {
|
$percent = "0";
|
$percent = "0";
|
} else
| } else
|
{ $percent = $memprofile['postnum']*100/$posts; $percent = round($percent, 2);
|
{ $percent = $memprofile['postnum']*100/$posts; $percent = round($percent, 2);
|
}
| }
|
$query = $db->simple_select(TABLE_PREFIX."users", "COUNT(*) AS referrals", "referrer='{$memprofile['uid']}'"); $referrals = $db->fetch_field($query, "referrals");
|
$query = $db->simple_select(TABLE_PREFIX."users", "COUNT(*) AS referrals", "referrer='{$memprofile['uid']}'"); $referrals = $db->fetch_field($query, "referrals");
|
|
|
if(!empty($memprofile['icq'])) { $memprofile['icq'] = intval($memprofile['icq']);
|
if(!empty($memprofile['icq'])) { $memprofile['icq'] = intval($memprofile['icq']);
|
}
| }
|
else { $memprofile['icq'] = '';
| else { $memprofile['icq'] = '';
|
Zeile 1138 | Zeile 1128 |
---|
{ $lang->away_note = sprintf($lang->away_note, $memprofile['username']); $awaydate = my_date($mybb->settings['dateformat'], $memprofile['awaydate']);
|
{ $lang->away_note = sprintf($lang->away_note, $memprofile['username']); $awaydate = my_date($mybb->settings['dateformat'], $memprofile['awaydate']);
|
$memprofile['awayreason'] = htmlspecialchars_uni($memprofile['awayreason']);
| if(!empty($memprofile['awayreason'])) { $awayreason = htmlspecialchars_uni($memprofile['awayreason']); } else { $awayreason = $lang->away_no_reason; }
|
if($memprofile['returndate'] == '') { $returndate = "$lang->unknown"; } else
|
if($memprofile['returndate'] == '') { $returndate = "$lang->unknown"; } else
|
{
| {
|
$returnhome = explode("-", $memprofile['returndate']); $returnmkdate = mktime(0, 0, 0, $returnhome[1], $returnhome[0], $returnhome[2]); $returndate = my_date($mybb->settings['dateformat'], $returnmkdate);
| $returnhome = explode("-", $memprofile['returndate']); $returnmkdate = mktime(0, 0, 0, $returnhome[1], $returnhome[0], $returnhome[2]); $returndate = my_date($mybb->settings['dateformat'], $returnmkdate);
|
Zeile 1182 | Zeile 1179 |
---|
{ $membday = explode("-", $memprofile['birthday']); if($membday[2])
|
{ $membday = explode("-", $memprofile['birthday']); if($membday[2])
|
{
| { $year = my_date("Y"); $lang->membdayage = sprintf($lang->membdayage, get_age($memprofile['birthday'])); $membdayage = $lang->membdayage;
|
if($membday[2] < 1970) { $w_day = get_weekday($membday[1], $membday[0], $membday[2]);
| if($membday[2] < 1970) { $w_day = get_weekday($membday[1], $membday[0], $membday[2]);
|
Zeile 1194 | Zeile 1194 |
---|
$membday = mktime(0, 0, 0, $membday[1], $membday[0], $membday[2]); $membday = date($bdayformat, $membday); }
|
$membday = mktime(0, 0, 0, $membday[1], $membday[0], $membday[2]); $membday = date($bdayformat, $membday); }
|
$lang->membdayage = sprintf($lang->membdayage, get_age($memprofile['birthday'])); $membdayage = $lang->membdayage;
| |
} else {
| } else {
|
Zeile 1203 | Zeile 1201 |
---|
$membday = date("F j", $membday); $membdayage = ''; }
|
$membday = date("F j", $membday); $membdayage = ''; }
|
}
| }
|
else { $membday = $lang->not_specified; $membdayage = '';
|
else { $membday = $lang->not_specified; $membdayage = '';
|
}
| }
|
if(!$memprofile['displaygroup']) {
| if(!$memprofile['displaygroup']) {
|
Zeile 1217 | Zeile 1215 |
---|
$displaygroup = usergroup_displaygroup($memprofile['displaygroup']);
// Get the user title for this user
|
$displaygroup = usergroup_displaygroup($memprofile['displaygroup']);
// Get the user title for this user
|
if($displaygroup['usertitle'])
| if(trim($memprofile['usertitle']) != '') { // User has custom user title $usertitle = $memprofile['usertitle']; } elseif(trim($displaygroup['usertitle']) != '')
|
{
|
{
|
| // User has group title
|
$usertitle = $displaygroup['usertitle'];
|
$usertitle = $displaygroup['usertitle'];
|
$stars = $displaygroup['stars'];
| |
} else {
|
} else {
|
| // No usergroup title so get a default one
|
$query = $db->simple_select(TABLE_PREFIX."usertitles", "*", "", array('order_by' => 'posts', 'order_dir' => 'DESC')); while($title = $db->fetch_array($query))
|
$query = $db->simple_select(TABLE_PREFIX."usertitles", "*", "", array('order_by' => 'posts', 'order_dir' => 'DESC')); while($title = $db->fetch_array($query))
|
{
| {
|
if($memprofile['postnum'] >= $title['posts']) { $usertitle = $title['title'];
| if($memprofile['postnum'] >= $title['posts']) { $usertitle = $title['title'];
|
Zeile 1234 | Zeile 1238 |
---|
$starimage = $title['starimage']; break; }
|
$starimage = $title['starimage']; break; }
|
}
| } } if($displaygroup['stars']) { $stars = $displaygroup['stars'];
|
}
if(!empty($displaygroup['image']))
| }
if(!empty($displaygroup['image']))
|
Zeile 1251 | Zeile 1260 |
---|
eval("\$groupimage = \"".$templates->get("member_profile_groupimage")."\";"); }
|
eval("\$groupimage = \"".$templates->get("member_profile_groupimage")."\";"); }
|
if(trim($memprofile['usertitle']) != '') { $usertitle = $memprofile['usertitle']; }
|
|
if(!$starimage) { $starimage = $displaygroup['starimage'];
| if(!$starimage) { $starimage = $displaygroup['starimage'];
|
Zeile 1283 | Zeile 1289 |
---|
$query = $db->simple_select(TABLE_PREFIX."userfields", "*", "ufid='$uid'"); $userfields = $db->fetch_array($query); $customfields = '';
|
$query = $db->simple_select(TABLE_PREFIX."userfields", "*", "ufid='$uid'"); $userfields = $db->fetch_array($query); $customfields = '';
|
$bgcolor = trow1;
| $bgcolor = "trow1";
|
// If this user is an Administrator or a Moderator then we wish to show all profile fields if($mybb->usergroup['cancp'] == "yes" || $mybb->usergroup['issupermod'] == "yes" || $mybb->usergroup['gid'] == 6) {
| // If this user is an Administrator or a Moderator then we wish to show all profile fields if($mybb->usergroup['cancp'] == "yes" || $mybb->usergroup['issupermod'] == "yes" || $mybb->usergroup['gid'] == 6) {
|
Zeile 1393 | Zeile 1399 |
---|
} elseif($mybb->input['action'] == "do_emailuser" && $mybb->request_method == "post") {
|
} elseif($mybb->input['action'] == "do_emailuser" && $mybb->request_method == "post") {
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
$plugins->run_hooks("member_do_emailuser_start");
if($mybb->usergroup['cansendemail'] == "no") { error_no_permission(); }
|
$plugins->run_hooks("member_do_emailuser_start");
if($mybb->usergroup['cansendemail'] == "no") { error_no_permission(); }
|
$query = $db->simple_select(TABLE_PREFIX."users", "uid, username, email, hideemail", "username='".$db->escape_string($mybb->input['touser'])."'");
| $query = $db->simple_select(TABLE_PREFIX."users", "uid, username, email, hideemail", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['touser']))."'");
|
$emailto = $db->fetch_array($query); if(!$emailto['username']) {
| $emailto = $db->fetch_array($query); if(!$emailto['username']) {
|