Zeile 219 | Zeile 219 |
---|
$user = get_user($mybb->input['uid']);
// Does the user not exist?
|
$user = get_user($mybb->input['uid']);
// Does the user not exist?
|
if(!$user['uid'] || $user['usergroup'] != 5)
| if(!$user || $user['usergroup'] != 5)
|
{ flash_message($lang->error_invalid_user, 'error'); admin_redirect("index.php?module=user-users");
| { flash_message($lang->error_invalid_user, 'error'); admin_redirect("index.php?module=user-users");
|
Zeile 435 | Zeile 435 |
---|
$user = get_user($mybb->input['uid']);
// Does the user not exist?
|
$user = get_user($mybb->input['uid']);
// Does the user not exist?
|
if(!$user['uid'])
| if(!$user)
|
{ flash_message($lang->error_invalid_user, 'error'); admin_redirect("index.php?module=user-users");
| { flash_message($lang->error_invalid_user, 'error'); admin_redirect("index.php?module=user-users");
|
Zeile 632 | Zeile 632 |
---|
} } // Are we setting a new avatar from a URL?
|
} } // Are we setting a new avatar from a URL?
|
else if($mybb->input['avatar_url'] && $mybb->input['avatar_url'] != $user['avatar'])
| else if(!empty($mybb->input['avatar_url']) && $mybb->input['avatar_url'] != $user['avatar'])
|
{ if(!$mybb->settings['allowremoteavatars']) {
| { if(!$mybb->settings['allowremoteavatars']) {
|
Zeile 943 | Zeile 943 |
---|
<link rel="stylesheet" href="../jscripts/sceditor/themes/mybb.css" type="text/css" media="all" /> <script type="text/javascript" src="../jscripts/sceditor/jquery.sceditor.bbcode.min.js?ver=1832"></script>
|
<link rel="stylesheet" href="../jscripts/sceditor/themes/mybb.css" type="text/css" media="all" /> <script type="text/javascript" src="../jscripts/sceditor/jquery.sceditor.bbcode.min.js?ver=1832"></script>
|
<script type="text/javascript" src="../jscripts/bbcodes_sceditor.js?ver=1832"></script>
| <script type="text/javascript" src="../jscripts/bbcodes_sceditor.js?ver=1837"></script>
|
<script type="text/javascript" src="../jscripts/sceditor/plugins/undo.js?ver=1832"></script> EOF; $page->output_header($lang->edit_user);
| <script type="text/javascript" src="../jscripts/sceditor/plugins/undo.js?ver=1832"></script> EOF; $page->output_header($lang->edit_user);
|
Zeile 1544 | Zeile 1544 |
---|
if($errors) {
|
if($errors) {
|
$avatar_url = htmlspecialchars_uni($mybb->input['avatar_url']);
| if(isset($mybb->input['avatar_url'])) { $avatar_url = htmlspecialchars_uni($mybb->input['avatar_url']); }
|
}
if($mybb->settings['maxavatardims'] != "")
| }
if($mybb->settings['maxavatardims'] != "")
|
Zeile 1632 | Zeile 1635 |
---|
}
$existing_info = $lang->sprintf($lang->moderate_length, $expired, $color);
|
}
$existing_info = $lang->sprintf($lang->moderate_length, $expired, $color);
|
} else {
| } else {
|
$existing_info = $lang->moderated_perm; } }
| $existing_info = $lang->moderated_perm; } }
|
Zeile 1646 | Zeile 1649 |
---|
// Suspend posts // Generate check box $suspost_options = $form->generate_select_box('suspost_period', $periods, $mybb->get_input('suspost_period'), array('id' => 'suspost_period'));
|
// Suspend posts // Generate check box $suspost_options = $form->generate_select_box('suspost_period', $periods, $mybb->get_input('suspost_period'), array('id' => 'suspost_period'));
|
|
|
// Do we have any existing suspensions here? if($user['suspendposting'] || ($mybb->get_input('suspendposting') && !empty($errors))) {
| // Do we have any existing suspensions here? if($user['suspendposting'] || ($mybb->get_input('suspendposting') && !empty($errors))) {
|
Zeile 1657 | Zeile 1660 |
---|
$existing_info = $lang->suspended_perm; } else
|
$existing_info = $lang->suspended_perm; } else
|
{
| {
|
$remaining = $user['suspensiontime']-TIME_NOW; $suspost_date = nice_time($remaining, array('seconds' => false));
| $remaining = $user['suspensiontime']-TIME_NOW; $suspost_date = nice_time($remaining, array('seconds' => false));
|
Zeile 1724 | Zeile 1727 |
---|
$("#suspost").show(); } else if($("#suspendposting").is(":checked") == false)
|
$("#suspost").show(); } else if($("#suspendposting").is(":checked") == false)
|
{
| {
|
$("#suspost").hide(); } }
| $("#suspost").hide(); } }
|
Zeile 1759 | Zeile 1762 |
---|
$user = get_user($mybb->input['uid']);
// Does the user not exist?
|
$user = get_user($mybb->input['uid']);
// Does the user not exist?
|
if(!$user['uid'])
| if(!$user)
|
{ flash_message($lang->error_invalid_user, 'error'); admin_redirect("index.php?module=user-users");
| { flash_message($lang->error_invalid_user, 'error'); admin_redirect("index.php?module=user-users");
|
Zeile 1833 | Zeile 1836 |
---|
$query = $db->simple_select("adminviews", "*", "type='user' AND (vid='{$default_view}' OR uid=0)", array("order_by" => "uid", "order_dir" => "desc")); $admin_view = $db->fetch_array($query);
|
$query = $db->simple_select("adminviews", "*", "type='user' AND (vid='{$default_view}' OR uid=0)", array("order_by" => "uid", "order_dir" => "desc")); $admin_view = $db->fetch_array($query);
|
if($mybb->input['type'])
| if(!empty($mybb->input['type']))
|
{ $admin_view['view_type'] = $mybb->input['type']; }
| { $admin_view['view_type'] = $mybb->input['type']; }
|
Zeile 2084 | Zeile 2087 |
---|
$db->update_query("users", array('reputation' => (int)$total_reputation), "uid='{$destination_user['uid']}'");
// Calculate warning points
|
$db->update_query("users", array('reputation' => (int)$total_reputation), "uid='{$destination_user['uid']}'");
// Calculate warning points
|
$query = $db->query(" SELECT SUM(points) as warn_lev
| $query = $db->query(" SELECT SUM(points) as warn_lev
|
FROM ".TABLE_PREFIX."warnings WHERE uid='{$source_user['uid']}' AND expired='0' ");
| FROM ".TABLE_PREFIX."warnings WHERE uid='{$source_user['uid']}' AND expired='0' ");
|
Zeile 2445 | Zeile 2448 |
---|
{ // Set a cookie my_setcookie("acp_view", $mybb->input['vid'], 60);
|
{ // Set a cookie my_setcookie("acp_view", $mybb->input['vid'], 60);
|
}
| }
|
else { // We already have a cookie, so let's use it...
| else { // We already have a cookie, so let's use it...
|
Zeile 2535 | Zeile 2538 |
---|
$not_updated_count = count($selected) - $to_update_count; $lang->inline_activated_more = $lang->sprintf($lang->inline_activated_more, my_number_format($not_updated_count)); $lang->inline_activated = $lang->inline_activated."<br />".$lang->inline_activated_more; // Add these stats to the message
|
$not_updated_count = count($selected) - $to_update_count; $lang->inline_activated_more = $lang->sprintf($lang->inline_activated_more, my_number_format($not_updated_count)); $lang->inline_activated = $lang->inline_activated."<br />".$lang->inline_activated_more; // Add these stats to the message
|
}
| }
|
$mybb->input['action'] = "inline_activated"; // Force a change to the action so we can add it to the adminlog log_admin_action($to_update_count); // Add to adminlog my_unsetcookie("inlinemod_useracp"); // Unset the cookie, so that the users aren't still selected when we're redirected
|
$mybb->input['action'] = "inline_activated"; // Force a change to the action so we can add it to the adminlog log_admin_action($to_update_count); // Add to adminlog my_unsetcookie("inlinemod_useracp"); // Unset the cookie, so that the users aren't still selected when we're redirected
|
|
|
flash_message($lang->inline_activated, 'success');
|
flash_message($lang->inline_activated, 'success');
|
admin_redirect("index.php?module=user-users".$vid_url);
| admin_redirect("index.php?module=user-users".$vid_url);
|
} else
|
} else
|
{
| {
|
// Nothing was updated, show an error flash_message($lang->inline_activated_failed, 'error'); admin_redirect("index.php?module=user-users".$vid_url);
| // Nothing was updated, show an error flash_message($lang->inline_activated_failed, 'error'); admin_redirect("index.php?module=user-users".$vid_url);
|
Zeile 2556 | Zeile 2559 |
---|
if($mybb->get_input('no')) { admin_redirect("index.php?module=user-users".$vid_url); // User clicked on 'No'
|
if($mybb->get_input('no')) { admin_redirect("index.php?module=user-users".$vid_url); // User clicked on 'No'
|
}
| }
|
if($mybb->request_method == "post") { $sql_array = implode(",", $selected);
| if($mybb->request_method == "post") { $sql_array = implode(",", $selected);
|
Zeile 2601 | Zeile 2604 |
---|
while($user = $db->fetch_array($query)) { $bannedcache[] = "u_".$user['uid'];
|
while($user = $db->fetch_array($query)) { $bannedcache[] = "u_".$user['uid'];
|
}
| }
|
// Collect the users $query = $db->simple_select("users", "uid, username, usergroup, additionalgroups, displaygroup", "uid IN (".$sql_array.")");
|
// Collect the users $query = $db->simple_select("users", "uid, username, usergroup, additionalgroups, displaygroup", "uid IN (".$sql_array.")");
|
|
|
if($mybb->input['bantime'] == '---') { $lifted = 0; } else
|
if($mybb->input['bantime'] == '---') { $lifted = 0; } else
|
{
| {
|
$lifted = ban_date2timestamp($mybb->input['bantime']); }
| $lifted = ban_date2timestamp($mybb->input['bantime']); }
|
Zeile 2624 | Zeile 2627 |
---|
{ // We remove ourselves and Super Admins from the mix continue;
|
{ // We remove ourselves and Super Admins from the mix continue;
|
}
| }
|
if(is_array($bannedcache) && in_array("u_".$user['uid'], $bannedcache)) {
| if(is_array($bannedcache) && in_array("u_".$user['uid'], $bannedcache)) {
|
Zeile 2692 | Zeile 2695 |
---|
if($errors) { $page->output_inline_error($errors);
|
if($errors) { $page->output_inline_error($errors);
|
}
| }
|
$form = new Form("index.php?module=user-users", "post"); echo $form->generate_hidden_field('action', 'inline_edit');
| $form = new Form("index.php?module=user-users", "post"); echo $form->generate_hidden_field('action', 'inline_edit');
|
Zeile 2804 | Zeile 2807 |
---|
{ case '1': $threshold = $base_time * 31; // 1 month = 31 days, in the standard terms
|
{ case '1': $threshold = $base_time * 31; // 1 month = 31 days, in the standard terms
|
break;
| break;
|
case '2': $threshold = $base_time * 93; // 3 months = 31 days * 3 break;
| case '2': $threshold = $base_time * 93; // 3 months = 31 days * 3 break;
|
Zeile 2848 | Zeile 2851 |
---|
if(is_super_admin($user['uid']) && !is_super_admin($mybb->user['uid'])) { continue;
|
if(is_super_admin($user['uid']) && !is_super_admin($mybb->user['uid'])) { continue;
|
}
| }
|
$return_array = delete_user_posts($user['uid'], $date); // Delete user posts, and grab a list of threads to delete if($return_array && is_array($return_array)) { $prune_array = array_merge_recursive($prune_array, $return_array); }
|
$return_array = delete_user_posts($user['uid'], $date); // Delete user posts, and grab a list of threads to delete if($return_array && is_array($return_array)) { $prune_array = array_merge_recursive($prune_array, $return_array); }
|
}
$plugins->run_hooks("admin_user_multiprune_threads", $prune_array);
| }
$plugins->run_hooks("admin_user_multiprune_threads", $prune_array);
|
// No posts were found for the user, return error if(!is_array($prune_array) || count($prune_array) == 0) {
| // No posts were found for the user, return error if(!is_array($prune_array) || count($prune_array) == 0) {
|
Zeile 2872 | Zeile 2875 |
---|
// We've finished deleting user's posts, so let's delete the threads if(is_array($prune_array['to_delete']) && count($prune_array['to_delete']) > 0)
|
// We've finished deleting user's posts, so let's delete the threads if(is_array($prune_array['to_delete']) && count($prune_array['to_delete']) > 0)
|
{
| {
|
foreach($prune_array['to_delete'] as $tid)
|
foreach($prune_array['to_delete'] as $tid)
|
{
| {
|
$db->delete_query("threads", "tid='$tid'"); $db->delete_query("threads", "closed='moved|$tid'"); $db->delete_query("threadsubscriptions", "tid='$tid'"); $db->delete_query("polls", "tid='$tid'"); $db->delete_query("threadsread", "tid='$tid'"); $db->delete_query("threadratings", "tid='$tid'");
|
$db->delete_query("threads", "tid='$tid'"); $db->delete_query("threads", "closed='moved|$tid'"); $db->delete_query("threadsubscriptions", "tid='$tid'"); $db->delete_query("polls", "tid='$tid'"); $db->delete_query("threadsread", "tid='$tid'"); $db->delete_query("threadratings", "tid='$tid'");
|
}
| }
|
}
// After deleting threads, rebuild the thread counters for the affected threads
| }
// After deleting threads, rebuild the thread counters for the affected threads
|
Zeile 2892 | Zeile 2895 |
---|
while($thread = $db->fetch_array($query)) { rebuild_thread_counters($thread['tid']);
|
while($thread = $db->fetch_array($query)) { rebuild_thread_counters($thread['tid']);
|
} }
| } }
|
// After updating thread counters, update the affected forum counters if(is_array($prune_array['forum_update']) && count($prune_array['forum_update']) > 0) {
| // After updating thread counters, update the affected forum counters if(is_array($prune_array['forum_update']) && count($prune_array['forum_update']) > 0) {
|
Zeile 2939 | Zeile 2942 |
---|
echo $form->generate_hidden_field('action', 'inline_edit'); echo $form->generate_hidden_field('inline_action', 'multiprune'); echo $form->generate_hidden_field('processed', '1');
|
echo $form->generate_hidden_field('action', 'inline_edit'); echo $form->generate_hidden_field('inline_action', 'multiprune'); echo $form->generate_hidden_field('processed', '1');
|
|
|
$form_container = new FormContainer($lang->mass_prune_posts);
// Generate a list of days (1 - 31)
| $form_container = new FormContainer($lang->mass_prune_posts);
// Generate a list of days (1 - 31)
|
Zeile 2948 | Zeile 2951 |
---|
for($i = 1; $i <= 31; ++$i) { $day_options[] = $i;
|
for($i = 1; $i <= 31; ++$i) { $day_options[] = $i;
|
}
| }
|
// Generate a list of months (1 - 12) $month_options = array();
| // Generate a list of months (1 - 12) $month_options = array();
|
Zeile 2961 | Zeile 2964 |
---|
$date_box = $form->generate_select_box('day', $day_options, $mybb->input['day']); $month_box = $form->generate_select_box('month', $month_options, $mybb->input['month']); $year_box = $form->generate_numeric_field('year', $mybb->input['year'], array('id' => 'year', 'style' => 'width: 50px;', 'min' => 0));
|
$date_box = $form->generate_select_box('day', $day_options, $mybb->input['day']); $month_box = $form->generate_select_box('month', $month_options, $mybb->input['month']); $year_box = $form->generate_numeric_field('year', $mybb->input['year'], array('id' => 'year', 'style' => 'width: 50px;', 'min' => 0));
|
|
|
$prune_select = $date_box.$month_box.$year_box; $form_container->output_row($lang->manual_date, "", $prune_select, 'date');
|
$prune_select = $date_box.$month_box.$year_box; $form_container->output_row($lang->manual_date, "", $prune_select, 'date');
|
|
|
// Generate the set date box $set_options = array(); $set_options[] = $lang->set_an_option;
| // Generate the set date box $set_options = array(); $set_options[] = $lang->set_an_option;
|
Zeile 2983 | Zeile 2986 |
---|
$page->output_footer(); break; case 'multiusergroup':
|
$page->output_footer(); break; case 'multiusergroup':
|
if($mybb->input['processed'] == 1)
| if($mybb->get_input('processed', \MyBB::INPUT_INT) === 1)
|
{ // Determine additional usergroups if(is_array($mybb->input['additionalgroups']))
| { // Determine additional usergroups if(is_array($mybb->input['additionalgroups']))
|
Zeile 3083 | Zeile 3086 |
---|
$display_group_options[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']); }
|
$display_group_options[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']); }
|
if(!is_array($mybb->input['additionalgroups']))
| if(!$mybb->get_input('additionalgroups', \MyBB::INPUT_ARRAY))
|
{
|
{
|
$mybb->input['additionalgroups'] = explode(',', $mybb->input['additionalgroups']);
| $mybb->input['additionalgroups'] = explode(',', $mybb->get_input('additionalgroups'));
|
}
|
}
|
$form_container->output_row($lang->primary_user_group, "", $form->generate_select_box('usergroup', $options, $mybb->input['usergroup'], array('id' => 'usergroup')), 'usergroup');
| $form_container->output_row($lang->primary_user_group, "", $form->generate_select_box('usergroup', $options, $mybb->get_input('usergroup'), array('id' => 'usergroup')), 'usergroup');
|
$form_container->output_row($lang->additional_user_groups, $lang->additional_user_groups_desc, $form->generate_select_box('additionalgroups[]', $options, $mybb->input['additionalgroups'], array('id' => 'additionalgroups', 'multiple' => true, 'size' => 5)), 'additionalgroups'); $form_container->output_row($lang->display_user_group, "", $form->generate_select_box('displaygroup', $display_group_options, $mybb->input['displaygroup'], array('id' => 'displaygroup')), 'displaygroup');
| $form_container->output_row($lang->additional_user_groups, $lang->additional_user_groups_desc, $form->generate_select_box('additionalgroups[]', $options, $mybb->input['additionalgroups'], array('id' => 'additionalgroups', 'multiple' => true, 'size' => 5)), 'additionalgroups'); $form_container->output_row($lang->display_user_group, "", $form->generate_select_box('displaygroup', $display_group_options, $mybb->input['displaygroup'], array('id' => 'displaygroup')), 'displaygroup');
|
Zeile 3864 | Zeile 3867 |
---|
}
$built_view .= '
|
}
$built_view .= '
|
<script type="text/javascript" src="'.$mybb->settings['bburl'].'/jscripts/inline_moderation.js?ver=1821"></script>
| <script type="text/javascript" src="'.$mybb->settings['bburl'].'/jscripts/inline_moderation.js?ver=1838"></script>
|
<form action="index.php?module=user-users" method="post"> <input type="hidden" name="my_post_key" value="'.$mybb->post_code.'" /> <input type="hidden" name="action" value="inline_edit" />
| <form action="index.php?module=user-users" method="post"> <input type="hidden" name="my_post_key" value="'.$mybb->post_code.'" /> <input type="hidden" name="action" value="inline_edit" />
|