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 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] = '';
| foreach(array('icq', 'aim', 'yahoo', 'skype', 'google') as $cfield) { $contact_fields[$cfield] = '';
|
Zeile 434 | Zeile 436 |
---|
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').'";'); }
|
Zeile 512 | Zeile 514 |
---|
$altbg = "trow1"; $requiredfields = $customfields = ''; $mybb->input['profile_fields'] = $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY);
|
$altbg = "trow1"; $requiredfields = $customfields = ''; $mybb->input['profile_fields'] = $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY);
|
|
|
$pfcache = $cache->read('profilefields');
if(is_array($pfcache))
| $pfcache = $cache->read('profilefields');
if(is_array($pfcache))
|
Zeile 536 | Zeile 538 |
---|
else { $options = array();
|
else { $options = array();
|
}
| }
|
$field = "fid{$profilefield['fid']}"; $select = ''; if($errors)
| $field = "fid{$profilefield['fid']}"; $select = ''; if($errors)
|
Zeile 546 | Zeile 548 |
---|
$mybb->input['profile_fields'][$field] = ''; } $userfield = $mybb->input['profile_fields'][$field];
|
$mybb->input['profile_fields'][$field] = ''; } $userfield = $mybb->input['profile_fields'][$field];
|
}
| }
|
else
|
else
|
{
| {
|
$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);
$sel = ""; if($val == $seloptions[$val]) { $sel = " selected=\"selected\""; }
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
| } } $expoptions = explode("\n", $options); if(is_array($expoptions)) { foreach($expoptions as $key => $val) { $val = trim($val); $val = str_replace("\n", "\\n", $val);
$sel = ""; if(isset($seloptions[$val]) && $val == $seloptions[$val]) { $sel = " selected=\"selected\""; }
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
|
} if(!$profilefield['length']) {
| } if(!$profilefield['length']) {
|
Zeile 609 | Zeile 611 |
---|
}
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
|
}
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
|
} if(!$profilefield['length']) { $profilefield['length'] = 1; }
| } if(!$profilefield['length']) { $profilefield['length'] = 1; }
|
eval("\$code = \"".$templates->get("usercp_profile_profilefields_select")."\";"); } } elseif($type == "radio")
|
eval("\$code = \"".$templates->get("usercp_profile_profilefields_select")."\";"); } } elseif($type == "radio")
|
{ $expoptions = explode("\n", $options); if(is_array($expoptions))
| { $expoptions = explode("\n", $options); if(is_array($expoptions))
|
{ foreach($expoptions as $key => $val) { $checked = ""; if($val == $userfield)
|
{ foreach($expoptions as $key => $val) { $checked = ""; if($val == $userfield)
|
{
| {
|
$checked = " checked=\"checked\""; }
| $checked = " checked=\"checked\""; }
|
Zeile 640 | Zeile 642 |
---|
if($errors) { $useropts = $userfield;
|
if($errors) { $useropts = $userfield;
|
}
| }
|
else
|
else
|
{
| {
|
$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;
|
Zeile 658 | 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\""; }
eval("\$code .= \"".$templates->get("usercp_profile_profilefields_checkbox")."\";"); }
|
{ $checked = " checked=\"checked\""; }
eval("\$code .= \"".$templates->get("usercp_profile_profilefields_checkbox")."\";"); }
|
} }
| } }
|
elseif($type == "textarea") { $value = htmlspecialchars_uni($userfield);
| elseif($type == "textarea") { $value = htmlspecialchars_uni($userfield);
|
Zeile 718 | Zeile 720 |
---|
{ if($title['posts'] <= $mybb->user['postnum']) {
|
{ if($title['posts'] <= $mybb->user['postnum']) {
|
$defaulttitle = $title['title'];
| $defaulttitle = htmlspecialchars_uni($title['title']);
|
break; } }
| break; } }
|
Zeile 790 | Zeile 792 |
---|
"dateformat" => $mybb->get_input('dateformat', MyBB::INPUT_INT), "timeformat" => $mybb->get_input('timeformat', MyBB::INPUT_INT), "timezone" => $db->escape_string($mybb->get_input('timezoneoffset')),
|
"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')
| "language" => $mybb->get_input('language'), 'usergroup' => $mybb->user['usergroup'], 'additionalgroups' => $mybb->user['additionalgroups']
|
);
$user['options'] = array(
| );
$user['options'] = array(
|
Zeile 821 | Zeile 825 |
---|
if($mybb->settings['usertppoptions']) { $user['options']['tpp'] = $mybb->get_input('tpp', MyBB::INPUT_INT);
|
if($mybb->settings['usertppoptions']) { $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', MyBB::INPUT_INT); }
| $user['options']['ppp'] = $mybb->get_input('ppp', MyBB::INPUT_INT); }
|
Zeile 1640 | Zeile 1644 |
---|
else { $icon = " ";
|
else { $icon = " ";
|
}
| }
|
// Determine the folder $folder = ''; $folder_label = '';
if(isset($thread['doticon']))
|
// Determine the folder $folder = ''; $folder_label = '';
if(isset($thread['doticon']))
|
{
| {
|
$folder = "dot_"; $folder_label .= $lang->icon_dot; }
| $folder = "dot_"; $folder_label .= $lang->icon_dot; }
|
Zeile 1660 | Zeile 1664 |
---|
if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid']) { $forum_read = $readforums[$thread['fid']];
|
if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid']) { $forum_read = $readforums[$thread['fid']];
|
|
|
$read_cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24; if($forum_read == 0 || $forum_read < $read_cutoff) { $forum_read = $read_cutoff;
|
$read_cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24; if($forum_read == 0 || $forum_read < $read_cutoff) { $forum_read = $read_cutoff;
|
} }
| } }
|
else { $forum_read = $forumsread[$thread['fid']];
| else { $forum_read = $forumsread[$thread['fid']];
|
Zeile 1691 | Zeile 1695 |
---|
}
if(!$lastread)
|
}
if(!$lastread)
|
{
| {
|
$readcookie = $threadread = my_get_array_cookie("threadread", $thread['tid']); if($readcookie > $forum_read) {
| $readcookie = $threadread = my_get_array_cookie("threadread", $thread['tid']); if($readcookie > $forum_read) {
|
Zeile 1791 | Zeile 1795 |
---|
$plugins->run_hooks("usercp_forumsubscriptions_start");
if($mybb->user['uid'] == 0)
|
$plugins->run_hooks("usercp_forumsubscriptions_start");
if($mybb->user['uid'] == 0)
|
{ // Build a forum cache. $query = $db->query("
| { // Build a forum cache. $query = $db->query("
|
SELECT fid FROM ".TABLE_PREFIX."forums WHERE active != 0
| SELECT fid FROM ".TABLE_PREFIX."forums WHERE active != 0
|
Zeile 1806 | Zeile 1810 |
---|
} } else
|
} } else
|
{
| {
|
// Build a forum cache. $query = $db->query(" SELECT f.fid, fr.dateline AS lastread
| // Build a forum cache. $query = $db->query(" SELECT f.fid, fr.dateline AS lastread
|
Zeile 1844 | Zeile 1848 |
---|
$forums = ''; while($forum = $db->fetch_array($query))
|
$forums = ''; while($forum = $db->fetch_array($query))
|
{
| {
|
$forum_url = get_forum_link($forum['fid']); $forumpermissions = $fpermissions[$forum['fid']];
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0) { continue;
|
$forum_url = get_forum_link($forum['fid']); $forumpermissions = $fpermissions[$forum['fid']];
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0) { continue;
|
}
| }
|
$lightbulb = get_forum_lightbulb(array('open' => $forum['open'], 'lastread' => $forum['lastread']), array('lastpost' => $forum['lastpost'])); $folder = $lightbulb['folder'];
if(isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] != 0)
|
$lightbulb = get_forum_lightbulb(array('open' => $forum['open'], 'lastread' => $forum['lastread']), array('lastpost' => $forum['lastpost'])); $folder = $lightbulb['folder'];
if(isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] != 0)
|
{
| {
|
$posts = '-'; $threads = '-'; }
| $posts = '-'; $threads = '-'; }
|
Zeile 1870 | Zeile 1874 |
---|
if($forum['lastpost'] == 0 || $forum['lastposter'] == "") { eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost_never")."\";");
|
if($forum['lastpost'] == 0 || $forum['lastposter'] == "") { eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost_never")."\";");
|
}
| }
|
// Hide last post elseif(isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] != 0 && $forum['lastposteruid'] != $mybb->user['uid']) {
| // Hide last post elseif(isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] != 0 && $forum['lastposteruid'] != $mybb->user['uid']) {
|
Zeile 1895 | Zeile 1899 |
---|
if($mybb->settings['showdescriptions'] == 0) { $forum['description'] = "";
|
if($mybb->settings['showdescriptions'] == 0) { $forum['description'] = "";
|
}
| }
|
eval("\$forums .= \"".$templates->get("usercp_forumsubscriptions_forum")."\";"); }
| eval("\$forums .= \"".$templates->get("usercp_forumsubscriptions_forum")."\";"); }
|
Zeile 1915 | Zeile 1919 |
---|
{ // 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'));
|
|
|
$plugins->run_hooks("usercp_do_editsig_start");
// User currently has a suspended signature
| $plugins->run_hooks("usercp_do_editsig_start");
// User currently has a suspended signature
|
Zeile 1946 | Zeile 1950 |
---|
$plugins->run_hooks("usercp_do_editsig_end"); redirect("usercp.php?action=editsig", $lang->redirect_sigupdated); }
|
$plugins->run_hooks("usercp_do_editsig_end"); redirect("usercp.php?action=editsig", $lang->redirect_sigupdated); }
|
|
|
if($mybb->input['action'] == "editsig") { $plugins->run_hooks("usercp_editsig_start");
| if($mybb->input['action'] == "editsig") { $plugins->run_hooks("usercp_editsig_start");
|
Zeile 2048 | Zeile 2052 |
---|
if($mybb->settings['sigimgcode'] == 1) { $sigimgcode = $lang->on;
|
if($mybb->settings['sigimgcode'] == 1) { $sigimgcode = $lang->on;
|
}
| }
|
else { $sigimgcode = $lang->off;
| else { $sigimgcode = $lang->off;
|
Zeile 2147 | 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 2251 | Zeile 2255 |
---|
{ list($maxwidth, $maxheight) = explode("x", my_strtolower($mybb->settings['maxavatardims'])); $lang->avatar_note .= "<br />".$lang->sprintf($lang->avatar_note_dimensions, $maxwidth, $maxheight);
|
{ list($maxwidth, $maxheight) = explode("x", my_strtolower($mybb->settings['maxavatardims'])); $lang->avatar_note .= "<br />".$lang->sprintf($lang->avatar_note_dimensions, $maxwidth, $maxheight);
|
}
| }
|
if($mybb->settings['avatarsize']) { $maxsize = get_friendly_size($mybb->settings['avatarsize']*1024);
| if($mybb->settings['avatarsize']) { $maxsize = get_friendly_size($mybb->settings['avatarsize']*1024);
|
Zeile 2261 | Zeile 2265 |
---|
$auto_resize = ''; if($mybb->settings['avatarresizing'] == "auto")
|
$auto_resize = ''; if($mybb->settings['avatarresizing'] == "auto")
|
{
| {
|
eval("\$auto_resize = \"".$templates->get("usercp_avatar_auto_resize_auto")."\";"); } else if($mybb->settings['avatarresizing'] == "user")
| eval("\$auto_resize = \"".$templates->get("usercp_avatar_auto_resize_auto")."\";"); } else if($mybb->settings['avatarresizing'] == "user")
|
Zeile 2271 | Zeile 2275 |
---|
$avatarupload = ''; if($mybb->usergroup['canuploadavatars'] == 1)
|
$avatarupload = ''; if($mybb->usergroup['canuploadavatars'] == 1)
|
{
| {
|
eval("\$avatarupload = \"".$templates->get("usercp_avatar_upload")."\";"); }
$removeavatar = ''; if(!empty($mybb->user['avatar']))
|
eval("\$avatarupload = \"".$templates->get("usercp_avatar_upload")."\";"); }
$removeavatar = ''; if(!empty($mybb->user['avatar']))
|
{
| {
|
eval("\$removeavatar = \"".$templates->get("usercp_avatar_remove")."\";"); }
$plugins->run_hooks("usercp_avatar_end");
|
eval("\$removeavatar = \"".$templates->get("usercp_avatar_remove")."\";"); }
$plugins->run_hooks("usercp_avatar_end");
|
|
|
if(!isset($avatar_error)) { $avatar_error = '';
|
if(!isset($avatar_error)) { $avatar_error = '';
|
}
| }
|
eval("\$avatar = \"".$templates->get("usercp_avatar")."\";"); output_page($avatar); }
|
eval("\$avatar = \"".$templates->get("usercp_avatar")."\";"); output_page($avatar); }
|
|
|
if($mybb->input['action'] == "acceptrequest")
|
if($mybb->input['action'] == "acceptrequest")
|
{ // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
// Validate request $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)) { error($lang->invalid_request); }
| { // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
// Validate request $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)) { error($lang->invalid_request); }
|
$plugins->run_hooks("usercp_acceptrequest_start");
| $plugins->run_hooks("usercp_acceptrequest_start");
|
Zeile 2314 | Zeile 2318 |
---|
if($user['buddylist'] != '') { $user['buddylist'] = explode(',', $user['buddylist']);
|
if($user['buddylist'] != '') { $user['buddylist'] = explode(',', $user['buddylist']);
|
} else {
| } else {
|
$user['buddylist'] = array(); }
| $user['buddylist'] = array(); }
|
Zeile 2354 | Zeile 2358 |
---|
} $mybb->user['buddylist'][] = (int)$request['uid'];
|
} $mybb->user['buddylist'][] = (int)$request['uid'];
|
|
|
// Now we have the new list, so throw it all back together $new_list = implode(",", $mybb->user['buddylist']);
| // Now we have the new list, so throw it all back together $new_list = implode(",", $mybb->user['buddylist']);
|
Zeile 2372 | Zeile 2376 |
---|
} $mybb->user['buddylist'] = $db->escape_string($new_list);
|
} $mybb->user['buddylist'] = $db->escape_string($new_list);
|
|
|
$db->update_query("users", array('buddylist' => $mybb->user['buddylist']), "uid='".(int)$mybb->user['uid']."'"); $pm = array(
| $db->update_query("users", array('buddylist' => $mybb->user['buddylist']), "uid='".(int)$mybb->user['uid']."'"); $pm = array(
|
Zeile 2403 | Zeile 2407 |
---|
// Validate request $query = $db->simple_select('buddyrequests', '*', 'id='.$mybb->get_input('id', MyBB::INPUT_INT).' AND touid='.(int)$mybb->user['uid']);
|
// Validate request $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)) {
|
error($lang->invalid_request); }
| error($lang->invalid_request); }
|
Zeile 2424 | Zeile 2428 |
---|
$plugins->run_hooks("usercp_declinerequest_end"); redirect("usercp.php?action=editlists", $lang->buddyrequest_declined);
|
$plugins->run_hooks("usercp_declinerequest_end"); redirect("usercp.php?action=editlists", $lang->buddyrequest_declined);
|
}
| }
|
elseif($mybb->input['action'] == "cancelrequest") { // Verify incoming POST request
| elseif($mybb->input['action'] == "cancelrequest") { // Verify incoming POST request
|
Zeile 2437 | Zeile 2441 |
---|
{ error($lang->invalid_request); }
|
{ error($lang->invalid_request); }
|
|
|
$plugins->run_hooks("usercp_cancelrequest_start"); $db->delete_query('buddyrequests', 'id='.(int)$request['id']);
| $plugins->run_hooks("usercp_cancelrequest_start"); $db->delete_query('buddyrequests', 'id='.(int)$request['id']);
|
Zeile 2456 | Zeile 2460 |
---|
$existing_users = array(); $selected_list = array();
|
$existing_users = array(); $selected_list = array();
|
if($mybb->get_input('manage') == "ignored") {
| if($mybb->get_input('manage') == "ignored") {
|
if($mybb->user['ignorelist']) { $existing_users = explode(",", $mybb->user['ignorelist']);
| if($mybb->user['ignorelist']) { $existing_users = explode(",", $mybb->user['ignorelist']);
|
Zeile 3217 | Zeile 3221 |
---|
$db->insert_query("joinrequests", $joinrequest);
|
$db->insert_query("joinrequests", $joinrequest);
|
foreach($groupleaders[$usergroup['gid']] as $leader)
| if(array_key_exists($usergroup['gid'], $groupleaders))
|
{
|
{
|
// 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['username'], $mybb->user['username'], $usergroup['title'], $mybb->settings['bbname'], $mybb->get_input('reason'), $mybb->settings['bburl'], $leader['gid']); my_mail($leader['email'], $subject, $message);
| foreach($groupleaders[$usergroup['gid']] as $leader) { // 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['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 3249 |
---|
eval("\$joinpage = \"".$templates->get("usercp_usergroups_joingroup")."\";"); output_page($joinpage); exit;
|
eval("\$joinpage = \"".$templates->get("usercp_usergroups_joingroup")."\";"); output_page($joinpage); exit;
|
} else
| } else
|
{ join_usergroup($mybb->user['uid'], $mybb->get_input('joingroup', MyBB::INPUT_INT)); $plugins->run_hooks("usercp_usergroups_join_group");
|
{ 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); } }
| redirect("usercp.php?action=usergroups", $lang->joined_group); } }
|
// Accepting invitation if($mybb->get_input('acceptinvite', MyBB::INPUT_INT)) {
| // Accepting invitation if($mybb->get_input('acceptinvite', MyBB::INPUT_INT)) {
|
Zeile 3279 | 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 3292 | 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 3305 | 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 3330 | 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']];
|
Zeile 3363 | Zeile 3370 |
---|
$showmemberof = true;
if(isset($groupleader[$usergroup['gid']]))
|
$showmemberof = true;
if(isset($groupleader[$usergroup['gid']]))
|
{
| {
|
eval("\$leavelink = \"".$templates->get("usercp_usergroups_memberof_usergroup_leaveleader")."\";"); } elseif($usergroup['type'] != 4 && $usergroup['type'] != 3 && $usergroup['type'] != 5)
| eval("\$leavelink = \"".$templates->get("usercp_usergroups_memberof_usergroup_leaveleader")."\";"); } elseif($usergroup['type'] != 4 && $usergroup['type'] != 3 && $usergroup['type'] != 5)
|
Zeile 3382 | Zeile 3389 |
---|
{ $usergroup['description'] = htmlspecialchars_uni($usergroup['description']); eval("\$description = \"".$templates->get("usercp_usergroups_memberof_usergroup_description")."\";");
|
{ $usergroup['description'] = htmlspecialchars_uni($usergroup['description']); eval("\$description = \"".$templates->get("usercp_usergroups_memberof_usergroup_description")."\";");
|
}
| }
|
$trow = alt_trow(); if($usergroup['candisplaygroup'] == 1 && $usergroup['gid'] == $mybb->user['displaygroup']) { eval("\$displaycode = \"".$templates->get("usercp_usergroups_memberof_usergroup_display")."\";"); } elseif($usergroup['candisplaygroup'] == 1)
|
$trow = alt_trow(); if($usergroup['candisplaygroup'] == 1 && $usergroup['gid'] == $mybb->user['displaygroup']) { eval("\$displaycode = \"".$templates->get("usercp_usergroups_memberof_usergroup_display")."\";"); } elseif($usergroup['candisplaygroup'] == 1)
|
{
| {
|
eval("\$displaycode = \"".$templates->get("usercp_usergroups_memberof_usergroup_setdisplay")."\";"); } else
| eval("\$displaycode = \"".$templates->get("usercp_usergroups_memberof_usergroup_setdisplay")."\";"); } else
|
Zeile 3414 | Zeile 3421 |
---|
{ $existinggroups .= ",".$mybb->user['additionalgroups']; }
|
{ $existinggroups .= ",".$mybb->user['additionalgroups']; }
|
|
|
$joinablegroups = $joinablegrouplist = ''; $query = $db->simple_select("usergroups", "*", "(type='3' OR type='4' OR type='5') AND gid NOT IN ($existinggroups)", array('order_by' => 'title')); while($usergroup = $db->fetch_array($query))
| $joinablegroups = $joinablegrouplist = ''; $query = $db->simple_select("usergroups", "*", "(type='3' OR type='4' OR type='5') AND gid NOT IN ($existinggroups)", array('order_by' => 'title')); while($usergroup = $db->fetch_array($query))
|
Zeile 3433 | Zeile 3440 |
---|
if($usergroup['type'] == 4) { $conditions = $lang->usergroup_joins_moderated;
|
if($usergroup['type'] == 4) { $conditions = $lang->usergroup_joins_moderated;
|
}
| }
|
elseif($usergroup['type'] == 5) { $conditions = $lang->usergroup_joins_invite;
| elseif($usergroup['type'] == 5) { $conditions = $lang->usergroup_joins_invite;
|
Zeile 3453 | Zeile 3460 |
---|
$joinlink = $lang->sprintf($lang->pending_invitation, $usergroup['gid'], $mybb->post_code); } elseif($usergroup['type'] == 5)
|
$joinlink = $lang->sprintf($lang->pending_invitation, $usergroup['gid'], $mybb->post_code); } elseif($usergroup['type'] == 5)
|
{
| {
|
$joinlink = "--"; } else { eval("\$joinlink = \"".$templates->get("usercp_usergroups_joinable_usergroup_join")."\";");
|
$joinlink = "--"; } else { eval("\$joinlink = \"".$templates->get("usercp_usergroups_joinable_usergroup_join")."\";");
|
}
| }
|
$usergroupleaders = ''; if(!empty($groupleaders[$usergroup['gid']]))
| $usergroupleaders = ''; if(!empty($groupleaders[$usergroup['gid']]))
|
Zeile 3484 | 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");
|
Zeile 3586 | Zeile 3593 |
---|
$multipage = multipage($totalattachments, $perpage, $page, "usercp.php?action=attachments"); $bandwidth = get_friendly_size($bandwidth);
|
$multipage = multipage($totalattachments, $perpage, $page, "usercp.php?action=attachments"); $bandwidth = get_friendly_size($bandwidth);
|
|
|
if(!$attachments) { eval("\$attachments = \"".$templates->get("usercp_attachments_none")."\";");
| if(!$attachments) { eval("\$attachments = \"".$templates->get("usercp_attachments_none")."\";");
|
Zeile 3671 | Zeile 3678 |
---|
$regdate = my_date('relative', $mybb->user['regdate']);
$useravatar = format_avatar($mybb->user['avatar'], $mybb->user['avatardimensions'], '100x100');
|
$regdate = my_date('relative', $mybb->user['regdate']);
$useravatar = format_avatar($mybb->user['avatar'], $mybb->user['avatardimensions'], '100x100');
|
| $avatar_username = htmlspecialchars_uni($mybb->user['username']);
|
eval("\$avatar = \"".$templates->get("usercp_currentavatar")."\";");
$usergroup = htmlspecialchars_uni($groupscache[$mybb->user['usergroup']]['title']);
| eval("\$avatar = \"".$templates->get("usercp_currentavatar")."\";");
$usergroup = htmlspecialchars_uni($groupscache[$mybb->user['usergroup']]['title']);
|
Zeile 3689 | 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) {
|