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;
|
Zeile 578 | 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 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\""; }
| { $checked = " checked=\"checked\""; }
|
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 821 | Zeile 823 |
---|
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 2461 | Zeile 2463 |
---|
if($mybb->user['ignorelist']) { $existing_users = explode(",", $mybb->user['ignorelist']);
|
if($mybb->user['ignorelist']) { $existing_users = explode(",", $mybb->user['ignorelist']);
|
}
| }
|
if($mybb->user['buddylist']) { // Create a list of buddies... $selected_list = explode(",", $mybb->user['buddylist']);
|
if($mybb->user['buddylist']) { // Create a list of buddies... $selected_list = explode(",", $mybb->user['buddylist']);
|
}
| }
|
} else {
| } else {
|
Zeile 2485 | Zeile 2487 |
---|
$error_message = ""; $message = "";
|
$error_message = ""; $message = "";
|
|
|
// Adding one or more users to this list if($mybb->get_input('add_username')) {
| // Adding one or more users to this list if($mybb->get_input('add_username')) {
|
Zeile 2510 | Zeile 2512 |
---|
continue; } $users[$key] = $db->escape_string($username);
|
continue; } $users[$key] = $db->escape_string($username);
|
}
| }
|
// Get the requests we have sent that are still pending $query = $db->simple_select('buddyrequests', 'touid', 'uid='.(int)$mybb->user['uid']); $requests = array();
| // Get the requests we have sent that are still pending $query = $db->simple_select('buddyrequests', 'touid', 'uid='.(int)$mybb->user['uid']); $requests = array();
|
Zeile 2610 | Zeile 2612 |
---|
$pm = array( 'subject' => 'buddyrequest_new_buddy', 'message' => 'buddyrequest_new_buddy_message',
|
$pm = array( 'subject' => 'buddyrequest_new_buddy', 'message' => 'buddyrequest_new_buddy_message',
|
'touid' => $user['uid'], 'receivepms' => (int)$user['buddyrequestspm'], 'language' => $user['language'], 'language_file' => 'usercp'
| 'touid' => $user['uid'], 'receivepms' => (int)$user['buddyrequestspm'], 'language' => $user['language'], 'language_file' => 'usercp'
|
); send_pm($pm);
| ); send_pm($pm);
|
Zeile 2662 | Zeile 2664 |
---|
else { $message = $lang->users_added_to_buddy_list;
|
else { $message = $lang->users_added_to_buddy_list;
|
} }
| } }
|
if($adding_self == true) { if($mybb->get_input('manage') == "ignored") { $error_message = $lang->cant_add_self_to_ignore_list;
|
if($adding_self == true) { if($mybb->get_input('manage') == "ignored") { $error_message = $lang->cant_add_self_to_ignore_list;
|
}
| }
|
else { $error_message = $lang->cant_add_self_to_buddy_list;
|
else { $error_message = $lang->cant_add_self_to_buddy_list;
|
} }
| } }
|
if(count($existing_users) == 0) { $message = "";
| if(count($existing_users) == 0) { $message = "";
|
Zeile 2708 | Zeile 2710 |
---|
{ $user['buddylist'] = array(); }
|
{ $user['buddylist'] = array(); }
|
|
|
$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']);
|
$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']);
|
|
|
// 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);
| // 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);
|
Zeile 2816 | Zeile 2818 |
---|
{ echo "\$(\"#buddy_list\").html(\"<li>{$lang->buddy_list_empty}</li>\");\n"; }
|
{ echo "\$(\"#buddy_list\").html(\"<li>{$lang->buddy_list_empty}</li>\");\n"; }
|
}
| }
|
else { echo "\$(\"#".$mybb->get_input('manage')."_count\").html(\"".count(explode(",", $new_list))."\");\n"; } echo $message_js; exit;
|
else { echo "\$(\"#".$mybb->get_input('manage')."_count\").html(\"".count(explode(",", $new_list))."\");\n"; } echo $message_js; exit;
|
}
| }
|
$mybb->input['action'] = "editlists"; } else { if($error_message)
|
$mybb->input['action'] = "editlists"; } else { if($error_message)
|
{
| {
|
$message .= "<br />".$error_message; } redirect("usercp.php?action=editlists#".$mybb->get_input('manage'), $message); } }
|
$message .= "<br />".$error_message; } redirect("usercp.php?action=editlists#".$mybb->get_input('manage'), $message); } }
|
|
|
if($mybb->input['action'] == "editlists") { $plugins->run_hooks("usercp_editlists_start");
|
if($mybb->input['action'] == "editlists") { $plugins->run_hooks("usercp_editlists_start");
|
|
|
$timecut = TIME_NOW - $mybb->settings['wolcutoff'];
|
$timecut = TIME_NOW - $mybb->settings['wolcutoff'];
|
|
|
// Fetch out buddies $buddy_count = 0; $buddy_list = '';
| // Fetch out buddies $buddy_count = 0; $buddy_list = '';
|
Zeile 2867 | Zeile 2869 |
---|
$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 $ignore_count = 0; $ignore_list = '';
| // Fetch out ignore list users $ignore_count = 0; $ignore_list = '';
|
Zeile 3125 | Zeile 3127 |
---|
}
$dispgroup = $usergroups[$mybb->get_input('displaygroup', MyBB::INPUT_INT)];
|
}
$dispgroup = $usergroups[$mybb->get_input('displaygroup', MyBB::INPUT_INT)];
|
if($dispgroup['candisplaygroup'] != 1) {
| if($dispgroup['candisplaygroup'] != 1) {
|
error($lang->cannot_set_displaygroup); } $db->update_query("users", array('displaygroup' => $mybb->get_input('displaygroup', MyBB::INPUT_INT)), "uid='".$mybb->user['uid']."'");
| error($lang->cannot_set_displaygroup); } $db->update_query("users", array('displaygroup' => $mybb->get_input('displaygroup', MyBB::INPUT_INT)), "uid='".$mybb->user['uid']."'");
|
Zeile 3279 | Zeile 3281 |
---|
} } // 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 3310 | Zeile 3312 |
---|
}
while($usergroup = $db->fetch_array($query))
|
}
while($usergroup = $db->fetch_array($query))
|
{
| {
|
$memberlistlink = $moderaterequestslink = ''; eval("\$memberlistlink = \"".$templates->get("usercp_usergroups_leader_usergroup_memberlist")."\";"); $usergroup['title'] = htmlspecialchars_uni($usergroup['title']); if($usergroup['type'] != 4) { $usergroup['joinrequests'] = '--';
|
$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['joinrequests'] > 0 && $usergroup['canmanagerequests'] == 1) { eval("\$moderaterequestslink = \"".$templates->get("usercp_usergroups_leader_usergroup_moderaterequests")."\";");
| if($usergroup['joinrequests'] > 0 && $usergroup['canmanagerequests'] == 1) { eval("\$moderaterequestslink = \"".$templates->get("usercp_usergroups_leader_usergroup_moderaterequests")."\";");
|
Zeile 3330 | Zeile 3332 |
---|
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 3365 |
---|
$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 3384 |
---|
{ $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 3416 |
---|
{ $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 3435 |
---|
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 3455 |
---|
$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 3486 |
---|
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 3588 |
---|
$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 3689 | Zeile 3691 |
---|
$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) {
|