Zeile 58 | Zeile 58 |
---|
$moderated_forums = array(); if($mybb->usergroup['issupermod'] != 1) {
|
$moderated_forums = array(); if($mybb->usergroup['issupermod'] != 1) {
|
$query = $db->simple_select("moderators", "*", "(id='{$mybb->user['uid']}' AND isgroup = '0') OR (id='{$mybb->user['usergroup']}' AND isgroup = '1')");
| $query = $db->simple_select("moderators", "*", "(id='{$mybb->user['uid']}' AND isgroup = '0') OR (id IN ({$mybb->usergroup['all_usergroups']}) AND isgroup = '1')");
|
$numannouncements = $nummodqueuethreads = $nummodqueueposts = $nummodqueueattach = $numreportedposts = $nummodlogs = 0; while($forum = $db->fetch_array($query))
| $numannouncements = $nummodqueuethreads = $nummodqueueposts = $nummodqueueattach = $numreportedposts = $nummodlogs = 0; while($forum = $db->fetch_array($query))
|
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'), "signature" => $mybb->get_input('signature'),
| "skype" => $mybb->get_input('skype'), "google" => $mybb->get_input('google'), "signature" => $mybb->get_input('signature'),
|
Zeile 2616 | 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 2665 | 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 2688 | 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 2731 | Zeile 2730 |
---|
$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 2775 | Zeile 2774 |
---|
error_no_permission(); }
|
error_no_permission(); }
|
if(!my_validate_url($user['website']))
| $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']))
|
{ $user['website'] = ''; }
| { $user['website'] = ''; }
|
Zeile 2783 | Zeile 2798 |
---|
if($user['icq'] != "0") { $user['icq'] = (int)$user['icq'];
|
if($user['icq'] != "0") { $user['icq'] = (int)$user['icq'];
|
}
| }
|
if(!$errors) { $mybb->input = array_merge($user, $mybb->input);
| if(!$errors) { $mybb->input = array_merge($user, $mybb->input);
|
Zeile 2800 | Zeile 2815 |
---|
list($mybb->input['birthday_day'], $mybb->input['birthday_month'], $mybb->input['birthday_year']) = $birthday; } else
|
list($mybb->input['birthday_day'], $mybb->input['birthday_month'], $mybb->input['birthday_year']) = $birthday; } else
|
{
| {
|
$errors = inline_error($errors); }
|
$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) { $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'])
| // Sanitize all input foreach(array('usertitle', 'website', 'icq', 'skype', 'google', 'signature', 'birthday_day', 'birthday_month', 'birthday_year') as $field)
|
{
|
{
|
$user['displaygroup'] = $user['usergroup'];
| $mybb->input[$field] = htmlspecialchars_uni($mybb->get_input($field));
|
}
|
}
|
$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 2836 | Zeile 2843 |
---|
break; } }
|
break; } }
|
}
| }
|
$user['usertitle'] = htmlspecialchars_uni($user['usertitle']);
if(empty($user['usertitle'])) { $lang->current_custom_usertitle = '';
|
$user['usertitle'] = htmlspecialchars_uni($user['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)
|
{
| {
|
if($mybb->input['birthday_day'] == $day) { $selected = "selected=\"selected\"";
| if($mybb->input['birthday_day'] == $day) { $selected = "selected=\"selected\"";
|
Zeile 2871 | Zeile 2878 |
---|
{ $awaycheck = array('', ''); if($errors)
|
{ $awaycheck = array('', ''); if($errors)
|
{
| {
|
if($user['away'] == 1) { $awaycheck[1] = "checked=\"checked\"";
| if($user['away'] == 1) { $awaycheck[1] = "checked=\"checked\"";
|
Zeile 2925 | Zeile 2932 |
---|
if(isset($returndate[1])) { $returndatemonthsel[$returndate[1]] = " selected=\"selected\"";
|
if(isset($returndate[1])) { $returndatemonthsel[$returndate[1]] = " selected=\"selected\"";
|
}
| }
|
if(!isset($returndate[2])) { $returndate[2] = '';
| if(!isset($returndate[2])) { $returndate[2] = '';
|
Zeile 2975 | 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 3001 | Zeile 3008 |
---|
$sel = ""; if(isset($seloptions[$val]) && $val == $seloptions[$val])
|
$sel = ""; if(isset($seloptions[$val]) && $val == $seloptions[$val])
|
{ $sel = " selected=\"selected\""; }
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";"); } if(!$profilefield['length']) {
| { $sel = " selected=\"selected\""; }
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";"); } if(!$profilefield['length']) {
|
$profilefield['length'] = 3; }
| $profilefield['length'] = 3; }
|
Zeile 3034 | Zeile 3041 |
---|
} if(!$profilefield['length']) {
|
} if(!$profilefield['length']) {
|
$profilefield['length'] = 1; }
| $profilefield['length'] = 1; }
|
eval("\$code = \"".$templates->get("usercp_profile_profilefields_select")."\";");
|
eval("\$code = \"".$templates->get("usercp_profile_profilefields_select")."\";");
|
} }
| } }
|
elseif($type == "radio") { $expoptions = explode("\n", $options);
| elseif($type == "radio") { $expoptions = explode("\n", $options);
|
Zeile 3062 | Zeile 3069 |
---|
if($errors) { $useropts = $userfield;
|
if($errors) { $useropts = $userfield;
|
}
| }
|
else { $useropts = explode("\n", $userfield);
|
else { $useropts = explode("\n", $userfield);
|
}
| }
|
if(is_array($useropts)) { foreach($useropts as $key => $val) { $seloptions[$val] = $val;
|
if(is_array($useropts)) { foreach($useropts as $key => $val) { $seloptions[$val] = $val;
|
} }
| } }
|
$expoptions = explode("\n", $options); if(is_array($expoptions)) {
| $expoptions = explode("\n", $options); if(is_array($expoptions)) {
|
Zeile 3090 | Zeile 3097 |
---|
} } elseif($type == "textarea")
|
} } elseif($type == "textarea")
|
{
| {
|
$value = htmlspecialchars_uni($userfield); eval("\$code = \"".$templates->get("usercp_profile_profilefields_textarea")."\";"); }
| $value = htmlspecialchars_uni($userfield); eval("\$code = \"".$templates->get("usercp_profile_profilefields_textarea")."\";"); }
|
Zeile 3199 | Zeile 3206 |
---|
$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 3281 |
---|
{ $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'];
|
$plugins->run_hooks("modcp_editprofile_end");
|
$plugins->run_hooks("modcp_editprofile_end");
|
|
|
eval("\$edituser = \"".$templates->get("modcp_editprofile")."\";"); output_page($edituser); }
if($mybb->input['action'] == "finduser")
|
eval("\$edituser = \"".$templates->get("modcp_editprofile")."\";"); output_page($edituser); }
if($mybb->input['action'] == "finduser")
|
{
| {
|
if($mybb->usergroup['caneditprofiles'] == 0) { error_no_permission();
| if($mybb->usergroup['caneditprofiles'] == 0) { error_no_permission();
|
Zeile 3420 | Zeile 3434 |
---|
$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 3575 |
---|
$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 3589 |
---|
{ $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 3628 |
---|
{ $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 3647 |
---|
{ $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);
|
Zeile 4217 | Zeile 4242 |
---|
$updated_group = array( 'usergroup' => $ban['oldgroup'],
|
$updated_group = array( 'usergroup' => $ban['oldgroup'],
|
'additionalgroups' => $ban['oldadditionalgroups'],
| 'additionalgroups' => $db->escape_string($ban['oldadditionalgroups']),
|
'displaygroup' => $ban['olddisplaygroup'] ); $db->update_query("users", $updated_group, "uid='{$ban['uid']}'"); $db->delete_query("banned", "uid='{$ban['uid']}'");
|
'displaygroup' => $ban['olddisplaygroup'] ); $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);
|
Zeile 4266 | Zeile 4290 |
---|
error_no_permission(); } }
|
error_no_permission(); } }
|
| $errors = array();
|
// Creating a new ban if(!$existing_ban)
| // Creating a new ban if(!$existing_ban)
|
Zeile 4280 | Zeile 4306 |
---|
if(!$user['uid']) { $errors[] = $lang->invalid_username;
|
if(!$user['uid']) { $errors[] = $lang->invalid_username;
|
}
| }
|
}
if($user['uid'] == $mybb->user['uid'])
| }
if($user['uid'] == $mybb->user['uid'])
|
Zeile 4307 | Zeile 4333 |
---|
if(empty($usergroup['gid']) || empty($usergroup['isbannedgroup'])) { $errors[] = $lang->error_nobangroup;
|
if(empty($usergroup['gid']) || empty($usergroup['isbannedgroup'])) { $errors[] = $lang->error_nobangroup;
|
}
| }
|
// If this is a new ban, we check the user isn't already part of a banned group if(!$existing_ban && $user['uid']) {
| // If this is a new ban, we check the user isn't already part of a banned group if(!$existing_ban && $user['uid']) {
|
Zeile 4343 | Zeile 4369 |
---|
if($existing_ban) { $update_array = array(
|
if($existing_ban) { $update_array = array(
|
'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT), 'dateline' => TIME_NOW, 'bantime' => $db->escape_string($mybb->get_input('liftafter')), 'lifted' => $db->escape_string($lifted), 'reason' => $db->escape_string($banreason) );
| 'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT), 'dateline' => TIME_NOW, 'bantime' => $db->escape_string($mybb->get_input('liftafter')), 'lifted' => $db->escape_string($lifted), 'reason' => $db->escape_string($banreason) );
|
$db->update_query('banned', $update_array, "uid='{$user['uid']}'"); } else
| $db->update_query('banned', $update_array, "uid='{$user['uid']}'"); } else
|
Zeile 4358 | Zeile 4384 |
---|
'uid' => $user['uid'], 'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT), 'oldgroup' => (int)$user['usergroup'],
|
'uid' => $user['uid'], 'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT), 'oldgroup' => (int)$user['usergroup'],
|
'oldadditionalgroups' => (string)$user['additionalgroups'],
| 'oldadditionalgroups' => $db->escape_string($user['additionalgroups']),
|
'olddisplaygroup' => (int)$user['displaygroup'], 'admin' => (int)$mybb->user['uid'], 'dateline' => TIME_NOW,
| 'olddisplaygroup' => (int)$user['displaygroup'], 'admin' => (int)$mybb->user['uid'], 'dateline' => TIME_NOW,
|
Zeile 4377 | 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)
|
Zeile 4725 | Zeile 4749 |
---|
$where = ''; if($tflist_modlog) {
|
$where = ''; if($tflist_modlog) {
|
$where = "WHERE (t.fid <> 0 {$tflist_modlog}) OR (!l.fid)";
| $where = "WHERE (t.fid <> 0 {$tflist_modlog}) OR (l.fid <> 0)";
|
}
$query = $db->query("
| }
$query = $db->query("
|