"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Upload/member.php" between
mybb_1822.zip and mybb_1823.zip

About: MyBB is a multilingual, standards-compliant and free forum (discussion board) software.

member.php  (mybb_1822):member.php  (mybb_1823)
skipping to change at line 19 skipping to change at line 19
*/ */
define("IN_MYBB", 1); define("IN_MYBB", 1);
define("IGNORE_CLEAN_VARS", "sid"); define("IGNORE_CLEAN_VARS", "sid");
define('THIS_SCRIPT', 'member.php'); define('THIS_SCRIPT', 'member.php');
define("ALLOWABLE_PAGE", "register,do_register,login,do_login,logout,lostpw,do_l ostpw,activate,resendactivation,do_resendactivation,resetpassword,viewnotes"); define("ALLOWABLE_PAGE", "register,do_register,login,do_login,logout,lostpw,do_l ostpw,activate,resendactivation,do_resendactivation,resetpassword,viewnotes");
$nosession['avatar'] = 1; $nosession['avatar'] = 1;
$templatelist = "member_register,member_register_hiddencaptcha,member_register_c oppa,member_register_agreement_coppa,member_register_agreement,member_register_c ustomfield,member_register_requiredfields,member_profile_findthreads"; $templatelist = "member_register,member_register_hiddencaptcha,member_register_c oppa,member_register_agreement_coppa,member_register_agreement,member_register_c ustomfield,member_register_requiredfields,member_profile_findthreads";
$templatelist .= ",member_loggedin_notice,member_profile_away,member_register_re $templatelist .= ",member_loggedin_notice,member_profile_away,member_register_re
gimage,member_register_regimage_recaptcha_invisible,member_register_regimage_noc gimage,member_register_regimage_recaptcha_invisible,member_register_regimage_noc
aptcha,post_captcha_hidden,post_captcha,member_register_referrer"; aptcha,post_captcha_hcaptcha_invisible,post_captcha_hcaptcha,post_captcha_hidden
$templatelist .= ",member_profile_email,member_profile_offline,member_profile_re ,post_captcha,member_register_referrer";
putation,member_profile_warn,member_profile_warninglevel,member_profile_customfi $templatelist .= ",member_profile_email,member_profile_offline,member_profile_re
elds_field,member_profile_customfields,member_profile_adminoptions,member_profil putation,member_profile_warn,member_profile_warninglevel,member_profile_customfi
e"; elds_field,member_profile_customfields,member_profile_adminoptions_manageban,mem
$templatelist .= ",member_profile_signature,member_profile_avatar,member_profile ber_profile_adminoptions,member_profile";
_groupimage,member_profile_referrals,member_profile_website,member_profile_reput $templatelist .= ",member_profile_signature,member_profile_avatar,member_profile
ation_vote,member_activate,member_lostpw,member_register_additionalfields"; _groupimage,member_referrals_link,member_profile_referrals,member_profile_websit
e,member_profile_reputation_vote,member_activate,member_lostpw,member_register_a
dditionalfields";
$templatelist .= ",member_profile_modoptions_manageuser,member_profile_modoption s_editprofile,member_profile_modoptions_banuser,member_profile_modoptions_viewno tes,member_profile_modoptions_editnotes,member_profile_modoptions_purgespammer"; $templatelist .= ",member_profile_modoptions_manageuser,member_profile_modoption s_editprofile,member_profile_modoptions_banuser,member_profile_modoptions_viewno tes,member_profile_modoptions_editnotes,member_profile_modoptions_purgespammer";
$templatelist .= ",usercp_profile_profilefields_select_option,usercp_profile_pro filefields_multiselect,usercp_profile_profilefields_select,usercp_profile_profil efields_textarea,usercp_profile_profilefields_radio,member_viewnotes"; $templatelist .= ",usercp_profile_profilefields_select_option,usercp_profile_pro filefields_multiselect,usercp_profile_profilefields_select,usercp_profile_profil efields_textarea,usercp_profile_profilefields_radio,member_viewnotes";
$templatelist .= ",member_register_question,member_register_question_refresh,use rcp_options_timezone,usercp_options_timezone_option,usercp_options_language_opti on,member_profile_customfields_field_multi_item,member_profile_customfields_fiel d_multi"; $templatelist .= ",member_register_question,member_register_question_refresh,use rcp_options_timezone,usercp_options_timezone_option,usercp_options_language_opti on,member_profile_customfields_field_multi_item,member_profile_customfields_fiel d_multi";
$templatelist .= ",member_profile_contact_fields_google,member_profile_contact_f ields_icq,member_profile_contact_fields_skype,member_profile_pm,member_profile_c ontact_details,member_profile_modoptions_manageban"; $templatelist .= ",member_profile_contact_fields_google,member_profile_contact_f ields_icq,member_profile_contact_fields_skype,member_profile_pm,member_profile_c ontact_details,member_profile_modoptions_manageban";
$templatelist .= ",member_profile_banned_remaining,member_profile_addremove,memb er_emailuser_guest,member_register_day,usercp_options_tppselect_option,postbit_w arninglevel_formatted,member_profile_userstar,member_profile_findposts"; $templatelist .= ",member_profile_banned_remaining,member_profile_addremove,memb er_emailuser_guest,member_register_day,usercp_options_tppselect_option,postbit_w arninglevel_formatted,member_profile_userstar,member_profile_findposts";
$templatelist .= ",usercp_options_tppselect,usercp_options_pppselect,member_rese tpassword,member_login,member_profile_online,usercp_options_pppselect_option,pos tbit_reputation_formatted,member_emailuser,usercp_profile_profilefields_text"; $templatelist .= ",usercp_options_tppselect,usercp_options_pppselect,member_rese tpassword,member_login,member_profile_online,usercp_options_pppselect_option,pos tbit_reputation_formatted,member_emailuser,usercp_profile_profilefields_text";
$templatelist .= ",member_profile_modoptions_ipaddress,member_profile_modoptions ,member_profile_banned,member_register_language,member_resendactivation,usercp_p rofile_profilefields_checkbox,member_register_password,member_coppa_form"; $templatelist .= ",member_profile_modoptions_ipaddress,member_profile_modoptions ,member_profile_banned,member_register_language,member_resendactivation,usercp_p rofile_profilefields_checkbox,member_register_password,member_coppa_form";
require_once "./global.php"; require_once "./global.php";
require_once MYBB_ROOT."inc/functions_post.php"; require_once MYBB_ROOT."inc/functions_post.php";
skipping to change at line 793 skipping to change at line 793
else else
{ {
$plugins->run_hooks("member_register_start"); $plugins->run_hooks("member_register_start");
// JS validator extra // JS validator extra
if($mybb->settings['maxnamelength'] > 0 && $mybb->settings['minna melength'] > 0) if($mybb->settings['maxnamelength'] > 0 && $mybb->settings['minna melength'] > 0)
{ {
$lang->js_validator_username_length = $lang->sprintf($lan g->js_validator_username_length, $mybb->settings['minnamelength'], $mybb->settin gs['maxnamelength']); $lang->js_validator_username_length = $lang->sprintf($lan g->js_validator_username_length, $mybb->settings['minnamelength'], $mybb->settin gs['maxnamelength']);
} }
$validator_javascript = "<script type=\"text/javascript\">
$(function() {
$('#registration_form').validate({
rules: {
username: {
required: true,
minlength: {$mybb->settings['minnamelength']},
maxlength: {$mybb->settings['maxnamelength']},
remote: {
url: 'xmlhttp.php?action=username_availab
ility',
type: 'post',
dataType: 'json',
data:
{
my_post_key: my_post_key
},
},
},
email: {
required: true,
email: true,
remote: {
url: 'xmlhttp.php?action=email_availabili
ty',
type: 'post',
dataType: 'json',
data:
{
my_post_key: my_post_key
},
},
},
email2: {
required: true,
email: true,
equalTo: '#email'
},
},
messages: {
username: {
minlength: '{$lang->js_validator_username_length}
',
maxlength: '{$lang->js_validator_username_length}
',
},
email: '{$lang->js_validator_invalid_email}',
email2: '{$lang->js_validator_email_match}',
},
errorPlacement: function(error, element) {
if(element.is(':checkbox') || element.is(':radio'))
error.insertAfter($('input[name=\"' + element.att
r('name') + '\"]').last().next('span'));
else
error.insertAfter(element);
}
});\n";
if(isset($mybb->input['timezoneoffset'])) if(isset($mybb->input['timezoneoffset']))
{ {
$timezoneoffset = $mybb->get_input('timezoneoffset'); $timezoneoffset = $mybb->get_input('timezoneoffset');
} }
else else
{ {
$timezoneoffset = $mybb->settings['timezoneoffset']; $timezoneoffset = $mybb->settings['timezoneoffset'];
} }
$tzselect = build_timezone_select("timezoneoffset", $timezoneoffs et, true); $tzselect = build_timezone_select("timezoneoffset", $timezoneoffs et, true);
skipping to change at line 948 skipping to change at line 895
} }
else else
{ {
$usergroup = 2; $usergroup = 2;
} }
$pfcache = $cache->read('profilefields'); $pfcache = $cache->read('profilefields');
if(is_array($pfcache)) if(is_array($pfcache))
{ {
$jsvar_reqfields = array();
foreach($pfcache as $profilefield) foreach($pfcache as $profilefield)
{ {
if($profilefield['required'] != 1 && $profilefiel d['registration'] != 1 || !is_member($profilefield['editableby'], array('usergro up' => $mybb->user['usergroup'], 'additionalgroups' => $usergroup))) if($profilefield['required'] != 1 && $profilefiel d['registration'] != 1 || !is_member($profilefield['editableby'], array('usergro up' => $mybb->user['usergroup'], 'additionalgroups' => $usergroup)))
{ {
continue; continue;
} }
$code = $select = $val = $options = $expoptions = $useropts = ''; $code = $select = $val = $options = $expoptions = $useropts = '';
$seloptions = array(); $seloptions = array();
$profilefield['type'] = htmlspecialchars_uni($pro filefield['type']); $profilefield['type'] = htmlspecialchars_uni($pro filefield['type']);
skipping to change at line 1110 skipping to change at line 1058
} }
eval("\$code = \"".$templates->get("userc p_profile_profilefields_text")."\";"); eval("\$code = \"".$templates->get("userc p_profile_profilefields_text")."\";");
} }
if($profilefield['required'] == 1) if($profilefield['required'] == 1)
{ {
// JS validator extra, choose correct sel ectors for everything except single select which always has value // JS validator extra, choose correct sel ectors for everything except single select which always has value
if($type != 'select') if($type != 'select')
{ {
if($type == "textarea") $jsvar_reqfields[] = array(
{ 'type' => $type,
$inp_selector = "$('texta 'fid' => $field,
rea[name=\"profile_fields[{$field}]\"]')"; );
}
elseif($type == "multiselect")
{
$inp_selector = "$('selec
t[name=\"profile_fields[{$field}][]\"]')";
}
elseif($type == "checkbox")
{
$inp_selector = "$('input
[name=\"profile_fields[{$field}][]\"]')";
}
else
{
$inp_selector = "$('input
[name=\"profile_fields[{$field}]\"]')";
}
$validator_javascript .= "
{$inp_selector}.rules('add', {
required: true,
messages: {
required: '{$lang->js_validator_not_empty}'
}
});\n";
} }
eval("\$requiredfields .= \"".$templates- >get("member_register_customfield")."\";"); eval("\$requiredfields .= \"".$templates- >get("member_register_customfield")."\";");
} }
else else
{ {
eval("\$customfields .= \"".$templates->g et("member_register_customfield")."\";"); eval("\$customfields .= \"".$templates->g et("member_register_customfield")."\";");
} }
} }
skipping to change at line 1173 skipping to change at line 1101
if($mybb->settings['dstcorrection'] == 1) if($mybb->settings['dstcorrection'] == 1)
{ {
$enabledstcheck = "checked=\"checked\""; $enabledstcheck = "checked=\"checked\"";
} }
$no_auto_subscribe_selected = $instant_email_subscribe_se lected = $instant_pm_subscribe_selected = $no_subscribe_selected = ''; $no_auto_subscribe_selected = $instant_email_subscribe_se lected = $instant_pm_subscribe_selected = $no_subscribe_selected = '';
$dst_auto_selected = $dst_enabled_selected = $dst_disable d_selected = ''; $dst_auto_selected = $dst_enabled_selected = $dst_disable d_selected = '';
$username = $email = $email2 = ''; $username = $email = $email2 = '';
$regerrors = ''; $regerrors = '';
} }
// Spambot registration image thingy // Spambot registration image thingy
$captcha_html = 0;
if($mybb->settings['captchaimage']) if($mybb->settings['captchaimage'])
{ {
require_once MYBB_ROOT.'inc/class_captcha.php'; require_once MYBB_ROOT.'inc/class_captcha.php';
$captcha = new captcha(true, "member_register_regimage"); $captcha = new captcha(true, "member_register_regimage");
if($captcha->html) if($captcha->html)
{ {
$captcha_html = 1;
$regimage = $captcha->html; $regimage = $captcha->html;
if($mybb->settings['captchaimage'] == 1)
{
// JS validator extra for our default CAP
TCHA
$validator_javascript .= "
$('#imagestring').rules('add', {
required: true,
remote:{
url: 'xmlhttp.php?action=validate_captcha',
type: 'post',
dataType: 'json',
data:
{
imagehash: function () {
return $('#imagehash').val();
},
my_post_key: my_post_key
},
},
messages: {
remote: '{$lang->js_validator_no_image_text}'
}
});\n";
}
} }
} }
// Security Question // Security Question
$questionbox = ''; $questionbox = '';
$question_exists = 0;
if($mybb->settings['securityquestion']) if($mybb->settings['securityquestion'])
{ {
$sid = generate_question(); $sid = generate_question();
$query = $db->query(" $query = $db->query("
SELECT q.question, s.sid SELECT q.question, s.sid
FROM ".TABLE_PREFIX."questionsessions s FROM ".TABLE_PREFIX."questionsessions s
LEFT JOIN ".TABLE_PREFIX."questions q ON (q.qid=s .qid) LEFT JOIN ".TABLE_PREFIX."questions q ON (q.qid=s .qid)
WHERE q.active='1' AND s.sid='{$sid}' WHERE q.active='1' AND s.sid='{$sid}'
"); ");
if($db->num_rows($query) > 0) if($db->num_rows($query) > 0)
{ {
$question_exists = 1;
$question = $db->fetch_array($query); $question = $db->fetch_array($query);
//Set parser options for security question //Set parser options for security question
$parser_options = array( $parser_options = array(
"allow_html" => 0, "allow_html" => 0,
"allow_mycode" => 1, "allow_mycode" => 1,
"allow_smilies" => 1, "allow_smilies" => 1,
"allow_imgcode" => 1, "allow_imgcode" => 1,
"allow_videocode" => 1, "allow_videocode" => 1,
"filter_badwords" => 1, "filter_badwords" => 1,
skipping to change at line 1250 skipping to change at line 1158
$refresh = ''; $refresh = '';
// Total questions // Total questions
$q = $db->simple_select('questions', 'COUNT(qid) as num', 'active=1'); $q = $db->simple_select('questions', 'COUNT(qid) as num', 'active=1');
$num = $db->fetch_field($q, 'num'); $num = $db->fetch_field($q, 'num');
if($num > 1) if($num > 1)
{ {
eval("\$refresh = \"".$templates->get("me mber_register_question_refresh")."\";"); eval("\$refresh = \"".$templates->get("me mber_register_question_refresh")."\";");
} }
eval("\$questionbox = \"".$templates->get("member _register_question")."\";"); eval("\$questionbox = \"".$templates->get("member _register_question")."\";");
$validator_javascript .= "
$('#answer').rules('add', {
required: true,
remote:{
url: 'xmlhttp.php?action=validate_question',
type: 'post',
dataType: 'json',
data:
{
question: function () {
return $('#question_id').val();
},
my_post_key: my_post_key
},
},
messages: {
remote: '{$lang->js_validator_no_security_question}'
}
});\n";
} }
} }
$hiddencaptcha = ''; $hiddencaptcha = '';
// Hidden CAPTCHA for Spambots // Hidden CAPTCHA for Spambots
if($mybb->settings['hiddencaptchaimage']) if($mybb->settings['hiddencaptchaimage'])
{ {
$captcha_field = $mybb->settings['hiddencaptchaimagefield ']; $captcha_field = $mybb->settings['hiddencaptchaimagefield '];
eval("\$hiddencaptcha = \"".$templates->get("member_regis ter_hiddencaptcha")."\";"); eval("\$hiddencaptcha = \"".$templates->get("member_regis ter_hiddencaptcha")."\";");
} }
if($mybb->settings['regtype'] != "randompass") if($mybb->settings['regtype'] != "randompass")
{ {
// JS validator extra // JS validator extra
$lang->js_validator_password_length = $lang->sprintf($lan g->js_validator_password_length, $mybb->settings['minpasswordlength']); $lang->js_validator_password_length = $lang->sprintf($lan g->js_validator_password_length, $mybb->settings['minpasswordlength']);
$validator_javascript .= "
$.validator.addMethod('passwordSecurity', function(value, element, param)
{
return !(
($('#email').val() != '' && value == $('#email').
val()) ||
($('#username').val() != '' && value == $('#usern
ame').val()) ||
($('#email').val() != '' && value.indexOf($('#ema
il').val()) > -1) ||
($('#username').val() != '' && value.indexOf($('#
username').val()) > -1) ||
($('#email').val() != '' && $('#email').val().ind
exOf(value) > -1) ||
($('#username').val() != '' && $('#username').val
().indexOf(value) > -1)
);
}, '{$lang->js_validator_bad_password_security}');\n";
// See if the board has "require complex passwords" enabl ed. // See if the board has "require complex passwords" enabl ed.
if($mybb->settings['requirecomplexpasswords'] == 1) if($mybb->settings['requirecomplexpasswords'] == 1)
{ {
$lang->password = $lang->complex_password = $lang ->sprintf($lang->complex_password, $mybb->settings['minpasswordlength']); $lang->password = $lang->complex_password = $lang ->sprintf($lang->complex_password, $mybb->settings['minpasswordlength']);
$validator_javascript .= "
$('#password').rules('add', {
required: true,
minlength: {$mybb->settings['minpasswordlength']},
remote:{
url: 'xmlhttp.php?action=complex_password',
type: 'post',
dataType: 'json',
data:
{
my_post_key: my_post_key
},
},
passwordSecurity: '',
messages: {
minlength: '{$lang->js_validator_password_length}',
required: '{$lang->js_validator_password_length}',
remote: '{$lang->js_validator_no_image_text}'
}
});\n";
} }
else
{
$validator_javascript .= "
$('#password').rules('add', {
required: true,
minlength: {$mybb->settings['minpasswordlength']},
passwordSecurity: '',
messages: {
minlength: '{$lang->js_validator_password_length}',
required: '{$lang->js_validator_password_length}'
}
});\n";
}
$validator_javascript .= "
$('#password2').rules('add', {
required: true,
minlength: {$mybb->settings['minpasswordlength']},
equalTo: '#password',
messages: {
minlength: '{$lang->js_validator_password_length}',
required: '{$lang->js_validator_password_length}',
equalTo: '{$lang->js_validator_password_matches}'
}
});\n";
eval("\$passboxes = \"".$templates->get("member_register_ password")."\";"); eval("\$passboxes = \"".$templates->get("member_register_ password")."\";");
} }
$languages = $lang->get_languages(); $languages = $lang->get_languages();
$langoptions = $boardlanguage = ''; $langoptions = $boardlanguage = '';
if(count($languages) > 1) if(count($languages) > 1)
{ {
foreach($languages as $name => $language) foreach($languages as $name => $language)
{ {
$language = htmlspecialchars_uni($language); $language = htmlspecialchars_uni($language);
skipping to change at line 1378 skipping to change at line 1207
} }
eval('$boardlanguage = "'.$templates->get('member_registe r_language').'";'); eval('$boardlanguage = "'.$templates->get('member_registe r_language').'";');
} }
// Set the time so we can find automated signups // Set the time so we can find automated signups
$time = TIME_NOW; $time = TIME_NOW;
$plugins->run_hooks("member_register_end"); $plugins->run_hooks("member_register_end");
$validator_javascript .= " $jsvar_reqfields = json_encode($jsvar_reqfields);
});
</script>\n"; $validator_javascript = "<script type=\"text/javascript\">
var regsettings = {
requiredfields: '{$jsvar_reqfields}',
minnamelength: '{$mybb->settings['minnamelength']
}',
maxnamelength: '{$mybb->settings['maxnamelength']
}',
minpasswordlength: '{$mybb->settings['minpassword
length']}',
captchaimage: '{$mybb->settings['captchaimage']}'
,
captchahtml: '{$captcha_html}',
securityquestion: '{$mybb->settings['securityques
tion']}',
questionexists: '{$question_exists}',
requirecomplexpasswords: '{$mybb->settings['requi
recomplexpasswords']}',
regtype: '{$mybb->settings['regtype']}',
hiddencaptchaimage: '{$mybb->settings['hiddencapt
chaimage']}'
};
lang.js_validator_username_length = '{$lang->js_validator
_username_length}';
lang.js_validator_invalid_email = '{$lang->js_validator_i
nvalid_email}';
lang.js_validator_email_match = '{$lang->js_validator_ema
il_match}';
lang.js_validator_not_empty = '{$lang->js_validator_not_e
mpty}';
lang.js_validator_password_length = '{$lang->js_validator
_password_length}';
lang.js_validator_password_matches = '{$lang->js_validato
r_password_matches}';
lang.js_validator_no_image_text = '{$lang->js_validator_n
o_image_text}';
lang.js_validator_no_security_question = '{$lang->js_vali
dator_no_security_question}';
lang.js_validator_bad_password_security = '{$lang->js_val
idator_bad_password_security}';
</script>\n";
eval("\$registration = \"".$templates->get("member_register")."\" ;"); eval("\$registration = \"".$templates->get("member_register")."\" ;");
output_page($registration); output_page($registration);
} }
} }
if($mybb->input['action'] == "activate") if($mybb->input['action'] == "activate")
{ {
$plugins->run_hooks("member_activate_start"); $plugins->run_hooks("member_activate_start");
skipping to change at line 1522 skipping to change at line 1375
foreach($captcha->get_errors() as $error) foreach($captcha->get_errors() as $error)
{ {
$errors[] = $error; $errors[] = $error;
} }
} }
} }
$query = $db->query(" $query = $db->query("
SELECT u.uid, u.username, u.usergroup, u.email, a.code, a.type, a .validated SELECT u.uid, u.username, u.usergroup, u.email, a.code, a.type, a .validated
FROM ".TABLE_PREFIX."users u FROM ".TABLE_PREFIX."users u
LEFT JOIN ".TABLE_PREFIX."awaitingactivation a ON (a.uid=u.uid AN D a.type='r' OR a.type='b') LEFT JOIN ".TABLE_PREFIX."awaitingactivation a ON (a.uid=u.uid AN D (a.type='r' OR a.type='b'))
WHERE u.email='".$db->escape_string($mybb->get_input('email'))."' WHERE u.email='".$db->escape_string($mybb->get_input('email'))."'
"); ");
$numusers = $db->num_rows($query); $numusers = $db->num_rows($query);
if($numusers < 1) if($numusers < 1)
{ {
error($lang->error_invalidemail); error($lang->error_invalidemail);
} }
else else
{ {
if(count($errors) == 0) if(count($errors) == 0)
skipping to change at line 2031 skipping to change at line 1884
{ {
if(!$correct) if(!$correct)
{ {
$login_captcha->build_captcha(); $login_captcha->build_captcha();
} }
else else
{ {
$captcha = $login_captcha->build_hidden_captcha() ; $captcha = $login_captcha->build_hidden_captcha() ;
} }
} }
elseif(in_array($login_captcha->type, array(2, 4, 5))) elseif(in_array($login_captcha->type, array(4, 5, 8)))
{ {
$login_captcha->build_recaptcha(); $login_captcha->build_recaptcha();
} }
elseif(in_array($login_captcha->type, array(6, 7)))
{
$login_captcha->build_hcaptcha();
}
if($login_captcha->html) if($login_captcha->html)
{ {
$captcha = $login_captcha->html; $captcha = $login_captcha->html;
} }
} }
$username = ""; $username = "";
$password = ""; $password = "";
if(isset($mybb->input['username']) && $mybb->request_method == "post") if(isset($mybb->input['username']) && $mybb->request_method == "post")
skipping to change at line 2146 skipping to change at line 2003
$plugins->run_hooks('member_viewnotes'); $plugins->run_hooks('member_viewnotes');
eval("\$viewnotes = \"".$templates->get("member_viewnotes", 1, 0)."\";"); eval("\$viewnotes = \"".$templates->get("member_viewnotes", 1, 0)."\";");
echo $viewnotes; echo $viewnotes;
exit; exit;
} }
if($mybb->input['action'] == "profile") if($mybb->input['action'] == "profile")
{ {
$plugins->run_hooks("member_profile_start");
if($mybb->usergroup['canviewprofiles'] == 0) if($mybb->usergroup['canviewprofiles'] == 0)
{ {
error_no_permission(); error_no_permission();
} }
$uid = $mybb->get_input('uid', MyBB::INPUT_INT); $uid = $mybb->get_input('uid', MyBB::INPUT_INT);
if($uid) if($uid)
{ {
$memprofile = get_user($uid); $memprofile = get_user($uid);
} }
skipping to change at line 2174 skipping to change at line 2029
$memprofile = false; $memprofile = false;
} }
if(!$memprofile) if(!$memprofile)
{ {
error($lang->error_nomember); error($lang->error_nomember);
} }
$uid = $memprofile['uid']; $uid = $memprofile['uid'];
$plugins->run_hooks("member_profile_start");
$me_username = $memprofile['username']; $me_username = $memprofile['username'];
$memprofile['username'] = htmlspecialchars_uni($memprofile['username']); $memprofile['username'] = htmlspecialchars_uni($memprofile['username']);
$lang->profile = $lang->sprintf($lang->profile, $memprofile['username']); $lang->profile = $lang->sprintf($lang->profile, $memprofile['username']);
// Get member's permissions // Get member's permissions
$memperms = user_permissions($memprofile['uid']); $memperms = user_permissions($memprofile['uid']);
// Set display group // Set display group
$displaygroupfields = array("title", "description", "namestyle", "usertit le", "stars", "starimage", "image"); $displaygroupfields = array("title", "description", "namestyle", "usertit le", "stars", "starimage", "image");
skipping to change at line 2833 skipping to change at line 2690
$memban['adminuser'] = build_profile_link(htmlspecialchars_uni($m emban['adminuser']), $memban['admin']); $memban['adminuser'] = build_profile_link(htmlspecialchars_uni($m emban['adminuser']), $memban['admin']);
// Display a nice warning to the user // Display a nice warning to the user
eval('$bannedbit = "'.$templates->get('member_profile_banned').'" ;'); eval('$bannedbit = "'.$templates->get('member_profile_banned').'" ;');
} }
$adminoptions = ''; $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_admino if($memperms['isbannedgroup'] == 1)
ptions")."\";"); {
eval("\$adminoptions = \"".$templates->get("member_profil
e_adminoptions_manageban")."\";");
}
else
{
eval("\$adminoptions = \"".$templates->get("member_profil
e_adminoptions")."\";");
}
} }
$modoptions = $viewnotes = $editnotes = $editprofile = $banuser = $manage ban = $manageuser = ''; $modoptions = $viewnotes = $editnotes = $editprofile = $banuser = $manage ban = $manageuser = '';
$can_purge_spammer = purgespammer_show($memprofile['postnum'], $memprofil e['usergroup'], $memprofile['uid']); $can_purge_spammer = purgespammer_show($memprofile['postnum'], $memprofil e['usergroup'], $memprofile['uid']);
if($mybb->usergroup['canmodcp'] == 1 || $can_purge_spammer) if($mybb->usergroup['canmodcp'] == 1 || $can_purge_spammer)
{ {
if($mybb->usergroup['canuseipsearch'] == 1) if($mybb->usergroup['canuseipsearch'] == 1)
{ {
$memprofile['regip'] = my_inet_ntop($db->unescape_binary( $memprofile['regip'])); $memprofile['regip'] = my_inet_ntop($db->unescape_binary( $memprofile['regip']));
$memprofile['lastip'] = my_inet_ntop($db->unescape_binary ($memprofile['lastip'])); $memprofile['lastip'] = my_inet_ntop($db->unescape_binary ($memprofile['lastip']));
skipping to change at line 3284 skipping to change at line 3148
{ {
$plugins->run_hooks('member_referrals_start'); $plugins->run_hooks('member_referrals_start');
$uid = $mybb->get_input('uid', MyBB::INPUT_INT); $uid = $mybb->get_input('uid', MyBB::INPUT_INT);
if(!$uid) if(!$uid)
{ {
error($lang->referrals_no_user_specified); error($lang->referrals_no_user_specified);
} }
$user = get_user($uid); $user = get_user($uid);
if(!$user['$uid'])
{
error($lang->referrals_invalid_user);
}
$lang->nav_referrals = $lang->sprintf($lang->nav_referrals, $user['userna me']); $lang->nav_referrals = $lang->sprintf($lang->nav_referrals, $user['userna me']);
add_breadcrumb($lang->nav_referrals); add_breadcrumb($lang->nav_referrals);
$query = $db->simple_select('users', 'COUNT(uid) AS total', "referrer='{$ uid}'"); $query = $db->simple_select('users', 'COUNT(uid) AS total', "referrer='{$ uid}'");
$referral_count = $db->fetch_field($query, 'total'); $referral_count = $db->fetch_field($query, 'total');
$bg_color = 'trow1'; $bg_color = 'trow1';
if($referral_count == 0) if($referral_count == 0)
 End of changes. 21 change blocks. 
216 lines changed or deleted 86 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)