Zeile 166 | Zeile 166 |
---|
}
$mybb->input['avatar'] = str_replace(array("./", ".."), "", $mybb->input['avatar']);
|
}
$mybb->input['avatar'] = str_replace(array("./", ".."), "", $mybb->input['avatar']);
|
|
|
if(file_exists("../".$mybb->settings['avatardir']."/".$mybb->input['avatar'])) { $dimensions = @getimagesize("../".$mybb->settings['avatardir']."/".$mybb->input['avatar']);
| if(file_exists("../".$mybb->settings['avatardir']."/".$mybb->input['avatar'])) { $dimensions = @getimagesize("../".$mybb->settings['avatardir']."/".$mybb->input['avatar']);
|
Zeile 177 | Zeile 177 |
---|
);
$db->update_query("users", $updated_avatar, "uid='".$user['uid']."'");
|
);
$db->update_query("users", $updated_avatar, "uid='".$user['uid']."'");
|
$plugins->run_hooks("admin_user_users_avatar_gallery_commit");
| $plugins->run_hooks("admin_user_users_avatar_gallery_commit");
|
// Log admin action log_admin_action($user['uid'], $user['username']);
| // Log admin action log_admin_action($user['uid'], $user['username']);
|
Zeile 206 | Zeile 206 |
---|
{ $gallery = str_replace(array("..", "\x0"), "", $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 215 | Zeile 215 |
---|
{ $mybb->settings['avatardir'] = "../images/avatars/"; }
|
{ $mybb->settings['avatardir'] = "../images/avatars/"; }
|
|
|
// Within a gallery if(!empty($gallery)) {
| // Within a gallery if(!empty($gallery)) {
|
Zeile 256 | Zeile 256 |
---|
// Get a listing of avatars/directories within this gallery $sub_galleries = $avatars = array(); $files = @scandir($real_path);
|
// Get a listing of avatars/directories within this gallery $sub_galleries = $avatars = array(); $files = @scandir($real_path);
|
|
|
if(is_array($files)) { foreach($files as $file)
| if(is_array($files)) { foreach($files as $file)
|
Zeile 265 | Zeile 265 |
---|
{ continue; }
|
{ continue; }
|
|
|
// Build friendly name $friendly_name = str_replace(array("_", "%20"), " ", $file); $friendly_name = ucwords($friendly_name);
| // Build friendly name $friendly_name = str_replace(array("_", "%20"), " ", $file); $friendly_name = ucwords($friendly_name);
|
Zeile 294 | Zeile 294 |
---|
else if(preg_match("#\.(jpg|jpeg|gif|bmp|png)$#i", $file)) { $friendly_name = preg_replace("#\.(jpg|jpeg|gif|bmp|png)$#i", "", $friendly_name);
|
else if(preg_match("#\.(jpg|jpeg|gif|bmp|png)$#i", $file)) { $friendly_name = preg_replace("#\.(jpg|jpeg|gif|bmp|png)$#i", "", $friendly_name);
|
|
|
// Fetch dimensions $dimensions = @getimagesize($real_path."/".$file);
|
// Fetch dimensions $dimensions = @getimagesize($real_path."/".$file);
|
|
|
$avatars[] = array( "path" => $path.$file, "friendly_name" => $friendly_name,
| $avatars[] = array( "path" => $path.$file, "friendly_name" => $friendly_name,
|
Zeile 395 | Zeile 395 |
---|
}
$db->update_query("users", $updated_user, "uid='{$user['uid']}'");
|
}
$db->update_query("users", $updated_user, "uid='{$user['uid']}'");
|
|
|
$plugins->run_hooks("admin_user_users_coppa_activate_commit");
|
$plugins->run_hooks("admin_user_users_coppa_activate_commit");
|
|
|
// Log admin action log_admin_action($user['uid'], $user['username']);
| // Log admin action log_admin_action($user['uid'], $user['username']);
|
Zeile 406 | Zeile 406 |
---|
if($user['coppauser']) { $message = $lang->success_coppa_activated;
|
if($user['coppauser']) { $message = $lang->success_coppa_activated;
|
} else
| } else
|
{ $message = $lang->success_activated; }
|
{ $message = $lang->success_activated; }
|
|
|
update_admin_session('flash_message2', array('message' => $message, 'type' => 'success')); } else
| update_admin_session('flash_message2', array('message' => $message, 'type' => 'success')); } else
|
Zeile 423 | Zeile 423 |
---|
else { flash_message($lang->success_activated, 'success');
|
else { flash_message($lang->success_activated, 'success');
|
}
| }
|
}
|
}
|
|
|
if($admin_session['data']['last_users_url']) { $url = $admin_session['data']['last_users_url']; update_admin_session('last_users_url', '');
|
if($admin_session['data']['last_users_url']) { $url = $admin_session['data']['last_users_url']; update_admin_session('last_users_url', '');
|
|
|
if($mybb->input['from'] == "home") { update_admin_session('from', 'home');
| if($mybb->input['from'] == "home") { update_admin_session('from', 'home');
|
Zeile 440 | Zeile 440 |
---|
{ $url = "index.php?module=user-users&action=edit&uid={$user['uid']}"; }
|
{ $url = "index.php?module=user-users&action=edit&uid={$user['uid']}"; }
|
|
|
admin_redirect($url); }
if($mybb->input['action'] == "add") { $plugins->run_hooks("admin_user_users_add");
|
admin_redirect($url); }
if($mybb->input['action'] == "add") { $plugins->run_hooks("admin_user_users_add");
|
|
|
if($mybb->request_method == "post") { // Determine the usergroup stuff
| if($mybb->request_method == "post") { // Determine the usergroup stuff
|
Zeile 470 | Zeile 470 |
---|
// Set up user handler. require_once MYBB_ROOT."inc/datahandlers/user.php"; $userhandler = new UserDataHandler('insert');
|
// Set up user handler. require_once MYBB_ROOT."inc/datahandlers/user.php"; $userhandler = new UserDataHandler('insert');
|
// Set the data for the new user.
| // Set the data for the new user.
|
$new_user = array( "uid" => $mybb->input['uid'], "username" => $mybb->input['username'],
| $new_user = array( "uid" => $mybb->input['uid'], "username" => $mybb->input['username'],
|
Zeile 498 | Zeile 498 |
---|
else { $user_info = $userhandler->insert_user();
|
else { $user_info = $userhandler->insert_user();
|
|
|
$plugins->run_hooks("admin_user_users_add_commit");
|
$plugins->run_hooks("admin_user_users_add_commit");
|
|
|
// Log admin action log_admin_action($user_info['uid'], $user_info['username']);
| // Log admin action log_admin_action($user_info['uid'], $user_info['username']);
|
Zeile 518 | Zeile 518 |
---|
$page->add_breadcrumb_item($lang->create_user); $page->output_header($lang->create_user);
|
$page->add_breadcrumb_item($lang->create_user); $page->output_header($lang->create_user);
|
|
|
$form = new Form("index.php?module=user-users&action=add", "post");
|
$form = new Form("index.php?module=user-users&action=add", "post");
|
|
|
$page->output_nav_tabs($sub_tabs, 'create_user');
// If we have any error messages, show them if($errors)
|
$page->output_nav_tabs($sub_tabs, 'create_user');
// If we have any error messages, show them if($errors)
|
{
| {
|
$page->output_inline_error($errors); } else { $mybb->input = array( "usergroup" => 2
|
$page->output_inline_error($errors); } else { $mybb->input = array( "usergroup" => 2
|
);
| );
|
}
$form_container = new FormContainer($lang->required_profile_info);
| }
$form_container = new FormContainer($lang->required_profile_info);
|
Zeile 540 | Zeile 540 |
---|
$form_container->output_row($lang->password." <em>*</em>", "", $form->generate_password_box('password', $mybb->input['password'], array('id' => 'password', 'autocomplete' => 'off')), 'password'); $form_container->output_row($lang->confirm_password." <em>*</em>", "", $form->generate_password_box('confirm_password', $mybb->input['confirm_password'], array('id' => 'confirm_new_password')), 'confirm_new_password'); $form_container->output_row($lang->email_address." <em>*</em>", "", $form->generate_text_box('email', $mybb->input['email'], array('id' => 'email')), 'email');
|
$form_container->output_row($lang->password." <em>*</em>", "", $form->generate_password_box('password', $mybb->input['password'], array('id' => 'password', 'autocomplete' => 'off')), 'password'); $form_container->output_row($lang->confirm_password." <em>*</em>", "", $form->generate_password_box('confirm_password', $mybb->input['confirm_password'], array('id' => 'confirm_new_password')), 'confirm_new_password'); $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'));
| $display_group_options[0] = $lang->use_primary_user_group; $options = array(); $query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title'));
|
Zeile 568 | 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'])."'"); $user = $db->fetch_array($query);
| $query = $db->simple_select("users", "*", "uid='".intval($mybb->input['uid'])."'"); $user = $db->fetch_array($query);
|
Zeile 591 | Zeile 591 |
---|
if(is_array($mybb->input['additionalgroups'])) { foreach($mybb->input['additionalgroups'] as $key => $gid)
|
if(is_array($mybb->input['additionalgroups'])) { foreach($mybb->input['additionalgroups'] as $key => $gid)
|
{
| {
|
if($gid == $mybb->input['usergroup']) { unset($mybb->input['additionalgroups'][$key]);
| if($gid == $mybb->input['usergroup']) { unset($mybb->input['additionalgroups'][$key]);
|
Zeile 620 | Zeile 620 |
---|
"postnum" => $mybb->input['postnum'], "usertitle" => $mybb->input['usertitle'], "timezone" => $mybb->input['timezone'],
|
"postnum" => $mybb->input['postnum'], "usertitle" => $mybb->input['usertitle'], "timezone" => $mybb->input['timezone'],
|
"language" => $mybb->input['language'],
| "language" => $mybb->input['language'],
|
"profile_fields" => $mybb->input['profile_fields'], "profile_fields_editable" => true, "website" => $mybb->input['website'],
| "profile_fields" => $mybb->input['profile_fields'], "profile_fields_editable" => true, "website" => $mybb->input['website'],
|
Zeile 649 | Zeile 649 |
---|
} } if($mybb->input['new_password'])
|
} } if($mybb->input['new_password'])
|
{
| {
|
$updated_user['password'] = $mybb->input['new_password']; $updated_user['password2'] = $mybb->input['confirm_new_password']; }
| $updated_user['password'] = $mybb->input['new_password']; $updated_user['password2'] = $mybb->input['confirm_new_password']; }
|
Zeile 676 | Zeile 676 |
---|
if($mybb->settings['usertppoptions']) { $updated_user['options']['tpp'] = intval($mybb->input['tpp']);
|
if($mybb->settings['usertppoptions']) { $updated_user['options']['tpp'] = intval($mybb->input['tpp']);
|
}
| }
|
if($mybb->settings['userpppoptions']) {
| if($mybb->settings['userpppoptions']) {
|
Zeile 704 | Zeile 704 |
---|
); remove_avatars($user['uid']); }
|
); remove_avatars($user['uid']); }
|
|
|
// Are we uploading a new avatar? if($_FILES['avatar_upload']['name']) {
| // Are we uploading a new avatar? if($_FILES['avatar_upload']['name']) {
|
Zeile 767 | Zeile 767 |
---|
{ list($maxwidth, $maxheight) = explode("x", my_strtolower($mybb->settings['maxavatardims'])); if(($maxwidth && $width > $maxwidth) || ($maxheight && $height > $maxheight))
|
{ list($maxwidth, $maxheight) = explode("x", my_strtolower($mybb->settings['maxavatardims'])); if(($maxwidth && $width > $maxwidth) || ($maxheight && $height > $maxheight))
|
{
| {
|
$lang->error_avatartoobig = $lang->sprintf($lang->error_avatartoobig, $maxwidth, $maxheight); $avatar_error = $lang->error_avatartoobig; } } }
|
$lang->error_avatartoobig = $lang->sprintf($lang->error_avatartoobig, $maxwidth, $maxheight); $avatar_error = $lang->error_avatartoobig; } } }
|
|
|
if(empty($avatar_error)) { if($width > 0 && $height > 0)
| if(empty($avatar_error)) { if($width > 0 && $height > 0)
|
Zeile 846 | Zeile 846 |
---|
if(!is_array($errors)) { $suspend_length = fetch_time_length(intval($mybb->input[$option['time']]), $mybb->input[$option['period']]);
|
if(!is_array($errors)) { $suspend_length = fetch_time_length(intval($mybb->input[$option['time']]), $mybb->input[$option['period']]);
|
|
|
if($user[$option['update_field']] == 1 && ($mybb->input[$option['time']] || $mybb->input[$option['period']] == "never")) { // We already have a suspension, but entered a new time
| if($user[$option['update_field']] == 1 && ($mybb->input[$option['time']] || $mybb->input[$option['period']] == "never")) { // We already have a suspension, but entered a new time
|
Zeile 864 | Zeile 864 |
---|
elseif(!$user[$option['update_field']]) { // New suspension for this user... bad user!
|
elseif(!$user[$option['update_field']]) { // New suspension for this user... bad user!
|
$extra_user_updates[$option['update_field']] = 1;
| $extra_user_updates[$option['update_field']] = 1;
|
if($suspend_length == "-1") { $extra_user_updates[$option['update_length']] = 0;
| if($suspend_length == "-1") { $extra_user_updates[$option['update_length']] = 0;
|
Zeile 887 | Zeile 887 |
---|
{ $user_info = $userhandler->update_user(); $db->update_query("users", $extra_user_updates, "uid='{$user['uid']}'");
|
{ $user_info = $userhandler->update_user(); $db->update_query("users", $extra_user_updates, "uid='{$user['uid']}'");
|
|
|
// if we're updating the user's signature preferences, do so now if($mybb->input['update_posts'] == 'enable' || $mybb->input['update_posts'] == 'disable') {
| // if we're updating the user's signature preferences, do so now if($mybb->input['update_posts'] == 'enable' || $mybb->input['update_posts'] == 'disable') {
|
Zeile 896 | Zeile 896 |
---|
); $db->update_query("posts", $update_signature, "uid='{$user['uid']}'"); }
|
); $db->update_query("posts", $update_signature, "uid='{$user['uid']}'"); }
|
|
|
$plugins->run_hooks("admin_user_users_edit_commit");
// Log admin action
| $plugins->run_hooks("admin_user_users_edit_commit");
// Log admin action
|
Zeile 931 | Zeile 931 |
---|
// 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'];
| if($mybb->input['bday1'] || $mybb->input['bday2'] || $mybb->input['bday3']) { $mybb->input['bday'][0] = $mybb->input['bday1'];
|
Zeile 946 | Zeile 946 |
---|
if($user['birthday']) { $mybb->input['bday'] = explode('-', $user['birthday']);
|
if($user['birthday']) { $mybb->input['bday'] = explode('-', $user['birthday']);
|
}
| }
|
}
// Fetch custom profile fields
| }
// Fetch custom profile fields
|
Zeile 965 | Zeile 965 |
---|
$page->add_breadcrumb_item($lang->edit_user.": ".htmlspecialchars_uni($user['username'])); $page->output_header($lang->edit_user);
|
$page->add_breadcrumb_item($lang->edit_user.": ".htmlspecialchars_uni($user['username'])); $page->output_header($lang->edit_user);
|
|
|
$sub_tabs['edit_user'] = array( 'title' => $lang->edit_user, 'description' => $lang->edit_user_desc
| $sub_tabs['edit_user'] = array( 'title' => $lang->edit_user, 'description' => $lang->edit_user_desc
|
Zeile 981 | Zeile 981 |
---|
{ $page->output_inline_error($errors); }
|
{ $page->output_inline_error($errors); }
|
|
|
// Is this user a COPPA user? We show a warning & activate link if($user['coppauser']) {
| // Is this user a COPPA user? We show a warning & activate link if($user['coppauser']) {
|
Zeile 1063 | Zeile 1063 |
---|
if($posts_per_day > $user['postnum']) { $posts_per_day = $user['postnum'];
|
if($posts_per_day > $user['postnum']) { $posts_per_day = $user['postnum'];
|
} }
| } }
|
$stats = $cache->read("stats"); $posts = $stats['numposts']; if($posts == 0)
|
$stats = $cache->read("stats"); $posts = $stats['numposts']; if($posts == 0)
|
{
| {
|
$percent_posts = "0";
|
$percent_posts = "0";
|
} else {
| } else {
|
$percent_posts = round($user['postnum']*100/$posts, 2); }
| $percent_posts = round($user['postnum']*100/$posts, 2); }
|
Zeile 1086 | Zeile 1086 |
---|
else { $reputation = "-";
|
else { $reputation = "-";
|
}
| }
|
if($mybb->settings['enablewarningsystem'] != 0 && $user_permissions['canreceivewarnings'] != 0) {
| if($mybb->settings['enablewarningsystem'] != 0 && $user_permissions['canreceivewarnings'] != 0) {
|
Zeile 1123 | Zeile 1123 |
---|
$table->construct_cell("<strong>{$lang->registration_ip}:</strong> {$user['regip']}"); $table->construct_cell("<strong>{$lang->last_known_ip}:</strong> {$user['lastip']}"); $table->construct_row();
|
$table->construct_cell("<strong>{$lang->registration_ip}:</strong> {$user['regip']}"); $table->construct_cell("<strong>{$lang->last_known_ip}:</strong> {$user['lastip']}"); $table->construct_row();
|
|
|
$table->output("{$lang->user_overview}: {$user['username']}"); echo "</div>\n";
| $table->output("{$lang->user_overview}: {$user['username']}"); echo "</div>\n";
|
Zeile 1146 | Zeile 1146 |
---|
$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']);
|
}
| }
|
$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->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');
|
Zeile 1165 | Zeile 1165 |
---|
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();
|
|
|
$form_container = new FormContainer($lang->optional_profile_info.": {$user['username']}"); $form_container->output_row($lang->custom_user_title, $lang->custom_user_title_desc, $form->generate_text_box('usertitle', $mybb->input['usertitle'], array('id' => 'usertitle')), 'usertitle'); $form_container->output_row($lang->website, "", $form->generate_text_box('website', $mybb->input['website'], array('id' => 'website')), 'website');
| $form_container = new FormContainer($lang->optional_profile_info.": {$user['username']}"); $form_container->output_row($lang->custom_user_title, $lang->custom_user_title_desc, $form->generate_text_box('usertitle', $mybb->input['usertitle'], array('id' => 'usertitle')), 'usertitle'); $form_container->output_row($lang->website, "", $form->generate_text_box('website', $mybb->input['website'], array('id' => 'website')), 'website');
|
Zeile 1226 | Zeile 1226 |
---|
{ $mybb->input['pmnotice'] = 1; }
|
{ $mybb->input['pmnotice'] = 1; }
|
|
|
$messaging_options = array( $form->generate_check_box("allownotices", 1, $lang->recieve_admin_emails, array("checked" => $mybb->input['allownotices'])), $form->generate_check_box("hideemail", 1, $lang->hide_email_from_others, array("checked" => $mybb->input['hideemail'])),
| $messaging_options = array( $form->generate_check_box("allownotices", 1, $lang->recieve_admin_emails, array("checked" => $mybb->input['allownotices'])), $form->generate_check_box("hideemail", 1, $lang->hide_email_from_others, array("checked" => $mybb->input['hideemail'])),
|
Zeile 1240 | Zeile 1240 |
---|
$date_format_options = array($lang->use_default); foreach($date_formats as $key => $format)
|
$date_format_options = array($lang->use_default); foreach($date_formats as $key => $format)
|
{
| {
|
$date_format_options[$key] = my_date($format, TIME_NOW, "", 0); }
| $date_format_options[$key] = my_date($format, TIME_NOW, "", 0); }
|
Zeile 1494 | Zeile 1494 |
---|
$table->construct_cell($lang->avatar_desc."{$remove_avatar}<br /><small>{$max_size}</small>"); $table->construct_row();
|
$table->construct_cell($lang->avatar_desc."{$remove_avatar}<br /><small>{$max_size}</small>"); $table->construct_row();
|
|
|
$table->output($lang->avatar.": {$user['username']}");
// Custom avatar
| $table->output($lang->avatar.": {$user['username']}");
// Custom avatar
|
Zeile 1517 | Zeile 1517 |
---|
echo "<iframe src=\"index.php?module=user-users&action=avatar_gallery&uid={$user['uid']}\" width=\"100%\" height=\"350\" frameborder=\"0\"></iframe>"; echo "</div>"; echo "</div>";
|
echo "<iframe src=\"index.php?module=user-users&action=avatar_gallery&uid={$user['uid']}\" width=\"100%\" height=\"350\" frameborder=\"0\"></iframe>"; echo "</div>"; echo "</div>";
|
|
|
// // MODERATOR OPTIONS //
| // // MODERATOR OPTIONS //
|
Zeile 1599 | Zeile 1599 |
---|
{ $("suspendposting").checked = false; $("suspost").hide();
|
{ $("suspendposting").checked = false; $("suspost").hide();
|
|
|
if($("moderateposting").checked == true) { $("modpost").show();
| if($("moderateposting").checked == true) { $("modpost").show();
|
Zeile 1607 | Zeile 1607 |
---|
else if($("moderateposting").checked == false) { $("modpost").hide();
|
else if($("moderateposting").checked == false) { $("modpost").hide();
|
}
| }
|
} else if(action == "suspost") { $("moderateposting").checked = false; $("modpost").hide();
|
} else if(action == "suspost") { $("moderateposting").checked = false; $("modpost").hide();
|
|
|
if($("suspendposting").checked == true) { $("suspost").show();
| if($("suspendposting").checked == true) { $("suspost").show();
|
Zeile 1626 | Zeile 1626 |
---|
}
if($("moderateposting").checked == false)
|
}
if($("moderateposting").checked == false)
|
{
| {
|
$("modpost").hide(); } else { $("modpost").show();
|
$("modpost").hide(); } else { $("modpost").show();
|
}
| }
|
if($("suspendposting").checked == false) { $("suspost").hide(); } else
|
if($("suspendposting").checked == false) { $("suspost").hide(); } else
|
{
| {
|
$("suspost").show(); }
// --> </script>';
|
$("suspost").show(); }
// --> </script>';
|
|
|
$page->output_footer(); }
|
$page->output_footer(); }
|
|
|
if($mybb->input['action'] == "delete") { $plugins->run_hooks("admin_user_users_delete");
|
if($mybb->input['action'] == "delete") { $plugins->run_hooks("admin_user_users_delete");
|
|
|
$query = $db->simple_select("users", "*", "uid='".intval($mybb->input['uid'])."'"); $user = $db->fetch_array($query);
| $query = $db->simple_select("users", "*", "uid='".intval($mybb->input['uid'])."'"); $user = $db->fetch_array($query);
|
Zeile 1662 | Zeile 1662 |
---|
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"); }
|
|
|
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');
|
Zeile 1733 | Zeile 1733 |
---|
if($mybb->input['action'] == "referrers") { $plugins->run_hooks("admin_user_users_referrers");
|
if($mybb->input['action'] == "referrers") { $plugins->run_hooks("admin_user_users_referrers");
|
|
|
$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']}", 'description' => $lang->show_referrers_desc );
|
$sub_tabs['referrers'] = array( 'title' => $lang->show_referrers, 'link' => "index.php?module=user-users&action=referrers&uid={$mybb->input['uid']}", 'description' => $lang->show_referrers_desc );
|
|
|
$page->output_nav_tabs($sub_tabs, 'referrers');
|
$page->output_nav_tabs($sub_tabs, 'referrers');
|
|
|
// Fetch default admin view $default_view = fetch_default_view("user"); if(!$default_view)
| // Fetch default admin view $default_view = fetch_default_view("user"); if(!$default_view)
|
Zeile 1753 | Zeile 1753 |
---|
} $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']) { $admin_view['view_type'] = $mybb->input['type']; }
|
if($mybb->input['type']) { $admin_view['view_type'] = $mybb->input['type']; }
|
|
|
$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'];
|
Zeile 1776 | Zeile 1776 |
---|
{ echo $view; }
|
{ echo $view; }
|
|
|
$page->output_footer(); }
if($mybb->input['action'] == "ipaddresses")
|
$page->output_footer(); }
if($mybb->input['action'] == "ipaddresses")
|
{
| {
|
$plugins->run_hooks("admin_user_users_ipaddresses");
|
$plugins->run_hooks("admin_user_users_ipaddresses");
|
|
|
$page->add_breadcrumb_item($lang->ip_addresses);
|
$page->add_breadcrumb_item($lang->ip_addresses);
|
$page->output_header($lang->ip_addresses);
| $page->output_header($lang->ip_addresses);
|
$sub_tabs['ipaddresses'] = array( 'title' => $lang->show_ip_addresses, 'link' => "index.php?module=user-users&action=ipaddresses&uid={$mybb->input['uid']}", 'description' => $lang->show_ip_addresses_desc );
|
$sub_tabs['ipaddresses'] = array( 'title' => $lang->show_ip_addresses, 'link' => "index.php?module=user-users&action=ipaddresses&uid={$mybb->input['uid']}", 'description' => $lang->show_ip_addresses_desc );
|
|
|
$page->output_nav_tabs($sub_tabs, 'ipaddresses');
|
$page->output_nav_tabs($sub_tabs, 'ipaddresses');
|
|
|
$query = $db->simple_select("users", "uid, regip, username, lastip", "uid='{$mybb->input['uid']}'", array('limit' => 1)); $user = $db->fetch_array($query);
// Log admin action log_admin_action($user['uid'], $user['username']);
|
$query = $db->simple_select("users", "uid, regip, username, lastip", "uid='{$mybb->input['uid']}'", array('limit' => 1)); $user = $db->fetch_array($query);
// Log admin action log_admin_action($user['uid'], $user['username']);
|
|
|
$table = new Table;
|
$table = new Table;
|
|
|
$table->construct_header($lang->ip_address); $table->construct_header($lang->controls, array('width' => 200, 'class' => "align_center"));
|
$table->construct_header($lang->ip_address); $table->construct_header($lang->controls, array('width' => 200, 'class' => "align_center"));
|
|
|
if(empty($user['lastip'])) { $user['lastip'] = $lang->unknown;
|
if(empty($user['lastip'])) { $user['lastip'] = $lang->unknown;
|
$controls = '';
| $controls = '';
|
} else { $popup = new PopupMenu("user_last", $lang->options);
|
} else { $popup = new PopupMenu("user_last", $lang->options);
|
$popup->add_item($lang->show_users_regged_with_ip,
| $popup->add_item($lang->show_users_regged_with_ip,
|
"index.php?module=user-users&action=search&results=1&conditions=".urlencode(serialize(array("regip" => $user['lastip'])))); $popup->add_item($lang->show_users_posted_with_ip, "index.php?module=user-users&results=1&action=search&conditions=".urlencode(serialize(array("postip" => $user['lastip'])))); $popup->add_item($lang->info_on_ip, "{$mybb->settings['bburl']}/modcp.php?action=iplookup&ipaddress={$user['lastip']}", "MyBB.popupWindow('{$mybb->settings['bburl']}/modcp.php?action=iplookup&ipaddress={$user['lastip']}', 'iplookup', 500, 250); return false;");
| "index.php?module=user-users&action=search&results=1&conditions=".urlencode(serialize(array("regip" => $user['lastip'])))); $popup->add_item($lang->show_users_posted_with_ip, "index.php?module=user-users&results=1&action=search&conditions=".urlencode(serialize(array("postip" => $user['lastip'])))); $popup->add_item($lang->info_on_ip, "{$mybb->settings['bburl']}/modcp.php?action=iplookup&ipaddress={$user['lastip']}", "MyBB.popupWindow('{$mybb->settings['bburl']}/modcp.php?action=iplookup&ipaddress={$user['lastip']}', 'iplookup', 500, 250); return false;");
|
Zeile 1822 | Zeile 1822 |
---|
$controls = $popup->fetch(); } $table->construct_cell("<strong>{$lang->last_known_ip}:</strong> {$user['lastip']}");
|
$controls = $popup->fetch(); } $table->construct_cell("<strong>{$lang->last_known_ip}:</strong> {$user['lastip']}");
|
$table->construct_cell($controls, array('class' => "align_center")); $table->construct_row();
| $table->construct_cell($controls, array('class' => "align_center")); $table->construct_row();
|
if(empty($user['regip'])) { $user['regip'] = $lang->unknown; $controls = '';
|
if(empty($user['regip'])) { $user['regip'] = $lang->unknown; $controls = '';
|
}
| }
|
else { $popup = new PopupMenu("user_reg", $lang->options);
| else { $popup = new PopupMenu("user_reg", $lang->options);
|
Zeile 1842 | Zeile 1842 |
---|
$table->construct_cell("<strong>{$lang->registration_ip}:</strong> {$user['regip']}"); $table->construct_cell($controls, array('class' => "align_center")); $table->construct_row();
|
$table->construct_cell("<strong>{$lang->registration_ip}:</strong> {$user['regip']}"); $table->construct_cell($controls, array('class' => "align_center")); $table->construct_row();
|
|
|
$counter = 0;
|
$counter = 0;
|
|
|
$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)) {
|
Zeile 1855 | Zeile 1855 |
---|
$popup->add_item($lang->info_on_ip, "{$mybb->settings['bburl']}/modcp.php?action=iplookup&ipaddress={$ip['ipaddress']}", "MyBB.popupWindow('{$mybb->settings['bburl']}/modcp.php?action=iplookup&ipaddress={$ip['ipaddress']}', 'iplookup', 500, 250); return false;"); $popup->add_item($lang->ban_ip, "index.php?module=config-banning&filter={$ip['ipaddress']}"); $controls = $popup->fetch();
|
$popup->add_item($lang->info_on_ip, "{$mybb->settings['bburl']}/modcp.php?action=iplookup&ipaddress={$ip['ipaddress']}", "MyBB.popupWindow('{$mybb->settings['bburl']}/modcp.php?action=iplookup&ipaddress={$ip['ipaddress']}', 'iplookup', 500, 250); return false;"); $popup->add_item($lang->ban_ip, "index.php?module=config-banning&filter={$ip['ipaddress']}"); $controls = $popup->fetch();
|
|
|
$table->construct_cell($ip['ipaddress']); $table->construct_cell($controls, array('class' => "align_center")); $table->construct_row(); }
|
$table->construct_cell($ip['ipaddress']); $table->construct_cell($controls, array('class' => "align_center")); $table->construct_row(); }
|
|
|
$table->output($lang->ip_address_for." {$user['username']}");
|
$table->output($lang->ip_address_for." {$user['username']}");
|
|
|
$page->output_footer(); }
if($mybb->input['action'] == "merge") { $plugins->run_hooks("admin_user_users_merge");
|
$page->output_footer(); }
if($mybb->input['action'] == "merge") { $plugins->run_hooks("admin_user_users_merge");
|
|
|
if($mybb->request_method == "post") { $query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['source_username']))."'");
| if($mybb->request_method == "post") { $query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['source_username']))."'");
|
Zeile 1877 | 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']) { $errors[] = $lang->error_invalid_user_destination;
|
$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']))) { flash_message($lang->error_no_perms_super_admin, 'error'); admin_redirect("index.php?module=user-users");
|
// 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");
|
}
| }
|
if($source_user['uid'] == $destination_user['uid']) { $errors[] = $lang->error_cannot_merge_same_account;
| if($source_user['uid'] == $destination_user['uid']) { $errors[] = $lang->error_cannot_merge_same_account;
|
Zeile 1912 | Zeile 1912 |
---|
{ $db->update_query("adminoptions", $uid_update, "uid='{$source_user['uid']}'"); }
|
{ $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("events", $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("events", $uid_update, "uid='{$source_user['uid']}'");
|
Zeile 1926 | Zeile 1926 |
---|
$db->update_query("reportedposts", $uid_update, "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->update_query("reportedposts", $uid_update, "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->update_query("warnings", $uid_update, "uid='{$source_user['uid']}'"); $db->update_query("warnings", array("revokedby" => $destination_user['uid']), "revokedby='{$source_user['uid']}'"); $db->update_query("warnings", array("issuedby" => $destination_user['uid']), "issuedby='{$source_user['uid']}'");
|
$db->delete_query("sessions", "uid='{$source_user['uid']}'");
// Is the source user a moderator?
| $db->delete_query("sessions", "uid='{$source_user['uid']}'");
// Is the source user a moderator?
|
Zeile 1936 | Zeile 1939 |
---|
// 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']}'");
| // Banning $db->update_query("banned", array('admin' => $destination_user['uid']), "admin = '{$source_user['uid']}'");
|
Zeile 1996 | Zeile 1995 |
---|
$total_reputation = $db->fetch_field($query, "total_rep");
$db->update_query("users", array('reputation' => intval($total_reputation)), "uid='{$destination_user['uid']}'");
|
$total_reputation = $db->fetch_field($query, "total_rep");
$db->update_query("users", array('reputation' => intval($total_reputation)), "uid='{$destination_user['uid']}'");
|
| // Calculate warning points $query = $db->query(" SELECT SUM(points) as warn_lev FROM ".TABLE_PREFIX."warnings WHERE uid='{$source_user['uid']}' AND expired='0' "); $original_warn_level = $db->fetch_field($query, "warn_lev");
$query = $db->query(" SELECT SUM(points) as warn_lev FROM ".TABLE_PREFIX."warnings WHERE uid='{$destination_user['uid']}' AND expired='0' "); $new_warn_level = $db->fetch_field($query, "warn_lev"); $db->update_query("users", array("warningpoints" => intval($original_warn_level + $new_warn_level)), "uid='{$destination_user['uid']}'");
|
// Additional updates for non-uid fields $last_poster = array( "lastposteruid" => $destination_user['uid'], "lastposter" => $db->escape_string($destination_user['username'])
|
// Additional updates for non-uid fields $last_poster = array( "lastposteruid" => $destination_user['uid'], "lastposter" => $db->escape_string($destination_user['username'])
|
);
| );
|
$db->update_query("forums", $last_poster, "lastposteruid='{$source_user['uid']}'"); $db->update_query("threads", $last_poster, "lastposteruid='{$source_user['uid']}'"); $edit_uid = array(
| $db->update_query("forums", $last_poster, "lastposteruid='{$source_user['uid']}'"); $db->update_query("threads", $last_poster, "lastposteruid='{$source_user['uid']}'"); $edit_uid = array(
|
Zeile 2011 | Zeile 2026 |
---|
$from_uid = array( "fromid" => $destination_user['uid']
|
$from_uid = array( "fromid" => $destination_user['uid']
|
);
| );
|
$db->update_query("privatemessages", $from_uid, "fromid='{$source_user['uid']}'"); $to_uid = array( "toid" => $destination_user['uid']
|
$db->update_query("privatemessages", $from_uid, "fromid='{$source_user['uid']}'"); $to_uid = array( "toid" => $destination_user['uid']
|
);
| );
|
$db->update_query("privatemessages", $to_uid, "toid='{$source_user['uid']}'");
// Delete the old user $db->delete_query("users", "uid='{$source_user['uid']}'"); $db->delete_query("banned", "uid='{$source_user['uid']}'");
|
$db->update_query("privatemessages", $to_uid, "toid='{$source_user['uid']}'");
// Delete the old user $db->delete_query("users", "uid='{$source_user['uid']}'"); $db->delete_query("banned", "uid='{$source_user['uid']}'");
|
| // Did the old user have an uploaded avatar? if($source_user['avatartype'] == "upload") { // Removes the ./ at the beginning the timestamp on the end... @unlink("../".substr($source_user['avatar'], 2, -20)); }
|
// Get a list of forums where post count doesn't apply $fids = array(); $query = $db->simple_select("forums", "fid", "usepostcounts=0");
| // Get a list of forums where post count doesn't apply $fids = array(); $query = $db->simple_select("forums", "fid", "usepostcounts=0");
|
Zeile 2029 | Zeile 2051 |
---|
{ $fids[] = $fid; }
|
{ $fids[] = $fid; }
|
|
|
$fids_not_in = ''; if(!empty($fids)) { $fids_not_in = "AND fid NOT IN(".implode(',', $fids).")"; }
|
$fids_not_in = ''; if(!empty($fids)) { $fids_not_in = "AND fid NOT IN(".implode(',', $fids).")"; }
|
|
|
// Update user post count $query = $db->simple_select("posts", "COUNT(*) AS postnum", "uid='".$destination_user['uid']."' {$fids_not_in}"); $num = $db->fetch_array($query);
| // Update user post count $query = $db->simple_select("posts", "COUNT(*) AS postnum", "uid='".$destination_user['uid']."' {$fids_not_in}"); $num = $db->fetch_array($query);
|
Zeile 2043 | Zeile 2065 |
---|
"postnum" => $num['postnum'] ); $db->update_query("users", $updated_count, "uid='{$destination_user['uid']}'");
|
"postnum" => $num['postnum'] ); $db->update_query("users", $updated_count, "uid='{$destination_user['uid']}'");
|
|
|
// Use the earliest registration date if($destination_user['regdate'] > $source_user['regdate']) { $db->update_query("users", array('regdate' => $source_user['regdate']), "uid='{$destination_user['uid']}'"); }
|
// Use the earliest registration date if($destination_user['regdate'] > $source_user['regdate']) { $db->update_query("users", array('regdate' => $source_user['regdate']), "uid='{$destination_user['uid']}'"); }
|
|
|
update_stats(array('numusers' => '-1'));
|
update_stats(array('numusers' => '-1'));
|
|
|
$plugins->run_hooks("admin_user_users_merge_commit");
// Log admin action
| $plugins->run_hooks("admin_user_users_merge_commit");
// Log admin action
|
Zeile 2066 | Zeile 2088 |
---|
$page->add_breadcrumb_item($lang->merge_users); $page->output_header($lang->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
| $page->output_nav_tabs($sub_tabs, 'merge_users');
// If we have any error messages, show them
|
Zeile 2074 | Zeile 2096 |
---|
{ $page->output_inline_error($errors); }
|
{ $page->output_inline_error($errors); }
|
|
|
$form = new Form("index.php?module=user-users&action=merge", "post");
$form_container = new FormContainer($lang->merge_users);
| $form = new Form("index.php?module=user-users&action=merge", "post");
$form_container = new FormContainer($lang->merge_users);
|
Zeile 2093 | Zeile 2115 |
---|
</script>';
$buttons[] = $form->generate_submit_button($lang->merge_user_accounts);
|
</script>';
$buttons[] = $form->generate_submit_button($lang->merge_user_accounts);
|
$form->output_submit_wrapper($buttons); $form->end();
$page->output_footer(); }
| $form->output_submit_wrapper($buttons); $form->end();
$page->output_footer(); }
|
if($mybb->input['action'] == "search") { $plugins->run_hooks("admin_user_users_search");
|
if($mybb->input['action'] == "search") { $plugins->run_hooks("admin_user_users_search");
|
|
|
if($mybb->request_method == "post" || $mybb->input['results'] == 1) { // Build view options from incoming search options
| if($mybb->request_method == "post" || $mybb->input['results'] == 1) { // Build view options from incoming search options
|
Zeile 2112 | Zeile 2134 |
---|
$admin_view = $db->fetch_array($query); // View does not exist or this view is private and does not belong to the current user if(!$admin_view['vid'] || ($admin_view['visibility'] == 1 && $admin_view['uid'] != $mybb->user['uid']))
|
$admin_view = $db->fetch_array($query); // View does not exist or this view is private and does not belong to the current user if(!$admin_view['vid'] || ($admin_view['visibility'] == 1 && $admin_view['uid'] != $mybb->user['uid']))
|
{
| {
|
unset($admin_view); } }
if($mybb->input['search_id'] && $admin_session['data']['user_views'][$mybb->input['search_id']])
|
unset($admin_view); } }
if($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']); }
| $admin_view = $admin_session['data']['user_views'][$mybb->input['search_id']]; unset($admin_view['extra_sql']); }
|
Zeile 2143 | Zeile 2165 |
---|
if($mybb->input['type']) { $admin_view['view_type'] = $mybb->input['type'];
|
if($mybb->input['type']) { $admin_view['view_type'] = $mybb->input['type'];
|
}
| }
|
if($mybb->input['conditions']) { $admin_view['conditions'] = $mybb->input['conditions']; }
|
if($mybb->input['conditions']) { $admin_view['conditions'] = $mybb->input['conditions']; }
|
|
|
if($mybb->input['sortby'])
|
if($mybb->input['sortby'])
|
{
| {
|
$admin_view['sortby'] = $mybb->input['sortby'];
|
$admin_view['sortby'] = $mybb->input['sortby'];
|
}
| }
|
if(intval($mybb->input['perpage'])) { $admin_view['perpage'] = $mybb->input['perpage']; }
|
if(intval($mybb->input['perpage'])) { $admin_view['perpage'] = $mybb->input['perpage']; }
|
|
|
if($mybb->input['order']) { $admin_view['sortorder'] = $mybb->input['order']; }
|
if($mybb->input['order']) { $admin_view['sortorder'] = $mybb->input['order']; }
|
|
|
if($mybb->input['displayas']) { $admin_view['view_type'] = $mybb->input['displayas']; }
|
if($mybb->input['displayas']) { $admin_view['view_type'] = $mybb->input['displayas']; }
|
|
|
if($mybb->input['profile_fields']) { $admin_view['custom_profile_fields'] = $mybb->input['profile_fields'];
|
if($mybb->input['profile_fields']) { $admin_view['custom_profile_fields'] = $mybb->input['profile_fields'];
|
}
| }
|
$results = build_users_view($admin_view);
if($results)
| $results = build_users_view($admin_view);
if($results)
|
Zeile 2199 | Zeile 2221 |
---|
} } }
|
} } }
|
|
|
$page->add_breadcrumb_item($lang->find_users); $page->output_header($lang->find_users);
|
$page->add_breadcrumb_item($lang->find_users); $page->output_header($lang->find_users);
|
|
|
$page->output_nav_tabs($sub_tabs, 'find_users');
// If we have any error messages, show them
|
$page->output_nav_tabs($sub_tabs, 'find_users');
// If we have any error messages, show them
|
if($errors) {
| if($errors) {
|
$page->output_inline_error($errors); }
|
$page->output_inline_error($errors); }
|
|
|
if(!$mybb->input['displayas']) { $mybb->input['displayas'] = "card";
|
if(!$mybb->input['displayas']) { $mybb->input['displayas'] = "card";
|
}
| }
|
$form = new Form("index.php?module=user-users&action=search", "post");
| $form = new Form("index.php?module=user-users&action=search", "post");
|
Zeile 2257 | Zeile 2279 |
---|
$vid_url = "&vid=".$mybb->input['vid']; }
|
$vid_url = "&vid=".$mybb->input['vid']; }
|
|
|
// First, collect the user IDs that we're performing the moderation on $ids = explode("|", $mybb->cookies['inlinemod_useracp']); foreach($ids as $id)
| // First, collect the user IDs that we're performing the moderation on $ids = explode("|", $mybb->cookies['inlinemod_useracp']); foreach($ids as $id)
|
Zeile 2276 | Zeile 2298 |
---|
$errors[] = $lang->error_inline_no_users_selected; } }
|
$errors[] = $lang->error_inline_no_users_selected; } }
|
|
|
if($errors) { // Don't show views, but show the user list if there's errors
| if($errors) { // Don't show views, but show the user list if there's errors
|
Zeile 2349 | Zeile 2371 |
---|
// 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);
|
}
| }
|
break; case 'multilift': // Get the users that are banned, and check that they have been selected
| break; case 'multilift': // Get the users that are banned, and check that they have been selected
|
Zeile 2359 | Zeile 2381 |
---|
}
if($mybb->request_method == "post")
|
}
if($mybb->request_method == "post")
|
{ $sql_array = implode(",", $selected);
| { $sql_array = implode(",", $selected);
|
$query = $db->simple_select("banned", "*", "uid IN (".$sql_array.")"); $to_be_unbanned = $db->num_rows($query); while($ban = $db->fetch_array($query))
| $query = $db->simple_select("banned", "*", "uid IN (".$sql_array.")"); $to_be_unbanned = $db->num_rows($query); while($ban = $db->fetch_array($query))
|
Zeile 2368 | Zeile 2390 |
---|
$updated_group = array( "usergroup" => $ban['oldgroup'], "additionalgroups" => $ban['oldadditionalgroups'],
|
$updated_group = array( "usergroup" => $ban['oldgroup'], "additionalgroups" => $ban['oldadditionalgroups'],
|
"displaygroup" => $ban['olddisplaygroup']
| "displaygroup" => $ban['olddisplaygroup']
|
); $db->update_query("users", $updated_group, "uid = '".$ban['uid']."'"); $db->delete_query("banned", "uid = '".$ban['uid']."'");
| ); $db->update_query("users", $updated_group, "uid = '".$ban['uid']."'"); $db->delete_query("banned", "uid = '".$ban['uid']."'");
|
Zeile 2500 | Zeile 2522 |
---|
echo $form->generate_hidden_field('processed', '1');
$form_container = new FormContainer('<div class="float_right"><a href="index.php?module=user-users&action=inline_edit&inline_action=multilift&my_post_key='.$mybb->post_code.'">'.$lang->lift_bans.'</a></div>'.$lang->mass_ban);
|
echo $form->generate_hidden_field('processed', '1');
$form_container = new FormContainer('<div class="float_right"><a href="index.php?module=user-users&action=inline_edit&inline_action=multilift&my_post_key='.$mybb->post_code.'">'.$lang->lift_bans.'</a></div>'.$lang->mass_ban);
|
$form_container->output_row($lang->ban_reason, "", $form->generate_text_box('reason', $mybb->input['reason'], array('id' => 'reason')), 'reason');
| $form_container->output_row($lang->ban_reason, "", $form->generate_text_box('reason', $mybb->input['reason'], array('id' => 'reason')), 'reason');
|
$ban_times = fetch_ban_times(); foreach($ban_times as $time => $period) {
| $ban_times = fetch_ban_times(); foreach($ban_times as $time => $period) {
|
Zeile 2511 | Zeile 2533 |
---|
} $length_list[$time] = $period; }
|
} $length_list[$time] = $period; }
|
$form_container->output_row($lang->ban_time, "", $form->generate_select_box('bantime', $length_list, $mybb->input['bantime'], array('id' => 'bantime')), 'bantime');
| $form_container->output_row($lang->ban_time, "", $form->generate_select_box('bantime', $length_list, $mybb->input['bantime'], array('id' => 'bantime')), 'bantime');
|
$form_container->end();
|
$form_container->end();
|
|
|
$buttons[] = $form->generate_submit_button($lang->ban_users);
|
$buttons[] = $form->generate_submit_button($lang->ban_users);
|
$form->output_submit_wrapper($buttons);
| $form->output_submit_wrapper($buttons);
|
$form->end(); $page->output_footer(); break;
| $form->end(); $page->output_footer(); break;
|
Zeile 2660 | Zeile 2682 |
---|
{ $sql_array = implode(",", $selected); $prune_array = array();
|
{ $sql_array = implode(",", $selected); $prune_array = array();
|
$query = $db->simple_select("users", "uid", "uid IN (".$sql_array.")");
| $query = $db->simple_select("users", "uid", "uid IN (".$sql_array.")");
|
while($user = $db->fetch_array($query)) { // Protect Super Admins if(is_super_admin($user['uid']) && !is_super_admin($mybb->user['uid'])) { continue;
|
while($user = $db->fetch_array($query)) { // Protect Super Admins 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);
|
}
| }
|
}
// No posts were found for the user, return error
| }
// No posts were found for the user, return error
|
Zeile 2691 | Zeile 2713 |
---|
if(is_array($prune_array['to_delete']) && count($prune_array['to_delete']) > 0) { foreach($prune_array['to_delete'] as $tid)
|
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'"); $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'");
|
Zeile 2709 | Zeile 2731 |
---|
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
| }
// After updating thread counters, update the affected forum counters
|
Zeile 2738 | Zeile 2760 |
---|
$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));
| // Display a table warning $table = new Table; $lang->mass_prune_info = $lang->sprintf($lang->mass_prune_info, count($selected));
|
Zeile 2755 | Zeile 2777 |
---|
$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');
|
$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);
| echo $form->generate_hidden_field('processed', '1');
$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 2780 | Zeile 2802 |
---|
$year_box = $form->generate_text_box('year', $mybb->input['year'], array('id' => 'year', 'style' => 'width: 50px;'));
$prune_select = $date_box.$month_box.$year_box;
|
$year_box = $form->generate_text_box('year', $mybb->input['year'], array('id' => 'year', 'style' => 'width: 50px;'));
$prune_select = $date_box.$month_box.$year_box;
|
$form_container->output_row($lang->manual_date, "", $prune_select, 'date');
| $form_container->output_row($lang->manual_date, "", $prune_select, 'date');
|
// Generate the set date box $set_options = array();
| // Generate the set date box $set_options = array();
|
Zeile 2791 | Zeile 2813 |
---|
$set_options[] = $lang->$string; }
|
$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->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_container->end();
$buttons[] = $form->generate_submit_button($lang->prune_posts);
|
$form->output_submit_wrapper($buttons);
| $form->output_submit_wrapper($buttons);
|
$form->end(); $page->output_footer(); break;
| $form->end(); $page->output_footer(); break;
|
Zeile 2897 | Zeile 2919 |
---|
$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->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->primary_user_group, "", $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, "", $form->generate_select_box('displaygroup', $display_group_options, $mybb->input['displaygroup'], array('id' => 'displaygroup')), 'displaygroup');
| $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_container->end();
$buttons[] = $form->generate_submit_button($lang->alter_usergroups);
|
$form->output_submit_wrapper($buttons);
| $form->output_submit_wrapper($buttons);
|
$form->end(); $page->output_footer(); break;
|
$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(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']];
| 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']];
|
Zeile 3009 | Zeile 3031 |
---|
if($view['title']) { $title_string = "view_title_{$view['vid']}";
|
if($view['title']) { $title_string = "view_title_{$view['vid']}";
|
|
|
if($lang->$title_string) { $view['title'] = $lang->$title_string; }
|
if($lang->$title_string) { $view['title'] = $lang->$title_string; }
|
|
|
$view_title .= " (".htmlspecialchars_uni($view['title']).")"; }
// Build the URL to this view if(!isset($view['url']))
|
$view_title .= " (".htmlspecialchars_uni($view['title']).")"; }
// Build the URL to this view if(!isset($view['url']))
|
{
| {
|
$view['url'] = "index.php?module=user-users"; } if(!is_array($view['conditions'])) { $view['conditions'] = unserialize($view['conditions']);
|
$view['url'] = "index.php?module=user-users"; } if(!is_array($view['conditions'])) { $view['conditions'] = unserialize($view['conditions']);
|
}
| }
|
if(!is_array($view['fields'])) { $view['fields'] = unserialize($view['fields']);
| if(!is_array($view['fields'])) { $view['fields'] = unserialize($view['fields']);
|
Zeile 3056 | Zeile 3078 |
---|
} $view['url'] .= "&search_id=".htmlspecialchars_uni($mybb->input['search_id']); }
|
} $view['url'] .= "&search_id=".htmlspecialchars_uni($mybb->input['search_id']); }
|
|
|
if(isset($mybb->input['username'])) { $view['url'] .= "&username=".urlencode(htmlspecialchars_uni($mybb->input['username']));
|
if(isset($mybb->input['username'])) { $view['url'] .= "&username=".urlencode(htmlspecialchars_uni($mybb->input['username']));
|
}
| }
|
if(!isset($admin_session['data']['last_users_view']) || $admin_session['data']['last_users_view'] != 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'])); }
|
update_admin_session('last_users_url', str_replace("&", "&", $view['url'])); }
|
|
|
if(isset($view['conditions']['referrer'])){ $view['url'] .= "&action=referrers&uid=".htmlspecialchars_uni($view['conditions']['referrer']); }
|
if(isset($view['conditions']['referrer'])){ $view['url'] .= "&action=referrers&uid=".htmlspecialchars_uni($view['conditions']['referrer']); }
|
|
|
// Do we not have any views? if(empty($view)) { return false; }
|
// Do we not have any views? if(empty($view)) { return false; }
|
|
|
$table = new Table;
// Build header for table based view
| $table = new Table;
// Build header for table based view
|
Zeile 3181 | Zeile 3203 |
---|
{ $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))
|
{
| {
|
$ip_sql = "long{$search_field}='{$ip_range}'"; } else
| $ip_sql = "long{$search_field}='{$ip_range}'"; } else
|
Zeile 3203 | Zeile 3225 |
---|
$ip_sql = "ipaddress LIKE '".$db->escape_string($view['conditions']['postip'])."'"; } else
|
$ip_sql = "ipaddress LIKE '".$db->escape_string($view['conditions']['postip'])."'"; } else
|
{
| {
|
$ip_range = fetch_longipv4_range($view['conditions']['postip']); if(!is_array($ip_range)) { $ip_sql = "longipaddress='{$ip_range}'"; } else
|
$ip_range = fetch_longipv4_range($view['conditions']['postip']); if(!is_array($ip_range)) { $ip_sql = "longipaddress='{$ip_range}'"; } else
|
{
| {
|
$ip_sql = "longipaddress > '{$ip_range[0]}' AND longipaddress < '{$ip_range[1]}'"; } }
| $ip_sql = "longipaddress > '{$ip_range[0]}' AND longipaddress < '{$ip_range[1]}'"; } }
|
Zeile 3223 | Zeile 3245 |
---|
$search_sql .= " AND u.uid IN(".implode(',', $ip_uids).")"; unset($ip_uids); }
|
$search_sql .= " AND u.uid IN(".implode(',', $ip_uids).")"; unset($ip_uids); }
|
|
|
// Custom Profile Field searching if($view['custom_profile_fields']) {
| // Custom Profile Field searching if($view['custom_profile_fields']) {
|
Zeile 3240 | Zeile 3262 |
---|
}
if($value == $lang->na)
|
}
if($value == $lang->na)
|
{
| {
|
continue; }
| continue; }
|
Zeile 3248 | Zeile 3270 |
---|
{ $column = str_replace('_blank', '', $column); $userfield_sql .= ' AND '.$db->escape_string($column)." != ''";
|
{ $column = str_replace('_blank', '', $column); $userfield_sql .= ' AND '.$db->escape_string($column)." != ''";
|
}
| }
|
else { $userfield_sql .= ' AND '.$db->escape_string($column)."='".$db->escape_string($value)."'";
| else { $userfield_sql .= ' AND '.$db->escape_string($column)."='".$db->escape_string($value)."'";
|
Zeile 3261 | Zeile 3283 |
---|
{ continue; }
|
{ continue; }
|
|
|
if(strpos($column, '_blank') !== false)
|
if(strpos($column, '_blank') !== false)
|
{
| {
|
$column = str_replace('_blank', '', $column); $userfield_sql .= ' AND '.$db->escape_string($column)." != ''"; }
| $column = str_replace('_blank', '', $column); $userfield_sql .= ' AND '.$db->escape_string($column)." != ''"; }
|
Zeile 3298 | Zeile 3320 |
---|
foreach($view['conditions']['usergroup'] as $usergroup) { $usergroup = intval($usergroup);
|
foreach($view['conditions']['usergroup'] as $usergroup) { $usergroup = intval($usergroup);
|
|
|
if(!$usergroup)
|
if(!$usergroup)
|
{
| {
|
continue; }
| continue; }
|
Zeile 3314 | Zeile 3336 |
---|
$additional_sql .= "OR CONCAT(',',additionalgroups,',') LIKE '%,{$usergroup},%'"; } }
|
$additional_sql .= "OR CONCAT(',',additionalgroups,',') LIKE '%,{$usergroup},%'"; } }
|
|
|
$search_sql .= " AND (u.usergroup IN (".implode(",", array_map('intval', $view['conditions']['usergroup'])).") {$additional_sql})"; }
| $search_sql .= " AND (u.usergroup IN (".implode(",", array_map('intval', $view['conditions']['usergroup'])).") {$additional_sql})"; }
|
Zeile 3322 | Zeile 3344 |
---|
if(isset($view['conditions']['coppa'])) { $search_sql .= " AND u.coppauser=1 AND u.usergroup=5";
|
if(isset($view['conditions']['coppa'])) { $search_sql .= " AND u.coppauser=1 AND u.usergroup=5";
|
}
| }
|
// Extra SQL? if(isset($view['extra_sql'])) {
| // Extra SQL? if(isset($view['extra_sql'])) {
|
Zeile 3337 | Zeile 3359 |
---|
WHERE {$search_sql} "); $num_results = $db->fetch_field($query, "num_results");
|
WHERE {$search_sql} "); $num_results = $db->fetch_field($query, "num_results");
|
|
|
// No matching results then return false if(!$num_results) {
| // No matching results then return false if(!$num_results) {
|
Zeile 3372 | Zeile 3394 |
---|
$start = 0; $mybb->input['page'] = 1; }
|
$start = 0; $mybb->input['page'] = 1; }
|
|
|
$from_bit = ""; if(isset($mybb->input['from']) && $mybb->input['from'] == "home") { $from_bit = "&from=home"; }
|
$from_bit = ""; if(isset($mybb->input['from']) && $mybb->input['from'] == "home") { $from_bit = "&from=home"; }
|
|
|
switch($view['sortby'])
|
switch($view['sortby'])
|
{
| {
|
case "regdate": case "lastactive": case "postnum":
| case "regdate": case "lastactive": case "postnum":
|
Zeile 3389 | Zeile 3411 |
---|
break; case "numposts": $view['sortby'] = "postnum";
|
break; case "numposts": $view['sortby'] = "postnum";
|
break;
| break;
|
case "warninglevel": $view['sortby'] = "warningpoints"; break; default: $view['sortby'] = "username";
|
case "warninglevel": $view['sortby'] = "warningpoints"; break; default: $view['sortby'] = "username";
|
}
| }
|
if($view['sortorder'] != "desc") {
| if($view['sortorder'] != "desc") {
|
Zeile 3403 | Zeile 3425 |
---|
}
$usergroups = $cache->read("usergroups");
|
}
$usergroups = $cache->read("usergroups");
|
|
|
// Fetch matching users $query = $db->query(" SELECT u.*
| // Fetch matching users $query = $db->query(" SELECT u.*
|
Zeile 3515 | Zeile 3537 |
---|
$table->construct_row(); } }
|
$table->construct_row(); } }
|
|
|
if(!isset($view['table_id'])) { $view['table_id'] = "users_list";
| if(!isset($view['table_id'])) { $view['table_id'] = "users_list";
|
Zeile 3524 | Zeile 3546 |
---|
$switch_view = "<div class=\"float_right\">"; $switch_url = $view['url']; if($mybb->input['page'] > 0)
|
$switch_view = "<div class=\"float_right\">"; $switch_url = $view['url']; if($mybb->input['page'] > 0)
|
{
| {
|
$switch_url .= "&page=".intval($mybb->input['page']); } if($view['view_type'] != "card") { $switch_view .= "<strong>{$lang->table_view}</strong> | <a href=\"{$switch_url}&type=card\" style=\"font-weight: normal;\">{$lang->card_view}</a>";
|
$switch_url .= "&page=".intval($mybb->input['page']); } if($view['view_type'] != "card") { $switch_view .= "<strong>{$lang->table_view}</strong> | <a href=\"{$switch_url}&type=card\" style=\"font-weight: normal;\">{$lang->card_view}</a>";
|
}
| }
|
else { $switch_view .= "<a href=\"{$switch_url}&type=table\" style=\"font-weight: normal;\">{$lang->table_view}</a> | <strong>{$lang->card_view}</strong>";
| else { $switch_view .= "<a href=\"{$switch_url}&type=table\" style=\"font-weight: normal;\">{$lang->table_view}</a> | <strong>{$lang->card_view}</strong>";
|
Zeile 3539 | Zeile 3561 |
---|
// Do we need to construct the pagination? if($num_results > $view['perpage'])
|
// Do we need to construct the pagination? if($num_results > $view['perpage'])
|
{
| {
|
$pagination = draw_admin_pagination($mybb->input['page'], $view['perpage'], $num_results, $view['url']."&type={$view['view_type']}"); $search_class = "float_right"; $search_style = "";
|
$pagination = draw_admin_pagination($mybb->input['page'], $view['perpage'], $num_results, $view['url']."&type={$view['view_type']}"); $search_class = "float_right"; $search_style = "";
|
}
| }
|
else { $search_class = ''; $search_style = "text-align: right;"; }
|
else { $search_class = ''; $search_style = "text-align: right;"; }
|
|
|
$search_action = $view['url']; // stop &username= in the query string if($view_upos = strpos($search_action, '&username='))
| $search_action = $view['url']; // stop &username= in the query string if($view_upos = strpos($search_action, '&username='))
|
Zeile 3612 | Zeile 3634 |
---|
} </script>\n"; $built_view .= "</div>\n";
|
} </script>\n"; $built_view .= "</div>\n";
|
|
|
// Autocompletion for usernames $built_view .= ' <script type="text/javascript" src="../jscripts/autocomplete.js?ver=140"></script>
| // Autocompletion for usernames $built_view .= ' <script type="text/javascript" src="../jscripts/autocomplete.js?ver=140"></script>
|
Zeile 3691 | Zeile 3713 |
---|
}
$view_field = $user_view_fields[$field];
|
}
$view_field = $user_view_fields[$field];
|
|
|
// Special conditions for avatar if($field == "avatar") { $avatar = $user['view']['avatar']; } else if($field == "controls")
|
// Special conditions for avatar if($field == "avatar") { $avatar = $user['view']['avatar']; } else if($field == "controls")
|
{
| {
|
$controls = $user['view']['controls']; } // Otherwise, just user data
| $controls = $user['view']['controls']; } // Otherwise, just user data
|
Zeile 3711 | Zeile 3733 |
---|
else { $value = $user[$field];
|
else { $value = $user[$field];
|
}
| }
|
if($field == "postnum") { $value = my_number_format($value); }
|
if($field == "postnum") { $value = my_number_format($value); }
|
|
|
$user_details[] = "<strong>{$view_field['title']}:</strong> {$value}";
|
$user_details[] = "<strong>{$view_field['title']}:</strong> {$value}";
|
}
| }
|
} // Floated to the left or right?
| } // Floated to the left or right?
|
Zeile 3777 | Zeile 3799 |
---|
$value = $user[$field]; } $table->construct_cell($value, $field_options);
|
$value = $user[$field]; } $table->construct_cell($value, $field_options);
|
}
| }
|
$table->construct_cell("<input type=\"checkbox\" class=\"checkbox\" name=\"inlinemod_{$user['uid']}\" id=\"inlinemod_{$user['uid']}\" value=\"1\" onclick=\"$('uid_{$user['uid']}').toggleClassName('inline_selected');\" />");
|
$table->construct_cell("<input type=\"checkbox\" class=\"checkbox\" name=\"inlinemod_{$user['uid']}\" id=\"inlinemod_{$user['uid']}\" value=\"1\" onclick=\"$('uid_{$user['uid']}').toggleClassName('inline_selected');\" />");
|
|
|
$table->construct_row(); }
function fetch_scaled_avatar($user, $max_width=80, $max_height=80)
|
$table->construct_row(); }
function fetch_scaled_avatar($user, $max_width=80, $max_height=80)
|
{
| {
|
$scaled_dimensions = array( "width" => $max_width, "height" => $max_height, );
if($user['avatar'])
|
$scaled_dimensions = array( "width" => $max_width, "height" => $max_height, );
if($user['avatar'])
|
{
| {
|
if($user['avatardimensions']) { require_once MYBB_ROOT."inc/functions_image.php"; list($width, $height) = explode("|", $user['avatardimensions']); $scaled_dimensions = scale_image($width, $height, $max_width, $max_height); }
|
if($user['avatardimensions']) { require_once MYBB_ROOT."inc/functions_image.php"; list($width, $height) = explode("|", $user['avatardimensions']); $scaled_dimensions = scale_image($width, $height, $max_width, $max_height); }
|
}
| }
|
return array("width" => $scaled_dimensions['width'], "height" => $scaled_dimensions['height']); }
|
return array("width" => $scaled_dimensions['width'], "height" => $scaled_dimensions['height']); }
|
|
|
function output_custom_profile_fields($fields, $values, &$form_container, &$form, $search=false) { global $lang;
|
function output_custom_profile_fields($fields, $values, &$form_container, &$form, $search=false) { global $lang;
|
|
|
if(!is_array($fields)) { return;
| if(!is_array($fields)) { return;
|
Zeile 3823 | Zeile 3845 |
---|
{ case "multiselect": if(!is_array($values[$field_name]))
|
{ case "multiselect": if(!is_array($values[$field_name]))
|
{
| {
|
$user_options = explode("\n", $values[$field_name]);
|
$user_options = explode("\n", $values[$field_name]);
|
}
| }
|
else { $user_options = $values[$field_name];
|
else { $user_options = $values[$field_name];
|
}
| }
|
foreach($user_options as $val) { $selected_options[$val] = $val; }
$select_options = explode("\n", $options);
|
foreach($user_options as $val) { $selected_options[$val] = $val; }
$select_options = explode("\n", $options);
|
$options = array();
| $options = array();
|
if($search == true) { $select_options[''] = $lang->na; }
|
if($search == true) { $select_options[''] = $lang->na; }
|
|
|
foreach($select_options as $val) { $val = trim($val);
| foreach($select_options as $val) { $val = trim($val);
|
Zeile 3951 | Zeile 3973 |
---|
{ $input = $mybb->input; }
|
{ $input = $mybb->input; }
|
|
|
if(!is_array($input['conditions'])) { $input['conditions'] = unserialize($input['conditions']);
|
if(!is_array($input['conditions'])) { $input['conditions'] = unserialize($input['conditions']);
|
}
| }
|
if(!is_array($input['profile_fields']))
|
if(!is_array($input['profile_fields']))
|
{
| {
|
$input['profile_fields'] = unserialize($input['profile_fields']); }
|
$input['profile_fields'] = unserialize($input['profile_fields']); }
|
|
|
if(!is_array($input['fields'])) { $input['fields'] = unserialize($input['fields']);
|
if(!is_array($input['fields'])) { $input['fields'] = unserialize($input['fields']);
|
}
| }
|
$form_container = new FormContainer($lang->find_users_where); $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 = new FormContainer($lang->find_users_where); $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');
|
Zeile 4000 | Zeile 4022 |
---|
$form_container->output_row($lang->posted_with_ip, $lang->wildcard, $form->generate_text_box('conditions[postip]', $input['conditions']['postip'], array('id' => 'postip')), 'postip');
$form_container->end();
|
$form_container->output_row($lang->posted_with_ip, $lang->wildcard, $form->generate_text_box('conditions[postip]', $input['conditions']['postip'], array('id' => 'postip')), 'postip');
$form_container->end();
|
|
|
// Custom profile fields go here $form_container = new FormContainer($lang->custom_profile_fields_match);
|
// Custom profile fields go here $form_container = new FormContainer($lang->custom_profile_fields_match);
|
|
|
// Fetch custom profile fields $query = $db->simple_select("profilefields", "*", "", array('order_by' => 'disporder')); while($profile_field = $db->fetch_array($query))
|
// Fetch custom profile fields $query = $db->simple_select("profilefields", "*", "", array('order_by' => 'disporder')); while($profile_field = $db->fetch_array($query))
|
{
| {
|
if($profile_field['required'] == 1) { $profile_fields['required'][] = $profile_field;
| if($profile_field['required'] == 1) { $profile_fields['required'][] = $profile_field;
|
Zeile 4017 | Zeile 4039 |
---|
$profile_fields['optional'][] = $profile_field; } }
|
$profile_fields['optional'][] = $profile_field; } }
|
|
|
output_custom_profile_fields($profile_fields['required'], $input['profile_fields'], $form_container, $form, true); output_custom_profile_fields($profile_fields['optional'], $input['profile_fields'], $form_container, $form, true);
|
output_custom_profile_fields($profile_fields['required'], $input['profile_fields'], $form_container, $form, true); output_custom_profile_fields($profile_fields['optional'], $input['profile_fields'], $form_container, $form, true);
|
|
|
$form_container->end();
|
$form_container->end();
|
|
|
// Autocompletion for usernames echo ' <script type="text/javascript" src="../jscripts/autocomplete.js?ver=140"></script>
| // Autocompletion for usernames echo ' <script type="text/javascript" src="../jscripts/autocomplete.js?ver=140"></script>
|