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 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(); } }
|
}
| }
|
if($("#moderateposting").is(":checked") == false) { $("#modpost").hide();
|
if($("#moderateposting").is(":checked") == false) { $("#modpost").hide();
|
} else
| } else
|
{ $("#modpost").show();
|
{ $("#modpost").show();
|
}
| }
|
if($("#suspendposting").is(":checked") == false)
|
if($("#suspendposting").is(":checked") == false)
|
{
| {
|
$("#suspost").hide(); } else { $("#suspost").show();
|
$("#suspost").hide(); } else { $("#suspost").show();
|
}
| }
|
// --> </script>';
|
// --> </script>';
|
|
|
$page->output_footer(); }
|
$page->output_footer(); }
|
|
|
if($mybb->input['action'] == "delete") { $user = get_user($mybb->input['uid']);
| if($mybb->input['action'] == "delete") { $user = get_user($mybb->input['uid']);
|
Zeile 1768 | Zeile 1771 |
---|
if(is_super_admin($mybb->input['uid']) && $mybb->user['uid'] != $mybb->input['uid'] && !is_super_admin($mybb->user['uid'])) { flash_message($lang->error_no_perms_super_admin, 'error');
|
if(is_super_admin($mybb->input['uid']) && $mybb->user['uid'] != $mybb->input['uid'] && !is_super_admin($mybb->user['uid'])) { flash_message($lang->error_no_perms_super_admin, 'error');
|
admin_redirect("index.php?module=user-users"); }
| admin_redirect("index.php?module=user-users"); }
|
// User clicked no if($mybb->get_input('no'))
| // User clicked no if($mybb->get_input('no'))
|
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 1905 | Zeile 1908 |
---|
$table->construct_row();
if(empty($user['regip']))
|
$table->construct_row();
if(empty($user['regip']))
|
{
| {
|
$user['regip'] = $lang->unknown; $controls = '';
|
$user['regip'] = $lang->unknown; $controls = '';
|
}
| }
|
else { $user['regip'] = my_inet_ntop($db->unescape_binary($user['regip']));
| else { $user['regip'] = my_inet_ntop($db->unescape_binary($user['regip']));
|
Zeile 1927 | Zeile 1930 |
---|
$query = $db->simple_select("posts", "DISTINCT ipaddress", "uid='{$mybb->input['uid']}'"); while($ip = $db->fetch_array($query))
|
$query = $db->simple_select("posts", "DISTINCT ipaddress", "uid='{$mybb->input['uid']}'"); while($ip = $db->fetch_array($query))
|
{
| {
|
++$counter; $ip['ipaddress'] = my_inet_ntop($db->unescape_binary($ip['ipaddress'])); $popup = new PopupMenu("id_{$counter}", $lang->options);
| ++$counter; $ip['ipaddress'] = my_inet_ntop($db->unescape_binary($ip['ipaddress'])); $popup = new PopupMenu("id_{$counter}", $lang->options);
|
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 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" />
|