Zeile 17 | Zeile 17 |
---|
$templatelist = "member_register,member_register_hiddencaptcha,member_register_coppa,member_register_agreement_coppa,member_register_agreement,member_register_customfield,member_register_requiredfields,member_profile_findthreads"; $templatelist .= ",member_loggedin_notice,member_profile_away,member_register_regimage,member_register_regimage_recaptcha_invisible,member_register_regimage_nocaptcha,post_captcha_hcaptcha_invisible,post_captcha_hcaptcha,post_captcha_hidden,post_captcha,member_register_referrer";
|
$templatelist = "member_register,member_register_hiddencaptcha,member_register_coppa,member_register_agreement_coppa,member_register_agreement,member_register_customfield,member_register_requiredfields,member_profile_findthreads"; $templatelist .= ",member_loggedin_notice,member_profile_away,member_register_regimage,member_register_regimage_recaptcha_invisible,member_register_regimage_nocaptcha,post_captcha_hcaptcha_invisible,post_captcha_hcaptcha,post_captcha_hidden,post_captcha,member_register_referrer";
|
$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_manageban,member_profile_adminoptions,member_profile";
| $templatelist .= ",member_profile_email,member_profile_offline,member_profile_reputation,member_profile_warn,member_profile_warninglevel,member_profile_warninglevel_link,member_profile_customfields_field,member_profile_customfields,member_profile_adminoptions_manageban,member_profile_adminoptions,member_profile";
|
$templatelist .= ",member_profile_signature,member_profile_avatar,member_profile_groupimage,member_referrals_link,member_profile_referrals,member_profile_website,member_profile_reputation_vote,member_activate,member_lostpw,member_register_additionalfields"; $templatelist .= ",member_profile_modoptions_manageuser,member_profile_modoptions_editprofile,member_profile_modoptions_banuser,member_profile_modoptions_viewnotes,member_profile_modoptions_editnotes,member_profile_modoptions_purgespammer"; $templatelist .= ",usercp_profile_profilefields_select_option,usercp_profile_profilefields_multiselect,usercp_profile_profilefields_select,usercp_profile_profilefields_textarea,usercp_profile_profilefields_radio,member_viewnotes";
| $templatelist .= ",member_profile_signature,member_profile_avatar,member_profile_groupimage,member_referrals_link,member_profile_referrals,member_profile_website,member_profile_reputation_vote,member_activate,member_lostpw,member_register_additionalfields"; $templatelist .= ",member_profile_modoptions_manageuser,member_profile_modoptions_editprofile,member_profile_modoptions_banuser,member_profile_modoptions_viewnotes,member_profile_modoptions_editnotes,member_profile_modoptions_purgespammer"; $templatelist .= ",usercp_profile_profilefields_select_option,usercp_profile_profilefields_multiselect,usercp_profile_profilefields_select,usercp_profile_profilefields_textarea,usercp_profile_profilefields_radio,member_viewnotes";
|
Zeile 31 | Zeile 31 |
---|
require_once MYBB_ROOT."inc/functions_post.php"; require_once MYBB_ROOT."inc/functions_user.php"; require_once MYBB_ROOT."inc/class_parser.php";
|
require_once MYBB_ROOT."inc/functions_post.php"; require_once MYBB_ROOT."inc/functions_user.php"; require_once MYBB_ROOT."inc/class_parser.php";
|
| require_once MYBB_ROOT."inc/functions_modcp.php";
|
$parser = new postParser;
// Load global language phrases
| $parser = new postParser;
// Load global language phrases
|
Zeile 89 | Zeile 90 |
---|
} }
|
} }
|
| $fromreg = 0;
|
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");
|
Zeile 300 | Zeile 302 |
---|
$db->update_query("questions", $update_question, "qid='{$question['qid']}'"); }
|
$db->update_query("questions", $update_question, "qid='{$question['qid']}'"); }
|
$db->delete_query("questionsessions", "sid='{$sid}'");
| $db->delete_query("questionsessions", "sid='{$question_id}'");
|
} }
|
} }
|
| $regerrors = '';
|
if(!empty($errors)) { $username = htmlspecialchars_uni($mybb->get_input('username'));
| if(!empty($errors)) { $username = htmlspecialchars_uni($mybb->get_input('username'));
|
Zeile 597 | Zeile 600 |
---|
// Verify if we have permissions to access user-users require_once MYBB_ROOT.$mybb->config['admin_dir']."/modules/user/module_meta.php";
|
// Verify if we have permissions to access user-users require_once MYBB_ROOT.$mybb->config['admin_dir']."/modules/user/module_meta.php";
|
if(function_exists("user_admin_permissions")) {
| |
// Get admin permissions $adminperms = get_admin_permissions($recipient['uid']);
|
// Get admin permissions $adminperms = get_admin_permissions($recipient['uid']);
|
$permissions = user_admin_permissions(); if(array_key_exists('users', $permissions['permissions']) && $adminperms['user']['users'] != 1)
| if(empty($adminperms['user']['users']) || $adminperms['user']['users'] != 1)
|
{ continue; // No permissions }
|
{ continue; // No permissions }
|
}
| |
}
// Load language
| }
// Load language
|
Zeile 841 | Zeile 839 |
---|
$ref['username'] = htmlspecialchars_uni($ref['username']); $referrername = $ref['username']; }
|
$ref['username'] = htmlspecialchars_uni($ref['username']); $referrername = $ref['username']; }
|
elseif(isset($referrer))
| elseif(!empty($referrer))
|
{ $query = $db->simple_select("users", "username", "uid='".(int)$referrer['uid']."'"); $ref = $db->fetch_array($query);
| { $query = $db->simple_select("users", "username", "uid='".(int)$referrer['uid']."'"); $ref = $db->fetch_array($query);
|
Zeile 903 | Zeile 901 |
---|
$code = $select = $val = $options = $expoptions = $useropts = ''; $seloptions = array(); $profilefield['type'] = htmlspecialchars_uni($profilefield['type']);
|
$code = $select = $val = $options = $expoptions = $useropts = ''; $seloptions = array(); $profilefield['type'] = htmlspecialchars_uni($profilefield['type']);
|
$thing = explode("\n", $profilefield['type'], "2");
| $thing = explode("\n", $profilefield['type'], 2);
|
$type = trim($thing[0]);
|
$type = trim($thing[0]);
|
$options = $thing[1];
| $options = isset($thing[1]) ? $thing[1] : null;
|
$select = ''; $field = "fid{$profilefield['fid']}"; $profilefield['description'] = htmlspecialchars_uni($profilefield['description']); $profilefield['name'] = htmlspecialchars_uni($profilefield['name']);
|
$select = ''; $field = "fid{$profilefield['fid']}"; $profilefield['description'] = htmlspecialchars_uni($profilefield['description']); $profilefield['name'] = htmlspecialchars_uni($profilefield['name']);
|
if($errors && isset($mybb->input['profile_fields'][$field]))
| if(!empty($errors) && isset($mybb->input['profile_fields'][$field]))
|
{ $userfield = $mybb->input['profile_fields'][$field]; }
| { $userfield = $mybb->input['profile_fields'][$field]; }
|
Zeile 920 | Zeile 918 |
---|
} if($type == "multiselect") {
|
} if($type == "multiselect") {
|
if($errors)
| if(!empty($errors))
|
{ $useropts = $userfield; }
| { $useropts = $userfield; }
|
Zeile 1003 | Zeile 1001 |
---|
} elseif($type == "checkbox") {
|
} elseif($type == "checkbox") {
|
if($errors)
| if(!empty($errors))
|
{ $useropts = $userfield; }
| { $useropts = $userfield; }
|
Zeile 1080 | Zeile 1078 |
---|
} }
|
} }
|
if(!isset($fromreg))
| if(!isset($fromreg) || $fromreg == 0)
|
{ $allownoticescheck = "checked=\"checked\""; $hideemailcheck = '';
| { $allownoticescheck = "checked=\"checked\""; $hideemailcheck = '';
|
Zeile 1099 | Zeile 1097 |
---|
} // Spambot registration image thingy $captcha_html = 0;
|
} // Spambot registration image thingy $captcha_html = 0;
|
| $regimage = '';
|
if($mybb->settings['captchaimage']) { require_once MYBB_ROOT.'inc/class_captcha.php';
| if($mybb->settings['captchaimage']) { require_once MYBB_ROOT.'inc/class_captcha.php';
|
Zeile 1124 | Zeile 1123 |
---|
WHERE q.active='1' AND s.sid='{$sid}' "); if($db->num_rows($query) > 0)
|
WHERE q.active='1' AND s.sid='{$sid}' "); if($db->num_rows($query) > 0)
|
{
| {
|
$question_exists = 1; $question = $db->fetch_array($query);
| $question_exists = 1; $question = $db->fetch_array($query);
|
Zeile 1155 | Zeile 1154 |
---|
}
eval("\$questionbox = \"".$templates->get("member_register_question")."\";");
|
}
eval("\$questionbox = \"".$templates->get("member_register_question")."\";");
|
}
| }
|
}
$hiddencaptcha = '';
| }
$hiddencaptcha = '';
|
Zeile 1170 | Zeile 1169 |
---|
{ // JS validator extra $lang->js_validator_password_length = $lang->sprintf($lang->js_validator_password_length, $mybb->settings['minpasswordlength']);
|
{ // JS validator extra $lang->js_validator_password_length = $lang->sprintf($lang->js_validator_password_length, $mybb->settings['minpasswordlength']);
|
|
|
// 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) {
|
Zeile 1178 | Zeile 1177 |
---|
} eval("\$passboxes = \"".$templates->get("member_register_password")."\";"); }
|
} eval("\$passboxes = \"".$templates->get("member_register_password")."\";"); }
|
|
|
$languages = $lang->get_languages(); $langoptions = $boardlanguage = ''; if(count($languages) > 1)
| $languages = $lang->get_languages(); $langoptions = $boardlanguage = ''; if(count($languages) > 1)
|
Zeile 1186 | Zeile 1185 |
---|
foreach($languages as $name => $language) { $language = htmlspecialchars_uni($language);
|
foreach($languages as $name => $language) { $language = htmlspecialchars_uni($language);
|
|
|
$sel = ''; if($mybb->get_input('language') == $name) {
| $sel = ''; if($mybb->get_input('language') == $name) {
|
Zeile 1195 | Zeile 1194 |
---|
eval('$langoptions .= "'.$templates->get('usercp_options_language_option').'";'); }
|
eval('$langoptions .= "'.$templates->get('usercp_options_language_option').'";'); }
|
|
|
eval('$boardlanguage = "'.$templates->get('member_register_language').'";'); }
| eval('$boardlanguage = "'.$templates->get('member_register_language').'";'); }
|
Zeile 1203 | Zeile 1202 |
---|
$time = TIME_NOW;
$plugins->run_hooks("member_register_end");
|
$time = TIME_NOW;
$plugins->run_hooks("member_register_end");
|
|
|
$jsvar_reqfields = json_encode($jsvar_reqfields);
$validator_javascript = "<script type=\"text/javascript\">
| $jsvar_reqfields = json_encode($jsvar_reqfields);
$validator_javascript = "<script type=\"text/javascript\">
|
Zeile 1220 | Zeile 1219 |
---|
regtype: '{$mybb->settings['regtype']}', hiddencaptchaimage: '{$mybb->settings['hiddencaptchaimage']}' };
|
regtype: '{$mybb->settings['regtype']}', hiddencaptchaimage: '{$mybb->settings['hiddencaptchaimage']}' };
|
| lang.js_validator_no_username = '{$lang->js_validator_no_username}';
|
lang.js_validator_username_length = '{$lang->js_validator_username_length}'; lang.js_validator_invalid_email = '{$lang->js_validator_invalid_email}'; lang.js_validator_email_match = '{$lang->js_validator_email_match}';
| lang.js_validator_username_length = '{$lang->js_validator_username_length}'; lang.js_validator_invalid_email = '{$lang->js_validator_invalid_email}'; lang.js_validator_email_match = '{$lang->js_validator_email_match}';
|
Zeile 1280 | Zeile 1280 |
---|
if(!$activation['uid']) { error($lang->error_alreadyactivated);
|
if(!$activation['uid']) { error($lang->error_alreadyactivated);
|
}
| }
|
if($activation['code'] !== $mybb->get_input('code')) { error($lang->error_badactivationcode);
| if($activation['code'] !== $mybb->get_input('code')) { error($lang->error_badactivationcode);
|
Zeile 1375 | Zeile 1375 |
---|
LEFT JOIN ".TABLE_PREFIX."awaitingactivation a ON (a.uid=u.uid AND (a.type='r' OR a.type='b')) WHERE u.email='".$db->escape_string($mybb->get_input('email'))."' ");
|
LEFT JOIN ".TABLE_PREFIX."awaitingactivation a ON (a.uid=u.uid AND (a.type='r' OR a.type='b')) WHERE u.email='".$db->escape_string($mybb->get_input('email'))."' ");
|
$numusers = $db->num_rows($query); if($numusers < 1) { error($lang->error_invalidemail); } else { if(count($errors) == 0) { while($user = $db->fetch_array($query)) {
| $numusers = $db->num_rows($query); if($numusers < 1) { error($lang->error_invalidemail); } else { if(count($errors) == 0) { while($user = $db->fetch_array($query)) {
|
if($user['type'] == "b" && $user['validated'] == 1) { error($lang->error_activated_by_admin);
| if($user['type'] == "b" && $user['validated'] == 1) { error($lang->error_activated_by_admin);
|
Zeile 1512 | Zeile 1512 |
---|
} }
|
} }
|
$email = $db->escape_string($email);
| |
$query = $db->simple_select("users", "*", "email='".$db->escape_string($mybb->get_input('email'))."'"); $numusers = $db->num_rows($query); if($numusers < 1)
| $query = $db->simple_select("users", "*", "email='".$db->escape_string($mybb->get_input('email'))."'"); $numusers = $db->num_rows($query); if($numusers < 1)
|
Zeile 1762 | Zeile 1761 |
---|
);
$user_loginattempts = get_user_by_username($user['username'], $options);
|
);
$user_loginattempts = get_user_by_username($user['username'], $options);
|
$user['loginattempts'] = (int)$user_loginattempts['loginattempts'];
| if(!empty($user_loginattempts)) { $user['loginattempts'] = (int)$user_loginattempts['loginattempts']; }
|
$loginhandler->set_data($user); $validated = $loginhandler->validate_login();
|
$loginhandler->set_data($user); $validated = $loginhandler->validate_login();
|
|
|
if(!$validated) { $mybb->input['action'] = "login"; $mybb->request_method = "get";
|
if(!$validated) { $mybb->input['action'] = "login"; $mybb->request_method = "get";
|
$login_user = get_user_by_username($user['username'], array('fields' => 'uid'));
// Is a fatal call if user has had too many tries $logins = login_attempt_check($login_user['uid']);
$db->update_query("users", array('loginattempts' => 'loginattempts+1'), "uid='".(int)$loginhandler->login_data['uid']."'", 1, true);
| $login_user_uid = 0; if(!empty($loginhandler->login_data)) { $login_user_uid = (int)$loginhandler->login_data['uid']; $user['loginattempts'] = (int)$loginhandler->login_data['loginattempts']; }
// Is a fatal call if user has had too many tries $logins = login_attempt_check($login_user_uid);
|
|
|
$errors = $loginhandler->get_friendly_errors();
| $db->update_query("users", array('loginattempts' => 'loginattempts+1'), "uid='".$login_user_uid."'", 1, true);
|
|
|
$user['loginattempts'] = (int)$loginhandler->login_data['loginattempts'];
| $errors = $loginhandler->get_friendly_errors();
|
// If we need a captcha set it here
|
// If we need a captcha set it here
|
if($mybb->settings['failedcaptchalogincount'] > 0 && ($user['loginattempts'] > $mybb->settings['failedcaptchalogincount'] || (int)$mybb->cookies['loginattempts'] > $mybb->settings['failedcaptchalogincount']))
| if( $mybb->settings['failedcaptchalogincount'] > 0 && ( ( isset($user['loginattempts']) && $user['loginattempts'] > $mybb->settings['failedcaptchalogincount'] ) || ( isset($mybb->cookies['loginattempts']) && (int)$mybb->cookies['loginattempts'] > $mybb->settings['failedcaptchalogincount'] ) ) )
|
{ $do_captcha = true; $correct = $loginhandler->captcha_verified;
| { $do_captcha = true; $correct = $loginhandler->captcha_verified;
|
Zeile 1870 | Zeile 1887 |
---|
require_once MYBB_ROOT.'inc/class_captcha.php'; $login_captcha = new captcha(false, "post_captcha");
|
require_once MYBB_ROOT.'inc/class_captcha.php'; $login_captcha = new captcha(false, "post_captcha");
|
if($login_captcha->type == 1)
| if($login_captcha->type == captcha::DEFAULT_CAPTCHA)
|
{ if(!$correct) {
| { if(!$correct) {
|
Zeile 1881 | Zeile 1898 |
---|
$captcha = $login_captcha->build_hidden_captcha(); } }
|
$captcha = $login_captcha->build_hidden_captcha(); } }
|
elseif(in_array($login_captcha->type, array(4, 5, 8)))
| elseif(in_array($login_captcha->type, array(captcha::NOCAPTCHA_RECAPTCHA, captcha::RECAPTCHA_INVISIBLE, captcha::RECAPTCHA_V3)))
|
{ $login_captcha->build_recaptcha(); }
|
{ $login_captcha->build_recaptcha(); }
|
elseif(in_array($login_captcha->type, array(6, 7)))
| elseif(in_array($login_captcha->type, array(captcha::HCAPTCHA, captcha::HCAPTCHA_INVISIBLE)))
|
{ $login_captcha->build_hcaptcha(); }
| { $login_captcha->build_hcaptcha(); }
|
Zeile 2132 | Zeile 2149 |
---|
$sig_parser['nofollow_on'] = 1; }
|
$sig_parser['nofollow_on'] = 1; }
|
if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)
| if($mybb->user['uid'] != 0 && $mybb->user['showimages'] != 1 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)
|
{ $sig_parser['allow_imgcode'] = 0; }
| { $sig_parser['allow_imgcode'] = 0; }
|
Zeile 2328 | Zeile 2345 |
---|
}
// Get the user title for this user
|
}
// Get the user title for this user
|
unset($usertitle);
| |
unset($stars);
|
unset($stars);
|
| $usertitle = '';
|
$starimage = ''; if(trim($memprofile['usertitle']) != '') {
| $starimage = ''; if(trim($memprofile['usertitle']) != '') {
|
Zeile 2343 | Zeile 2360 |
---|
} else {
|
} else {
|
| if(!isset($usertitles)) { $usertitles = $cache->read('usertitles'); }
|
// No usergroup title so get a default one
|
// No usergroup title so get a default one
|
$usertitles = $cache->read('usertitles');
| |
if(is_array($usertitles)) { foreach($usertitles as $title)
| if(is_array($usertitles)) { foreach($usertitles as $title)
|
Zeile 2353 | Zeile 2373 |
---|
if($memprofile['postnum'] >= $title['posts']) { $usertitle = $title['title'];
|
if($memprofile['postnum'] >= $title['posts']) { $usertitle = $title['title'];
|
$stars = $title['stars']; $starimage = $title['starimage'];
break;
| $stars = $title['stars']; $starimage = $title['starimage'];
break;
|
} } } }
|
} } } }
|
|
|
$usertitle = htmlspecialchars_uni($usertitle);
if($memperms['stars'] || $memperms['usertitle']) { // Set the number of stars if display group has constant number of stars
|
$usertitle = htmlspecialchars_uni($usertitle);
if($memperms['stars'] || $memperms['usertitle']) { // Set the number of stars if display group has constant number of stars
|
$stars = $memperms['stars']; } elseif(!$stars)
| $stars = $memperms['stars']; } elseif(!isset($stars))
|
{
|
{
|
if(!is_array($usertitles))
| if(!isset($usertitles))
|
{ $usertitles = $cache->read('usertitles'); }
| { $usertitles = $cache->read('usertitles'); }
|
Zeile 2388 | Zeile 2408 |
---|
break; } }
|
break; } }
|
| }
if(!isset($stars)) { $stars = 0;
|
} }
| } }
|
Zeile 2405 | Zeile 2430 |
---|
$memperms['image'] = str_replace("{lang}", $language, $memperms['image']); $memperms['image'] = str_replace("{theme}", $theme['imgdir'], $memperms['image']); eval("\$groupimage = \"".$templates->get("member_profile_groupimage")."\";");
|
$memperms['image'] = str_replace("{lang}", $language, $memperms['image']); $memperms['image'] = str_replace("{theme}", $theme['imgdir'], $memperms['image']); eval("\$groupimage = \"".$templates->get("member_profile_groupimage")."\";");
|
}
| }
|
if(empty($starimage))
|
if(empty($starimage))
|
{
| {
|
$starimage = $memperms['starimage']; }
| $starimage = $memperms['starimage']; }
|
Zeile 2418 | Zeile 2443 |
---|
$starimage = str_replace("{theme}", $theme['imgdir'], $starimage); $userstars = ''; for($i = 0; $i < $stars; ++$i)
|
$starimage = str_replace("{theme}", $theme['imgdir'], $starimage); $userstars = ''; for($i = 0; $i < $stars; ++$i)
|
{
| {
|
eval("\$userstars .= \"".$templates->get("member_profile_userstar", 1, 0)."\";"); } }
| eval("\$userstars .= \"".$templates->get("member_profile_userstar", 1, 0)."\";"); } }
|
Zeile 2442 | Zeile 2467 |
---|
else { $memlastvisitdate = my_date('relative', $last_seen);
|
else { $memlastvisitdate = my_date('relative', $last_seen);
|
|
|
if($memprofile['timeonline'] > 0) { $timeonline = nice_time($memprofile['timeonline']);
| if($memprofile['timeonline'] > 0) { $timeonline = nice_time($memprofile['timeonline']);
|
Zeile 2457 | Zeile 2482 |
---|
$activity = fetch_wol_activity($session['location'], $session['nopermission']); $location = build_friendly_wol_location($activity); $location_time = my_date($mybb->settings['timeformat'], $last_seen);
|
$activity = fetch_wol_activity($session['location'], $session['nopermission']); $location = build_friendly_wol_location($activity); $location_time = my_date($mybb->settings['timeformat'], $last_seen);
|
|
|
eval("\$online_status = \"".$templates->get("member_profile_online")."\";"); } }
|
eval("\$online_status = \"".$templates->get("member_profile_online")."\";"); } }
|
}
| }
|
if(!isset($online_status)) {
| if(!isset($online_status)) {
|
Zeile 2474 | Zeile 2499 |
---|
// Build Referral $referrals = ''; if($mybb->settings['usereferrals'] == 1)
|
// Build Referral $referrals = ''; if($mybb->settings['usereferrals'] == 1)
|
{ $bg_color = alt_trow();
| { $bg_color = alt_trow();
|
$uid = (int) $memprofile['uid']; $referral_count = $memprofile['referrals'];
| $uid = (int) $memprofile['uid']; $referral_count = $memprofile['referrals'];
|
Zeile 2499 | Zeile 2524 |
---|
{ eval("\$vote_link = \"".$templates->get("member_profile_reputation_vote")."\";"); }
|
{ eval("\$vote_link = \"".$templates->get("member_profile_reputation_vote")."\";"); }
|
|
|
eval("\$reputation = \"".$templates->get("member_profile_reputation")."\";"); }
| eval("\$reputation = \"".$templates->get("member_profile_reputation")."\";"); }
|
Zeile 2507 | Zeile 2532 |
---|
if($mybb->settings['enablewarningsystem'] != 0 && $memperms['canreceivewarnings'] != 0 && ($mybb->usergroup['canwarnusers'] != 0 || ($mybb->user['uid'] == $memprofile['uid'] && $mybb->settings['canviewownwarning'] != 0))) { $bg_color = alt_trow();
|
if($mybb->settings['enablewarningsystem'] != 0 && $memperms['canreceivewarnings'] != 0 && ($mybb->usergroup['canwarnusers'] != 0 || ($mybb->user['uid'] == $memprofile['uid'] && $mybb->settings['canviewownwarning'] != 0))) { $bg_color = alt_trow();
|
|
|
if($mybb->settings['maxwarningpoints'] < 1) { $mybb->settings['maxwarningpoints'] = 10;
|
if($mybb->settings['maxwarningpoints'] < 1) { $mybb->settings['maxwarningpoints'] = 10;
|
}
$warning_level = round($memprofile['warningpoints']/$mybb->settings['maxwarningpoints']*100);
| }
$warning_level = round($memprofile['warningpoints']/$mybb->settings['maxwarningpoints']*100);
|
if($warning_level > 100)
|
if($warning_level > 100)
|
{
| {
|
$warning_level = 100;
|
$warning_level = 100;
|
}
| }
|
|
|
$warn_user = ''; $warning_link = 'usercp.php';
| |
$warning_level = get_colored_warning_level($warning_level);
|
$warning_level = get_colored_warning_level($warning_level);
|
if($mybb->usergroup['canwarnusers'] != 0 && $memprofile['uid'] != $mybb->user['uid'])
| if($mybb->usergroup['canwarnusers'] != 0)
|
{ eval("\$warn_user = \"".$templates->get("member_profile_warn")."\";");
|
{ eval("\$warn_user = \"".$templates->get("member_profile_warn")."\";");
|
$warning_link = "warnings.php?uid={$memprofile['uid']}";
| eval("\$warning_level = \"".$templates->get("member_profile_warninglevel_link")."\";"); } else { eval("\$warning_level = \"".$templates->get("member_profile_warninglevel")."\";");
|
}
|
}
|
eval("\$warning_level = \"".$templates->get("member_profile_warninglevel")."\";");
| |
}
$bgcolor = $alttrow = 'trow1';
| }
$bgcolor = $alttrow = 'trow1';
|
Zeile 2595 | Zeile 2620 |
---|
$parser_options['nl2br'] = 0; }
|
$parser_options['nl2br'] = 0; }
|
if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)
| if($mybb->user['uid'] != 0 && $mybb->user['showimages'] != 1 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)
|
{ $parser_options['allow_imgcode'] = 0; }
| { $parser_options['allow_imgcode'] = 0; }
|
Zeile 2609 | Zeile 2634 |
---|
$customfield['name'] = htmlspecialchars_uni($customfield['name']); eval("\$customfields .= \"".$templates->get("member_profile_customfields_field")."\";"); $bgcolor = alt_trow();
|
$customfield['name'] = htmlspecialchars_uni($customfield['name']); eval("\$customfields .= \"".$templates->get("member_profile_customfields_field")."\";"); $bgcolor = alt_trow();
|
} } }
| } } }
|
if($customfields)
|
if($customfields)
|
{
| {
|
eval("\$profilefields = \"".$templates->get("member_profile_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), $post_percent);
| $memprofile['postnum'] = my_number_format($memprofile['postnum']); $lang->ppd_percent_total = $lang->sprintf($lang->ppd_percent_total, my_number_format($ppd), $post_percent);
|
Zeile 2625 | Zeile 2650 |
---|
$lang->tpd_percent_total = $lang->sprintf($lang->tpd_percent_total, my_number_format($tpd), $thread_percent);
$formattedname = format_name($memprofile['username'], $memprofile['usergroup'], $memprofile['displaygroup']);
|
$lang->tpd_percent_total = $lang->sprintf($lang->tpd_percent_total, my_number_format($tpd), $thread_percent);
$formattedname = format_name($memprofile['username'], $memprofile['usergroup'], $memprofile['displaygroup']);
|
|
|
$bannedbit = ''; if($memperms['isbannedgroup'] == 1 && $mybb->usergroup['canbanusers'] == 1) { // Fetch details on their ban $query = $db->simple_select('banned b LEFT JOIN '.TABLE_PREFIX.'users a ON (b.admin=a.uid)', 'b.*, a.username AS adminuser', "b.uid='{$uid}'", array('limit' => 1));
|
$bannedbit = ''; if($memperms['isbannedgroup'] == 1 && $mybb->usergroup['canbanusers'] == 1) { // Fetch details on their ban $query = $db->simple_select('banned b LEFT JOIN '.TABLE_PREFIX.'users a ON (b.admin=a.uid)', 'b.*, a.username AS adminuser', "b.uid='{$uid}'", array('limit' => 1));
|
$memban = $db->fetch_array($query);
if($memban['reason']) { $memban['reason'] = htmlspecialchars_uni($parser->parse_badwords($memban['reason'])); } else { $memban['reason'] = $lang->na; }
if($memban['lifted'] == 'perm' || $memban['lifted'] == '' || $memban['bantime'] == 'perm' || $memban['bantime'] == '---') { $banlength = $lang->permanent; $timeremaining = $lang->na; } else { // Set up the array of ban times. $bantimes = fetch_ban_times();
$banlength = $bantimes[$memban['bantime']]; $remaining = $memban['lifted']-TIME_NOW;
$timeremaining = nice_time($remaining, array('short' => 1, 'seconds' => false))."";
| |
|
|
$banned_class = ''; if($remaining < 3600) { $banned_class = "high_banned"; } else if($remaining < 86400)
| if($db->num_rows($query)) { $memban = $db->fetch_array($query);
if($memban['reason']) { $memban['reason'] = htmlspecialchars_uni($parser->parse_badwords($memban['reason'])); } else { $memban['reason'] = $lang->na; }
if($memban['lifted'] == 'perm' || $memban['lifted'] == '' || $memban['bantime'] == 'perm' || $memban['bantime'] == '---')
|
{
|
{
|
$banned_class = "moderate_banned"; } else if($remaining < 604800) { $banned_class = "low_banned";
| $banlength = $lang->permanent; $timeremaining = $lang->na; $banned_class = "normal_banned";
|
} else {
|
} else {
|
$banned_class = "normal_banned";
| // Set up the array of ban times. $bantimes = fetch_ban_times();
$banlength = $bantimes[$memban['bantime']]; $remaining = $memban['lifted']-TIME_NOW;
$timeremaining = nice_time($remaining, array('short' => 1, 'seconds' => false))."";
$banned_class = ''; if($remaining < 3600) { $banned_class = "high_banned"; } else if($remaining < 86400) { $banned_class = "moderate_banned"; } else if($remaining < 604800) { $banned_class = "low_banned"; } else { $banned_class = "normal_banned"; }
|
}
|
}
|
| |
eval('$timeremaining = "'.$templates->get('member_profile_banned_remaining').'";');
|
eval('$timeremaining = "'.$templates->get('member_profile_banned_remaining').'";');
|
}
$memban['adminuser'] = build_profile_link(htmlspecialchars_uni($memban['adminuser']), $memban['admin']);
| |
|
|
// Display a nice warning to the user eval('$bannedbit = "'.$templates->get('member_profile_banned').'";');
| $memban['adminuser'] = build_profile_link(htmlspecialchars_uni($memban['adminuser']), $memban['admin']);
// Display a nice warning to the user eval('$bannedbit = "'.$templates->get('member_profile_banned').'";'); } else { // TODO: more specific output for converted/merged boards where no ban record is merged. $bannedbit = ''; }
|
}
$adminoptions = '';
| }
$adminoptions = '';
|
Zeile 2724 | Zeile 2758 |
---|
$memprofile['usernotes'] = $lang->no_usernotes; }
|
$memprofile['usernotes'] = $lang->no_usernotes; }
|
if($mybb->usergroup['caneditprofiles'] == 1)
| if($mybb->usergroup['caneditprofiles'] == 1 && modcp_can_manage_user($memprofile['uid']))
|
{
|
{
|
eval("\$editprofile = \"".$templates->get("member_profile_modoptions_editprofile")."\";"); eval("\$editnotes = \"".$templates->get("member_profile_modoptions_editnotes")."\";"); }
if($mybb->usergroup['canbanusers'] == 1 && (!$memban['uid'] || $memban['uid'] && ($mybb->user['uid'] == $memban['admin']) || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['cancp'] == 1)) { if($memperms['isbannedgroup'] == 1 && $mybb->usergroup['canbanusers'] == 1)
| if(modcp_can_manage_user($memprofile['uid']))
|
{
|
{
|
eval("\$manageban = \"".$templates->get("member_profile_modoptions_manageban")."\";");
| eval("\$editprofile = \"".$templates->get("member_profile_modoptions_editprofile")."\";"); eval("\$editnotes = \"".$templates->get("member_profile_modoptions_editnotes")."\";");
|
}
|
}
|
else
| }
if($memperms['isbannedgroup'] == 1 && $mybb->usergroup['canbanusers'] == 1 && modcp_can_manage_user($memprofile['uid'])) { eval("\$manageban = \"".$templates->get("member_profile_modoptions_manageban")."\";"); } elseif(modcp_can_manage_user($memprofile['uid']) && $mybb->usergroup['canbanusers'] == 1) { if(modcp_can_manage_user($memprofile['uid']) && $mybb->usergroup['canbanusers'] == 1)
|
{ eval("\$banuser = \"".$templates->get("member_profile_modoptions_banuser")."\";"); } }
|
{ eval("\$banuser = \"".$templates->get("member_profile_modoptions_banuser")."\";"); } }
|
| $purgespammer = '';
|
if($can_purge_spammer) { eval("\$purgespammer = \"".$templates->get('member_profile_modoptions_purgespammer')."\";");
| if($can_purge_spammer) { eval("\$purgespammer = \"".$templates->get('member_profile_modoptions_purgespammer')."\";");
|