Zeile 2587 | 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'),
|
"yahoo" => $mybb->get_input('yahoo'),
| |
"skype" => $mybb->get_input('skype'), "google" => $mybb->get_input('google'), "signature" => $mybb->get_input('signature'),
| "skype" => $mybb->get_input('skype'), "google" => $mybb->get_input('google'), "signature" => $mybb->get_input('signature'),
|
Zeile 2617 | Zeile 2616 |
---|
// 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 2689 | Zeile 2688 |
---|
$string = $option['action']."_error"; $errors[] = $lang->$string; }
|
$string = $option['action']."_error"; $errors[] = $lang->$string; }
|
if(!is_array($errors))
| else
|
{ $suspend_length = fetch_time_length((int)$mybb->input[$option['time']], $mybb->input[$option['period']]);
| { $suspend_length = fetch_time_length((int)$mybb->input[$option['time']], $mybb->input[$option['period']]);
|
Zeile 2700 | Zeile 2698 |
---|
if($suspend_length == "-1") { // Permanent ban on action
|
if($suspend_length == "-1") { // Permanent ban on action
|
$extra_user_updates[$option['update_length']] = 0; }
| $extra_user_updates[$option['update_length']] = 0; }
|
elseif($suspend_length && $suspend_length != "-1") { // Temporary ban on action
|
elseif($suspend_length && $suspend_length != "-1") { // Temporary ban on action
|
$extra_user_updates[$option['update_length']] = TIME_NOW + $suspend_length;
| $extra_user_updates[$option['update_length']] = TIME_NOW + $suspend_length;
|
} } elseif(!$user[$option['update_field']])
| } } elseif(!$user[$option['update_field']])
|
Zeile 2715 | Zeile 2713 |
---|
if($suspend_length == "-1") { $extra_user_updates[$option['update_length']] = 0;
|
if($suspend_length == "-1") { $extra_user_updates[$option['update_length']] = 0;
|
}
| }
|
else { $extra_user_updates[$option['update_length']] = TIME_NOW + $suspend_length;
| else { $extra_user_updates[$option['update_length']] = TIME_NOW + $suspend_length;
|
Zeile 2728 | Zeile 2726 |
---|
// Those with javascript turned off will be able to select both - cheeky! // Check to make sure we're not moderating AND suspending posting if(isset($extra_user_updates) && $extra_user_updates['moderateposts'] && $extra_user_updates['suspendposting'])
|
// Those with javascript turned off will be able to select both - cheeky! // Check to make sure we're not moderating AND suspending posting if(isset($extra_user_updates) && $extra_user_updates['moderateposts'] && $extra_user_updates['suspendposting'])
|
{
| {
|
$errors[] = $lang->suspendmoderate_error; }
|
$errors[] = $lang->suspendmoderate_error; }
|
if(is_array($errors))
| if(is_array($errors) && !empty($errors))
|
{ $mybb->input['action'] = "editprofile"; }
| { $mybb->input['action'] = "editprofile"; }
|
Zeile 2784 | Zeile 2782 |
---|
if(!$user['displaygroup']) { $user['displaygroup'] = $user['usergroup'];
|
if(!$user['displaygroup']) { $user['displaygroup'] = $user['usergroup'];
|
}
| }
|
$display_group = usergroup_displaygroup($user['displaygroup']); if(is_array($display_group)) {
| $display_group = usergroup_displaygroup($user['displaygroup']); if(is_array($display_group)) {
|
Zeile 2795 | Zeile 2793 |
---|
if(!my_validate_url($user['website'])) { $user['website'] = '';
|
if(!my_validate_url($user['website'])) { $user['website'] = '';
|
}
| }
|
if($user['icq'] != "0") { $user['icq'] = (int)$user['icq'];
| if($user['icq'] != "0") { $user['icq'] = (int)$user['icq'];
|
Zeile 2813 | Zeile 2811 |
---|
if(!isset($birthday[2])) { $birthday[2] = '';
|
if(!isset($birthday[2])) { $birthday[2] = '';
|
}
| }
|
list($mybb->input['birthday_day'], $mybb->input['birthday_month'], $mybb->input['birthday_year']) = $birthday; }
|
list($mybb->input['birthday_day'], $mybb->input['birthday_month'], $mybb->input['birthday_year']) = $birthday; }
|
else { $errors = inline_error($errors); }
| else { $errors = inline_error($errors); }
|
// Sanitize all input
|
// Sanitize all input
|
foreach(array('usertitle', 'website', 'icq', 'yahoo', 'skype', 'google', 'signature', 'birthday_day', 'birthday_month', 'birthday_year') as $field)
| foreach(array('usertitle', 'website', 'icq', '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 if(!empty($userperms['usertitle']))
| // Custom user title if(!empty($userperms['usertitle']))
|
Zeile 2842 | Zeile 2840 |
---|
if($title['posts'] <= $user['postnum']) { $defaulttitle = $title['title'];
|
if($title['posts'] <= $user['postnum']) { $defaulttitle = $title['title'];
|
break; } }
| break; } }
|
}
$user['usertitle'] = htmlspecialchars_uni($user['usertitle']);
| }
$user['usertitle'] = htmlspecialchars_uni($user['usertitle']);
|
Zeile 2928 | Zeile 2926 |
---|
$returndatemonthsel = array(); foreach(range(1, 12) as $month)
|
$returndatemonthsel = array(); foreach(range(1, 12) as $month)
|
{
| {
|
$returndatemonthsel[$month] = ''; } if(isset($returndate[1]))
| $returndatemonthsel[$month] = ''; } if(isset($returndate[1]))
|
Zeile 2984 | Zeile 2982 |
---|
$userfield = $user_fields[$field]; } if($type == "multiselect")
|
$userfield = $user_fields[$field]; } if($type == "multiselect")
|
{
| {
|
if($errors) { $useropts = $userfield; } else
|
if($errors) { $useropts = $userfield; } else
|
{
| {
|
$useropts = explode("\n", $userfield); } if(is_array($useropts)) { foreach($useropts as $key => $val)
|
$useropts = explode("\n", $userfield); } if(is_array($useropts)) { foreach($useropts as $key => $val)
|
{
| {
|
$seloptions[$val] = $val; } }
| $seloptions[$val] = $val; } }
|
Zeile 3010 | Zeile 3008 |
---|
$sel = ""; if(isset($seloptions[$val]) && $val == $seloptions[$val])
|
$sel = ""; if(isset($seloptions[$val]) && $val == $seloptions[$val])
|
{ $sel = " selected=\"selected\""; }
| { $sel = " selected=\"selected\""; }
|
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";"); }
| eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";"); }
|
Zeile 3040 | Zeile 3038 |
---|
}
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")."\";");
|
eval("\$code = \"".$templates->get("usercp_profile_profilefields_select")."\";");
|
}
| }
|
} elseif($type == "radio") {
| } elseif($type == "radio") {
|
Zeile 3067 | Zeile 3065 |
---|
} } elseif($type == "checkbox")
|
} } elseif($type == "checkbox")
|
{
| {
|
if($errors) { $useropts = $userfield;
| if($errors) { $useropts = $userfield;
|
Zeile 3289 | Zeile 3287 |
---|
$user_icq = $mybb->input['icq']; $user_skype = $mybb->input['skype']; $user_google = $mybb->input['google'];
|
$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 3514 | Zeile 3511 |
---|
else { $mybb->input['filter']['reason'] = '';
|
else { $mybb->input['filter']['reason'] = '';
|
}
| }
|
$sortbysel = array('username' => '', 'expires' => '', 'issuedby' => '', 'dateline' => ''); if(!isset($mybb->input['filter']['sortby'])) {
| $sortbysel = array('username' => '', 'expires' => '', 'issuedby' => '', 'dateline' => ''); if(!isset($mybb->input['filter']['sortby'])) {
|
Zeile 3569 | Zeile 3566 |
---|
$total_warnings = $db->fetch_field($query, 'count'); $page = $mybb->get_input('page', MyBB::INPUT_INT); if($page <= 0)
|
$total_warnings = $db->fetch_field($query, 'count'); $page = $mybb->get_input('page', MyBB::INPUT_INT); if($page <= 0)
|
{ $page = 1;
| { $page = 1;
|
} $per_page = 20; if(isset($mybb->input['filter']['per_page']) && (int)$mybb->input['filter']['per_page'] > 0)
| } $per_page = 20; if(isset($mybb->input['filter']['per_page']) && (int)$mybb->input['filter']['per_page'] > 0)
|
Zeile 3682 | Zeile 3679 |
---|
if($mybb->input['ipaddress']) { if(!is_array($groupscache))
|
if($mybb->input['ipaddress']) { if(!is_array($groupscache))
|
{
| {
|
$groupscache = $cache->read("usergroups"); }
| $groupscache = $cache->read("usergroups"); }
|
Zeile 3737 | Zeile 3734 |
---|
}
if(!empty($onlyusfids))
|
}
if(!empty($onlyusfids))
|
{
| {
|
$where_sql .= " AND ((t.fid IN(".implode(',', $onlyusfids).") AND t.uid='{$mybb->user['uid']}') OR t.fid NOT IN(".implode(',', $onlyusfids)."))"; }
| $where_sql .= " AND ((t.fid IN(".implode(',', $onlyusfids).") AND t.uid='{$mybb->user['uid']}') OR t.fid NOT IN(".implode(',', $onlyusfids)."))"; }
|
Zeile 3821 | Zeile 3818 |
---|
// Now we have the result counts, paginate $perpage = $mybb->get_input('perpage', MyBB::INPUT_INT); if(!$perpage || $perpage <= 0)
|
// Now we have the result counts, paginate $perpage = $mybb->get_input('perpage', MyBB::INPUT_INT); if(!$perpage || $perpage <= 0)
|
{
| {
|
$perpage = $mybb->settings['threadsperpage']; }
| $perpage = $mybb->settings['threadsperpage']; }
|
Zeile 3835 | Zeile 3832 |
---|
$pages = ceil($pages);
if($mybb->get_input('page') == "last")
|
$pages = ceil($pages);
if($mybb->get_input('page') == "last")
|
{
| {
|
$page = $pages; }
if($page > $pages || $page <= 0) { $page = 1;
|
$page = $pages; }
if($page > $pages || $page <= 0) { $page = 1;
|
}
| }
|
if($page) { $start = ($page-1) * $perpage; } else
|
if($page) { $start = ($page-1) * $perpage; } else
|
{
| {
|
$start = 0; $page = 1; }
| $start = 0; $page = 1; }
|
Zeile 3905 | Zeile 3902 |
---|
{ eval("\$results .= \"".$templates->get("modcp_ipsearch_result")."\";"); $result = true;
|
{ eval("\$results .= \"".$templates->get("modcp_ipsearch_result")."\";"); $result = true;
|
}
| }
|
if($result) { --$post_limit;
| if($result) { --$post_limit;
|
Zeile 3960 | Zeile 3957 |
---|
{ $ip = my_inet_ntop($db->unescape_binary($ipaddress['ipaddress'])); if(!$ipaddress['username'])
|
{ $ip = my_inet_ntop($db->unescape_binary($ipaddress['ipaddress'])); if(!$ipaddress['username'])
|
{
| {
|
$ipaddress['username'] = $ipaddress['postusername']; // Guest username support } $ipaddress['username'] = htmlspecialchars_uni($ipaddress['username']);
| $ipaddress['username'] = $ipaddress['postusername']; // Guest username support } $ipaddress['username'] = htmlspecialchars_uni($ipaddress['username']);
|
Zeile 3978 | Zeile 3975 |
---|
eval("\$results .= \"".$templates->get("modcp_ipsearch_result")."\";"); } }
|
eval("\$results .= \"".$templates->get("modcp_ipsearch_result")."\";"); } }
|
}
| }
|
if(!$results)
|
if(!$results)
|
{
| {
|
eval("\$results = \"".$templates->get("modcp_ipsearch_noresults")."\";"); }
if($ipaddressvalue) { $lang->ipsearch_results = $lang->sprintf($lang->ipsearch_results, $ipaddressvalue);
|
eval("\$results = \"".$templates->get("modcp_ipsearch_noresults")."\";"); }
if($ipaddressvalue) { $lang->ipsearch_results = $lang->sprintf($lang->ipsearch_results, $ipaddressvalue);
|
}
| }
|
else { $lang->ipsearch_results = $lang->ipsearch;
| else { $lang->ipsearch_results = $lang->ipsearch;
|
Zeile 4100 | Zeile 4097 |
---|
$pages = ceil($pages);
if($mybb->get_input('page') == "last")
|
$pages = ceil($pages);
if($mybb->get_input('page') == "last")
|
{
| {
|
$page = $pages; }
| $page = $pages; }
|
Zeile 4154 | Zeile 4151 |
---|
if($banned['reason']) { $banned['reason'] = htmlspecialchars_uni($parser->parse_badwords($banned['reason']));
|
if($banned['reason']) { $banned['reason'] = htmlspecialchars_uni($parser->parse_badwords($banned['reason']));
|
} else {
| } else {
|
$banned['reason'] = $lang->na; }
| $banned['reason'] = $lang->na; }
|
Zeile 4183 | Zeile 4180 |
---|
if($remaining < 3600) { $banned_class = "high_banned";
|
if($remaining < 3600) { $banned_class = "high_banned";
|
}
| }
|
else if($remaining < 86400) { $banned_class = "moderate_banned";
| else if($remaining < 86400) { $banned_class = "moderate_banned";
|
Zeile 4236 | Zeile 4233 |
---|
if($mybb->user['uid'] != $ban['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['cancp'] != 1) { error_no_permission();
|
if($mybb->user['uid'] != $ban['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['cancp'] != 1) { error_no_permission();
|
}
$plugins->run_hooks("modcp_liftban_start");
| }
$plugins->run_hooks("modcp_liftban_start");
|
$query = $db->simple_select("users", "username", "uid = '{$ban['uid']}'"); $username = $db->fetch_field($query, "username");
| $query = $db->simple_select("users", "username", "uid = '{$ban['uid']}'"); $username = $db->fetch_field($query, "username");
|
Zeile 4250 | Zeile 4247 |
---|
); $db->update_query("users", $updated_group, "uid='{$ban['uid']}'"); $db->delete_query("banned", "uid='{$ban['uid']}'");
|
); $db->update_query("users", $updated_group, "uid='{$ban['uid']}'"); $db->delete_query("banned", "uid='{$ban['uid']}'");
|
$cache->update_banned();
|
|
$cache->update_moderators(); log_moderator_action(array("uid" => $ban['uid'], "username" => $username), $lang->lifted_ban);
|
$cache->update_moderators(); log_moderator_action(array("uid" => $ban['uid'], "username" => $username), $lang->lifted_ban);
|
|
|
$plugins->run_hooks("modcp_liftban_end");
redirect("modcp.php?action=banning", $lang->redirect_banlifted);
| $plugins->run_hooks("modcp_liftban_end");
redirect("modcp.php?action=banning", $lang->redirect_banlifted);
|
Zeile 4268 | Zeile 4264 |
---|
if($mybb->usergroup['canbanusers'] == 0) { error_no_permission();
|
if($mybb->usergroup['canbanusers'] == 0) { error_no_permission();
|
}
| }
|
// Editing an existing ban if($mybb->get_input('uid', MyBB::INPUT_INT))
| // Editing an existing ban if($mybb->get_input('uid', MyBB::INPUT_INT))
|
Zeile 4292 | Zeile 4288 |
---|
if($existing_ban && $mybb->user['uid'] != $user['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['cancp'] != 1) { error_no_permission();
|
if($existing_ban && $mybb->user['uid'] != $user['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['cancp'] != 1) { error_no_permission();
|
} }
$errors = array();
| } }
$errors = array();
|
// Creating a new ban if(!$existing_ban) {
| // Creating a new ban if(!$existing_ban) {
|
Zeile 4407 | Zeile 4403 |
---|
'additionalgroups' => '', ); $db->update_query('users', $update_array, "uid = {$user['uid']}");
|
'additionalgroups' => '', ); $db->update_query('users', $update_array, "uid = {$user['uid']}");
|
$cache->update_banned();
| |
// Log edit or add ban if($existing_ban)
| // Log edit or add ban if($existing_ban)
|