Zeile 942 | Zeile 942 |
---|
$page->extra_header .= <<<EOF
<link rel="stylesheet" href="../jscripts/sceditor/themes/mybb.css" type="text/css" media="all" />
|
$page->extra_header .= <<<EOF
<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=1822"></script> <script type="text/javascript" src="../jscripts/bbcodes_sceditor.js?ver=1827"></script> <script type="text/javascript" src="../jscripts/sceditor/plugins/undo.js?ver=1805"></script>
| <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/sceditor/plugins/undo.js?ver=1832"></script>
|
EOF; $page->output_header($lang->edit_user);
| EOF; $page->output_header($lang->edit_user);
|
Zeile 2005 | Zeile 2005 |
---|
merge_thread_ratings($source_user['uid'], $destination_user['uid']);
// Banning
|
merge_thread_ratings($source_user['uid'], $destination_user['uid']);
// Banning
|
$db->update_query("banned", array('admin' => $destination_user['uid']), "admin = '{$source_user['uid']}'");
| switch($db->type) { case 'mysql': case 'mysqli': $where = "`admin` = '{$source_user['uid']}'"; break; default: $where = "admin = '{$source_user['uid']}'"; break; } $db->update_query("banned", array('admin' => $destination_user['uid']), $where);
|
// Carry over referrals $db->update_query("users", array("referrer" => $destination_user['uid']), "referrer='{$source_user['uid']}' AND uid!='{$destination_user['uid']}'");
| // Carry over referrals $db->update_query("users", array("referrer" => $destination_user['uid']), "referrer='{$source_user['uid']}' AND uid!='{$destination_user['uid']}'");
|
Zeile 2049 | Zeile 2059 |
---|
continue; } }
|
continue; } }
|
|
|
$last_result = array( "rid" => $rep['rid'], "uid" => $rep['uid'] );
|
$last_result = array( "rid" => $rep['rid'], "uid" => $rep['uid'] );
|
}
| }
|
// Remove any reputations we've selected to remove... if(!empty($to_remove))
| // Remove any reputations we've selected to remove... if(!empty($to_remove))
|
Zeile 2062 | Zeile 2072 |
---|
$imp = implode(",", $to_remove); $db->delete_query("reputation", "rid IN (".$imp.")"); }
|
$imp = implode(",", $to_remove); $db->delete_query("reputation", "rid IN (".$imp.")"); }
|
|
|
// Calculate the new reputation for this user... $query = $db->simple_select("reputation", "SUM(reputation) as total_rep", "uid='{$destination_user['uid']}'"); $total_reputation = $db->fetch_field($query, "total_rep");
| // Calculate the new reputation for this user... $query = $db->simple_select("reputation", "SUM(reputation) as total_rep", "uid='{$destination_user['uid']}'"); $total_reputation = $db->fetch_field($query, "total_rep");
|
Zeile 2070 | Zeile 2080 |
---|
$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 2137 | Zeile 2147 |
---|
while($fid = $db->fetch_field($query, "fid")) { $fids[] = $fid;
|
while($fid = $db->fetch_field($query, "fid")) { $fids[] = $fid;
|
}
| }
|
$fids_not_in = ''; if(!empty($fids))
| $fids_not_in = ''; if(!empty($fids))
|
Zeile 2180 | Zeile 2190 |
---|
// Log admin action log_admin_action($source_user['uid'], $source_user['username'], $destination_user['uid'], $destination_user['username']);
|
// Log admin action log_admin_action($source_user['uid'], $source_user['username'], $destination_user['uid'], $destination_user['username']);
|
|
|
// Redirect! $username = htmlspecialchars_uni($source_user['username']); $destination_username = htmlspecialchars_uni($destination_user['username']);
| // Redirect! $username = htmlspecialchars_uni($source_user['username']); $destination_username = htmlspecialchars_uni($destination_user['username']);
|
Zeile 2188 | Zeile 2198 |
---|
admin_redirect("index.php?module=user-users"); exit; }
|
admin_redirect("index.php?module=user-users"); exit; }
|
}
| }
|
$page->add_breadcrumb_item($lang->merge_users); $page->output_header($lang->merge_users);
$page->output_nav_tabs($sub_tabs, 'merge_users');
|
$page->add_breadcrumb_item($lang->merge_users); $page->output_header($lang->merge_users);
$page->output_nav_tabs($sub_tabs, 'merge_users');
|
|
|
// If we have any error messages, show them if($errors) {
| // If we have any error messages, show them if($errors) {
|
Zeile 2202 | Zeile 2212 |
---|
}
$form = new Form("index.php?module=user-users&action=merge", "post");
|
}
$form = new Form("index.php?module=user-users&action=merge", "post");
|
|
|
$form_container = new FormContainer($lang->merge_users); $form_container->output_row($lang->source_account." <em>*</em>", $lang->source_account_desc, $form->generate_text_box('source_username', $mybb->get_input('source_username'), array('id' => 'source_username')), 'source_username'); $form_container->output_row($lang->destination_account." <em>*</em>", $lang->destination_account_desc, $form->generate_text_box('destination_username', $mybb->get_input('destination_username'), array('id' => 'destination_username')), 'destination_username');
| $form_container = new FormContainer($lang->merge_users); $form_container->output_row($lang->source_account." <em>*</em>", $lang->source_account_desc, $form->generate_text_box('source_username', $mybb->get_input('source_username'), array('id' => 'source_username')), 'source_username'); $form_container->output_row($lang->destination_account." <em>*</em>", $lang->destination_account_desc, $form->generate_text_box('destination_username', $mybb->get_input('destination_username'), array('id' => 'destination_username')), 'destination_username');
|
Zeile 2215 | Zeile 2225 |
---|
<script type="text/javascript"> <!-- $("#source_username").select2({
|
<script type="text/javascript"> <!-- $("#source_username").select2({
|
placeholder: "'.$lang->search_for_a_user.'", minimumInputLength: 2, multiple: false, ajax: { // instead of writing the function to execute the request we use Select2\'s convenient helper url: "../xmlhttp.php?action=get_users", dataType: \'json\', data: function (term, page) { return { query: term // search term };
| placeholder: "'.$lang->search_for_a_user.'", minimumInputLength: 2, multiple: false, ajax: { // instead of writing the function to execute the request we use Select2\'s convenient helper url: "../xmlhttp.php?action=get_users", dataType: \'json\', data: function (term, page) { return { query: term // search term };
|
}, results: function (data, page) { // parse the results into the format expected by Select2. // since we are using custom formatting functions we do not need to alter remote JSON data
| }, results: function (data, page) { // parse the results into the format expected by Select2. // since we are using custom formatting functions we do not need to alter remote JSON data
|
Zeile 2354 | Zeile 2364 |
---|
if(!empty($mybb->input['profile_fields'])) { $admin_view['custom_profile_fields'] = $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY);
|
if(!empty($mybb->input['profile_fields'])) { $admin_view['custom_profile_fields'] = $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY);
|
}
| }
|
$plugins->run_hooks("admin_user_users_search_commit");
| $plugins->run_hooks("admin_user_users_search_commit");
|
Zeile 2397 | Zeile 2407 |
---|
if(!$mybb->get_input('displayas')) { $mybb->input['displayas'] = "card";
|
if(!$mybb->get_input('displayas')) { $mybb->input['displayas'] = "card";
|
}
| }
|
$form = new Form("index.php?module=user-users&action=search", "post");
user_search_conditions($mybb->input, $form);
| $form = new Form("index.php?module=user-users&action=search", "post");
user_search_conditions($mybb->input, $form);
|
Zeile 2441 | Zeile 2451 |
---|
$vid_url = "&vid=".$mybb->get_input('vid'); } else
|
$vid_url = "&vid=".$mybb->get_input('vid'); } else
|
{
| {
|
$vid_url = null; }
| $vid_url = null; }
|
Zeile 2528 | Zeile 2538 |
---|
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');
|
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');
|
admin_redirect("index.php?module=user-users".$vid_url);
| admin_redirect("index.php?module=user-users".$vid_url);
|
} else {
| } else {
|
Zeile 2571 | Zeile 2581 |
---|
admin_redirect("index.php?module=user-users".$vid_url); } else
|
admin_redirect("index.php?module=user-users".$vid_url); } else
|
{
| {
|
$page->output_confirm_action("index.php?module=user-users&action=inline_edit&inline_action=multilift", $lang->confirm_multilift); }
| $page->output_confirm_action("index.php?module=user-users&action=inline_edit&inline_action=multilift", $lang->confirm_multilift); }
|
Zeile 2678 | Zeile 2688 |
---|
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'); echo $form->generate_hidden_field('inline_action', 'multiban');
| $form = new Form("index.php?module=user-users", "post"); echo $form->generate_hidden_field('action', 'inline_edit'); echo $form->generate_hidden_field('inline_action', 'multiban');
|
Zeile 2701 | Zeile 2711 |
---|
$form_container->end();
$buttons[] = $form->generate_submit_button($lang->ban_users);
|
$form_container->end();
$buttons[] = $form->generate_submit_button($lang->ban_users);
|
$form->output_submit_wrapper($buttons); $form->end();
| $form->output_submit_wrapper($buttons); $form->end();
|
$page->output_footer(); break; case 'multidelete':
| $page->output_footer(); break; case 'multidelete':
|
Zeile 2746 | Zeile 2756 |
---|
if(($mybb->input['day'] || $mybb->input['month'] || $mybb->input['year']) && $mybb->input['set']) { $errors[] = $lang->multi_selected_dates;
|
if(($mybb->input['day'] || $mybb->input['month'] || $mybb->input['year']) && $mybb->input['set']) { $errors[] = $lang->multi_selected_dates;
|
}
| }
|
$day = $mybb->get_input('day', MyBB::INPUT_INT); $month = $mybb->get_input('month', MyBB::INPUT_INT);
| $day = $mybb->get_input('day', MyBB::INPUT_INT); $month = $mybb->get_input('month', MyBB::INPUT_INT);
|
Zeile 2855 | Zeile 2865 |
---|
// Require the rebuild functions require_once MYBB_ROOT.'/inc/functions.php'; require_once MYBB_ROOT.'/inc/functions_rebuild.php';
|
// Require the rebuild functions require_once MYBB_ROOT.'/inc/functions.php'; require_once MYBB_ROOT.'/inc/functions_rebuild.php';
|
|
|
// 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) { $db->delete_query("threads", "tid='$tid'");
| foreach($prune_array['to_delete'] as $tid) { $db->delete_query("threads", "tid='$tid'");
|
Zeile 2876 | Zeile 2886 |
---|
$sql_array = implode(",", $prune_array['thread_update']); $query = $db->simple_select("threads", "tid", "tid IN (".$sql_array.")", array('order_by' => 'tid', 'order_dir' => 'asc')); while($thread = $db->fetch_array($query))
|
$sql_array = implode(",", $prune_array['thread_update']); $query = $db->simple_select("threads", "tid", "tid IN (".$sql_array.")", array('order_by' => 'tid', 'order_dir' => 'asc')); while($thread = $db->fetch_array($query))
|
{
| {
|
rebuild_thread_counters($thread['tid']);
|
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 2895 | Zeile 2905 |
---|
} $looped_forum = $forum['fid']; rebuild_forum_counters($forum['fid']);
|
} $looped_forum = $forum['fid']; rebuild_forum_counters($forum['fid']);
|
} }
| } }
|
//log_admin_action(); my_unsetcookie("inlinemod_useracp"); // We've got our users, remove the cookie flash_message($lang->prune_complete, 'success'); admin_redirect("index.php?module=user-users".$vid_url); }
|
//log_admin_action(); my_unsetcookie("inlinemod_useracp"); // We've got our users, remove the cookie flash_message($lang->prune_complete, 'success'); admin_redirect("index.php?module=user-users".$vid_url); }
|
}
| }
|
$page->output_header($lang->manage_users); $page->output_nav_tabs($sub_tabs, 'manage_users');
|
$page->output_header($lang->manage_users); $page->output_nav_tabs($sub_tabs, 'manage_users');
|
|
|
// Display a table warning $table = new Table; $lang->mass_prune_info = $lang->sprintf($lang->mass_prune_info, count($selected)); $table->construct_cell($lang->mass_prune_info);
|
// Display a table warning $table = new Table; $lang->mass_prune_info = $lang->sprintf($lang->mass_prune_info, count($selected)); $table->construct_cell($lang->mass_prune_info);
|
$table->construct_row(); $table->output($lang->important);
if($errors) { $page->output_inline_error($errors); }
| $table->construct_row(); $table->output($lang->important);
if($errors) { $page->output_inline_error($errors); }
|
// Display the prune options $form = new Form("index.php?module=user-users", "post"); echo $form->generate_hidden_field('action', 'inline_edit'); echo $form->generate_hidden_field('inline_action', 'multiprune'); echo $form->generate_hidden_field('processed', '1');
|
// Display the prune options $form = new Form("index.php?module=user-users", "post"); 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);
|
$form_container = new FormContainer($lang->mass_prune_posts);
|
|
|
// Generate a list of days (1 - 31) $day_options = array(); $day_options[] = " ";
| // Generate a list of days (1 - 31) $day_options = array(); $day_options[] = " ";
|
Zeile 2940 | Zeile 2950 |
---|
$month_options = array(); $month_options[] = " "; for($i = 1; $i <= 12; ++$i)
|
$month_options = array(); $month_options[] = " "; for($i = 1; $i <= 12; ++$i)
|
{
| {
|
$string = "month_{$i}"; $month_options[] = $lang->$string; }
| $string = "month_{$i}"; $month_options[] = $lang->$string; }
|
Zeile 2950 | Zeile 2960 |
---|
$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 2959 | Zeile 2969 |
---|
$string = "option_{$i}"; $set_options[] = $lang->$string; }
|
$string = "option_{$i}"; $set_options[] = $lang->$string; }
|
|
|
$form_container->output_row($lang->relative_date, "", $lang->delete_posts." ".$form->generate_select_box('set', $set_options, $mybb->input['set']), 'set'); $form_container->end();
|
$form_container->output_row($lang->relative_date, "", $lang->delete_posts." ".$form->generate_select_box('set', $set_options, $mybb->input['set']), 'set'); $form_container->end();
|
|
|
$buttons[] = $form->generate_submit_button($lang->prune_posts); $form->output_submit_wrapper($buttons); $form->end();
| $buttons[] = $form->generate_submit_button($lang->prune_posts); $form->output_submit_wrapper($buttons); $form->end();
|
Zeile 2983 | Zeile 2993 |
---|
}
$additionalgroups = implode(",", array_map('intval', $mybb->input['additionalgroups']));
|
}
$additionalgroups = implode(",", array_map('intval', $mybb->input['additionalgroups']));
|
} else
| } else
|
{ $additionalgroups = ''; }
| { $additionalgroups = ''; }
|
Zeile 3049 | Zeile 3059 |
---|
if($errors) { $page->output_inline_error($errors);
|
if($errors) { $page->output_inline_error($errors);
|
}
| }
|
// Display the usergroup options $form = new Form("index.php?module=user-users", "post"); echo $form->generate_hidden_field('action', 'inline_edit');
| // Display the usergroup options $form = new Form("index.php?module=user-users", "post"); echo $form->generate_hidden_field('action', 'inline_edit');
|
Zeile 3399 | Zeile 3409 |
---|
$userfield_sql = '1=1'; foreach($view['custom_profile_fields'] as $column => $input) {
|
$userfield_sql = '1=1'; foreach($view['custom_profile_fields'] as $column => $input) {
|
| if(!preg_match('/^fid[0-9]+(_blank)?$/', $column)) { continue; }
|
if(is_array($input)) { foreach($input as $value => $text)
| if(is_array($input)) { foreach($input as $value => $text)
|