Zeile 26 | Zeile 26 |
---|
$templatelist .= ",usercp_editlists_no_buddies,usercp_editlists_no_ignored,usercp_editlists_no_requests,usercp_editlists_received_requests,usercp_editlists_sent_requests,usercp_drafts_draft_thread,usercp_drafts_draft_forum"; $templatelist .= ",usercp_usergroups_leader_usergroup_memberlist,usercp_usergroups_leader_usergroup_moderaterequests,usercp_usergroups_memberof_usergroup_leaveprimary,usercp_usergroups_memberof_usergroup_display,usercp_email"; $templatelist .= ",usercp_usergroups_memberof_usergroup_leaveleader,usercp_usergroups_memberof_usergroup_leaveother,usercp_usergroups_memberof_usergroup_leave,usercp_usergroups_joinable_usergroup_description,usercp_options_time_format";
|
$templatelist .= ",usercp_editlists_no_buddies,usercp_editlists_no_ignored,usercp_editlists_no_requests,usercp_editlists_received_requests,usercp_editlists_sent_requests,usercp_drafts_draft_thread,usercp_drafts_draft_forum"; $templatelist .= ",usercp_usergroups_leader_usergroup_memberlist,usercp_usergroups_leader_usergroup_moderaterequests,usercp_usergroups_memberof_usergroup_leaveprimary,usercp_usergroups_memberof_usergroup_display,usercp_email"; $templatelist .= ",usercp_usergroups_memberof_usergroup_leaveleader,usercp_usergroups_memberof_usergroup_leaveother,usercp_usergroups_memberof_usergroup_leave,usercp_usergroups_joinable_usergroup_description,usercp_options_time_format";
|
$templatelist .= ",usercp_editlists_sent_request,usercp_editlists_received_request,usercp_drafts_none,usercp_usergroups_memberof_usergroup_setdisplay,usercp_usergroups_memberof_usergroup_description,usercp_editlists_user,usercp_profile_day,usercp_profile_contact_fields,usercp_profile_contact_fields_field, usercp_profile_website";
| $templatelist .= ",usercp_editlists_sent_request,usercp_editlists_received_request,usercp_drafts_none,usercp_usergroups_memberof_usergroup_setdisplay,usercp_usergroups_memberof_usergroup_description,usercp_editlists_user,usercp_profile_day,usercp_profile_contact_fields,usercp_profile_contact_fields_field,usercp_profile_website";
|
require_once "./global.php"; require_once MYBB_ROOT."inc/functions_post.php";
| require_once "./global.php"; require_once MYBB_ROOT."inc/functions_post.php";
|
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 411 | Zeile 411 |
---|
$contact_fields = array(); $contactfields = '';
|
$contact_fields = array(); $contactfields = '';
|
| $cfieldsshow = false;
|
foreach(array('icq', 'aim', 'yahoo', 'skype', 'google') as $cfield) { $contact_fields[$cfield] = ''; $csetting = 'allow'.$cfield.'field'; if($mybb->settings[$csetting] == '')
|
foreach(array('icq', 'aim', 'yahoo', 'skype', 'google') as $cfield) { $contact_fields[$cfield] = ''; $csetting = 'allow'.$cfield.'field'; if($mybb->settings[$csetting] == '')
|
{ continue; }
if($mybb->settings[$csetting] != -1 && !is_member($mybb->settings[$csetting])) { continue; }
| { continue; }
if(!is_member($mybb->settings[$csetting])) { continue; }
|
$cfieldsshow = true;
$lang_string = 'contact_field_'.$cfield; $lang_string = $lang->{$lang_string}; $cfvalue = htmlspecialchars_uni($user[$cfield]);
|
$cfieldsshow = true;
$lang_string = 'contact_field_'.$cfield; $lang_string = $lang->{$lang_string}; $cfvalue = htmlspecialchars_uni($user[$cfield]);
|
|
|
eval('$contact_fields[$cfield] = "'.$templates->get('usercp_profile_contact_fields_field').'";'); }
|
eval('$contact_fields[$cfield] = "'.$templates->get('usercp_profile_contact_fields_field').'";'); }
|
if(!empty($cfieldsshow))
| if($cfieldsshow)
|
{ eval('$contactfields = "'.$templates->get('usercp_profile_contact_fields').'";');
|
{ eval('$contactfields = "'.$templates->get('usercp_profile_contact_fields').'";');
|
}
| }
|
if($mybb->settings['allowaway'] != 0) {
| if($mybb->settings['allowaway'] != 0) {
|
Zeile 445 | Zeile 447 |
---|
if($errors) { if($user['away'] == 1)
|
if($errors) { if($user['away'] == 1)
|
{ $awaycheck[1] = "checked=\"checked\""; } else { $awaycheck[0] = "checked=\"checked\"";
| { $awaycheck[1] = "checked=\"checked\""; } else { $awaycheck[0] = "checked=\"checked\"";
|
} $returndate = array();
|
} $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 466 | Zeile 468 |
---|
$awaydate = my_date($mybb->settings['dateformat'], $mybb->user['awaydate']); $awaycheck[1] = "checked=\"checked\""; $awaynotice = $lang->sprintf($lang->away_notice_away, $awaydate);
|
$awaydate = my_date($mybb->settings['dateformat'], $mybb->user['awaydate']); $awaycheck[1] = "checked=\"checked\""; $awaynotice = $lang->sprintf($lang->away_notice_away, $awaydate);
|
}
| }
|
else { $awaynotice = $lang->away_notice;
| else { $awaynotice = $lang->away_notice;
|
Zeile 511 | Zeile 513 |
---|
// 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 521 |
---|
{ 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 584 | Zeile 580 |
---|
$val = str_replace("\n", "\\n", $val);
$sel = "";
|
$val = str_replace("\n", "\\n", $val);
$sel = "";
|
if($val == $seloptions[$val])
| if(isset($seloptions[$val]) && $val == $seloptions[$val])
|
{ $sel = " selected=\"selected\""; }
| { $sel = " selected=\"selected\""; }
|
Zeile 664 | Zeile 660 |
---|
foreach($expoptions as $key => $val) { $checked = "";
|
foreach($expoptions as $key => $val) { $checked = "";
|
if($val == $seloptions[$val])
| if(isset($seloptions[$val]) && $val == $seloptions[$val])
|
{ $checked = " checked=\"checked\""; }
| { $checked = " checked=\"checked\""; }
|
Zeile 724 | Zeile 720 |
---|
{ if($title['posts'] <= $mybb->user['postnum']) {
|
{ if($title['posts'] <= $mybb->user['postnum']) {
|
$defaulttitle = $title['title'];
| $defaulttitle = htmlspecialchars_uni($title['title']);
|
break; } } } else {
|
break; } } } else {
|
$defaulttitle = $mybb->usergroup['usertitle'];
| $defaulttitle = htmlspecialchars_uni($mybb->usergroup['usertitle']);
|
}
$newtitle = '';
| }
$newtitle = '';
|
Zeile 792 | Zeile 788 |
---|
$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')),
|
"timezone" => $db->escape_string($mybb->get_input('timezoneoffset')),
|
"language" => $mybb->get_input('language')
| "language" => $mybb->get_input('language'), 'usergroup' => $mybb->user['usergroup'], 'additionalgroups' => $mybb->user['additionalgroups']
|
);
$user['options'] = array(
|
);
$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 1241 | Zeile 1239 |
---|
"code" => $activationcode, "type" => "e", "misc" => $db->escape_string($mybb->get_input('email'))
|
"code" => $activationcode, "type" => "e", "misc" => $db->escape_string($mybb->get_input('email'))
|
);
$db->insert_query("awaitingactivation", $newactivation);
| );
$db->insert_query("awaitingactivation", $newactivation);
|
$mail_message = $lang->sprintf($lang->email_changeemail, $mybb->user['username'], $mybb->settings['bbname'], $mybb->user['email'], $mybb->get_input('email'), $mybb->settings['bburl'], $activationcode, $mybb->user['username'], $mybb->user['uid']);
$lang->emailsubject_changeemail = $lang->sprintf($lang->emailsubject_changeemail, $mybb->settings['bbname']); my_mail($mybb->get_input('email'), $lang->emailsubject_changeemail, $mail_message);
|
$mail_message = $lang->sprintf($lang->email_changeemail, $mybb->user['username'], $mybb->settings['bbname'], $mybb->user['email'], $mybb->get_input('email'), $mybb->settings['bburl'], $activationcode, $mybb->user['username'], $mybb->user['uid']);
$lang->emailsubject_changeemail = $lang->sprintf($lang->emailsubject_changeemail, $mybb->settings['bbname']); my_mail($mybb->get_input('email'), $lang->emailsubject_changeemail, $mail_message);
|
|
|
$plugins->run_hooks("usercp_do_email_verify"); error($lang->redirect_changeemail_activation); }
| $plugins->run_hooks("usercp_do_email_verify"); error($lang->redirect_changeemail_activation); }
|
Zeile 1282 | Zeile 1280 |
---|
else { $email = $email2 = '';
|
else { $email = $email2 = '';
|
}
$plugins->run_hooks("usercp_email");
| }
$plugins->run_hooks("usercp_email");
|
eval("\$changemail = \"".$templates->get("usercp_email")."\";"); output_page($changemail);
| eval("\$changemail = \"".$templates->get("usercp_email")."\";"); output_page($changemail);
|
Zeile 1361 | Zeile 1359 |
---|
}
if(validate_password_from_uid($mybb->user['uid'], $mybb->get_input('password')) == false)
|
}
if(validate_password_from_uid($mybb->user['uid'], $mybb->get_input('password')) == false)
|
{ $errors[] = $lang->error_invalidpassword; }
| { $errors[] = $lang->error_invalidpassword; }
|
else { // Set up user handler.
| else { // Set up user handler.
|
Zeile 1378 | Zeile 1376 |
---|
$userhandler->set_data($user);
if(!$userhandler->validate_user())
|
$userhandler->set_data($user);
if(!$userhandler->validate_user())
|
{
| {
|
$errors = $userhandler->get_friendly_errors(); } else
| $errors = $userhandler->get_friendly_errors(); } else
|
Zeile 1388 | Zeile 1386 |
---|
redirect("usercp.php?action=changename", $lang->redirect_namechanged);
}
|
redirect("usercp.php?action=changename", $lang->redirect_namechanged);
}
|
}
| }
|
if(count($errors) > 0) { $errors = inline_error($errors);
| if(count($errors) > 0) { $errors = inline_error($errors);
|
Zeile 1402 | Zeile 1400 |
---|
if($mybb->usergroup['canchangename'] != 1) { error_no_permission();
|
if($mybb->usergroup['canchangename'] != 1) { error_no_permission();
|
}
| }
|
$plugins->run_hooks("usercp_changename_end");
| $plugins->run_hooks("usercp_changename_end");
|
Zeile 1423 | Zeile 1421 |
---|
}
// 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 1482 | Zeile 1480 |
---|
}
$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 1559 | Zeile 1557 |
---|
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 2043 | Zeile 2036 |
---|
if($mybb->settings['sigmycode'] == 1) { $sigmycode = $lang->on;
|
if($mybb->settings['sigmycode'] == 1) { $sigmycode = $lang->on;
|
}
| }
|
else { $sigmycode = $lang->off;
| else { $sigmycode = $lang->off;
|
Zeile 2158 | Zeile 2151 |
---|
$s = "?s={$maxheight}&r={$rating}&d=mm";
$updated_avatar = array(
|
$s = "?s={$maxheight}&r={$rating}&d=mm";
$updated_avatar = array(
|
"avatar" => "http://www.gravatar.com/avatar/{$email}{$s}.jpg",
| "avatar" => "https://www.gravatar.com/avatar/{$email}{$s}",
|
"avatardimensions" => "{$maxheight}|{$maxheight}", "avatartype" => "gravatar" );
| "avatardimensions" => "{$maxheight}|{$maxheight}", "avatartype" => "gravatar" );
|
Zeile 2193 | Zeile 2186 |
---|
if(!$type) { $avatar_error = $lang->error_invalidavatarurl;
|
if(!$type) { $avatar_error = $lang->error_invalidavatarurl;
|
}
| }
|
} }
| } }
|
Zeile 2255 | Zeile 2248 |
---|
$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 2309 | Zeile 2302 |
---|
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 2335 | Zeile 2328 |
---|
// 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']);
|
// And clean it up a little to ensure there is no possibility of bad values $new_list = preg_replace("#,{2,}#", ",", $new_list); $new_list = preg_replace("#[^0-9,]#", "", $new_list);
if(my_substr($new_list, 0, 1) == ",") { $new_list = my_substr($new_list, 1); } if(my_substr($new_list, -1) == ",")
| // And clean it up a little to ensure there is no possibility of bad values $new_list = preg_replace("#,{2,}#", ",", $new_list); $new_list = preg_replace("#[^0-9,]#", "", $new_list);
if(my_substr($new_list, 0, 1) == ",") { $new_list = my_substr($new_list, 1); } if(my_substr($new_list, -1) == ",")
|
{ $new_list = my_substr($new_list, 0, my_strlen($new_list)-2); }
| { $new_list = my_substr($new_list, 0, my_strlen($new_list)-2); }
|
Zeile 2413 | Zeile 2406 |
---|
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 2442 | Zeile 2435 |
---|
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))
|
{
| {
|
error($lang->invalid_request); }
| error($lang->invalid_request); }
|
Zeile 2468 | Zeile 2461 |
---|
$existing_users = array(); $selected_list = array(); if($mybb->get_input('manage') == "ignored")
|
$existing_users = array(); $selected_list = array(); if($mybb->get_input('manage') == "ignored")
|
{ if($mybb->user['ignorelist']) {
| { if($mybb->user['ignorelist']) {
|
$existing_users = explode(",", $mybb->user['ignorelist']); }
| $existing_users = explode(",", $mybb->user['ignorelist']); }
|
Zeile 2507 | Zeile 2500 |
---|
$users = array_map("trim", $users); $users = array_unique($users); foreach($users as $key => $username)
|
$users = array_map("trim", $users); $users = array_unique($users); foreach($users as $key => $username)
|
{
| {
|
if(empty($username))
|
if(empty($username))
|
{ unset($users[$key]);
| { unset($users[$key]);
|
continue; }
| continue; }
|
Zeile 2519 | Zeile 2512 |
---|
$adding_self = true; unset($users[$key]); continue;
|
$adding_self = true; unset($users[$key]); continue;
|
}
| }
|
$users[$key] = $db->escape_string($username); }
| $users[$key] = $db->escape_string($username); }
|
Zeile 2544 | Zeile 2537 |
---|
// 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 2690 | Zeile 2693 |
---|
}
// 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(!empty($user)) { // We want to remove us from this user's buddy list
|
Zeile 2710 | Zeile 2713 |
---|
$user['buddylist'] = array(); }
|
$user['buddylist'] = array(); }
|
$key = array_search((int)$mybb->input['delete'], $user['buddylist']);
| $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
| unset($user['buddylist'][$key]); // Now we have the new list, so throw it all back together
|
Zeile 2802 | Zeile 2805 |
---|
$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 2916 | Zeile 2919 |
---|
$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 2950 | Zeile 2953 |
---|
$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 2963 | Zeile 2966 |
---|
} if($received_rows == '')
|
} if($received_rows == '')
|
{
| {
|
eval("\$received_rows = \"".$templates->get("usercp_editlists_no_requests")."\";"); }
|
eval("\$received_rows = \"".$templates->get("usercp_editlists_no_requests")."\";"); }
|
|
|
eval("\$received_requests = \"".$templates->get("usercp_editlists_received_requests")."\";"); $sent_rows = ''; $query = $db->query(" SELECT r.*, u.username
|
eval("\$received_requests = \"".$templates->get("usercp_editlists_received_requests")."\";"); $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 3048 | Zeile 3051 |
---|
} } else
|
} } else
|
{
| {
|
$disable_delete_drafts = 'disabled="disabled"'; eval("\$drafts = \"".$templates->get("usercp_drafts_none")."\";"); }
| $disable_delete_drafts = 'disabled="disabled"'; eval("\$drafts = \"".$templates->get("usercp_drafts_none")."\";"); }
|
Zeile 3058 | Zeile 3061 |
---|
eval("\$draftlist = \"".$templates->get("usercp_drafts")."\";"); output_page($draftlist); }
|
eval("\$draftlist = \"".$templates->get("usercp_drafts")."\";"); output_page($draftlist); }
|
|
|
if($mybb->input['action'] == "do_drafts" && $mybb->request_method == "post") { // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
$plugins->run_hooks("usercp_do_drafts_start");
|
if($mybb->input['action'] == "do_drafts" && $mybb->request_method == "post") { // Verify incoming POST request 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);
|
}
| }
|
$pidin = array(); $tidin = array(); foreach($mybb->input['deletedraft'] as $id => $val)
| $pidin = array(); $tidin = array(); foreach($mybb->input['deletedraft'] as $id => $val)
|
Zeile 3084 | Zeile 3087 |
---|
} } 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)"; } if($pidin || $tidinp)
|
$tidin = implode(",", $tidin); $db->delete_query("threads", "tid IN ($tidin) AND visible='-2' AND uid='".$mybb->user['uid']."'"); $tidinp = "OR tid IN ($tidin)"; } if($pidin || $tidinp)
|
{
| {
|
$pidinq = $tidin = ''; if($pidin) {
| $pidinq = $tidin = ''; if($pidin) {
|
Zeile 3100 | Zeile 3103 |
---|
else { $pidinq = "1=0";
|
else { $pidinq = "1=0";
|
}
| }
|
$db->delete_query("posts", "($pidinq $tidinp) AND visible='-2' AND uid='".$mybb->user['uid']."'"); } $plugins->run_hooks("usercp_do_drafts_end");
| $db->delete_query("posts", "($pidinq $tidinp) AND visible='-2' AND uid='".$mybb->user['uid']."'"); } $plugins->run_hooks("usercp_do_drafts_end");
|
Zeile 3115 | Zeile 3118 |
---|
$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'));
if(my_strpos($ingroups, ",".$mybb->input['displaygroup'].",") === false)
|
{ // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(my_strpos($ingroups, ",".$mybb->input['displaygroup'].",") === false)
|
{
| {
|
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) { error($lang->cannot_set_displaygroup); }
|
if($dispgroup['candisplaygroup'] != 1) { 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);
|
exit;
| exit;
|
}
// 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;
|
}
| }
|
$groupleaders = array();
// List of usergroup leaders $query = $db->query("
|
$groupleaders = array();
// 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 "); while($leader = $db->fetch_array($query))
|
FROM ".TABLE_PREFIX."groupleaders g LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=g.uid) ORDER BY u.username ASC "); while($leader = $db->fetch_array($query))
|
{
| {
|
$groupleaders[$leader['gid']][$leader['uid']] = $leader; }
|
$groupleaders[$leader['gid']][$leader['uid']] = $leader; }
|
|
|
// Joining a group
|
// Joining a group
|
if($mybb->get_input('joingroup', 1)) { // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
$usergroup = $usergroups[$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'));
$usergroup = $usergroups[$mybb->get_input('joingroup', MyBB::INPUT_INT)];
|
if($usergroup['type'] == 5) { error($lang->cannot_join_invite_group);
|
if($usergroup['type'] == 5) { error($lang->cannot_join_invite_group);
|
}
| }
|
if(($usergroup['type'] != 4 && $usergroup['type'] != 3) || !$usergroup['gid']) { error($lang->cannot_join_group); }
|
if(($usergroup['type'] != 4 && $usergroup['type'] != 3) || !$usergroup['gid']) { 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'])
|
{
| {
|
error($lang->already_sent_join_request); } if($mybb->get_input('do') == "joingroup" && $usergroup['type'] == 4)
| error($lang->already_sent_join_request); } if($mybb->get_input('do') == "joingroup" && $usergroup['type'] == 4)
|
Zeile 3211 | Zeile 3214 |
---|
$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)
| if(array_key_exists($usergroup['gid'], $groupleaders))
|
{
|
{
|
foreach($groupleader as $leader)
| foreach($groupleaders[$usergroup['gid']] as $leader)
|
{
|
{
|
$leader_user = get_user($leader['uid']);
| |
// Load language
|
// Load language
|
$lang->set_language($leader_user['language']);
| $lang->set_language($leader['language']);
|
$lang->load("messages");
|
$lang->load("messages");
|
|
|
$subject = $lang->sprintf($lang->emailsubject_newjoinrequest, $mybb->settings['bbname']);
|
$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);
| $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);
|
} }
| } }
|
Zeile 3244 | Zeile 3245 |
---|
} 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 3285 | Zeile 3286 |
---|
} } // Show listing of various group related things
|
} } // Show listing of various group related things
|
|
|
// List of groups this user is a leader of $groupsledlist = '';
| // List of groups this user is a leader of $groupsledlist = '';
|
Zeile 3298 | Zeile 3299 |
---|
FROM ".TABLE_PREFIX."groupleaders l LEFT JOIN ".TABLE_PREFIX."usergroups g ON(g.gid=l.gid) LEFT JOIN ".TABLE_PREFIX."users u ON(((','|| u.additionalgroups|| ',' LIKE '%,'|| g.gid|| ',%') OR u.usergroup = g.gid))
|
FROM ".TABLE_PREFIX."groupleaders l LEFT JOIN ".TABLE_PREFIX."usergroups g ON(g.gid=l.gid) LEFT JOIN ".TABLE_PREFIX."users u ON(((','|| u.additionalgroups|| ',' LIKE '%,'|| g.gid|| ',%') OR u.usergroup = g.gid))
|
LEFT JOIN ".TABLE_PREFIX."joinrequests j ON(j.gid=g.gid AND j.uid != 0)
| LEFT JOIN ".TABLE_PREFIX."joinrequests j ON(j.gid=g.gid AND j.uid != 0)
|
WHERE l.uid='".$mybb->user['uid']."' GROUP BY g.gid, g.title, g.type, l.canmanagerequests, l.canmanagemembers, l.caninvitemembers ");
| WHERE l.uid='".$mybb->user['uid']."' GROUP BY g.gid, g.title, g.type, l.canmanagerequests, l.canmanagemembers, l.caninvitemembers ");
|
Zeile 3311 | Zeile 3312 |
---|
LEFT JOIN ".TABLE_PREFIX."users u ON(((CONCAT(',', u.additionalgroups, ',') LIKE CONCAT('%,', g.gid, ',%')) OR u.usergroup = g.gid)) LEFT JOIN ".TABLE_PREFIX."joinrequests j ON(j.gid=g.gid AND j.uid != 0) WHERE l.uid='".$mybb->user['uid']."'
|
LEFT JOIN ".TABLE_PREFIX."users u ON(((CONCAT(',', u.additionalgroups, ',') LIKE CONCAT('%,', g.gid, ',%')) OR u.usergroup = g.gid)) LEFT JOIN ".TABLE_PREFIX."joinrequests j ON(j.gid=g.gid AND j.uid != 0) WHERE l.uid='".$mybb->user['uid']."'
|
GROUP BY l.gid
| GROUP BY g.gid, g.title, g.type, l.canmanagerequests, l.canmanagemembers, l.caninvitemembers
|
"); }
| "); }
|
Zeile 3319 | Zeile 3320 |
---|
{ $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 3335 | Zeile 3337 |
---|
if($groupsledlist) { eval("\$leadinggroups = \"".$templates->get("usercp_usergroups_leader")."\";");
|
if($groupsledlist) { eval("\$leadinggroups = \"".$templates->get("usercp_usergroups_leader")."\";");
|
}
| }
|
// 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 3378 | Zeile 3383 |
---|
}
$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 3421 | Zeile 3429 |
---|
$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 3434 | Zeile 3444 |
---|
elseif($usergroup['type'] == 5) { $conditions = $lang->usergroup_joins_invite;
|
elseif($usergroup['type'] == 5) { $conditions = $lang->usergroup_joins_invite;
|
} else
| } else
|
{ $conditions = $lang->usergroup_joins_anyone;
|
{ $conditions = $lang->usergroup_joins_anyone;
|
}
| }
|
if(isset($appliedjoin[$usergroup['gid']]) && $usergroup['type'] != 5) { $applydate = my_date('relative', $appliedjoin[$usergroup['gid']]);
| if(isset($appliedjoin[$usergroup['gid']]) && $usergroup['type'] != 5) { $applydate = my_date('relative', $appliedjoin[$usergroup['gid']]);
|
Zeile 3456 | Zeile 3466 |
---|
else { eval("\$joinlink = \"".$templates->get("usercp_usergroups_joinable_usergroup_join")."\";");
|
else { eval("\$joinlink = \"".$templates->get("usercp_usergroups_joinable_usergroup_join")."\";");
|
}
| }
|
$usergroupleaders = ''; if(!empty($groupleaders[$usergroup['gid']])) {
| $usergroupleaders = ''; if(!empty($groupleaders[$usergroup['gid']])) {
|
Zeile 3481 | Zeile 3491 |
---|
if($joinablegrouplist) { eval("\$joinablegroups = \"".$templates->get("usercp_usergroups_joinable")."\";");
|
if($joinablegrouplist) { eval("\$joinablegroups = \"".$templates->get("usercp_usergroups_joinable")."\";");
|
}
$plugins->run_hooks("usercp_usergroups_end");
| }
$plugins->run_hooks("usercp_usergroups_end");
|
eval("\$groupmemberships = \"".$templates->get("usercp_usergroups")."\";"); output_page($groupmemberships); }
| eval("\$groupmemberships = \"".$templates->get("usercp_usergroups")."\";"); output_page($groupmemberships); }
|
Zeile 3508 | Zeile 3518 |
---|
}
$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 3667 | Zeile 3677 |
---|
$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'); $avatar_username = htmlspecialchars_uni($mybb->user['username']);
|
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 3686 | Zeile 3697 |
---|
$latest_warnings = ''; if($mybb->settings['enablewarningsystem'] != 0 && $mybb->settings['canviewownwarning'] != 0) {
|
$latest_warnings = ''; if($mybb->settings['enablewarningsystem'] != 0 && $mybb->settings['canviewownwarning'] != 0) {
|
| if($mybb->settings['maxwarningpoints'] < 1) { $mybb->settings['maxwarningpoints'] = 10; }
|
$warning_level = round($mybb->user['warningpoints']/$mybb->settings['maxwarningpoints']*100); if($warning_level > 100) {
| $warning_level = round($mybb->user['warningpoints']/$mybb->settings['maxwarningpoints']*100); if($warning_level > 100) {
|
Zeile 3957 | Zeile 3972 |
---|
$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";
|