Zeile 1 | Zeile 1 |
---|
<?php /** * MyBB 1.4
|
<?php /** * MyBB 1.4
|
* Copyright � 2008 MyBB Group, All Rights Reserved
| * Copyright © 2008 MyBB Group, All Rights Reserved
|
* * Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* * Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* $Id: member.php 4274 2008-11-19 03:22:50Z Tikitiki $
| * $Id: member.php 5379 2011-02-21 11:06:42Z Tomm $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 610 | Zeile 610 |
---|
else { $value = htmlspecialchars_uni($userfield);
|
else { $value = htmlspecialchars_uni($userfield);
|
$code = "<input type=\"text\" name=\"profile_fields[$field]\" id=\"{$field}\" class=\"textbox\" size=\"{$profilefield['length']}\" maxlength=\"{$profilefield['maxlength']}\" value=\"$value\" />";
| $maxlength = ""; if($profilefield['maxlength'] > 0) { $maxlength = " maxlength=\"{$profilefield['maxlength']}\""; } $code = "<input type=\"text\" name=\"profile_fields[$field]\" id=\"{$field}\" class=\"textbox\" size=\"{$profilefield['length']}\"{$maxlength} value=\"$value\" />";
|
} if($profilefield['required'] == 1) {
| } if($profilefield['required'] == 1) {
|
Zeile 709 | Zeile 714 |
---|
}
$plugins->run_hooks("member_register_end");
|
}
$plugins->run_hooks("member_register_end");
|
|
|
eval("\$registration = \"".$templates->get("member_register")."\";"); output_page($registration); }
| eval("\$registration = \"".$templates->get("member_register")."\";"); output_page($registration); }
|
Zeile 742 | Zeile 747 |
---|
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 984 | Zeile 989 |
---|
$mybb->input['action'] = "login"; $mybb->input['request_method'] = "get";
|
$mybb->input['action'] = "login"; $mybb->input['request_method'] = "get";
|
if($mybb->settings['failedlogintext'] == 1)
| if($mybb->settings['failedlogincount'] != 0 && $mybb->settings['failedlogintext'] == 1)
|
{ $login_text = $lang->sprintf($lang->failed_login_again, $mybb->settings['failedlogincount'] - $logins); }
| { $login_text = $lang->sprintf($lang->failed_login_again, $mybb->settings['failedlogincount'] - $logins); }
|
Zeile 1053 | Zeile 1058 |
---|
$db->update_query("sessions", $newsession, "sid='".$session->sid."'"); $db->update_query("users", array("loginattempts" => 1), "uid='{$user['uid']}'");
|
$db->update_query("sessions", $newsession, "sid='".$session->sid."'"); $db->update_query("users", array("loginattempts" => 1), "uid='{$user['uid']}'");
|
|
|
// 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'];
|
Zeile 1091 | Zeile 1096 |
---|
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 1104 | Zeile 1109 |
---|
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)
|
{ if(!$correct) { $randomstr = random_str(5); $imagehash = md5(random_str(12)); $imagearray = array( "imagehash" => $imagehash, "imagestring" => $randomstr, "dateline" => TIME_NOW ); $db->insert_query("captcha", $imagearray); eval("\$captcha = \"".$templates->get("post_captcha")."\";"); }
| { $randomstr = random_str(5); $imagehash = md5(random_str(12)); $imagearray = array( "imagehash" => $imagehash, "imagestring" => $randomstr, "dateline" => TIME_NOW ); $db->insert_query("captcha", $imagearray); eval("\$captcha = \"".$templates->get("post_captcha")."\";");
|
} $username = "";
| } $username = "";
|
Zeile 1145 | Zeile 1147 |
---|
eval("\$login = \"".$templates->get("member_login")."\";"); output_page($login);
|
eval("\$login = \"".$templates->get("member_login")."\";"); output_page($login);
|
}
| }
|
if($mybb->input['action'] == "logout") { $plugins->run_hooks("member_logout_start");
| if($mybb->input['action'] == "logout") { $plugins->run_hooks("member_logout_start");
|
Zeile 1301 | Zeile 1303 |
---|
} else {
|
} else {
|
| $alttrow = "trow1"; // To properly sort the contact details below
|
$sendemail = '';
|
$sendemail = '';
|
| }
// Clean alt_trow for the contact details $cat_array = array( "pm", "icq", "aim", "yahoo", "msn", );
$bgcolors = array(); foreach($cat_array as $cat) { $bgcolors[$cat] = alt_trow();
|
}
if($memprofile['website'])
| }
if($memprofile['website'])
|
Zeile 1351 | Zeile 1369 |
---|
{ $percent = 100; }
|
{ $percent = 100; }
|
$query = $db->simple_select("users", "COUNT(uid) AS referrals", "referrer='{$memprofile['uid']}'"); $referrals = $db->fetch_field($query, "referrals");
| |
if(!empty($memprofile['icq'])) {
| if(!empty($memprofile['icq'])) {
|
Zeile 1371 | Zeile 1386 |
---|
if(!empty($memprofile['awayreason'])) { $awayreason = htmlspecialchars_uni($memprofile['awayreason']);
|
if(!empty($memprofile['awayreason'])) { $awayreason = htmlspecialchars_uni($memprofile['awayreason']);
|
} else
| } else
|
{ $awayreason = $lang->away_no_reason; }
| { $awayreason = $lang->away_no_reason; }
|
Zeile 1412 | Zeile 1427 |
---|
$localtime = $lang->sprintf($lang->local_time_format, $memlocaldate, $memlocaltime);
if($memprofile['lastactive'])
|
$localtime = $lang->sprintf($lang->local_time_format, $memlocaldate, $memlocaltime);
if($memprofile['lastactive'])
|
{
| {
|
$memlastvisitdate = my_date($mybb->settings['dateformat'], $memprofile['lastactive']); $memlastvisitsep = ', '; $memlastvisittime = my_date($mybb->settings['timeformat'], $memprofile['lastactive']);
| $memlastvisitdate = my_date($mybb->settings['dateformat'], $memprofile['lastactive']); $memlastvisitsep = ', '; $memlastvisittime = my_date($mybb->settings['timeformat'], $memprofile['lastactive']);
|
Zeile 1475 | Zeile 1490 |
---|
{ $memprofile['displaygroup'] = $memprofile['usergroup']; }
|
{ $memprofile['displaygroup'] = $memprofile['usergroup']; }
|
| // Grab the following fields from the user's displaygroup $displaygroupfields = array( "title", "usertitle", "stars", "starimage", "image", "usereputationsystem" );
|
$displaygroup = usergroup_displaygroup($memprofile['displaygroup']);
// Get the user title for this user
| $displaygroup = usergroup_displaygroup($memprofile['displaygroup']);
// Get the user title for this user
|
Zeile 1506 | Zeile 1531 |
---|
} }
|
} }
|
if($displaygroup['stars'])
| if($displaygroup['stars'] || $displaygroup['usertitle'])
|
{ // Set the number of stars if display group has constant number of stars $stars = $displaygroup['stars'];
| { // Set the number of stars if display group has constant number of stars $stars = $displaygroup['stars'];
|
Zeile 1554 | Zeile 1579 |
---|
// User is currently online and this user has permissions to view the user on the WOL $timesearch = TIME_NOW - $mybb->settings['wolcutoffmins']*60;
|
// User is currently online and this user has permissions to view the user on the WOL $timesearch = TIME_NOW - $mybb->settings['wolcutoffmins']*60;
|
$query = $db->simple_select("sessions", "location", "uid='$uid' AND time>'{$timesearch}'", array('order_by' => 'time', 'order_dir' => 'DESC', 'limit' => 1)); $location = $db->fetch_field($query, 'location');
| $query = $db->simple_select("sessions", "location,nopermission", "uid='$uid' AND time>'{$timesearch}'", array('order_by' => 'time', 'order_dir' => 'DESC', 'limit' => 1)); $session = $db->fetch_array($query);
|
|
|
if(($memprofile['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1 || $memprofile['uid'] == $mybb->user['uid']) && $location)
| if(($memprofile['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1 || $memprofile['uid'] == $mybb->user['uid']) && !empty($session))
|
{ // Fetch their current location $lang->load("online"); require_once MYBB_ROOT."inc/functions_online.php";
|
{ // Fetch their current location $lang->load("online"); require_once MYBB_ROOT."inc/functions_online.php";
|
$activity = fetch_wol_activity($location);
| $activity = fetch_wol_activity($session['location'], $session['nopermission']);
|
$location = build_friendly_wol_location($activity); $location_time = my_date($mybb->settings['timeformat'], $memprofile['lastactive']);
| $location = build_friendly_wol_location($activity); $location_time = my_date($mybb->settings['timeformat'], $memprofile['lastactive']);
|
Zeile 1575 | Zeile 1600 |
---|
}
// Fetch the reputation for this user
|
}
// Fetch the reputation for this user
|
if($memperms['usereputationsystem'] == 1 && $mybb->settings['enablereputation'] == 1)
| if($memperms['usereputationsystem'] == 1 && $displaygroup['usereputationsystem'] == 1 && $mybb->settings['enablereputation'] == 1)
|
{ $reputation = get_reputation($memprofile['reputation']);
| { $reputation = get_reputation($memprofile['reputation']);
|
Zeile 1612 | Zeile 1637 |
---|
$userfields = $db->fetch_array($query); $customfields = ''; $bgcolor = "trow1";
|
$userfields = $db->fetch_array($query); $customfields = ''; $bgcolor = "trow1";
|
| $alttrow = "trow1";
|
// If this user is an Administrator or a Moderator then we wish to show all profile fields
|
// If this user is an Administrator or a Moderator then we wish to show all profile fields
|
if($mybb->usergroup['cancp'] == 1 || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['gid'] == 6)
| if($mybb->usergroup['cancp'] == 1 || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['canmodcp'] == 1)
|
{ $field_hidden = '1=1'; }
| { $field_hidden = '1=1'; }
|
Zeile 1682 | Zeile 1708 |
---|
{ $modoptions = ''; }
|
{ $modoptions = ''; }
|
|
|
$plugins->run_hooks("member_profile_end"); eval("\$profile = \"".$templates->get("member_profile")."\";");
| $plugins->run_hooks("member_profile_end"); eval("\$profile = \"".$templates->get("member_profile")."\";");
|
Zeile 1707 | Zeile 1733 |
---|
{ $query = $db->simple_select("maillogs", "COUNT(*) AS sent_count", "fromuid='{$mybb->user['uid']}' AND dateline >= '".(TIME_NOW - (60*60*24))."'"); $sent_count = $db->fetch_field($query, "sent_count");
|
{ $query = $db->simple_select("maillogs", "COUNT(*) AS sent_count", "fromuid='{$mybb->user['uid']}' AND dateline >= '".(TIME_NOW - (60*60*24))."'"); $sent_count = $db->fetch_field($query, "sent_count");
|
if($sent_count > $mybb->usergroup['maxemails'])
| 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);
| { $lang->error_max_emails_day = $lang->sprintf($lang->error_max_emails_day, $mybb->usergroup['maxemails']); error($lang->error_max_emails_day);
|