Zeile 263 | Zeile 263 |
---|
if(!empty($nav_announcements) || !empty($nav_modqueue) || !empty($nav_reportcenter) || !empty($nav_modlogs)) {
|
if(!empty($nav_announcements) || !empty($nav_modqueue) || !empty($nav_reportcenter) || !empty($nav_modlogs)) {
|
| $expaltext = (in_array("modcpforums", $collapse)) ? "[+]" : "[-]";
|
eval("\$modcp_nav_forums_posts = \"".$templates->get("modcp_nav_forums_posts")."\";"); }
if(!empty($nav_editprofile) || !empty($nav_banning) || !empty($nav_warninglogs) || !empty($nav_ipsearch)) {
|
eval("\$modcp_nav_forums_posts = \"".$templates->get("modcp_nav_forums_posts")."\";"); }
if(!empty($nav_editprofile) || !empty($nav_banning) || !empty($nav_warninglogs) || !empty($nav_ipsearch)) {
|
| $expaltext = (in_array("modcpusers", $collapse)) ? "[+]" : "[-]";
|
eval("\$modcp_nav_users = \"".$templates->get("modcp_nav_users")."\";"); }
| eval("\$modcp_nav_users = \"".$templates->get("modcp_nav_users")."\";"); }
|
Zeile 2585 | Zeile 2587 |
---|
"profile_fields_editable" => true, "website" => $mybb->get_input('website'), "icq" => $mybb->get_input('icq'),
|
"profile_fields_editable" => true, "website" => $mybb->get_input('website'), "icq" => $mybb->get_input('icq'),
|
"aim" => $mybb->get_input('aim'),
| |
"yahoo" => $mybb->get_input('yahoo'), "skype" => $mybb->get_input('skype'), "google" => $mybb->get_input('google'),
| "yahoo" => $mybb->get_input('yahoo'), "skype" => $mybb->get_input('skype'), "google" => $mybb->get_input('google'),
|
Zeile 2616 | Zeile 2617 |
---|
// Set the data of the user in the datahandler. $userhandler->set_data($updated_user);
|
// Set the data of the user in the datahandler. $userhandler->set_data($updated_user);
|
$errors = '';
| $errors = array();
|
// Validate the user and get any errors that might have occurred. if(!$userhandler->validate_user())
| // Validate the user and get any errors that might have occurred. if(!$userhandler->validate_user())
|
Zeile 2664 | Zeile 2665 |
---|
require_once MYBB_ROOT."inc/functions_warnings.php"; foreach($moderator_options as $option)
|
require_once MYBB_ROOT."inc/functions_warnings.php"; foreach($moderator_options as $option)
|
{ $mybb->input[$option['time']] = $mybb->get_input($option['time'], MyBB::INPUT_INT);
| { ${$option['time']} = $mybb->get_input($option['time'], MyBB::INPUT_INT);
|
$mybb->input[$option['period']] = $mybb->get_input($option['period']); if(empty($mybb->input[$option['action']])) {
| $mybb->input[$option['period']] = $mybb->get_input($option['period']); if(empty($mybb->input[$option['action']])) {
|
Zeile 2675 | Zeile 2676 |
---|
$extra_user_updates[$option['update_field']] = 0; $extra_user_updates[$option['update_length']] = 0; }
|
$extra_user_updates[$option['update_field']] = 0; $extra_user_updates[$option['update_length']] = 0; }
|
|
|
// Skip this option if we haven't selected it continue; }
else
|
// Skip this option if we haven't selected it continue; }
else
|
{
| {
|
if($mybb->input[$option['time']] == 0 && $mybb->input[$option['period']] != "never" && $user[$option['update_field']] != 1) { // User has selected a type of ban, but not entered a valid time frame $string = $option['action']."_error"; $errors[] = $lang->$string; }
|
if($mybb->input[$option['time']] == 0 && $mybb->input[$option['period']] != "never" && $user[$option['update_field']] != 1) { // User has selected a type of ban, but not entered a valid time frame $string = $option['action']."_error"; $errors[] = $lang->$string; }
|
|
|
if(!is_array($errors)) { $suspend_length = fetch_time_length((int)$mybb->input[$option['time']], $mybb->input[$option['period']]);
| if(!is_array($errors)) { $suspend_length = fetch_time_length((int)$mybb->input[$option['time']], $mybb->input[$option['period']]);
|
Zeile 2696 | Zeile 2697 |
---|
if($user[$option['update_field']] == 1 && ($mybb->input[$option['time']] || $mybb->input[$option['period']] == "never")) { // We already have a suspension, but entered a new time
|
if($user[$option['update_field']] == 1 && ($mybb->input[$option['time']] || $mybb->input[$option['period']] == "never")) { // We already have a suspension, but entered a new time
|
if($suspend_length == "-1") {
| if($suspend_length == "-1") {
|
// Permanent ban on action $extra_user_updates[$option['update_length']] = 0; }
| // Permanent ban on action $extra_user_updates[$option['update_length']] = 0; }
|
Zeile 2729 | Zeile 2730 |
---|
if(isset($extra_user_updates) && $extra_user_updates['moderateposts'] && $extra_user_updates['suspendposting']) { $errors[] = $lang->suspendmoderate_error;
|
if(isset($extra_user_updates) && $extra_user_updates['moderateposts'] && $extra_user_updates['suspendposting']) { $errors[] = $lang->suspendmoderate_error;
|
}
| }
|
if(is_array($errors)) {
| if(is_array($errors)) {
|
Zeile 2744 | Zeile 2745 |
---|
if(!empty($extra_user_updates)) { $db->update_query("users", $extra_user_updates, "uid='{$user['uid']}'");
|
if(!empty($extra_user_updates)) { $db->update_query("users", $extra_user_updates, "uid='{$user['uid']}'");
|
}
| }
|
log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->edited_user);
$plugins->run_hooks("modcp_do_editprofile_end");
|
log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->edited_user);
$plugins->run_hooks("modcp_do_editprofile_end");
|
|
|
redirect("modcp.php?action=finduser", $lang->redirect_user_updated); } } }
|
redirect("modcp.php?action=finduser", $lang->redirect_user_updated); } } }
|
|
|
if($mybb->input['action'] == "editprofile") { if($mybb->usergroup['caneditprofiles'] == 0)
|
if($mybb->input['action'] == "editprofile") { if($mybb->usergroup['caneditprofiles'] == 0)
|
{ error_no_permission(); }
add_breadcrumb($lang->mcp_nav_editprofile, "modcp.php?action=editprofile");
| { error_no_permission(); }
add_breadcrumb($lang->mcp_nav_editprofile, "modcp.php?action=editprofile");
|
$user = get_user($mybb->get_input('uid', MyBB::INPUT_INT)); if(!$user) { error($lang->error_nomember);
|
$user = get_user($mybb->get_input('uid', MyBB::INPUT_INT)); if(!$user) { error($lang->error_nomember);
|
}
| }
|
// Check if the current user has permission to edit this user if(!modcp_can_manage_user($user['uid'])) { error_no_permission();
|
// Check if the current user has permission to edit this user if(!modcp_can_manage_user($user['uid'])) { error_no_permission();
|
| }
$userperms = user_permissions($user['uid']);
// Set display group $displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");
if(!$user['displaygroup']) { $user['displaygroup'] = $user['usergroup']; }
$display_group = usergroup_displaygroup($user['displaygroup']); if(is_array($display_group)) { $userperms = array_merge($userperms, $display_group);
|
}
if(!my_validate_url($user['website']))
|
}
if(!my_validate_url($user['website']))
|
{
| {
|
$user['website'] = '';
|
$user['website'] = '';
|
}
| }
|
if($user['icq'] != "0") {
| if($user['icq'] != "0") {
|
Zeile 2792 | Zeile 2809 |
---|
if(!isset($birthday[1])) { $birthday[1] = '';
|
if(!isset($birthday[1])) { $birthday[1] = '';
|
}
| }
|
if(!isset($birthday[2])) { $birthday[2] = ''; } list($mybb->input['birthday_day'], $mybb->input['birthday_month'], $mybb->input['birthday_year']) = $birthday;
|
if(!isset($birthday[2])) { $birthday[2] = ''; } list($mybb->input['birthday_day'], $mybb->input['birthday_month'], $mybb->input['birthday_year']) = $birthday;
|
}
| }
|
else
|
else
|
{
| {
|
$errors = inline_error($errors); }
// Sanitize all input
|
$errors = inline_error($errors); }
// Sanitize all input
|
foreach(array('usertitle', 'website', 'icq', 'aim', 'yahoo', 'skype', 'google', 'signature', 'birthday_day', 'birthday_month', 'birthday_year') as $field)
| foreach(array('usertitle', 'website', 'icq', 'yahoo', 'skype', 'google', 'signature', 'birthday_day', 'birthday_month', 'birthday_year') as $field)
|
{ $mybb->input[$field] = htmlspecialchars_uni($mybb->get_input($field)); }
|
{ $mybb->input[$field] = htmlspecialchars_uni($mybb->get_input($field)); }
|
// Custom user title, check to see if we have a default group title if(!$user['displaygroup']) { $user['displaygroup'] = $user['usergroup']; }
$displaygroupfields = array('usertitle'); $display_group = usergroup_displaygroup($user['displaygroup']);
if(!empty($display_group['usertitle']))
| // Custom user title if(!empty($userperms['usertitle']))
|
{
|
{
|
$defaulttitle = htmlspecialchars_uni($display_group['usertitle']);
| $defaulttitle = htmlspecialchars_uni($userperms['usertitle']);
|
} else {
| } else {
|
Zeile 2843 | Zeile 2852 |
---|
if(empty($user['usertitle'])) { $lang->current_custom_usertitle = '';
|
if(empty($user['usertitle'])) { $lang->current_custom_usertitle = '';
|
}
| }
|
$bdaydaysel = $selected = ''; for($day = 1; $day <= 31; ++$day) {
| $bdaydaysel = $selected = ''; for($day = 1; $day <= 31; ++$day) {
|
Zeile 2871 | Zeile 2880 |
---|
{ $awaycheck = array('', ''); if($errors)
|
{ $awaycheck = array('', ''); if($errors)
|
{ if($user['away'] == 1) { $awaycheck[1] = "checked=\"checked\""; }
| { if($user['away'] == 1) { $awaycheck[1] = "checked=\"checked\""; }
|
else { $awaycheck[0] = "checked=\"checked\"";
| else { $awaycheck[0] = "checked=\"checked\"";
|
Zeile 2894 | Zeile 2903 |
---|
$awaydate = my_date($mybb->settings['dateformat'], $user['awaydate']); $awaycheck[1] = "checked=\"checked\""; $awaynotice = $lang->sprintf($lang->away_notice_away, $awaydate);
|
$awaydate = my_date($mybb->settings['dateformat'], $user['awaydate']); $awaycheck[1] = "checked=\"checked\""; $awaynotice = $lang->sprintf($lang->away_notice_away, $awaydate);
|
} else {
| } else {
|
$awaynotice = $lang->away_notice; $awaycheck[0] = "checked=\"checked\""; }
| $awaynotice = $lang->away_notice; $awaycheck[0] = "checked=\"checked\""; }
|
Zeile 2908 | Zeile 2917 |
---|
if($returndate[0] == $day) { $selected = "selected=\"selected\"";
|
if($returndate[0] == $day) { $selected = "selected=\"selected\"";
|
} else
| } else
|
{ $selected = ''; }
| { $selected = ''; }
|
Zeile 2921 | Zeile 2930 |
---|
foreach(range(1, 12) as $month) { $returndatemonthsel[$month] = '';
|
foreach(range(1, 12) as $month) { $returndatemonthsel[$month] = '';
|
}
| }
|
if(isset($returndate[1])) { $returndatemonthsel[$returndate[1]] = " selected=\"selected\"";
|
if(isset($returndate[1])) { $returndatemonthsel[$returndate[1]] = " selected=\"selected\"";
|
}
| }
|
if(!isset($returndate[2])) {
| if(!isset($returndate[2])) {
|
Zeile 2934 | Zeile 2943 |
---|
eval("\$awaysection = \"".$templates->get("usercp_profile_away")."\";"); }
|
eval("\$awaysection = \"".$templates->get("usercp_profile_away")."\";"); }
|
|
|
$plugins->run_hooks("modcp_editprofile_start");
// Fetch profile fields
| $plugins->run_hooks("modcp_editprofile_start");
// Fetch profile fields
|
Zeile 2973 | Zeile 2982 |
---|
else { $userfield = $user_fields[$field];
|
else { $userfield = $user_fields[$field];
|
} if($type == "multiselect") { if($errors) { $useropts = $userfield; } else { $useropts = explode("\n", $userfield); } if(is_array($useropts)) { foreach($useropts as $key => $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(isset($seloptions[$val]) && $val == $seloptions[$val]) { $sel = " selected=\"selected\""; }
| } if($type == "multiselect") { if($errors) { $useropts = $userfield; } else { $useropts = explode("\n", $userfield); } if(is_array($useropts)) { foreach($useropts as $key => $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(isset($seloptions[$val]) && $val == $seloptions[$val]) { $sel = " selected=\"selected\""; }
|
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
|
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
|
}
| }
|
if(!$profilefield['length']) { $profilefield['length'] = 3;
| if(!$profilefield['length']) { $profilefield['length'] = 3;
|
Zeile 3016 | Zeile 3025 |
---|
} } elseif($type == "select")
|
} } elseif($type == "select")
|
{ $expoptions = explode("\n", $options); if(is_array($expoptions))
| { $expoptions = explode("\n", $options); if(is_array($expoptions))
|
{ foreach($expoptions as $key => $val) {
| { foreach($expoptions as $key => $val) {
|
Zeile 3049 | Zeile 3058 |
---|
{ $checked = ""; if($val == $userfield)
|
{ $checked = ""; if($val == $userfield)
|
{ $checked = " checked=\"checked\"";
| { $checked = " checked=\"checked\"";
|
}
eval("\$code .= \"".$templates->get("usercp_profile_profilefields_radio")."\";"); }
|
}
eval("\$code .= \"".$templates->get("usercp_profile_profilefields_radio")."\";"); }
|
}
| }
|
} elseif($type == "checkbox") { if($errors)
|
} elseif($type == "checkbox") { if($errors)
|
{
| {
|
$useropts = $userfield; }
|
$useropts = $userfield; }
|
else { $useropts = explode("\n", $userfield); }
| else { $useropts = explode("\n", $userfield); }
|
if(is_array($useropts)) { foreach($useropts as $key => $val)
| if(is_array($useropts)) { foreach($useropts as $key => $val)
|
Zeile 3128 | Zeile 3137 |
---|
$user['signature'] = htmlspecialchars_uni($user['signature']); $codebuttons = build_mycode_inserter("signature");
|
$user['signature'] = htmlspecialchars_uni($user['signature']); $codebuttons = build_mycode_inserter("signature");
|
|
|
// Do we mark the suspend signature box? if($user['suspendsignature'] || ($mybb->get_input('suspendsignature', MyBB::INPUT_INT) && !empty($errors))) {
| // Do we mark the suspend signature box? if($user['suspendsignature'] || ($mybb->get_input('suspendsignature', MyBB::INPUT_INT) && !empty($errors))) {
|
Zeile 3199 | Zeile 3208 |
---|
$suspendsignature_info = $moderateposts_info = $suspendposting_info = ''; $action_options = $modpost_options = $suspost_options = '';
|
$suspendsignature_info = $moderateposts_info = $suspendposting_info = ''; $action_options = $modpost_options = $suspost_options = '';
|
| $modopts = array();
|
foreach($moderator_options as $option) {
|
foreach($moderator_options as $option) {
|
$mybb->input[$option['time']] = $mybb->get_input($option['time'], MyBB::INPUT_INT);
| ${$option['time']} = $mybb->get_input($option['time'], MyBB::INPUT_INT);
|
// Display the suspension info, if this user has this option suspended if($user[$option['option']]) {
| // Display the suspension info, if this user has this option suspended if($user[$option['option']]) {
|
Zeile 3273 | Zeile 3283 |
---|
{ $newtitle = ''; }
|
{ $newtitle = ''; }
|
| $birthday_year = $mybb->input['birthday_year']; $user_website = $mybb->input['website']; $user_icq = $mybb->input['icq']; $user_skype = $mybb->input['skype']; $user_google = $mybb->input['google']; $user_yahoo = $mybb->input['yahoo'];
|
$plugins->run_hooks("modcp_editprofile_end");
| $plugins->run_hooks("modcp_editprofile_end");
|
Zeile 3420 | Zeile 3437 |
---|
$plugins->run_hooks("modcp_finduser_end");
|
$plugins->run_hooks("modcp_finduser_end");
|
| $username = htmlspecialchars_uni($mybb->get_input('username'));
|
eval("\$finduser = \"".$templates->get("modcp_finduser")."\";"); output_page($finduser); }
| eval("\$finduser = \"".$templates->get("modcp_finduser")."\";"); output_page($finduser); }
|
Zeile 3560 | Zeile 3578 |
---|
$per_page = (int)$mybb->input['filter']['per_page']; } $start = ($page-1) * $per_page;
|
$per_page = (int)$mybb->input['filter']['per_page']; } $start = ($page-1) * $per_page;
|
| $pages = ceil($total_warnings / $per_page); if($page > $pages) { $start = 0; $page = 1; }
|
// Build the base URL for pagination links $url = 'modcp.php?action=warninglogs'; if(is_array($mybb->input['filter']) && count($mybb->input['filter']))
| // Build the base URL for pagination links $url = 'modcp.php?action=warninglogs'; if(is_array($mybb->input['filter']) && count($mybb->input['filter']))
|
Zeile 3568 | Zeile 3592 |
---|
{ $value = urlencode($value); $url .= "&filter[{$field}]={$value}";
|
{ $value = urlencode($value); $url .= "&filter[{$field}]={$value}";
|
} }
| } }
|
$multipage = multipage($total_warnings, $per_page, $page, $url);
// The actual query
| $multipage = multipage($total_warnings, $per_page, $page, $url);
// The actual query
|
Zeile 3607 | Zeile 3631 |
---|
{ $revoked_date = my_date('relative', $row['daterevoked']); eval("\$revoked_text = \"".$templates->get("modcp_warninglogs_warning_revoked")."\";");
|
{ $revoked_date = my_date('relative', $row['daterevoked']); eval("\$revoked_text = \"".$templates->get("modcp_warninglogs_warning_revoked")."\";");
|
}
| }
|
if($row['expires'] > 0) { $expire_date = nice_time($row['expires']-TIME_NOW);
| if($row['expires'] > 0) { $expire_date = nice_time($row['expires']-TIME_NOW);
|
Zeile 3626 | Zeile 3650 |
---|
{ $points = '+'.$row['points']; }
|
{ $points = '+'.$row['points']; }
|
|
|
eval("\$warning_list .= \"".$templates->get("modcp_warninglogs_warning")."\";");
|
eval("\$warning_list .= \"".$templates->get("modcp_warninglogs_warning")."\";");
|
}
| }
|
if(!$warning_list) { eval("\$warning_list = \"".$templates->get("modcp_warninglogs_nologs")."\";"); }
|
if(!$warning_list) { eval("\$warning_list = \"".$templates->get("modcp_warninglogs_nologs")."\";"); }
|
|
|
$plugins->run_hooks("modcp_warninglogs_end");
|
$plugins->run_hooks("modcp_warninglogs_end");
|
| $filter_username = $mybb->input['filter']['username']; $filter_modusername = $mybb->input['filter']['mod_username']; $filter_reason = $mybb->input['filter']['reason'];
|
eval("\$warninglogs = \"".$templates->get("modcp_warninglogs")."\";"); output_page($warninglogs);
| eval("\$warninglogs = \"".$templates->get("modcp_warninglogs")."\";"); output_page($warninglogs);
|