Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: users.php 5646 2011-10-31 10:32:20Z PirataNervo $
| * $Id$
|
*/
// Disallow direct access to this file for security reasons
| */
// Disallow direct access to this file for security reasons
|
Zeile 149 | Zeile 149 |
---|
if($mybb->input['action'] == "avatar_gallery") { $plugins->run_hooks("admin_user_users_avatar_gallery");
|
if($mybb->input['action'] == "avatar_gallery") { $plugins->run_hooks("admin_user_users_avatar_gallery");
|
|
|
$user = get_user($mybb->input['uid']); if(!$user['uid'])
|
$user = get_user($mybb->input['uid']); if(!$user['uid'])
|
{ exit; }
| { exit; }
|
// We've selected a new avatar for this user!
|
// We've selected a new avatar for this user!
|
if($mybb->input['avatar'])
| if(isset($mybb->input['avatar']))
|
{ if(!verify_post_check($mybb->input['my_post_key'])) {
| { if(!verify_post_check($mybb->input['my_post_key'])) {
|
Zeile 175 | Zeile 175 |
---|
"avatardimensions" => "{$dimensions[0]}|{$dimensions[1]}", "avatartype" => "gallery" );
|
"avatardimensions" => "{$dimensions[0]}|{$dimensions[1]}", "avatartype" => "gallery" );
|
|
|
$db->update_query("users", $updated_avatar, "uid='".$user['uid']."'"); $plugins->run_hooks("admin_user_users_avatar_gallery_commit");
| $db->update_query("users", $updated_avatar, "uid='".$user['uid']."'"); $plugins->run_hooks("admin_user_users_avatar_gallery_commit");
|
Zeile 188 | Zeile 188 |
---|
echo "<script type=\"text/javascript\">window.parent.submitUserForm();</script>"; exit; }
|
echo "<script type=\"text/javascript\">window.parent.submitUserForm();</script>"; exit; }
|
|
|
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"; echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n"; echo "<head profile=\"http://gmpg.org/xfn/1\">\n";
| echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"; echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n"; echo "<head profile=\"http://gmpg.org/xfn/1\">\n";
|
Zeile 201 | Zeile 201 |
---|
echo "<body id=\"avatar_gallery\">\n";
// Sanitize incoming path if we have one
|
echo "<body id=\"avatar_gallery\">\n";
// Sanitize incoming path if we have one
|
$gallery = str_replace(array("..", "\x0"), "", $mybb->input['gallery']);
| $gallery = ''; if(isset($mybb->input['gallery'])) { $gallery = str_replace(array("..", "\x0"), "", $mybb->input['gallery']); }
|
$breadcrumb = "<a href=\"index.php?module=user-users&action=avatar_gallery&uid={$user['uid']}\">Default Gallery</a>";
$mybb->settings['avatardir'] = "../".$mybb->settings['avatardir'];
| $breadcrumb = "<a href=\"index.php?module=user-users&action=avatar_gallery&uid={$user['uid']}\">Default Gallery</a>";
$mybb->settings['avatardir'] = "../".$mybb->settings['avatardir'];
|
Zeile 254 | Zeile 258 |
---|
$files = @scandir($real_path); if(is_array($files))
|
$files = @scandir($real_path); if(is_array($files))
|
{
| {
|
foreach($files as $file) { if($file == "." || $file == ".." || $file == ".svn")
| foreach($files as $file) { if($file == "." || $file == ".." || $file == ".svn")
|
Zeile 357 | Zeile 361 |
---|
if(!verify_post_check($mybb->input['my_post_key'])) { flash_message($lang->invalid_post_verify_key2, 'error');
|
if(!verify_post_check($mybb->input['my_post_key'])) { flash_message($lang->invalid_post_verify_key2, 'error');
|
admin_redirect("index.php?module=user-users");
| admin_redirect("index.php?module=user-users");
|
}
$query = $db->simple_select("users", "*", "uid='".intval($mybb->input['uid'])."'");
| }
$query = $db->simple_select("users", "*", "uid='".intval($mybb->input['uid'])."'");
|
Zeile 368 | Zeile 372 |
---|
{ 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");
|
}
$updated_user['usergroup'] = $user['usergroup'];
| }
$updated_user['usergroup'] = $user['usergroup'];
|
// Update if($user['coppauser'])
| // Update if($user['coppauser'])
|
Zeile 382 | Zeile 386 |
---|
else { $db->delete_query("awaitingactivation", "uid='{$user['uid']}'");
|
else { $db->delete_query("awaitingactivation", "uid='{$user['uid']}'");
|
}
| }
|
// Move out of awaiting activation if they're in it. if($user['usergroup'] == 5) {
| // Move out of awaiting activation if they're in it. if($user['usergroup'] == 5) {
|
Zeile 409 | Zeile 413 |
---|
} update_admin_session('flash_message2', array('message' => $message, 'type' => 'success'));
|
} update_admin_session('flash_message2', array('message' => $message, 'type' => 'success'));
|
}
| }
|
else { if($user['coppauser']) { flash_message($lang->success_coppa_activated, 'success');
|
else { if($user['coppauser']) { flash_message($lang->success_coppa_activated, 'success');
|
} else
| } else
|
{ flash_message($lang->success_activated, 'success'); }
| { flash_message($lang->success_activated, 'success'); }
|
Zeile 448 | Zeile 452 |
---|
{ // Determine the usergroup stuff if(is_array($mybb->input['additionalgroups']))
|
{ // Determine the usergroup stuff if(is_array($mybb->input['additionalgroups']))
|
{
| {
|
foreach($mybb->input['additionalgroups'] as $key => $gid) { if($gid == $mybb->input['usergroup'])
| foreach($mybb->input['additionalgroups'] as $key => $gid) { if($gid == $mybb->input['usergroup'])
|
Zeile 461 | Zeile 465 |
---|
else { $additionalgroups = '';
|
else { $additionalgroups = '';
|
}
| }
|
// Set up user handler. require_once MYBB_ROOT."inc/datahandlers/user.php";
| // Set up user handler. require_once MYBB_ROOT."inc/datahandlers/user.php";
|
Zeile 538 | Zeile 542 |
---|
$form_container->output_row($lang->email_address." <em>*</em>", "", $form->generate_text_box('email', $mybb->input['email'], array('id' => 'email')), 'email');
$display_group_options[0] = $lang->use_primary_user_group;
|
$form_container->output_row($lang->email_address." <em>*</em>", "", $form->generate_text_box('email', $mybb->input['email'], array('id' => 'email')), 'email');
$display_group_options[0] = $lang->use_primary_user_group;
|
| $options = array();
|
$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title')); while($usergroup = $db->fetch_array($query)) {
| $query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title')); while($usergroup = $db->fetch_array($query)) {
|
Zeile 563 | Zeile 568 |
---|
if($mybb->input['action'] == "edit") { $plugins->run_hooks("admin_user_users_edit");
|
if($mybb->input['action'] == "edit") { $plugins->run_hooks("admin_user_users_edit");
|
$query = $db->simple_select("users", "*", "uid='".intval($mybb->input['uid'])."'");
| $query = $db->simple_select("users", "*", "uid='".intval($mybb->input['uid'])."'");
|
$user = $db->fetch_array($query);
// Does the user not exist?
| $user = $db->fetch_array($query);
// Does the user not exist?
|
Zeile 623 | Zeile 628 |
---|
"aim" => $mybb->input['aim'], "yahoo" => $mybb->input['yahoo'], "msn" => $mybb->input['msn'],
|
"aim" => $mybb->input['aim'], "yahoo" => $mybb->input['yahoo'], "msn" => $mybb->input['msn'],
|
| "birthday" => array( "day" => $mybb->input['bday1'], "month" => $mybb->input['bday2'], "year" => $mybb->input['bday3'] ),
|
"style" => $mybb->input['style'], "signature" => $mybb->input['signature'], "dateformat" => intval($mybb->input['dateformat']),
| "style" => $mybb->input['style'], "signature" => $mybb->input['signature'], "dateformat" => intval($mybb->input['dateformat']),
|
Zeile 720 | Zeile 730 |
---|
else if($mybb->input['avatar_url'] && $mybb->input['avatar_url'] != $user['avatar']) { $mybb->input['avatar_url'] = preg_replace("#script:#i", "", $mybb->input['avatar_url']);
|
else if($mybb->input['avatar_url'] && $mybb->input['avatar_url'] != $user['avatar']) { $mybb->input['avatar_url'] = preg_replace("#script:#i", "", $mybb->input['avatar_url']);
|
$mybb->input['avatar_url'] = htmlspecialchars($mybb->input['avatar_url']);
| $mybb->input['avatar_url'] = htmlspecialchars_uni($mybb->input['avatar_url']);
|
$ext = get_extension($mybb->input['avatar_url']);
// Copy the avatar to the local server (work around remote URL access disabled for getimagesize)
| $ext = get_extension($mybb->input['avatar_url']);
// Copy the avatar to the local server (work around remote URL access disabled for getimagesize)
|
Zeile 778 | Zeile 788 |
---|
remove_avatars($user['uid']); } else
|
remove_avatars($user['uid']); } else
|
{
| {
|
$errors = array($avatar_error); } }
| $errors = array($avatar_error); } }
|
Zeile 902 | Zeile 912 |
---|
{ $user['usertitle'] = htmlspecialchars_decode($user['usertitle']); $mybb->input = $user;
|
{ $user['usertitle'] = htmlspecialchars_decode($user['usertitle']); $mybb->input = $user;
|
| $options = array( 'bday1', 'bday2', 'bday3', 'new_password', 'confirm_new_password', 'action_time', 'action_period', 'modpost_period', 'moderateposting', 'modpost_time', 'suspost_period', 'suspost_time' );
foreach($options as $option) { if(!isset($mybb->input[$option])) { $mybb->input[$option] = ''; } }
|
// We need to fetch this users profile field values $query = $db->simple_select("userfields", "*", "ufid='{$user['uid']}'"); $mybb->input['profile_fields'] = $db->fetch_array($query);
|
// We need to fetch this users profile field values $query = $db->simple_select("userfields", "*", "ufid='{$user['uid']}'"); $mybb->input['profile_fields'] = $db->fetch_array($query);
|
| }
if($mybb->input['bday1'] || $mybb->input['bday2'] || $mybb->input['bday3']) { $mybb->input['bday'][0] = $mybb->input['bday1']; $mybb->input['bday'][1] = $mybb->input['bday2']; $mybb->input['bday'][2] = intval($mybb->input['bday3']); } else { $mybb->input['bday'] = array(0, 0, '');
if($user['birthday']) { $mybb->input['bday'] = explode('-', $user['birthday']); }
|
}
// Fetch custom profile fields
| }
// Fetch custom profile fields
|
Zeile 1057 | Zeile 1098 |
---|
$warning_level = get_colored_warning_level($warning_level); }
|
$warning_level = get_colored_warning_level($warning_level); }
|
| $age = $lang->na;
|
if($user['birthday'])
|
if($user['birthday'])
|
{
| {
|
$age = get_age($user['birthday']);
|
$age = get_age($user['birthday']);
|
}
else { $age = ''; }
| }
|
$table->construct_cell("<div style=\"width: 126px; height: 126px;\" class=\"user_avatar\"><img src=\"".htmlspecialchars_uni($user['avatar'])."\" style=\"margin-top: {$avatar_top}px\" width=\"{$scaled_dimensions['width']}\" height=\"{$scaled_dimensions['height']}\" alt=\"\" /></div>", array('rowspan' => 6, 'width' => 1)); $table->construct_cell("<strong>{$lang->email_address}:</strong> <a href=\"mailto:".htmlspecialchars_uni($user['email'])."\">".htmlspecialchars_uni($user['email'])."</a>"); $table->construct_cell("<strong>{$lang->last_active}:</strong> {$last_active}");
| $table->construct_cell("<div style=\"width: 126px; height: 126px;\" class=\"user_avatar\"><img src=\"".htmlspecialchars_uni($user['avatar'])."\" style=\"margin-top: {$avatar_top}px\" width=\"{$scaled_dimensions['width']}\" height=\"{$scaled_dimensions['height']}\" alt=\"\" /></div>", array('rowspan' => 6, 'width' => 1)); $table->construct_cell("<strong>{$lang->email_address}:</strong> <a href=\"mailto:".htmlspecialchars_uni($user['email'])."\">".htmlspecialchars_uni($user['email'])."</a>"); $table->construct_cell("<strong>{$lang->last_active}:</strong> {$last_active}");
|
Zeile 1095 | Zeile 1131 |
---|
// PROFILE // echo "<div id=\"tab_profile\">\n";
|
// PROFILE // echo "<div id=\"tab_profile\">\n";
|
|
|
$form_container = new FormContainer($lang->required_profile_info.": {$user['username']}"); $form_container->output_row($lang->username." <em>*</em>", "", $form->generate_text_box('username', $mybb->input['username'], array('id' => 'username')), 'username'); $form_container->output_row($lang->new_password, $lang->new_password_desc, $form->generate_password_box('new_password', $mybb->input['new_password'], array('id' => 'new_password', 'autocomplete' => 'off')), 'new_password');
| $form_container = new FormContainer($lang->required_profile_info.": {$user['username']}"); $form_container->output_row($lang->username." <em>*</em>", "", $form->generate_text_box('username', $mybb->input['username'], array('id' => 'username')), 'username'); $form_container->output_row($lang->new_password, $lang->new_password_desc, $form->generate_password_box('new_password', $mybb->input['new_password'], array('id' => 'new_password', 'autocomplete' => 'off')), 'new_password');
|
Zeile 1103 | Zeile 1139 |
---|
$form_container->output_row($lang->email_address." <em>*</em>", "", $form->generate_text_box('email', $mybb->input['email'], array('id' => 'email')), 'email');
$display_group_options[0] = $lang->use_primary_user_group;
|
$form_container->output_row($lang->email_address." <em>*</em>", "", $form->generate_text_box('email', $mybb->input['email'], array('id' => 'email')), 'email');
$display_group_options[0] = $lang->use_primary_user_group;
|
| $options = array();
|
$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title')); while($usergroup = $db->fetch_array($query)) {
| $query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title')); while($usergroup = $db->fetch_array($query)) {
|
Zeile 1113 | Zeile 1150 |
---|
if(!is_array($mybb->input['additionalgroups'])) { $mybb->input['additionalgroups'] = explode(',', $mybb->input['additionalgroups']);
|
if(!is_array($mybb->input['additionalgroups'])) { $mybb->input['additionalgroups'] = explode(',', $mybb->input['additionalgroups']);
|
}
| }
|
$form_container->output_row($lang->primary_user_group." <em>*</em>", "", $form->generate_select_box('usergroup', $options, $mybb->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." <em>*</em>", "", $form->generate_select_box('displaygroup', $display_group_options, $mybb->input['displaygroup'], array('id' => 'displaygroup')), 'displaygroup'); $form_container->output_row($lang->post_count." <em>*</em>", "", $form->generate_text_box('postnum', $mybb->input['postnum'], array('id' => 'postnum')), 'postnum');
// Output custom profile fields - required
|
$form_container->output_row($lang->primary_user_group." <em>*</em>", "", $form->generate_select_box('usergroup', $options, $mybb->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." <em>*</em>", "", $form->generate_select_box('displaygroup', $display_group_options, $mybb->input['displaygroup'], array('id' => 'displaygroup')), 'displaygroup'); $form_container->output_row($lang->post_count." <em>*</em>", "", $form->generate_text_box('postnum', $mybb->input['postnum'], array('id' => 'postnum')), 'postnum');
// Output custom profile fields - required
|
| if(!isset($profile_fields['required'])) { $profile_fields['required'] = array(); }
|
output_custom_profile_fields($profile_fields['required'], $mybb->input['profile_fields'], $form_container, $form);
$form_container->end();
| output_custom_profile_fields($profile_fields['required'], $mybb->input['profile_fields'], $form_container, $form);
$form_container->end();
|
Zeile 1132 | Zeile 1173 |
---|
$form_container->output_row($lang->aim_handle, "", $form->generate_text_box('aim', $mybb->input['aim'], array('id' => 'aim')), 'aim'); $form_container->output_row($lang->yahoo_messanger_handle, "", $form->generate_text_box('yahoo', $mybb->input['yahoo'], array('id' => 'yahoo')), 'yahoo'); $form_container->output_row($lang->msn_messanger_handle, "", $form->generate_text_box('msn', $mybb->input['msn'], array('id' => 'msn')), 'msn');
|
$form_container->output_row($lang->aim_handle, "", $form->generate_text_box('aim', $mybb->input['aim'], array('id' => 'aim')), 'aim'); $form_container->output_row($lang->yahoo_messanger_handle, "", $form->generate_text_box('yahoo', $mybb->input['yahoo'], array('id' => 'yahoo')), 'yahoo'); $form_container->output_row($lang->msn_messanger_handle, "", $form->generate_text_box('msn', $mybb->input['msn'], array('id' => 'msn')), 'msn');
|
|
|
// Birthday
|
// Birthday
|
| $birthday_days = array(0 => ''); for($i = 1; $i <= 31; $i++) { $birthday_days[$i] = $i; }
$birthday_months = array( 0 => '', 1 => $lang->january, 2 => $lang->february, 3 => $lang->march, 4 => $lang->april, 5 => $lang->may, 6 => $lang->june, 7 => $lang->july, 8 => $lang->august, 9 => $lang->september, 10 => $lang->october, 11 => $lang->november, 12 => $lang->december );
$birthday_row = $form->generate_select_box('bday1', $birthday_days, $mybb->input['bday'][0], array('id' => 'bday_day')); $birthday_row .= ' '.$form->generate_select_box('bday2', $birthday_months, $mybb->input['bday'][1], array('id' => 'bday_month')); $birthday_row .= ' '.$form->generate_text_box('bday3', $mybb->input['bday'][2], array('id' => 'bday_year', 'style' => 'width: 3em;'));
$form_container->output_row($lang->birthday, "", $birthday_row, 'birthday');
|
// Output custom profile fields - optional output_custom_profile_fields($profile_fields['optional'], $mybb->input['profile_fields'], $form_container, $form);
| // Output custom profile fields - optional output_custom_profile_fields($profile_fields['optional'], $mybb->input['profile_fields'], $form_container, $form);
|
Zeile 1321 | Zeile 1390 |
---|
else { $sig_checked = 0;
|
else { $sig_checked = 0;
|
| $user_suspend_info = '';
|
}
$actions = '
| }
$actions = '
|
Zeile 1371 | Zeile 1441 |
---|
$form->generate_radio_button("update_posts", "no", $lang->do_nothing, array("checked" => 1)) );
|
$form->generate_radio_button("update_posts", "no", $lang->do_nothing, array("checked" => 1)) );
|
$form_container->output_row($lang->singature_preferences, "", implode("<br />", $signature_options));
| $form_container->output_row($lang->signature_preferences, "", implode("<br />", $signature_options));
|
$form_container->end(); echo "</div>\n";
| $form_container->end(); echo "</div>\n";
|
Zeile 1385 | Zeile 1455 |
---|
$table->construct_cell("<div style=\"width: 126px; height: 126px;\" class=\"user_avatar\"><img src=\"".htmlspecialchars_uni($user['avatar'])."\" width=\"{$scaled_dimensions['width']}\" style=\"margin-top: {$avatar_top}px\" height=\"{$scaled_dimensions['height']}\" alt=\"\" /></div>", array('width' => 1));
|
$table->construct_cell("<div style=\"width: 126px; height: 126px;\" class=\"user_avatar\"><img src=\"".htmlspecialchars_uni($user['avatar'])."\" width=\"{$scaled_dimensions['width']}\" style=\"margin-top: {$avatar_top}px\" height=\"{$scaled_dimensions['height']}\" alt=\"\" /></div>", array('width' => 1));
|
| $avatar_url = '';
|
if($user['avatartype'] == "upload" || stristr($user['avatar'], $mybb->settings['avataruploadpath'])) { $current_avatar_msg = "<br /><strong>{$lang->user_current_using_uploaded_avatar}</strong>";
| if($user['avatartype'] == "upload" || stristr($user['avatar'], $mybb->settings['avataruploadpath'])) { $current_avatar_msg = "<br /><strong>{$lang->user_current_using_uploaded_avatar}</strong>";
|
Zeile 1459 | Zeile 1530 |
---|
);
echo "<div id=\"tab_modoptions\">\n";
|
);
echo "<div id=\"tab_modoptions\">\n";
|
$form_container = new FormContainer($lang->mod_options);
| $form_container = new FormContainer($lang->mod_options.": {$user['username']}");
|
$form_container->output_row($lang->user_notes, '', $form->generate_text_area('usernotes', $mybb->input['usernotes'], array('id' => 'usernotes')), 'usernotes');
// Mod posts
| $form_container->output_row($lang->user_notes, '', $form->generate_text_area('usernotes', $mybb->input['usernotes'], array('id' => 'usernotes')), 'usernotes');
// Mod posts
|
Zeile 1467 | Zeile 1538 |
---|
$modpost_options = $form->generate_select_box('modpost_period', $periods, $mybb->input['modpost_period'], array('id' => 'modpost_period'));
// Do we have any existing suspensions here?
|
$modpost_options = $form->generate_select_box('modpost_period', $periods, $mybb->input['modpost_period'], array('id' => 'modpost_period'));
// Do we have any existing suspensions here?
|
| $existing_info = '';
|
if($user['moderateposts'] || ($mybb->input['moderateposting'] && !empty($errors))) { $mybb->input['moderateposting'] = 1;
| if($user['moderateposts'] || ($mybb->input['moderateposting'] && !empty($errors))) { $mybb->input['moderateposting'] = 1;
|
Zeile 1606 | Zeile 1678 |
---|
if($mybb->request_method == "post") { // Delete the user
|
if($mybb->request_method == "post") { // Delete the user
|
$db->update_query("posts", array('uid' => 0), "uid='{$user['uid']}'");
| |
$db->delete_query("userfields", "ufid='{$user['uid']}'"); $db->delete_query("privatemessages", "uid='{$user['uid']}'"); $db->delete_query("events", "uid='{$user['uid']}'");
| $db->delete_query("userfields", "ufid='{$user['uid']}'"); $db->delete_query("privatemessages", "uid='{$user['uid']}'"); $db->delete_query("events", "uid='{$user['uid']}'");
|
Zeile 1619 | Zeile 1690 |
---|
$db->delete_query("joinrequests", "uid='{$user['uid']}'"); $db->delete_query("warnings", "uid='{$user['uid']}'"); $db->delete_query("reputation", "uid='{$user['uid']}' OR adduid='{$user['uid']}'");
|
$db->delete_query("joinrequests", "uid='{$user['uid']}'"); $db->delete_query("warnings", "uid='{$user['uid']}'"); $db->delete_query("reputation", "uid='{$user['uid']}' OR adduid='{$user['uid']}'");
|
$db->delete_query("awaitingactivation", "uid='{$uid}'");
| $db->delete_query("awaitingactivation", "uid='{$user['uid']}'"); $db->delete_query("posts", "uid = '{$user['uid']}' AND visible = '-2'"); $db->delete_query("threads", "uid = '{$user['uid']}' AND visible = '-2'");
|
// Update forum stats update_stats(array('numusers' => '-1'));
|
// Update forum stats update_stats(array('numusers' => '-1'));
|
| // Update forums & threads if user is the lastposter $db->update_query("posts", array('uid' => 0), "uid='{$user['uid']}'"); $db->update_query("forums", array("lastposteruid" => 0), "lastposteruid = '{$user['uid']}'"); $db->update_query("threads", array("lastposteruid" => 0), "lastposteruid = '{$user['uid']}'");
|
// Did this user have an uploaded avatar? if($user['avatartype'] == "upload")
| // Did this user have an uploaded avatar? if($user['avatartype'] == "upload")
|
Zeile 1658 | Zeile 1736 |
---|
$page->add_breadcrumb_item($lang->show_referrers); $page->output_header($lang->show_referrers);
|
$page->add_breadcrumb_item($lang->show_referrers); $page->output_header($lang->show_referrers);
|
|
|
$sub_tabs['referrers'] = array( 'title' => $lang->show_referrers, 'link' => "index.php?module=user-users&action=referrers&uid={$mybb->input['uid']}",
| $sub_tabs['referrers'] = array( 'title' => $lang->show_referrers, 'link' => "index.php?module=user-users&action=referrers&uid={$mybb->input['uid']}",
|
Zeile 1683 | Zeile 1761 |
---|
$admin_view['conditions'] = unserialize($admin_view['conditions']); $admin_view['conditions']['referrer'] = $mybb->input['uid'];
|
$admin_view['conditions'] = unserialize($admin_view['conditions']); $admin_view['conditions']['referrer'] = $mybb->input['uid'];
|
echo build_users_view($admin_view);
| $view = build_users_view($admin_view);
// No referred users if(!$view) { $table = new Table; $table->construct_cell($lang->error_no_referred_users); $table->construct_row(); $table->output($lang->show_referrers); } else { echo $view; }
|
$page->output_footer(); }
| $page->output_footer(); }
|
Zeile 1786 | Zeile 1877 |
---|
if(!$source_user['uid']) { $errors[] = $lang->error_invalid_user_source;
|
if(!$source_user['uid']) { $errors[] = $lang->error_invalid_user_source;
|
}
| }
|
$query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['destination_username']))."'"); $destination_user = $db->fetch_array($query); if(!$destination_user['uid'])
|
$query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['destination_username']))."'"); $destination_user = $db->fetch_array($query); if(!$destination_user['uid'])
|
{
| {
|
$errors[] = $lang->error_invalid_user_destination; } // If we're not a super admin and we're merging a source super admin or a destination super admin then dissallow this action if(!is_super_admin($mybb->user['uid']) && (is_super_admin($source_user['uid']) || is_super_admin($destination_user['uid'])))
|
$errors[] = $lang->error_invalid_user_destination; } // If we're not a super admin and we're merging a source super admin or a destination super admin then dissallow this action if(!is_super_admin($mybb->user['uid']) && (is_super_admin($source_user['uid']) || is_super_admin($destination_user['uid'])))
|
{
| {
|
flash_message($lang->error_no_perms_super_admin, 'error'); admin_redirect("index.php?module=user-users");
|
flash_message($lang->error_no_perms_super_admin, 'error'); admin_redirect("index.php?module=user-users");
|
}
| }
|
if($source_user['uid'] == $destination_user['uid'])
|
if($source_user['uid'] == $destination_user['uid'])
|
{
| {
|
$errors[] = $lang->error_cannot_merge_same_account; }
| $errors[] = $lang->error_cannot_merge_same_account; }
|
Zeile 1811 | Zeile 1902 |
---|
{ // Begin to merge the accounts $uid_update = array(
|
{ // Begin to merge the accounts $uid_update = array(
|
"uid" => $destination_user['uid'] );
| "uid" => $destination_user['uid'] );
|
$query = $db->simple_select("adminoptions", "uid", "uid='{$destination_user['uid']}'"); $existing_admin_options = $db->fetch_field($query, "uid");
| $query = $db->simple_select("adminoptions", "uid", "uid='{$destination_user['uid']}'"); $existing_admin_options = $db->fetch_field($query, "uid");
|
Zeile 1820 | Zeile 1911 |
---|
if(!$existing_admin_options) { $db->update_query("adminoptions", $uid_update, "uid='{$source_user['uid']}'");
|
if(!$existing_admin_options) { $db->update_query("adminoptions", $uid_update, "uid='{$source_user['uid']}'");
|
}
| }
|
$db->update_query("adminlog", $uid_update, "uid='{$source_user['uid']}'"); $db->update_query("announcements", $uid_update, "uid='{$source_user['uid']}'");
| $db->update_query("adminlog", $uid_update, "uid='{$source_user['uid']}'"); $db->update_query("announcements", $uid_update, "uid='{$source_user['uid']}'");
|
Zeile 1836 | Zeile 1927 |
---|
$db->update_query("threadratings", $uid_update, "uid='{$source_user['uid']}'"); $db->update_query("threads", $uid_update, "uid='{$source_user['uid']}'"); $db->delete_query("sessions", "uid='{$source_user['uid']}'");
|
$db->update_query("threadratings", $uid_update, "uid='{$source_user['uid']}'"); $db->update_query("threads", $uid_update, "uid='{$source_user['uid']}'"); $db->delete_query("sessions", "uid='{$source_user['uid']}'");
|
|
|
// Is the source user a moderator? if($groupscache[$source_user['usergroup']]['canmodcp']) {
| // Is the source user a moderator? if($groupscache[$source_user['usergroup']]['canmodcp']) {
|
Zeile 1845 | Zeile 1936 |
---|
// Update the moderator cache... $cache->update_moderators(); }
|
// Update the moderator cache... $cache->update_moderators(); }
|
| // Forums & Threads $db->update_query("forums", array("lastposteruid" => $destination_user['uid']), "lastposteruid = '{$source_user['uid']}'"); $db->update_query("threads", array("lastposteruid" => $destination_user['uid']), "lastposteruid = '{$source_user['uid']}'");
// Banning $db->update_query("banned", array('admin' => $destination_user['uid']), "admin = '{$source_user['uid']}'");
|
// Merging Reputation // First, let's change all the details over to our new user...
| // Merging Reputation // First, let's change all the details over to our new user...
|
Zeile 2057 | Zeile 2155 |
---|
$admin_view['sortby'] = $mybb->input['sortby']; }
|
$admin_view['sortby'] = $mybb->input['sortby']; }
|
if($mybb->input['perpage'])
| if(intval($mybb->input['perpage']))
|
{ $admin_view['perpage'] = $mybb->input['perpage']; }
| { $admin_view['perpage'] = $mybb->input['perpage']; }
|
Zeile 2586 | Zeile 2684 |
---|
}
// Require the rebuild functions
|
}
// Require the rebuild functions
|
require_once(MYBB_ROOT.'/inc/functions.php'); require_once(MYBB_ROOT.'/inc/functions_rebuild.php');
| 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)
|
Zeile 2597 | Zeile 2695 |
---|
$db->delete_query("threads", "tid='$tid'"); $db->delete_query("threads", "closed='moved|$tid'"); $db->delete_query("threadsubscriptions", "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("polls", "tid='$tid'");
|
$db->delete_query("threadsread", "tid='$tid'");
|
$db->delete_query("threadsread", "tid='$tid'");
|
| $db->delete_query("threadratings", "tid='$tid'");
|
} }
| } }
|
Zeile 2644 | Zeile 2743 |
---|
$table = new Table; $lang->mass_prune_info = $lang->sprintf($lang->mass_prune_info, count($selected)); $table->construct_cell($lang->mass_prune_info);
|
$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->construct_row();
|
$table->output($lang->important);
if($errors)
| $table->output($lang->important);
if($errors)
|
Zeile 2713 | Zeile 2812 |
---|
unset($mybb->input['additionalgroups'][$key]); } }
|
unset($mybb->input['additionalgroups'][$key]); } }
|
$additionalgroups = implode(",", $mybb->input['additionalgroups']);
| $additionalgroups = implode(",", array_map('intval', $mybb->input['additionalgroups']));
|
} else {
| } else {
|
Zeile 2722 | Zeile 2821 |
---|
// Create an update array $update_array = array(
|
// Create an update array $update_array = array(
|
"usergroup" => $mybb->input['usergroup'],
| "usergroup" => intval($mybb->input['usergroup']),
|
"additionalgroups" => $additionalgroups,
|
"additionalgroups" => $additionalgroups,
|
"displaygroup" => $mybb->input['displaygroup']
| "displaygroup" => intval($mybb->input['displaygroup'])
|
);
// Do the usergroup update for all those selected
| );
// Do the usergroup update for all those selected
|
Zeile 2783 | Zeile 2882 |
---|
// Usergroups $display_group_options[0] = $lang->use_primary_user_group;
|
// Usergroups $display_group_options[0] = $lang->use_primary_user_group;
|
| $options = array();
|
$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title')); while($usergroup = $db->fetch_array($query))
|
$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title')); while($usergroup = $db->fetch_array($query))
|
{
| {
|
$options[$usergroup['gid']] = $usergroup['title']; $display_group_options[$usergroup['gid']] = $usergroup['title'];
|
$options[$usergroup['gid']] = $usergroup['title']; $display_group_options[$usergroup['gid']] = $usergroup['title'];
|
}
| }
|
if(!is_array($mybb->input['additionalgroups'])) { $mybb->input['additionalgroups'] = explode(',', $mybb->input['additionalgroups']);
| if(!is_array($mybb->input['additionalgroups'])) { $mybb->input['additionalgroups'] = explode(',', $mybb->input['additionalgroups']);
|
Zeile 2800 | Zeile 2900 |
---|
$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->end();
|
$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->end();
|
|
|
$buttons[] = $form->generate_submit_button($lang->alter_usergroups); $form->output_submit_wrapper($buttons); $form->end(); $page->output_footer(); break; }
|
$buttons[] = $form->generate_submit_button($lang->alter_usergroups); $form->output_submit_wrapper($buttons); $form->end(); $page->output_footer(); break; }
|
}
| }
|
}
if(!$mybb->input['action']) { $plugins->run_hooks("admin_user_users_start");
|
}
if(!$mybb->input['action']) { $plugins->run_hooks("admin_user_users_start");
|
|
|
$page->output_header($lang->browse_users); echo "<script type=\"text/javascript\" src=\"jscripts/users.js\"></script>";
|
$page->output_header($lang->browse_users); echo "<script type=\"text/javascript\" src=\"jscripts/users.js\"></script>";
|
|
|
$page->output_nav_tabs($sub_tabs, 'browse_users');
|
$page->output_nav_tabs($sub_tabs, 'browse_users');
|
if($mybb->input['search_id'] && $admin_session['data']['user_views'][$mybb->input['search_id']]) {
| if(isset($mybb->input['search_id']) && $admin_session['data']['user_views'][$mybb->input['search_id']]) {
|
$admin_view = $admin_session['data']['user_views'][$mybb->input['search_id']]; unset($admin_view['extra_sql']); } else { // Showing a specific view
|
$admin_view = $admin_session['data']['user_views'][$mybb->input['search_id']]; unset($admin_view['extra_sql']); } else { // Showing a specific view
|
if($mybb->input['vid'])
| if(isset($mybb->input['vid']))
|
{ $query = $db->simple_select("adminviews", "*", "vid='".intval($mybb->input['vid'])."'"); $admin_view = $db->fetch_array($query);
| { $query = $db->simple_select("adminviews", "*", "vid='".intval($mybb->input['vid'])."'"); $admin_view = $db->fetch_array($query);
|
Zeile 2839 | Zeile 2939 |
---|
}
// Don't have a view? Fetch the default
|
}
// Don't have a view? Fetch the default
|
if(!$admin_view)
| if(!isset($admin_view))
|
{ $default_view = fetch_default_view("user"); if(!$default_view)
| { $default_view = fetch_default_view("user"); if(!$default_view)
|
Zeile 2862 | Zeile 2962 |
---|
$popup->add_item("<em>{$lang->manage_views}</em>", "index.php?module=user-users&action=views"); $admin_view['popup'] = $popup->fetch();
|
$popup->add_item("<em>{$lang->manage_views}</em>", "index.php?module=user-users&action=views"); $admin_view['popup'] = $popup->fetch();
|
if($mybb->input['type'])
| if(isset($mybb->input['type']))
|
{ $admin_view['view_type'] = $mybb->input['type']; }
| { $admin_view['view_type'] = $mybb->input['type']; }
|
Zeile 2905 | Zeile 3005 |
---|
{ global $mybb, $db, $cache, $lang, $user_view_fields, $page;
|
{ global $mybb, $db, $cache, $lang, $user_view_fields, $page;
|
| $view_title = '';
|
if($view['title']) { $title_string = "view_title_{$view['vid']}";
| if($view['title']) { $title_string = "view_title_{$view['vid']}";
|
Zeile 2918 | Zeile 3019 |
---|
}
// Build the URL to this view
|
}
// Build the URL to this view
|
if(!$view['url'])
| if(!isset($view['url']))
|
{ $view['url'] = "index.php?module=user-users"; }
| { $view['url'] = "index.php?module=user-users"; }
|
Zeile 2934 | Zeile 3035 |
---|
{ $view['custom_profile_fields'] = unserialize($view['custom_profile_fields']); }
|
{ $view['custom_profile_fields'] = unserialize($view['custom_profile_fields']); }
|
if($mybb->input['username'])
| if(isset($mybb->input['username']))
|
{ $view['conditions']['username'] = $mybb->input['username']; }
| { $view['conditions']['username'] = $mybb->input['username']; }
|
Zeile 2946 | Zeile 3047 |
---|
{ // If this is a custom view we need to save everything ready to pass it on from page to page global $admin_session;
|
{ // If this is a custom view we need to save everything ready to pass it on from page to page global $admin_session;
|
if(!$_REQUEST['search_id'])
| if(!$mybb->input['search_id'])
|
{ $search_id = md5(random_str()); $admin_session['data']['user_views'][$search_id] = $view; update_admin_session('user_views', $admin_session['data']['user_views']);
|
{ $search_id = md5(random_str()); $admin_session['data']['user_views'][$search_id] = $view; update_admin_session('user_views', $admin_session['data']['user_views']);
|
$_REQUEST['search_id'] = $search_id;
| $mybb->input['search_id'] = $search_id;
|
}
|
}
|
$view['url'] .= "&search_id=".htmlspecialchars($_REQUEST['search_id']);
| $view['url'] .= "&search_id=".htmlspecialchars_uni($mybb->input['search_id']);
|
}
|
}
|
if($mybb->input['username'])
| if(isset($mybb->input['username']))
|
{ $view['url'] .= "&username=".urlencode(htmlspecialchars_uni($mybb->input['username'])); }
| { $view['url'] .= "&username=".urlencode(htmlspecialchars_uni($mybb->input['username'])); }
|
Zeile 2964 | Zeile 3065 |
---|
if(!isset($admin_session['data']['last_users_view']) || $admin_session['data']['last_users_view'] != str_replace("&", "&", $view['url'])) { update_admin_session('last_users_url', str_replace("&", "&", $view['url']));
|
if(!isset($admin_session['data']['last_users_view']) || $admin_session['data']['last_users_view'] != str_replace("&", "&", $view['url'])) { update_admin_session('last_users_url', str_replace("&", "&", $view['url']));
|
}
| }
|
if(isset($view['conditions']['referrer'])){
|
if(isset($view['conditions']['referrer'])){
|
$view['url'] .= "&action=referrers&uid=".htmlspecialchars($view['conditions']['referrer']);
| $view['url'] .= "&action=referrers&uid=".htmlspecialchars_uni($view['conditions']['referrer']);
|
} // Do we not have any views?
| } // Do we not have any views?
|
Zeile 2977 | Zeile 3078 |
---|
} $table = new Table;
|
} $table = new Table;
|
|
|
// Build header for table based view if($view['view_type'] != "card") {
| // Build header for table based view if($view['view_type'] != "card") {
|
Zeile 3000 | Zeile 3101 |
---|
$table->construct_header($view_field['title'], $field_options); } $table->construct_header("<input type=\"checkbox\" name=\"allbox\" onclick=\"inlineModeration.checkAll(this);\" />"); // Create a header for the "select" boxes
|
$table->construct_header($view_field['title'], $field_options); } $table->construct_header("<input type=\"checkbox\" name=\"allbox\" onclick=\"inlineModeration.checkAll(this);\" />"); // Create a header for the "select" boxes
|
}
$search_sql = '1=1';
| }
$search_sql = '1=1';
|
// Build the search SQL for users
| // Build the search SQL for users
|
Zeile 3010 | Zeile 3111 |
---|
$user_like_fields = array("username", "email", "website", "icq", "aim", "yahoo", "msn", "signature", "usertitle"); foreach($user_like_fields as $search_field) {
|
$user_like_fields = array("username", "email", "website", "icq", "aim", "yahoo", "msn", "signature", "usertitle"); foreach($user_like_fields as $search_field) {
|
if($view['conditions'][$search_field] && !$view['conditions'][$search_field.'_blank'])
| if(!empty($view['conditions'][$search_field]) && !$view['conditions'][$search_field.'_blank'])
|
{ $search_sql .= " AND u.{$search_field} LIKE '%".$db->escape_string_like($view['conditions'][$search_field])."%'"; }
|
{ $search_sql .= " AND u.{$search_field} LIKE '%".$db->escape_string_like($view['conditions'][$search_field])."%'"; }
|
else if(isset($view['conditions'][$search_field.'_blank']))
| else if(!empty($view['conditions'][$search_field.'_blank']))
|
{ $search_sql .= " AND u.{$search_field} != ''";
|
{ $search_sql .= " AND u.{$search_field} != ''";
|
} }
| } }
|
// EXACT matching fields $user_exact_fields = array("referrer"); foreach($user_exact_fields as $search_field) {
|
// EXACT matching fields $user_exact_fields = array("referrer"); foreach($user_exact_fields as $search_field) {
|
if($view['conditions'][$search_field])
| if(!empty($view['conditions'][$search_field]))
|
{ $search_sql .= " AND u.{$search_field}='".$db->escape_string($view['conditions'][$search_field])."'";
|
{ $search_sql .= " AND u.{$search_field}='".$db->escape_string($view['conditions'][$search_field])."'";
|
}
| }
|
}
// LESS THAN or GREATER THAN $direction_fields = array("postnum"); foreach($direction_fields as $search_field)
|
}
// LESS THAN or GREATER THAN $direction_fields = array("postnum"); foreach($direction_fields as $search_field)
|
{
| {
|
$direction_field = $search_field."_dir";
|
$direction_field = $search_field."_dir";
|
if(($view['conditions'][$search_field] || $view['conditions'][$search_field] === '0') && $view['conditions'][$direction_field])
| if(!empty($view['conditions'][$search_field]) && ($view['conditions'][$search_field] || $view['conditions'][$search_field] === '0') && $view['conditions'][$direction_field])
|
{ switch($view['conditions'][$direction_field]) { case "greater_than": $direction = ">";
|
{ switch($view['conditions'][$direction_field]) { case "greater_than": $direction = ">";
|
break;
| break;
|
case "less_than": $direction = "<"; break; default: $direction = "=";
|
case "less_than": $direction = "<"; break; default: $direction = "=";
|
}
| }
|
$search_sql .= " AND u.{$search_field}{$direction}'".$db->escape_string($view['conditions'][$search_field])."'"; } }
| $search_sql .= " AND u.{$search_field}{$direction}'".$db->escape_string($view['conditions'][$search_field])."'"; } }
|
Zeile 3056 | Zeile 3157 |
---|
$reg_fields = array("regdate"); foreach($reg_fields as $search_field) {
|
$reg_fields = array("regdate"); foreach($reg_fields as $search_field) {
|
if(intval($view['conditions'][$search_field]))
| if(!empty($view['conditions'][$search_field]) && intval($view['conditions'][$search_field]))
|
{ $threshold = TIME_NOW - (intval($view['conditions'][$search_field]) * 24 * 60 * 60);
| { $threshold = TIME_NOW - (intval($view['conditions'][$search_field]) * 24 * 60 * 60);
|
Zeile 3068 | Zeile 3169 |
---|
$ip_fields = array("regip", "lastip"); foreach($ip_fields as $search_field) {
|
$ip_fields = array("regip", "lastip"); foreach($ip_fields as $search_field) {
|
if($view['conditions'][$search_field])
| if(!empty($view['conditions'][$search_field]))
|
{ // IPv6 IP if(strpos($view['conditions'][$search_field], ":") !== false) { $view['conditions'][$search_field] = str_replace("*", "%", $view['conditions'][$search_field]); $ip_sql = "{$search_field} LIKE '".$db->escape_string($view['conditions'][$search_field])."'";
|
{ // IPv6 IP if(strpos($view['conditions'][$search_field], ":") !== false) { $view['conditions'][$search_field] = str_replace("*", "%", $view['conditions'][$search_field]); $ip_sql = "{$search_field} LIKE '".$db->escape_string($view['conditions'][$search_field])."'";
|
} else
| } else
|
{ $ip_range = fetch_longipv4_range($view['conditions'][$search_field]); if(!is_array($ip_range))
| { $ip_range = fetch_longipv4_range($view['conditions'][$search_field]); if(!is_array($ip_range))
|
Zeile 3093 | Zeile 3194 |
---|
}
// Post IP searching
|
}
// Post IP searching
|
if($view['conditions']['postip'])
| if(!empty($view['conditions']['postip']))
|
{ // IPv6 IP if(strpos($view['conditions']['postip'], ":") !== false)
| { // IPv6 IP if(strpos($view['conditions']['postip'], ":") !== false)
|
Zeile 3187 | Zeile 3288 |
---|
}
// Usergroup based searching
|
}
// Usergroup based searching
|
if($view['conditions']['usergroup'])
| if(isset($view['conditions']['usergroup']))
|
{ if(!is_array($view['conditions']['usergroup'])) {
| { if(!is_array($view['conditions']['usergroup'])) {
|
Zeile 3196 | Zeile 3297 |
---|
foreach($view['conditions']['usergroup'] as $usergroup) {
|
foreach($view['conditions']['usergroup'] as $usergroup) {
|
| $usergroup = intval($usergroup); if(!$usergroup) { continue; }
|
switch($db->type) { case "pgsql":
| switch($db->type) { case "pgsql":
|
Zeile 3206 | Zeile 3314 |
---|
$additional_sql .= "OR CONCAT(',',additionalgroups,',') LIKE '%,{$usergroup},%'"; } }
|
$additional_sql .= "OR CONCAT(',',additionalgroups,',') LIKE '%,{$usergroup},%'"; } }
|
$search_sql .= " AND (u.usergroup IN (".implode(",", $view['conditions']['usergroup']).") {$additional_sql})";
| $search_sql .= " AND (u.usergroup IN (".implode(",", array_map('intval', $view['conditions']['usergroup'])).") {$additional_sql})";
|
}
// COPPA users only?
|
}
// COPPA users only?
|
if($view['conditions']['coppa'])
| if(isset($view['conditions']['coppa']))
|
{ $search_sql .= " AND u.coppauser=1 AND u.usergroup=5"; }
// Extra SQL?
|
{ $search_sql .= " AND u.coppauser=1 AND u.usergroup=5"; }
// Extra SQL?
|
if($view['extra_sql']) {
| if(isset($view['extra_sql'])) {
|
$search_sql .= $view['extra_sql']; }
| $search_sql .= $view['extra_sql']; }
|
Zeile 3235 | Zeile 3344 |
---|
return false; } // Generate the list of results
|
return false; } // Generate the list of results
|
else {
| else {
|
if(!$view['perpage']) { $view['perpage'] = 20;
| if(!$view['perpage']) { $view['perpage'] = 20;
|
Zeile 3244 | Zeile 3353 |
---|
$view['perpage'] = intval($view['perpage']);
// Establish which page we're viewing and the starting index for querying
|
$view['perpage'] = intval($view['perpage']);
// Establish which page we're viewing and the starting index for querying
|
$mybb->input['page'] = intval($mybb->input['page']);
| // Establish which page we're viewing and the starting index for querying if(!isset($mybb->input['page'])) { $mybb->input['page'] = 1; } else { $mybb->input['page'] = intval($mybb->input['page']); }
|
if($mybb->input['page']) { $start = ($mybb->input['page'] - 1) * $view['perpage'];
| if($mybb->input['page']) { $start = ($mybb->input['page'] - 1) * $view['perpage'];
|
Zeile 3256 | Zeile 3374 |
---|
} $from_bit = "";
|
} $from_bit = "";
|
if($mybb->input['from'] == "home")
| if(isset($mybb->input['from']) && $mybb->input['from'] == "home")
|
{ $from_bit = "&from=home"; }
| { $from_bit = "&from=home"; }
|
Zeile 3294 | Zeile 3412 |
---|
ORDER BY {$view['sortby']} {$view['sortorder']} LIMIT {$start}, {$view['perpage']} ");
|
ORDER BY {$view['sortby']} {$view['sortorder']} LIMIT {$start}, {$view['perpage']} ");
|
| $users = '';
|
while($user = $db->fetch_array($query))
|
while($user = $db->fetch_array($query))
|
{
| { $comma = $groups_list = '';
|
$user['view']['username'] = "<a href=\"index.php?module=user-users&action=edit&uid={$user['uid']}\">".format_name($user['username'], $user['usergroup'], $user['displaygroup'])."</a>"; $user['view']['usergroup'] = $usergroups[$user['usergroup']]['title'];
|
$user['view']['username'] = "<a href=\"index.php?module=user-users&action=edit&uid={$user['uid']}\">".format_name($user['username'], $user['usergroup'], $user['displaygroup'])."</a>"; $user['view']['usergroup'] = $usergroups[$user['usergroup']]['title'];
|
$additional_groups = explode(",", $user['additionalgroups']); $comma = $groups_list = ''; foreach($additional_groups as $group)
| if($user['additionalgroups'])
|
{
|
{
|
$groups_list .= "{$comma}{$usergroups[$group]['title']}"; $comma = $lang->comma;
| $additional_groups = explode(",", $user['additionalgroups']);
foreach($additional_groups as $group) { $groups_list .= "{$comma}{$usergroups[$group]['title']}"; $comma = $lang->comma; }
|
} if(!$groups_list) {
| } if(!$groups_list) {
|
Zeile 3329 | Zeile 3452 |
---|
{ $popup->add_item($lang->approve_user, "index.php?module=user-users&action=activate_user&uid={$user['uid']}&my_post_key={$mybb->post_code}{$from_bit}"); }
|
{ $popup->add_item($lang->approve_user, "index.php?module=user-users&action=activate_user&uid={$user['uid']}&my_post_key={$mybb->post_code}{$from_bit}"); }
|
}
| }
|
$popup->add_item($lang->delete_user, "index.php?module=user-users&action=delete&uid={$user['uid']}&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->user_deletion_confirmation}')"); $popup->add_item($lang->show_referred_users, "index.php?module=user-users&action=referrers&uid={$user['uid']}");
| $popup->add_item($lang->delete_user, "index.php?module=user-users&action=delete&uid={$user['uid']}&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->user_deletion_confirmation}')"); $popup->add_item($lang->show_referred_users, "index.php?module=user-users&action=referrers&uid={$user['uid']}");
|
Zeile 3345 | Zeile 3468 |
---|
else { $reputation = "-";
|
else { $reputation = "-";
|
}
| }
|
if($mybb->settings['enablewarningsystem'] != 0 && $usergroups[$user['usergroup']]['canreceivewarnings'] != 0) { $warning_level = round($user['warningpoints']/$mybb->settings['maxwarningpoints']*100);
| if($mybb->settings['enablewarningsystem'] != 0 && $usergroups[$user['usergroup']]['canreceivewarnings'] != 0) { $warning_level = round($user['warningpoints']/$mybb->settings['maxwarningpoints']*100);
|
Zeile 3393 | Zeile 3516 |
---|
} }
|
} }
|
if(!$view['table_id'])
| if(!isset($view['table_id']))
|
{ $view['table_id'] = "users_list"; }
| { $view['table_id'] = "users_list"; }
|
Zeile 3438 | Zeile 3561 |
---|
$built_view = $search->construct_return; $built_view .= "<div class=\"{$search_class}\" style=\"padding-bottom: 3px; margin-top: -9px; {$search_style}\">"; $built_view .= $search->generate_hidden_field('action', 'search')."\n";
|
$built_view = $search->construct_return; $built_view .= "<div class=\"{$search_class}\" style=\"padding-bottom: 3px; margin-top: -9px; {$search_style}\">"; $built_view .= $search->generate_hidden_field('action', 'search')."\n";
|
if($view['conditions']['username'])
| if(isset($view['conditions']['username']))
|
{ $default_class = ''; $value = $view['conditions']['username'];
| { $default_class = ''; $value = $view['conditions']['username'];
|
Zeile 3451 | Zeile 3574 |
---|
$built_view .= $search->generate_text_box('username', $value, array('id' => 'search_keywords', 'class' => "{$default_class} field150 field_small"))."\n"; $built_view .= "<input type=\"submit\" class=\"search_button\" value=\"{$lang->search}\" />\n"; if($view['popup'])
|
$built_view .= $search->generate_text_box('username', $value, array('id' => 'search_keywords', 'class' => "{$default_class} field150 field_small"))."\n"; $built_view .= "<input type=\"submit\" class=\"search_button\" value=\"{$lang->search}\" />\n"; if($view['popup'])
|
{
| {
|
$built_view .= " <div style=\"display: inline\">{$view['popup']}</div>\n"; } $built_view .= "<script type='text/javascript'> var form = document.getElementById('search_form'); form.onsubmit = function() { var search = document.getElementById('search_keywords');
|
$built_view .= " <div style=\"display: inline\">{$view['popup']}</div>\n"; } $built_view .= "<script type='text/javascript'> var form = document.getElementById('search_form'); form.onsubmit = function() { var search = document.getElementById('search_keywords');
|
if(search.value == '' || search.value == '{$lang->search_for_user}') {
| if(search.value == '' || search.value == '".addcslashes($lang->search_for_user, "'")."') {
|
search.focus(); return false; }
| search.focus(); return false; }
|
Zeile 3468 | Zeile 3591 |
---|
var search = document.getElementById('search_keywords'); search.onfocus = function() {
|
var search = document.getElementById('search_keywords'); search.onfocus = function() {
|
if(this.value == '{$lang->search_for_user}')
| if(this.value == '".addcslashes($lang->search_for_user, "'")."')
|
{ $(this).removeClassName('search_default'); this.value = '';
|
{ $(this).removeClassName('search_default'); this.value = '';
|
} }
| } }
|
search.onblur = function() { if(this.value == '') { $(this).addClassName('search_default');
|
search.onblur = function() { if(this.value == '') { $(this).addClassName('search_default');
|
this.value = '{$lang->search_for_user}';
| this.value = '".addcslashes($lang->search_for_user, "'")."';
|
} } // fix the styling used if we have a different default value
|
} } // fix the styling used if we have a different default value
|
if(search.value != '{$lang->search_for_user}') { $(search).removeClassName('search_default'); }
| if(search.value != '".addcslashes($lang->search_for_user, "'")."') { $(search).removeClassName('search_default'); }
|
</script>\n"; $built_view .= "</div>\n";
| </script>\n"; $built_view .= "</div>\n";
|
Zeile 3498 | Zeile 3621 |
---|
new autoComplete("search_keywords", "../xmlhttp.php?action=get_users", {valueSpan: "username"}); // --> </script>';
|
new autoComplete("search_keywords", "../xmlhttp.php?action=get_users", {valueSpan: "username"}); // --> </script>';
|
|
|
$built_view .= $search->end();
|
$built_view .= $search->end();
|
$built_view .= $pagination;
| if(isset($pagination)) { $built_view .= $pagination; }
|
if($view['view_type'] != "card") { $checkbox = '';
| if($view['view_type'] != "card") { $checkbox = '';
|
Zeile 3511 | Zeile 3637 |
---|
$checkbox = "<input type=\"checkbox\" name=\"allbox\" onclick=\"inlineModeration.checkAll(this)\" /> "; } $built_view .= $table->construct_html("{$switch_view}<div>{$checkbox}{$lang->users}{$view_title}</div>", 1, "", $view['table_id']);
|
$checkbox = "<input type=\"checkbox\" name=\"allbox\" onclick=\"inlineModeration.checkAll(this)\" /> "; } $built_view .= $table->construct_html("{$switch_view}<div>{$checkbox}{$lang->users}{$view_title}</div>", 1, "", $view['table_id']);
|
$built_view .= $pagination;
| if(isset($pagination)) { $built_view .= $pagination; }
|
$built_view .= ' <script type="text/javascript" src="'.$mybb->settings['bburl'].'/jscripts/inline_moderation.js?ver=1400"></script>
| $built_view .= ' <script type="text/javascript" src="'.$mybb->settings['bburl'].'/jscripts/inline_moderation.js?ver=1400"></script>
|
Zeile 3575 | Zeile 3704 |
---|
// Otherwise, just user data else if($field != "username") {
|
// Otherwise, just user data else if($field != "username") {
|
if($user['view'][$field])
| if(isset($user['view'][$field]))
|
{ $value = $user['view'][$field]; }
| { $value = $user['view'][$field]; }
|
Zeile 3791 | Zeile 3920 |
---|
break; case "textarea": $extra = '';
|
break; case "textarea": $extra = '';
|
if($mybb->input['action'] == "search")
| if(isset($mybb->input['action']) && $mybb->input['action'] == "search")
|
{ $extra = " {$lang->or} ".$form->generate_check_box("profile_fields[{$field_name}_blank]", 1, $lang->is_not_blank, array('id' => "{$field_name}_blank", 'checked' => $values[$field_name.'_blank'])); }
| { $extra = " {$lang->or} ".$form->generate_check_box("profile_fields[{$field_name}_blank]", 1, $lang->is_not_blank, array('id' => "{$field_name}_blank", 'checked' => $values[$field_name.'_blank'])); }
|
Zeile 3800 | Zeile 3929 |
---|
break; default: $extra = '';
|
break; default: $extra = '';
|
if($mybb->input['action'] == "search")
| if(isset($mybb->input['action']) && $mybb->input['action'] == "search")
|
{ $extra = " {$lang->or} ".$form->generate_check_box("profile_fields[{$field_name}_blank]", 1, $lang->is_not_blank, array('id' => "{$field_name}_blank", 'checked' => $values[$field_name.'_blank'])); }
| { $extra = " {$lang->or} ".$form->generate_check_box("profile_fields[{$field_name}_blank]", 1, $lang->is_not_blank, array('id' => "{$field_name}_blank", 'checked' => $values[$field_name.'_blank'])); }
|
Zeile 3842 | Zeile 3971 |
---|
$form_container->output_row($lang->username_contains, "", $form->generate_text_box('conditions[username]', $input['conditions']['username'], array('id' => 'username')), 'username'); $form_container->output_row($lang->email_address_contains, "", $form->generate_text_box('conditions[email]', $input['conditions']['email'], array('id' => 'email')), 'email');
|
$form_container->output_row($lang->username_contains, "", $form->generate_text_box('conditions[username]', $input['conditions']['username'], array('id' => 'username')), 'username'); $form_container->output_row($lang->email_address_contains, "", $form->generate_text_box('conditions[email]', $input['conditions']['email'], array('id' => 'email')), 'email');
|
| $options = array();
|
$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title')); while($usergroup = $db->fetch_array($query)) {
| $query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title')); while($usergroup = $db->fetch_array($query)) {
|