Zeile 187 | Zeile 187 |
---|
$plugins->run_hooks("usercp_do_profile_start");
|
$plugins->run_hooks("usercp_do_profile_start");
|
if($mybb->get_input('away', 1) == 1 && $mybb->settings['allowaway'] != 0)
| if($mybb->get_input('away', MyBB::INPUT_INT) == 1 && $mybb->settings['allowaway'] != 0)
|
{ $awaydate = TIME_NOW; if(!empty($mybb->input['awayday'])) { // If the user has indicated that they will return on a specific day, but not month or year, assume it is current month and year
|
{ $awaydate = TIME_NOW; if(!empty($mybb->input['awayday'])) { // If the user has indicated that they will return on a specific day, but not month or year, assume it is current month and year
|
if(!$mybb->get_input('awaymonth', 1))
| if(!$mybb->get_input('awaymonth', MyBB::INPUT_INT))
|
{ $mybb->input['awaymonth'] = my_date('n', $awaydate); }
|
{ $mybb->input['awaymonth'] = my_date('n', $awaydate); }
|
if(!$mybb->get_input('awayyear', 1))
| if(!$mybb->get_input('awayyear', MyBB::INPUT_INT))
|
{ $mybb->input['awayyear'] = my_date('Y', $awaydate); }
| { $mybb->input['awayyear'] = my_date('Y', $awaydate); }
|
Zeile 238 | Zeile 238 |
---|
}
$bday = array(
|
}
$bday = array(
|
"day" => $mybb->get_input('bday1', 1), "month" => $mybb->get_input('bday2', 1), "year" => $mybb->get_input('bday3', 1)
| "day" => $mybb->get_input('bday1', MyBB::INPUT_INT), "month" => $mybb->get_input('bday2', MyBB::INPUT_INT), "year" => $mybb->get_input('bday3', MyBB::INPUT_INT)
|
);
// Set up user handler.
| );
// Set up user handler.
|
Zeile 255 | Zeile 255 |
---|
"birthday" => $bday, "birthdayprivacy" => $mybb->get_input('birthdayprivacy'), "away" => $away,
|
"birthday" => $bday, "birthdayprivacy" => $mybb->get_input('birthdayprivacy'), "away" => $away,
|
"profile_fields" => $mybb->get_input('profile_fields', 2)
| "profile_fields" => $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY)
|
); foreach(array('icq', 'aim', 'yahoo', 'skype', 'google') as $cfield) {
| ); foreach(array('icq', 'aim', 'yahoo', 'skype', 'google') as $cfield) {
|
Zeile 265 | Zeile 265 |
---|
continue; }
|
continue; }
|
if($mybb->settings[$csetting] != -1 && !is_member($mybb->settings[$csetting]))
| if(!is_member($mybb->settings[$csetting]))
|
{ continue; }
| { continue; }
|
Zeile 326 | Zeile 326 |
---|
{ $user = $mybb->input; $bday = array();
|
{ $user = $mybb->input; $bday = array();
|
$bday[0] = $mybb->get_input('bday1', 1); $bday[1] = $mybb->get_input('bday2', 1); $bday[2] = $mybb->get_input('bday3', 1);
| $bday[0] = $mybb->get_input('bday1', MyBB::INPUT_INT); $bday[1] = $mybb->get_input('bday2', MyBB::INPUT_INT); $bday[2] = $mybb->get_input('bday3', MyBB::INPUT_INT);
|
} else {
| } else {
|
Zeile 420 | Zeile 420 |
---|
continue; }
|
continue; }
|
if($mybb->settings[$csetting] != -1 && !is_member($mybb->settings[$csetting]))
| if(!is_member($mybb->settings[$csetting]))
|
{ continue; }
| { continue; }
|
Zeile 453 | Zeile 453 |
---|
$awaycheck[0] = "checked=\"checked\""; } $returndate = array();
|
$awaycheck[0] = "checked=\"checked\""; } $returndate = array();
|
$returndate[0] = $mybb->get_input('awayday', 1); $returndate[1] = $mybb->get_input('awaymonth', 1); $returndate[2] = $mybb->get_input('awayyear', 1);
| $returndate[0] = $mybb->get_input('awayday', MyBB::INPUT_INT); $returndate[1] = $mybb->get_input('awaymonth', MyBB::INPUT_INT); $returndate[2] = $mybb->get_input('awayyear', MyBB::INPUT_INT);
|
$user['awayreason'] = htmlspecialchars_uni($mybb->get_input('awayreason')); } else
| $user['awayreason'] = htmlspecialchars_uni($mybb->get_input('awayreason')); } else
|
Zeile 511 | Zeile 511 |
---|
// Custom profile fields baby! $altbg = "trow1"; $requiredfields = $customfields = '';
|
// Custom profile fields baby! $altbg = "trow1"; $requiredfields = $customfields = '';
|
$mybb->input['profile_fields'] = $mybb->get_input('profile_fields', 2);
| $mybb->input['profile_fields'] = $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY);
|
$pfcache = $cache->read('profilefields');
| $pfcache = $cache->read('profilefields');
|
Zeile 519 | Zeile 519 |
---|
{ foreach($pfcache as $profilefield) {
|
{ foreach($pfcache as $profilefield) {
|
if(empty($profilefield['editableby']) || ($profilefield['editableby'] != -1 && !is_member($profilefield['editableby']))) { continue; }
// Does this field have a minimum post count? if($profilefield['postnum'] && $profilefield['postnum'] > $mybb->user['postnum'])
| if(!is_member($profilefield['editableby']) || ($profilefield['postnum'] && $profilefield['postnum'] > $mybb->user['postnum']))
|
{ continue; }
| { continue; }
|
Zeile 558 | Zeile 552 |
---|
$userfield = $user[$field]; } if($type == "multiselect")
|
$userfield = $user[$field]; } if($type == "multiselect")
|
{ if($errors) { $useropts = $userfield; } else { $useropts = explode("\n", $userfield); } if(is_array($useropts)) { foreach($useropts as $key => $val) {
| { if($errors) { $useropts = $userfield; } else { $useropts = explode("\n", $userfield); } if(is_array($useropts)) { foreach($useropts as $key => $val) {
|
$val = htmlspecialchars_uni($val); $seloptions[$val] = $val;
|
$val = htmlspecialchars_uni($val); $seloptions[$val] = $val;
|
} } $expoptions = explode("\n", $options); if(is_array($expoptions)) { foreach($expoptions as $key => $val) { $val = trim($val); $val = str_replace("\n", "\\n", $val);
| } } $expoptions = explode("\n", $options); if(is_array($expoptions)) { foreach($expoptions as $key => $val) { $val = trim($val); $val = str_replace("\n", "\\n", $val);
|
$sel = ""; if($val == $seloptions[$val])
| $sel = ""; if($val == $seloptions[$val])
|
Zeile 590 | Zeile 584 |
---|
}
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
|
}
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
|
} if(!$profilefield['length'])
| } if(!$profilefield['length'])
|
{ $profilefield['length'] = 3; }
| { $profilefield['length'] = 3; }
|
Zeile 609 | Zeile 603 |
---|
$val = trim($val); $val = str_replace("\n", "\\n", $val); $sel = "";
|
$val = trim($val); $val = str_replace("\n", "\\n", $val); $sel = "";
|
if($val == htmlspecialchars_uni($userfield)) { $sel = " selected=\"selected\"";
| if($val == htmlspecialchars_uni($userfield)) { $sel = " selected=\"selected\"";
|
}
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";"); } if(!$profilefield['length'])
|
}
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";"); } if(!$profilefield['length'])
|
{
| {
|
$profilefield['length'] = 1; }
eval("\$code = \"".$templates->get("usercp_profile_profilefields_select")."\";");
|
$profilefield['length'] = 1; }
eval("\$code = \"".$templates->get("usercp_profile_profilefields_select")."\";");
|
}
| }
|
} elseif($type == "radio") {
| } elseif($type == "radio") {
|
Zeile 652 | Zeile 646 |
---|
$useropts = explode("\n", $userfield); } if(is_array($useropts))
|
$useropts = explode("\n", $userfield); } if(is_array($useropts))
|
{
| {
|
foreach($useropts as $key => $val) { $seloptions[$val] = $val;
|
foreach($useropts as $key => $val) { $seloptions[$val] = $val;
|
} }
| } }
|
$expoptions = explode("\n", $options); if(is_array($expoptions)) {
| $expoptions = explode("\n", $options); if(is_array($expoptions)) {
|
Zeile 671 | Zeile 665 |
---|
eval("\$code .= \"".$templates->get("usercp_profile_profilefields_checkbox")."\";"); }
|
eval("\$code .= \"".$templates->get("usercp_profile_profilefields_checkbox")."\";"); }
|
} }
| } }
|
elseif($type == "textarea") { $value = htmlspecialchars_uni($userfield); eval("\$code = \"".$templates->get("usercp_profile_profilefields_textarea")."\";");
|
elseif($type == "textarea") { $value = htmlspecialchars_uni($userfield); eval("\$code = \"".$templates->get("usercp_profile_profilefields_textarea")."\";");
|
}
| }
|
else { $value = htmlspecialchars_uni($userfield);
| else { $value = htmlspecialchars_uni($userfield);
|
Zeile 693 | Zeile 687 |
---|
if($profilefield['required'] == 1) { eval("\$requiredfields .= \"".$templates->get("usercp_profile_customfield")."\";");
|
if($profilefield['required'] == 1) { eval("\$requiredfields .= \"".$templates->get("usercp_profile_customfield")."\";");
|
}
| }
|
else { eval("\$customfields .= \"".$templates->get("usercp_profile_customfield")."\";");
| else { eval("\$customfields .= \"".$templates->get("usercp_profile_customfield")."\";");
|
Zeile 731 | Zeile 725 |
---|
} else {
|
} else {
|
$defaulttitle = $mybb->usergroup['usertitle'];
| $defaulttitle = htmlspecialchars_uni($mybb->usergroup['usertitle']);
|
}
$newtitle = '';
| }
$newtitle = '';
|
Zeile 792 | Zeile 786 |
---|
$user = array( "uid" => $mybb->user['uid'],
|
$user = array( "uid" => $mybb->user['uid'],
|
"style" => $mybb->get_input('style', 1), "dateformat" => $mybb->get_input('dateformat', 1), "timeformat" => $mybb->get_input('timeformat', 1),
| "style" => $mybb->get_input('style', MyBB::INPUT_INT), "dateformat" => $mybb->get_input('dateformat', MyBB::INPUT_INT), "timeformat" => $mybb->get_input('timeformat', MyBB::INPUT_INT),
|
"timezone" => $db->escape_string($mybb->get_input('timezoneoffset')), "language" => $mybb->get_input('language') );
$user['options'] = array(
|
"timezone" => $db->escape_string($mybb->get_input('timezoneoffset')), "language" => $mybb->get_input('language') );
$user['options'] = array(
|
"allownotices" => $mybb->get_input('allownotices', 1), "hideemail" => $mybb->get_input('hideemail', 1), "subscriptionmethod" => $mybb->get_input('subscriptionmethod', 1), "invisible" => $mybb->get_input('invisible', 1), "dstcorrection" => $mybb->get_input('dstcorrection', 1),
| "allownotices" => $mybb->get_input('allownotices', MyBB::INPUT_INT), "hideemail" => $mybb->get_input('hideemail', MyBB::INPUT_INT), "subscriptionmethod" => $mybb->get_input('subscriptionmethod', MyBB::INPUT_INT), "invisible" => $mybb->get_input('invisible', MyBB::INPUT_INT), "dstcorrection" => $mybb->get_input('dstcorrection', MyBB::INPUT_INT),
|
"threadmode" => $mybb->get_input('threadmode'),
|
"threadmode" => $mybb->get_input('threadmode'),
|
"showimages" => $mybb->get_input('showimages', 1), "showvideos" => $mybb->get_input('showvideos', 1), "showsigs" => $mybb->get_input('showsigs', 1), "showavatars" => $mybb->get_input('showavatars', 1), "showquickreply" => $mybb->get_input('showquickreply', 1), "receivepms" => $mybb->get_input('receivepms', 1), "pmnotice" => $mybb->get_input('pmnotice', 1), "receivefrombuddy" => $mybb->get_input('receivefrombuddy', 1), "daysprune" => $mybb->get_input('daysprune', 1), "showcodebuttons" => $mybb->get_input('showcodebuttons', 1), "sourceeditor" => $mybb->get_input('sourceeditor', 1), "pmnotify" => $mybb->get_input('pmnotify', 1), "buddyrequestspm" => $mybb->get_input('buddyrequestspm', 1), "buddyrequestsauto" => $mybb->get_input('buddyrequestsauto', 1), "showredirect" => $mybb->get_input('showredirect', 1), "classicpostbit" => $mybb->get_input('classicpostbit', 1)
| "showimages" => $mybb->get_input('showimages', MyBB::INPUT_INT), "showvideos" => $mybb->get_input('showvideos', MyBB::INPUT_INT), "showsigs" => $mybb->get_input('showsigs', MyBB::INPUT_INT), "showavatars" => $mybb->get_input('showavatars', MyBB::INPUT_INT), "showquickreply" => $mybb->get_input('showquickreply', MyBB::INPUT_INT), "receivepms" => $mybb->get_input('receivepms', MyBB::INPUT_INT), "pmnotice" => $mybb->get_input('pmnotice', MyBB::INPUT_INT), "receivefrombuddy" => $mybb->get_input('receivefrombuddy', MyBB::INPUT_INT), "daysprune" => $mybb->get_input('daysprune', MyBB::INPUT_INT), "showcodebuttons" => $mybb->get_input('showcodebuttons', MyBB::INPUT_INT), "sourceeditor" => $mybb->get_input('sourceeditor', MyBB::INPUT_INT), "pmnotify" => $mybb->get_input('pmnotify', MyBB::INPUT_INT), "buddyrequestspm" => $mybb->get_input('buddyrequestspm', MyBB::INPUT_INT), "buddyrequestsauto" => $mybb->get_input('buddyrequestsauto', MyBB::INPUT_INT), "showredirect" => $mybb->get_input('showredirect', MyBB::INPUT_INT), "classicpostbit" => $mybb->get_input('classicpostbit', MyBB::INPUT_INT)
|
);
if($mybb->settings['usertppoptions']) {
|
);
if($mybb->settings['usertppoptions']) {
|
$user['options']['tpp'] = $mybb->get_input('tpp', 1);
| $user['options']['tpp'] = $mybb->get_input('tpp', MyBB::INPUT_INT);
|
}
if($mybb->settings['userpppoptions']) {
|
}
if($mybb->settings['userpppoptions']) {
|
$user['options']['ppp'] = $mybb->get_input('ppp', 1);
| $user['options']['ppp'] = $mybb->get_input('ppp', MyBB::INPUT_INT);
|
}
$userhandler->set_data($user);
| }
$userhandler->set_data($user);
|
Zeile 842 | Zeile 836 |
---|
$errors = $userhandler->get_friendly_errors(); $errors = inline_error($errors); $mybb->input['action'] = "options";
|
$errors = $userhandler->get_friendly_errors(); $errors = inline_error($errors); $mybb->input['action'] = "options";
|
} else
| } else
|
{ $userhandler->update_user();
| { $userhandler->update_user();
|
Zeile 879 | Zeile 873 |
---|
{ $sel = " selected=\"selected\""; }
|
{ $sel = " selected=\"selected\""; }
|
|
|
eval('$langoptions .= "'.$templates->get('usercp_options_language_option').'";'); }
eval('$board_language = "'.$templates->get('usercp_options_language').'";');
|
eval('$langoptions .= "'.$templates->get('usercp_options_language_option').'";'); }
eval('$board_language = "'.$templates->get('usercp_options_language').'";');
|
}
| }
|
// Lets work out which options the user has selected and check the boxes if(isset($user['allownotices']) && $user['allownotices'] == 1)
| // Lets work out which options the user has selected and check the boxes if(isset($user['allownotices']) && $user['allownotices'] == 1)
|
Zeile 962 | Zeile 956 |
---|
if(isset($user['showavatars']) && $user['showavatars'] == 1) { $showavatarscheck = "checked=\"checked\"";
|
if(isset($user['showavatars']) && $user['showavatars'] == 1) { $showavatarscheck = "checked=\"checked\"";
|
} else
| } else
|
{ $showavatarscheck = ""; }
| { $showavatarscheck = ""; }
|
Zeile 972 | Zeile 966 |
---|
{ $showquickreplycheck = "checked=\"checked\""; }
|
{ $showquickreplycheck = "checked=\"checked\""; }
|
else { $showquickreplycheck = ""; }
if(isset($user['receivepms']) && $user['receivepms'] == 1)
| else { $showquickreplycheck = ""; }
if(isset($user['receivepms']) && $user['receivepms'] == 1)
|
{ $receivepmscheck = "checked=\"checked\""; }
| { $receivepmscheck = "checked=\"checked\""; }
|
Zeile 993 | Zeile 987 |
---|
else { $receivefrombuddycheck = "";
|
else { $receivefrombuddycheck = "";
|
}
| }
|
if(isset($user['pmnotice']) && $user['pmnotice'] >= 1) {
| if(isset($user['pmnotice']) && $user['pmnotice'] >= 1) {
|
Zeile 1002 | Zeile 996 |
---|
else { $pmnoticecheck = "";
|
else { $pmnoticecheck = "";
|
}
| }
|
$dst_auto_selected = $dst_enabled_selected = $dst_disabled_selected = ''; if(isset($user['dstcorrection']) && $user['dstcorrection'] == 2) {
| $dst_auto_selected = $dst_enabled_selected = $dst_disabled_selected = ''; if(isset($user['dstcorrection']) && $user['dstcorrection'] == 2) {
|
Zeile 1080 | Zeile 1074 |
---|
if(isset($user['classicpostbit']) && $user['classicpostbit'] != 0) { $classicpostbitcheck = "checked=\"checked\"";
|
if(isset($user['classicpostbit']) && $user['classicpostbit'] != 0) { $classicpostbitcheck = "checked=\"checked\"";
|
} else {
| } else {
|
$classicpostbitcheck = ''; }
| $classicpostbitcheck = ''; }
|
Zeile 1091 | Zeile 1085 |
---|
{ $selected = ''; if(isset($user['dateformat']) && $user['dateformat'] == $key)
|
{ $selected = ''; if(isset($user['dateformat']) && $user['dateformat'] == $key)
|
{ $selected = " selected=\"selected\"";
| { $selected = " selected=\"selected\"";
|
}
$dateformat = my_date($format, TIME_NOW, "", 0); eval("\$date_format_options .= \"".$templates->get("usercp_options_date_format")."\";");
|
}
$dateformat = my_date($format, TIME_NOW, "", 0); eval("\$date_format_options .= \"".$templates->get("usercp_options_date_format")."\";");
|
}
| }
|
$time_format_options = $timeformat = ''; foreach($time_formats as $key => $format)
| $time_format_options = $timeformat = ''; foreach($time_formats as $key => $format)
|
Zeile 1107 | Zeile 1101 |
---|
{ $selected = " selected=\"selected\""; }
|
{ $selected = " selected=\"selected\""; }
|
|
|
$timeformat = my_date($format, TIME_NOW, "", 0); eval("\$time_format_options .= \"".$templates->get("usercp_options_time_format")."\";");
|
$timeformat = my_date($format, TIME_NOW, "", 0); eval("\$time_format_options .= \"".$templates->get("usercp_options_time_format")."\";");
|
}
$tzselect = build_timezone_select("timezoneoffset", $mybb->user['timezone'], true);
| }
$tzselect = build_timezone_select("timezoneoffset", $mybb->user['timezone'], true);
|
$pms_from_buddys = ''; if($mybb->settings['allowbuddyonly'] == 1)
| $pms_from_buddys = ''; if($mybb->settings['allowbuddyonly'] == 1)
|
Zeile 1122 | Zeile 1116 |
---|
$threadview = array('linear' => '', 'threaded' => ''); if(isset($user['threadmode']) && is_scalar($user['threadmode']))
|
$threadview = array('linear' => '', 'threaded' => ''); if(isset($user['threadmode']) && is_scalar($user['threadmode']))
|
{
| {
|
$threadview[$user['threadmode']] = 'selected="selected"'; } $daysprunesel = array(1 => '', 5 => '', 10 => '', 20 => '', 50 => '', 75 => '', 100 => '', 365 => '', 9999 => '');
| $threadview[$user['threadmode']] = 'selected="selected"'; } $daysprunesel = array(1 => '', 5 => '', 10 => '', 20 => '', 50 => '', 75 => '', 100 => '', 365 => '', 9999 => '');
|
Zeile 1131 | Zeile 1125 |
---|
$daysprunesel[$user['daysprune']] = 'selected="selected"'; } if(!isset($user['style']))
|
$daysprunesel[$user['daysprune']] = 'selected="selected"'; } if(!isset($user['style']))
|
{
| {
|
$user['style'] = ''; }
| $user['style'] = ''; }
|
Zeile 1161 | Zeile 1155 |
---|
$tpp_option = $lang->sprintf($lang->tpp_option, $val); eval("\$tppoptions .= \"".$templates->get("usercp_options_tppselect_option")."\";");
|
$tpp_option = $lang->sprintf($lang->tpp_option, $val); eval("\$tppoptions .= \"".$templates->get("usercp_options_tppselect_option")."\";");
|
} }
| } }
|
eval("\$tppselect = \"".$templates->get("usercp_options_tppselect")."\";"); }
if($mybb->settings['userpppoptions'])
|
eval("\$tppselect = \"".$templates->get("usercp_options_tppselect")."\";"); }
if($mybb->settings['userpppoptions'])
|
{
| {
|
$explodedppp = explode(",", $mybb->settings['userpppoptions']); $pppoptions = $ppp_option = ''; if(is_array($explodedppp))
| $explodedppp = explode(",", $mybb->settings['userpppoptions']); $pppoptions = $ppp_option = ''; if(is_array($explodedppp))
|
Zeile 1186 | Zeile 1180 |
---|
} } eval("\$pppselect = \"".$templates->get("usercp_options_pppselect")."\";");
|
} } eval("\$pppselect = \"".$templates->get("usercp_options_pppselect")."\";");
|
}
| }
|
$plugins->run_hooks("usercp_options_end");
eval("\$editprofile = \"".$templates->get("usercp_options")."\";");
| $plugins->run_hooks("usercp_options_end");
eval("\$editprofile = \"".$templates->get("usercp_options")."\";");
|
Zeile 1202 | Zeile 1196 |
---|
$errors = array();
$plugins->run_hooks("usercp_do_email_start");
|
$errors = array();
$plugins->run_hooks("usercp_do_email_start");
|
if(validate_password_from_uid($mybb->user['uid'], $mybb->get_input('password')) == false) { $errors[] = $lang->error_invalidpassword; } else { // Set up user handler. require_once "inc/datahandlers/user.php"; $userhandler = new UserDataHandler("update");
$user = array(
| if(validate_password_from_uid($mybb->user['uid'], $mybb->get_input('password')) == false) { $errors[] = $lang->error_invalidpassword; } else { // Set up user handler. require_once "inc/datahandlers/user.php"; $userhandler = new UserDataHandler("update");
$user = array(
|
"uid" => $mybb->user['uid'], "email" => $mybb->get_input('email'), "email2" => $mybb->get_input('email2')
| "uid" => $mybb->user['uid'], "email" => $mybb->get_input('email'), "email2" => $mybb->get_input('email2')
|
Zeile 1291 | Zeile 1285 |
---|
}
if($mybb->input['action'] == "do_password" && $mybb->request_method == "post")
|
}
if($mybb->input['action'] == "do_password" && $mybb->request_method == "post")
|
{ // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
| { // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
$errors = array();
|
$errors = array();
|
|
|
$plugins->run_hooks("usercp_do_password_start"); if(validate_password_from_uid($mybb->user['uid'], $mybb->get_input('oldpassword')) == false) { $errors[] = $lang->error_invalidpassword;
|
$plugins->run_hooks("usercp_do_password_start"); if(validate_password_from_uid($mybb->user['uid'], $mybb->get_input('oldpassword')) == false) { $errors[] = $lang->error_invalidpassword;
|
}
| }
|
else { // Set up user handler.
| else { // Set up user handler.
|
Zeile 1332 | Zeile 1326 |
---|
$plugins->run_hooks("usercp_do_password_end"); redirect("usercp.php?action=password", $lang->redirect_passwordupdated);
|
$plugins->run_hooks("usercp_do_password_end"); redirect("usercp.php?action=password", $lang->redirect_passwordupdated);
|
} } if(count($errors) > 0) {
| } } if(count($errors) > 0) {
|
$mybb->input['action'] = "password"; $errors = inline_error($errors); }
| $mybb->input['action'] = "password"; $errors = inline_error($errors); }
|
Zeile 1356 | Zeile 1350 |
---|
$plugins->run_hooks("usercp_do_changename_start"); if($mybb->usergroup['canchangename'] != 1)
|
$plugins->run_hooks("usercp_do_changename_start"); if($mybb->usergroup['canchangename'] != 1)
|
{
| {
|
error_no_permission(); }
if(validate_password_from_uid($mybb->user['uid'], $mybb->get_input('password')) == false)
|
error_no_permission(); }
if(validate_password_from_uid($mybb->user['uid'], $mybb->get_input('password')) == false)
|
{
| {
|
$errors[] = $lang->error_invalidpassword; } else
| $errors[] = $lang->error_invalidpassword; } else
|
Zeile 1376 | Zeile 1370 |
---|
);
$userhandler->set_data($user);
|
);
$userhandler->set_data($user);
|
|
|
if(!$userhandler->validate_user()) { $errors = $userhandler->get_friendly_errors();
| if(!$userhandler->validate_user()) { $errors = $userhandler->get_friendly_errors();
|
Zeile 1423 | Zeile 1417 |
---|
}
// Clean input - only accept integers thanks!
|
}
// Clean input - only accept integers thanks!
|
$mybb->input['check'] = array_map('intval', $mybb->get_input('check', 2));
| $mybb->input['check'] = array_map('intval', $mybb->get_input('check', MyBB::INPUT_ARRAY));
|
$tids = implode(",", $mybb->input['check']);
// Deleting these subscriptions?
| $tids = implode(",", $mybb->input['check']);
// Deleting these subscriptions?
|
Zeile 1459 | Zeile 1453 |
---|
if($mybb->input['action'] == "subscriptions") { $plugins->run_hooks("usercp_subscriptions_start");
|
if($mybb->input['action'] == "subscriptions") { $plugins->run_hooks("usercp_subscriptions_start");
|
|
|
// Thread visiblity $visible = "AND t.visible != 0"; if(is_moderator() == true)
| // Thread visiblity $visible = "AND t.visible != 0"; if(is_moderator() == true)
|
Zeile 1482 | Zeile 1476 |
---|
}
$perpage = $mybb->settings['threadsperpage'];
|
}
$perpage = $mybb->settings['threadsperpage'];
|
$page = $mybb->get_input('page', 1);
| $page = $mybb->get_input('page', MyBB::INPUT_INT);
|
if($page > 0) { $start = ($page-1) * $perpage;
| if($page > 0) { $start = ($page-1) * $perpage;
|
Zeile 1542 | Zeile 1536 |
---|
if($sids) { $db->delete_query("threadsubscriptions", "sid IN ({$sids}) AND uid='{$mybb->user['uid']}'");
|
if($sids) { $db->delete_query("threadsubscriptions", "sid IN ({$sids}) AND uid='{$mybb->user['uid']}'");
|
}
| }
|
$threadcount = $threadcount - count($del_subscriptions);
| $threadcount = $threadcount - count($del_subscriptions);
|
Zeile 1559 | Zeile 1553 |
---|
if($mybb->user['uid'] == 0) { // Build a forum cache.
|
if($mybb->user['uid'] == 0) { // Build a forum cache.
|
$query = $db->query(" SELECT fid FROM ".TABLE_PREFIX."forums WHERE active != 0 ORDER BY pid, disporder ");
| $query = $db->simple_select('forums', 'fid', 'active != 0', array('order_by' => 'pid, disporder'));
|
$forumsread = my_unserialize($mybb->cookies['mybb']['forumread']); }
| $forumsread = my_unserialize($mybb->cookies['mybb']['forumread']); }
|
Zeile 1644 | Zeile 1633 |
---|
{ $icon = $icon_cache[$thread['icon']]; $icon['path'] = str_replace("{theme}", $theme['imgdir'], $icon['path']);
|
{ $icon = $icon_cache[$thread['icon']]; $icon['path'] = str_replace("{theme}", $theme['imgdir'], $icon['path']);
|
| $icon['path'] = htmlspecialchars_uni($icon['path']); $icon['name'] = htmlspecialchars_uni($icon['name']);
|
eval("\$icon = \"".$templates->get("usercp_subscriptions_thread_icon")."\";"); } else
| eval("\$icon = \"".$templates->get("usercp_subscriptions_thread_icon")."\";"); } else
|
Zeile 2204 | Zeile 2195 |
---|
{ $lang->error_avatartoobig = $lang->sprintf($lang->error_avatartoobig, $maxwidth, $maxheight); $avatar_error = $lang->error_avatartoobig;
|
{ $lang->error_avatartoobig = $lang->sprintf($lang->error_avatartoobig, $maxwidth, $maxheight); $avatar_error = $lang->error_avatartoobig;
|
}
| }
|
} }
| } }
|
Zeile 2253 | Zeile 2244 |
---|
$avatarurl = htmlspecialchars_uni($mybb->user['avatar']); }
|
$avatarurl = htmlspecialchars_uni($mybb->user['avatar']); }
|
$useravatar = format_avatar(htmlspecialchars_uni($mybb->user['avatar']), $mybb->user['avatardimensions'], '100x100');
| $useravatar = format_avatar($mybb->user['avatar'], $mybb->user['avatardimensions'], '100x100');
|
eval("\$currentavatar = \"".$templates->get("usercp_avatar_current")."\";");
if($mybb->settings['maxavatardims'] != "")
| eval("\$currentavatar = \"".$templates->get("usercp_avatar_current")."\";");
if($mybb->settings['maxavatardims'] != "")
|
Zeile 2307 | Zeile 2298 |
---|
verify_post_check($mybb->get_input('my_post_key'));
// Validate request
|
verify_post_check($mybb->get_input('my_post_key'));
// Validate request
|
$query = $db->simple_select('buddyrequests', '*', 'id='.(int)$mybb->input['id'].' AND touid='.(int)$mybb->user['uid']);
| $query = $db->simple_select('buddyrequests', '*', 'id='.$mybb->get_input('id', MyBB::INPUT_INT).' AND touid='.(int)$mybb->user['uid']);
|
$request = $db->fetch_array($query); if(empty($request)) {
| $request = $db->fetch_array($query); if(empty($request)) {
|
Zeile 2411 | Zeile 2402 |
---|
verify_post_check($mybb->get_input('my_post_key')); // Validate request
|
verify_post_check($mybb->get_input('my_post_key')); // Validate request
|
$query = $db->simple_select('buddyrequests', '*', 'id='.(int)$mybb->input['id'].' AND touid='.(int)$mybb->user['uid']);
| $query = $db->simple_select('buddyrequests', '*', 'id='.$mybb->get_input('id', MyBB::INPUT_INT).' AND touid='.(int)$mybb->user['uid']);
|
$request = $db->fetch_array($query); if(empty($request)) {
| $request = $db->fetch_array($query); if(empty($request)) {
|
Zeile 2440 | Zeile 2431 |
---|
verify_post_check($mybb->get_input('my_post_key')); // Validate request
|
verify_post_check($mybb->get_input('my_post_key')); // Validate request
|
$query = $db->simple_select('buddyrequests', '*', 'id='.(int)$mybb->input['id'].' AND uid='.(int)$mybb->user['uid']);
| $query = $db->simple_select('buddyrequests', '*', 'id='.$mybb->get_input('id', MyBB::INPUT_INT).' AND uid='.(int)$mybb->user['uid']);
|
$request = $db->fetch_array($query); if(empty($request)) {
| $request = $db->fetch_array($query); if(empty($request)) {
|
Zeile 2542 | Zeile 2533 |
---|
// Fetch out new users if(count($users) > 0) {
|
// Fetch out new users if(count($users) > 0) {
|
$query = $db->simple_select("users", "uid,buddyrequestsauto,buddyrequestspm,language", "LOWER(username) IN ('".my_strtolower(implode("','", $users))."')");
| switch($db->type) { case 'mysql': case 'mysqli': $field = 'username'; break; default: $field = 'LOWER(username)'; break; } $query = $db->simple_select("users", "uid,buddyrequestsauto,buddyrequestspm,language", "{$field} IN ('".my_strtolower(implode("','", $users))."')");
|
while($user = $db->fetch_array($query)) { ++$found_users;
| while($user = $db->fetch_array($query)) { ++$found_users;
|
Zeile 2557 | Zeile 2558 |
---|
else { $error_message = "buddy";
|
else { $error_message = "buddy";
|
}
| }
|
// On another list? $string = "users_already_on_".$error_message."_list"; if(in_array($user['uid'], $selected_list))
|
// On another list? $string = "users_already_on_".$error_message."_list"; if(in_array($user['uid'], $selected_list))
|
{
| {
|
$string .= "_alt"; }
| $string .= "_alt"; }
|
Zeile 2580 | Zeile 2581 |
---|
elseif($mybb->get_input('manage') == "ignored") { $error_message = $lang->users_already_sent_request_alt;
|
elseif($mybb->get_input('manage') == "ignored") { $error_message = $lang->users_already_sent_request_alt;
|
} array_pop($users); // To maintain a proper count when we call count($users)
| } array_pop($users); // To maintain a proper count when we call count($users)
|
continue; }
| continue; }
|
Zeile 2661 | Zeile 2662 |
---|
else { $message = $lang->users_added_to_buddy_list;
|
else { $message = $lang->users_added_to_buddy_list;
|
}
| }
|
}
if($adding_self == true)
|
}
if($adding_self == true)
|
{
| {
|
if($mybb->get_input('manage') == "ignored") { $error_message = $lang->cant_add_self_to_ignore_list;
|
if($mybb->get_input('manage') == "ignored") { $error_message = $lang->cant_add_self_to_ignore_list;
|
} else
| } else
|
{ $error_message = $lang->cant_add_self_to_buddy_list;
|
{ $error_message = $lang->cant_add_self_to_buddy_list;
|
} }
| } }
|
if(count($existing_users) == 0) { $message = "";
| if(count($existing_users) == 0) { $message = "";
|
Zeile 2688 | Zeile 2689 |
---|
}
// Removing a user from this list
|
}
// Removing a user from this list
|
else if($mybb->get_input('delete', 1))
| else if($mybb->get_input('delete', MyBB::INPUT_INT))
|
{ // Check if user exists on the list
|
{ // Check if user exists on the list
|
$key = array_search($mybb->get_input('delete', 1), $existing_users);
| $key = array_search($mybb->get_input('delete', MyBB::INPUT_INT), $existing_users);
|
if($key !== false) { unset($existing_users[$key]);
|
if($key !== false) { unset($existing_users[$key]);
|
$user = get_user($mybb->get_input('delete', 1));
| $user = get_user($mybb->get_input('delete', MyBB::INPUT_INT));
|
if(!empty($user)) { // We want to remove us from this user's buddy list if($user['buddylist'] != '') { $user['buddylist'] = explode(',', $user['buddylist']);
|
if(!empty($user)) { // We want to remove us from this user's buddy list if($user['buddylist'] != '') { $user['buddylist'] = explode(',', $user['buddylist']);
|
} else {
| } else {
|
$user['buddylist'] = array();
|
$user['buddylist'] = array();
|
} $key = array_search((int)$mybb->input['delete'], $user['buddylist']); unset($user['buddylist'][$key]);
| } $key = array_search($mybb->get_input('delete', MyBB::INPUT_INT), $user['buddylist']); unset($user['buddylist'][$key]);
|
// Now we have the new list, so throw it all back together $new_list = implode(",", $user['buddylist']);
| // Now we have the new list, so throw it all back together $new_list = implode(",", $user['buddylist']);
|
Zeile 2730 | Zeile 2731 |
---|
$user['buddylist'] = $db->escape_string($new_list); $db->update_query("users", array('buddylist' => $user['buddylist']), "uid='".(int)$user['uid']."'");
|
$user['buddylist'] = $db->escape_string($new_list); $db->update_query("users", array('buddylist' => $user['buddylist']), "uid='".(int)$user['uid']."'");
|
}
| }
|
if($mybb->get_input('manage') == "ignored") { $message = $lang->removed_from_ignore_list;
|
if($mybb->get_input('manage') == "ignored") { $message = $lang->removed_from_ignore_list;
|
}
| }
|
else { $message = $lang->removed_from_buddy_list;
| else { $message = $lang->removed_from_buddy_list;
|
Zeile 2745 | Zeile 2746 |
---|
}
// Now we have the new list, so throw it all back together
|
}
// Now we have the new list, so throw it all back together
|
$new_list = implode(",", $existing_users);
| $new_list = implode(",", $existing_users);
|
// And clean it up a little to ensure there is no possibility of bad values $new_list = preg_replace("#,{2,}#", ",", $new_list);
| // And clean it up a little to ensure there is no possibility of bad values $new_list = preg_replace("#,{2,}#", ",", $new_list);
|
Zeile 2800 | Zeile 2801 |
---|
$message_js .= " $.jGrowl('{$error_message}');"; }
|
$message_js .= " $.jGrowl('{$error_message}');"; }
|
if($mybb->get_input('delete', 1))
| if($mybb->get_input('delete', MyBB::INPUT_INT))
|
{ header("Content-type: text/javascript");
|
{ header("Content-type: text/javascript");
|
echo "$(\"#".$mybb->get_input('manage')."_".$mybb->get_input('delete', 1)."\").remove();\n";
| echo "$(\"#".$mybb->get_input('manage')."_".$mybb->get_input('delete', MyBB::INPUT_INT)."\").remove();\n";
|
if($new_list == "") { echo "\$(\"#".$mybb->get_input('manage')."_count\").html(\"0\");\n";
| if($new_list == "") { echo "\$(\"#".$mybb->get_input('manage')."_count\").html(\"0\");\n";
|
Zeile 2826 | Zeile 2827 |
---|
$mybb->input['action'] = "editlists"; } else
|
$mybb->input['action'] = "editlists"; } else
|
{
| {
|
if($error_message) { $message .= "<br />".$error_message;
| if($error_message) { $message .= "<br />".$error_message;
|
Zeile 2866 | Zeile 2867 |
---|
$lang->current_buddies = $lang->sprintf($lang->current_buddies, $buddy_count); if(!$buddy_list)
|
$lang->current_buddies = $lang->sprintf($lang->current_buddies, $buddy_count); if(!$buddy_list)
|
{ eval("\$buddy_list = \"".$templates->get("usercp_editlists_no_buddies")."\";");
| { eval("\$buddy_list = \"".$templates->get("usercp_editlists_no_buddies")."\";");
|
}
// Fetch out ignore list users
| }
// Fetch out ignore list users
|
Zeile 2890 | Zeile 2891 |
---|
} eval("\$ignore_list .= \"".$templates->get("usercp_editlists_user")."\";"); ++$ignore_count;
|
} eval("\$ignore_list .= \"".$templates->get("usercp_editlists_user")."\";"); ++$ignore_count;
|
}
| }
|
}
$lang->current_ignored_users = $lang->sprintf($lang->current_ignored_users, $ignore_count); if(!$ignore_list)
|
}
$lang->current_ignored_users = $lang->sprintf($lang->current_ignored_users, $ignore_count); if(!$ignore_list)
|
{
| {
|
eval("\$ignore_list = \"".$templates->get("usercp_editlists_no_ignored")."\";"); }
| eval("\$ignore_list = \"".$templates->get("usercp_editlists_no_ignored")."\";"); }
|
Zeile 2906 | Zeile 2907 |
---|
{ echo $ignore_list; echo "<script type=\"text/javascript\"> $(\"#ignored_count\").html(\"{$ignore_count}\"); {$message_js}</script>";
|
{ echo $ignore_list; echo "<script type=\"text/javascript\"> $(\"#ignored_count\").html(\"{$ignore_count}\"); {$message_js}</script>";
|
} else {
| } else {
|
if(isset($sent) && $sent === true) { $sent_rows = ''; $query = $db->query(" SELECT r.*, u.username
|
if(isset($sent) && $sent === true) { $sent_rows = ''; $query = $db->query(" SELECT r.*, u.username
|
FROM `".TABLE_PREFIX."buddyrequests` r LEFT JOIN `".TABLE_PREFIX."users` u ON (u.uid=r.touid) WHERE r.uid=".(int)$mybb->user['uid']." ");
| FROM ".TABLE_PREFIX."buddyrequests r LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=r.touid) WHERE r.uid=".(int)$mybb->user['uid']);
|
while($request = $db->fetch_array($query)) { $bgcolor = alt_trow(); $request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['touid']); $request['date'] = my_date($mybb->settings['dateformat'], $request['date'])." ".my_date($mybb->settings['timeformat'], $request['date']); eval("\$sent_rows .= \"".$templates->get("usercp_editlists_sent_request", 1, 0)."\";");
|
while($request = $db->fetch_array($query)) { $bgcolor = alt_trow(); $request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['touid']); $request['date'] = my_date($mybb->settings['dateformat'], $request['date'])." ".my_date($mybb->settings['timeformat'], $request['date']); eval("\$sent_rows .= \"".$templates->get("usercp_editlists_sent_request", 1, 0)."\";");
|
}
| }
|
if($sent_rows == '') { eval("\$sent_rows = \"".$templates->get("usercp_editlists_no_requests", 1, 0)."\";");
| if($sent_rows == '') { eval("\$sent_rows = \"".$templates->get("usercp_editlists_no_requests", 1, 0)."\";");
|
Zeile 2935 | Zeile 2936 |
---|
echo $sentrequests; echo $sent_requests."<script type=\"text/javascript\">{$message_js}</script>";
|
echo $sentrequests; echo $sent_requests."<script type=\"text/javascript\">{$message_js}</script>";
|
}
| }
|
else { echo $buddy_list;
| else { echo $buddy_list;
|
Zeile 2948 | Zeile 2949 |
---|
$received_rows = ''; $query = $db->query(" SELECT r.*, u.username
|
$received_rows = ''; $query = $db->query(" SELECT r.*, u.username
|
FROM `".TABLE_PREFIX."buddyrequests` r LEFT JOIN `".TABLE_PREFIX."users` u ON (u.uid=r.uid) WHERE r.touid=".(int)$mybb->user['uid']." ");
| FROM ".TABLE_PREFIX."buddyrequests r LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=r.uid) WHERE r.touid=".(int)$mybb->user['uid']);
|
while($request = $db->fetch_array($query)) { $bgcolor = alt_trow();
| while($request = $db->fetch_array($query)) { $bgcolor = alt_trow();
|
Zeile 2970 | Zeile 2971 |
---|
$sent_rows = ''; $query = $db->query(" SELECT r.*, u.username
|
$sent_rows = ''; $query = $db->query(" SELECT r.*, u.username
|
FROM `".TABLE_PREFIX."buddyrequests` r LEFT JOIN `".TABLE_PREFIX."users` u ON (u.uid=r.touid) WHERE r.uid=".(int)$mybb->user['uid']." ");
| FROM ".TABLE_PREFIX."buddyrequests r LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=r.touid) WHERE r.uid=".(int)$mybb->user['uid']);
|
while($request = $db->fetch_array($query)) { $bgcolor = alt_trow();
| while($request = $db->fetch_array($query)) { $bgcolor = alt_trow();
|
Zeile 3063 | Zeile 3064 |
---|
verify_post_check($mybb->get_input('my_post_key'));
$plugins->run_hooks("usercp_do_drafts_start");
|
verify_post_check($mybb->get_input('my_post_key'));
$plugins->run_hooks("usercp_do_drafts_start");
|
$mybb->input['deletedraft'] = $mybb->get_input('deletedraft', 2);
| $mybb->input['deletedraft'] = $mybb->get_input('deletedraft', MyBB::INPUT_ARRAY);
|
if(empty($mybb->input['deletedraft'])) { error($lang->no_drafts_selected);
| if(empty($mybb->input['deletedraft'])) { error($lang->no_drafts_selected);
|
Zeile 3082 | Zeile 3083 |
---|
} } if($tidin)
|
} } if($tidin)
|
{
| {
|
$tidin = implode(",", $tidin); $db->delete_query("threads", "tid IN ($tidin) AND visible='-2' AND uid='".$mybb->user['uid']."'"); $tidinp = "OR tid IN ($tidin)";
| $tidin = implode(",", $tidin); $db->delete_query("threads", "tid IN ($tidin) AND visible='-2' AND uid='".$mybb->user['uid']."'"); $tidinp = "OR tid IN ($tidin)";
|
Zeile 3113 | Zeile 3114 |
---|
$usergroups = $mybb->cache->read('usergroups');
// Changing our display group
|
$usergroups = $mybb->cache->read('usergroups');
// Changing our display group
|
if($mybb->get_input('displaygroup', 1))
| if($mybb->get_input('displaygroup', MyBB::INPUT_INT))
|
{ // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
| { // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
Zeile 3123 | Zeile 3124 |
---|
error($lang->not_member_of_group); }
|
error($lang->not_member_of_group); }
|
$dispgroup = $usergroups[$mybb->get_input('displaygroup', 1)];
| $dispgroup = $usergroups[$mybb->get_input('displaygroup', MyBB::INPUT_INT)];
|
if($dispgroup['candisplaygroup'] != 1)
|
if($dispgroup['candisplaygroup'] != 1)
|
{
| {
|
error($lang->cannot_set_displaygroup); }
|
error($lang->cannot_set_displaygroup); }
|
$db->update_query("users", array('displaygroup' => $mybb->get_input('displaygroup', 1)), "uid='".$mybb->user['uid']."'");
| $db->update_query("users", array('displaygroup' => $mybb->get_input('displaygroup', MyBB::INPUT_INT)), "uid='".$mybb->user['uid']."'");
|
$cache->update_moderators(); $plugins->run_hooks("usercp_usergroups_change_displaygroup"); redirect("usercp.php?action=usergroups", $lang->display_group_changed);
| $cache->update_moderators(); $plugins->run_hooks("usercp_usergroups_change_displaygroup"); redirect("usercp.php?action=usergroups", $lang->display_group_changed);
|
Zeile 3136 | Zeile 3137 |
---|
}
// Leaving a group
|
}
// Leaving a group
|
if($mybb->get_input('leavegroup', 1))
| if($mybb->get_input('leavegroup', MyBB::INPUT_INT))
|
{ // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
{ // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(my_strpos($ingroups, ",".$mybb->get_input('leavegroup', 1).",") === false)
| if(my_strpos($ingroups, ",".$mybb->get_input('leavegroup', MyBB::INPUT_INT).",") === false)
|
{ error($lang->not_member_of_group); }
|
{ error($lang->not_member_of_group); }
|
if($mybb->user['usergroup'] == $mybb->get_input('leavegroup', 1))
| if($mybb->user['usergroup'] == $mybb->get_input('leavegroup', MyBB::INPUT_INT))
|
{ error($lang->cannot_leave_primary_group); }
|
{ error($lang->cannot_leave_primary_group); }
|
$usergroup = $usergroups[$mybb->get_input('leavegroup', 1)];
| $usergroup = $usergroups[$mybb->get_input('leavegroup', MyBB::INPUT_INT)];
|
if($usergroup['type'] != 4 && $usergroup['type'] != 3 && $usergroup['type'] != 5) { error($lang->cannot_leave_group); }
|
if($usergroup['type'] != 4 && $usergroup['type'] != 3 && $usergroup['type'] != 5) { error($lang->cannot_leave_group); }
|
leave_usergroup($mybb->user['uid'], $mybb->get_input('leavegroup', 1));
| leave_usergroup($mybb->user['uid'], $mybb->get_input('leavegroup', MyBB::INPUT_INT));
|
$plugins->run_hooks("usercp_usergroups_leave_group"); redirect("usercp.php?action=usergroups", $lang->left_group); exit;
| $plugins->run_hooks("usercp_usergroups_leave_group"); redirect("usercp.php?action=usergroups", $lang->left_group); exit;
|
Zeile 3165 | Zeile 3166 |
---|
// List of usergroup leaders $query = $db->query("
|
// List of usergroup leaders $query = $db->query("
|
SELECT g.*, u.username, u.displaygroup, u.usergroup
| SELECT g.*, u.username, u.displaygroup, u.usergroup, u.email, u.language
|
FROM ".TABLE_PREFIX."groupleaders g LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=g.uid) ORDER BY u.username ASC
| FROM ".TABLE_PREFIX."groupleaders g LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=g.uid) ORDER BY u.username ASC
|
Zeile 3176 | Zeile 3177 |
---|
}
// Joining a group
|
}
// Joining a group
|
if($mybb->get_input('joingroup', 1))
| if($mybb->get_input('joingroup', MyBB::INPUT_INT))
|
{ // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
{ // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
$usergroup = $usergroups[$mybb->get_input('joingroup', 1)];
| $usergroup = $usergroups[$mybb->get_input('joingroup', MyBB::INPUT_INT)];
|
if($usergroup['type'] == 5) {
| if($usergroup['type'] == 5) {
|
Zeile 3193 | Zeile 3194 |
---|
error($lang->cannot_join_group); }
|
error($lang->cannot_join_group); }
|
if(my_strpos($ingroups, ",".$mybb->get_input('joingroup', 1).",") !== false)
| if(my_strpos($ingroups, ",".$mybb->get_input('joingroup', MyBB::INPUT_INT).",") !== false)
|
{ error($lang->already_member_of_group); }
|
{ error($lang->already_member_of_group); }
|
$query = $db->simple_select("joinrequests", "*", "uid='".$mybb->user['uid']."' AND gid='".$mybb->get_input('joingroup', 1)."'");
| $query = $db->simple_select("joinrequests", "*", "uid='".$mybb->user['uid']."' AND gid='".$mybb->get_input('joingroup', MyBB::INPUT_INT)."'");
|
$joinrequest = $db->fetch_array($query); if($joinrequest['rid']) {
| $joinrequest = $db->fetch_array($query); if($joinrequest['rid']) {
|
Zeile 3209 | Zeile 3210 |
---|
$now = TIME_NOW; $joinrequest = array( "uid" => $mybb->user['uid'],
|
$now = TIME_NOW; $joinrequest = array( "uid" => $mybb->user['uid'],
|
"gid" => $mybb->get_input('joingroup', 1),
| "gid" => $mybb->get_input('joingroup', MyBB::INPUT_INT),
|
"reason" => $db->escape_string($mybb->get_input('reason')), "dateline" => TIME_NOW );
$db->insert_query("joinrequests", $joinrequest);
|
"reason" => $db->escape_string($mybb->get_input('reason')), "dateline" => TIME_NOW );
$db->insert_query("joinrequests", $joinrequest);
|
foreach($groupleaders as $key => $groupleader)
| foreach($groupleaders[$usergroup['gid']] as $leader)
|
{
|
{
|
foreach($groupleader as $leader) { $leader_user = get_user($leader['uid']); // Load language $lang->set_language($leader_user['language']); $lang->load("messages");
| // Load language $lang->set_language($leader['language']); $lang->load("messages");
|
|
|
$subject = $lang->sprintf($lang->emailsubject_newjoinrequest, $mybb->settings['bbname']); $message = $lang->sprintf($lang->email_groupleader_joinrequest, $leader_user['username'], $mybb->user['username'], $usergroups[$leader['gid']]['title'], $mybb->settings['bbname'], $mybb->get_input('reason'), $mybb->settings['bburl'], $leader['gid']); my_mail($leader_user['email'], $subject, $message); }
| $subject = $lang->sprintf($lang->emailsubject_newjoinrequest, $mybb->settings['bbname']); $message = $lang->sprintf($lang->email_groupleader_joinrequest, $leader['username'], $mybb->user['username'], $usergroup['title'], $mybb->settings['bbname'], $mybb->get_input('reason'), $mybb->settings['bburl'], $leader['gid']); my_mail($leader['email'], $subject, $message);
|
}
// Load language
| }
// Load language
|
Zeile 3242 | Zeile 3238 |
---|
} elseif($usergroup['type'] == 4) {
|
} elseif($usergroup['type'] == 4) {
|
$joingroup = $mybb->get_input('joingroup', 1);
| $joingroup = $mybb->get_input('joingroup', MyBB::INPUT_INT);
|
eval("\$joinpage = \"".$templates->get("usercp_usergroups_joingroup")."\";"); output_page($joinpage); exit; } else {
|
eval("\$joinpage = \"".$templates->get("usercp_usergroups_joingroup")."\";"); output_page($joinpage); exit; } else {
|
join_usergroup($mybb->user['uid'], $mybb->get_input('joingroup', 1));
| join_usergroup($mybb->user['uid'], $mybb->get_input('joingroup', MyBB::INPUT_INT));
|
$plugins->run_hooks("usercp_usergroups_join_group"); redirect("usercp.php?action=usergroups", $lang->joined_group); } }
// Accepting invitation
|
$plugins->run_hooks("usercp_usergroups_join_group"); redirect("usercp.php?action=usergroups", $lang->joined_group); } }
// Accepting invitation
|
if($mybb->get_input('acceptinvite', 1))
| if($mybb->get_input('acceptinvite', MyBB::INPUT_INT))
|
{ // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
{ // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
$usergroup = $usergroups[$mybb->get_input('acceptinvite', 1)];
| $usergroup = $usergroups[$mybb->get_input('acceptinvite', MyBB::INPUT_INT)];
|
|
|
if(my_strpos($ingroups, ",".$mybb->get_input('acceptinvite', 1).",") !== false)
| if(my_strpos($ingroups, ",".$mybb->get_input('acceptinvite', MyBB::INPUT_INT).",") !== false)
|
{ error($lang->already_accepted_invite); }
|
{ error($lang->already_accepted_invite); }
|
$query = $db->simple_select("joinrequests", "*", "uid='".$mybb->user['uid']."' AND gid='".$mybb->get_input('acceptinvite', 1)."' AND invite='1'");
| $query = $db->simple_select("joinrequests", "*", "uid='".$mybb->user['uid']."' AND gid='".$mybb->get_input('acceptinvite', MyBB::INPUT_INT)."' AND invite='1'");
|
$joinrequest = $db->fetch_array($query); if($joinrequest['rid']) {
|
$joinrequest = $db->fetch_array($query); if($joinrequest['rid']) {
|
join_usergroup($mybb->user['uid'], $mybb->get_input('acceptinvite', 1)); $db->delete_query("joinrequests", "uid='{$mybb->user['uid']}' AND gid='".$mybb->get_input('acceptinvite', 1)."'");
| join_usergroup($mybb->user['uid'], $mybb->get_input('acceptinvite', MyBB::INPUT_INT)); $db->delete_query("joinrequests", "uid='{$mybb->user['uid']}' AND gid='".$mybb->get_input('acceptinvite', MyBB::INPUT_INT)."'");
|
$plugins->run_hooks("usercp_usergroups_accept_invite"); redirect("usercp.php?action=usergroups", $lang->joined_group); }
| $plugins->run_hooks("usercp_usergroups_accept_invite"); redirect("usercp.php?action=usergroups", $lang->joined_group); }
|
Zeile 3317 | Zeile 3313 |
---|
{ $memberlistlink = $moderaterequestslink = ''; eval("\$memberlistlink = \"".$templates->get("usercp_usergroups_leader_usergroup_memberlist")."\";");
|
{ $memberlistlink = $moderaterequestslink = ''; eval("\$memberlistlink = \"".$templates->get("usercp_usergroups_leader_usergroup_memberlist")."\";");
|
| $usergroup['title'] = htmlspecialchars_uni($usergroup['title']);
|
if($usergroup['type'] != 4) { $usergroup['joinrequests'] = '--';
| if($usergroup['type'] != 4) { $usergroup['joinrequests'] = '--';
|
Zeile 3338 | Zeile 3335 |
---|
// Fetch the list of groups the member is in // Do the primary group first $usergroup = $usergroups[$mybb->user['usergroup']];
|
// Fetch the list of groups the member is in // Do the primary group first $usergroup = $usergroups[$mybb->user['usergroup']];
|
| $usergroup['title'] = htmlspecialchars_uni($usergroup['title']); $usergroup['usertitle'] = htmlspecialchars_uni($usergroup['usertitle']); $usergroup['description'] = htmlspecialchars_uni($usergroup['description']);
|
eval("\$leavelink = \"".$templates->get("usercp_usergroups_memberof_usergroup_leaveprimary")."\";"); $trow = alt_trow(); if($usergroup['candisplaygroup'] == 1 && $usergroup['gid'] == $mybb->user['displaygroup'])
| eval("\$leavelink = \"".$templates->get("usercp_usergroups_memberof_usergroup_leaveprimary")."\";"); $trow = alt_trow(); if($usergroup['candisplaygroup'] == 1 && $usergroup['gid'] == $mybb->user['displaygroup'])
|
Zeile 3376 | Zeile 3376 |
---|
}
$description = '';
|
}
$description = '';
|
| $usergroup['title'] = htmlspecialchars_uni($usergroup['title']); $usergroup['usertitle'] = htmlspecialchars_uni($usergroup['usertitle']);
|
if($usergroup['description']) {
|
if($usergroup['description']) {
|
| $usergroup['description'] = htmlspecialchars_uni($usergroup['description']);
|
eval("\$description = \"".$templates->get("usercp_usergroups_memberof_usergroup_description")."\";"); } $trow = alt_trow();
| eval("\$description = \"".$templates->get("usercp_usergroups_memberof_usergroup_description")."\";"); } $trow = alt_trow();
|
Zeile 3419 | Zeile 3422 |
---|
$trow = alt_trow();
$description = '';
|
$trow = alt_trow();
$description = '';
|
| $usergroup['title'] = htmlspecialchars_uni($usergroup['title']);
|
if($usergroup['description']) {
|
if($usergroup['description']) {
|
| $usergroup['description'] = htmlspecialchars_uni($usergroup['description']);
|
eval("\$description = \"".$templates->get("usercp_usergroups_joinable_usergroup_description")."\";"); }
| eval("\$description = \"".$templates->get("usercp_usergroups_joinable_usergroup_description")."\";"); }
|
Zeile 3506 | Zeile 3511 |
---|
}
$perpage = $mybb->settings['threadsperpage'];
|
}
$perpage = $mybb->settings['threadsperpage'];
|
$page = $mybb->get_input('page', 1);
| $page = $mybb->get_input('page', MyBB::INPUT_INT);
|
if($page > 0) {
| if($page > 0) {
|
Zeile 3665 | Zeile 3670 |
---|
$lang->posts_day = $lang->sprintf($lang->posts_day, my_number_format($perday), $percent); $regdate = my_date('relative', $mybb->user['regdate']);
|
$lang->posts_day = $lang->sprintf($lang->posts_day, my_number_format($perday), $percent); $regdate = my_date('relative', $mybb->user['regdate']);
|
$useravatar = format_avatar(htmlspecialchars_uni($mybb->user['avatar']), $mybb->user['avatardimensions'], '100x100');
| $useravatar = format_avatar($mybb->user['avatar'], $mybb->user['avatardimensions'], '100x100');
|
eval("\$avatar = \"".$templates->get("usercp_currentavatar")."\";");
|
eval("\$avatar = \"".$templates->get("usercp_currentavatar")."\";");
|
$usergroup = $groupscache[$mybb->user['usergroup']]['title'];
| $usergroup = htmlspecialchars_uni($groupscache[$mybb->user['usergroup']]['title']);
|
if($mybb->user['usergroup'] == 5 && $mybb->settings['regtype'] != "admin") { eval("\$usergroup .= \"".$templates->get("usercp_resendactivation")."\";");
| if($mybb->user['usergroup'] == 5 && $mybb->settings['regtype'] != "admin") { eval("\$usergroup .= \"".$templates->get("usercp_resendactivation")."\";");
|
Zeile 3885 | Zeile 3890 |
---|
{ $icon = $icon_cache[$thread['icon']]; $icon['path'] = str_replace("{theme}", $theme['imgdir'], $icon['path']);
|
{ $icon = $icon_cache[$thread['icon']]; $icon['path'] = str_replace("{theme}", $theme['imgdir'], $icon['path']);
|
| $icon['path'] = htmlspecialchars_uni($icon['path']); $icon['name'] = htmlspecialchars_uni($icon['name']);
|
eval("\$icon = \"".$templates->get("usercp_subscriptions_thread_icon")."\";"); } else
| eval("\$icon = \"".$templates->get("usercp_subscriptions_thread_icon")."\";"); } else
|
Zeile 3953 | Zeile 3960 |
---|
$inactiveforums = get_inactive_forums(); if($unviewable_forums) {
|
$inactiveforums = get_inactive_forums(); if($unviewable_forums) {
|
$f_perm_sql = " AND t.fid NOT IN (".$unviewable_forums.")";
| $f_perm_sql = " AND t.fid NOT IN ($unviewable_forums)";
|
} if($inactiveforums) {
|
} if($inactiveforums) {
|
$f_perm_sql .= " AND t.fid NOT IN (".$inactiveforums.")";
| $f_perm_sql .= " AND t.fid NOT IN ($inactiveforums)";
|
}
$visible = " AND t.visible != 0";
| }
$visible = " AND t.visible != 0";
|
Zeile 4071 | Zeile 4078 |
---|
{ $icon = $icon_cache[$thread['icon']]; $icon['path'] = str_replace("{theme}", $theme['imgdir'], $icon['path']);
|
{ $icon = $icon_cache[$thread['icon']]; $icon['path'] = str_replace("{theme}", $theme['imgdir'], $icon['path']);
|
| $icon['path'] = htmlspecialchars_uni($icon['path']); $icon['name'] = htmlspecialchars_uni($icon['name']);
|
eval("\$icon = \"".$templates->get("usercp_subscriptions_thread_icon")."\";"); } else
| eval("\$icon = \"".$templates->get("usercp_subscriptions_thread_icon")."\";"); } else
|