Zeile 254 | Zeile 254 |
---|
my_mail($user['email'], $lang->sprintf($lang->emailsubject_activateaccount, $mybb->settings['bbname']), $message);
// Log admin action
|
my_mail($user['email'], $lang->sprintf($lang->emailsubject_activateaccount, $mybb->settings['bbname']), $message);
// Log admin action
|
log_admin_action($user['uid'], htmlspecialchars_uni($user['username']));
| log_admin_action($user['uid'], $user['username']);
|
if($mybb->input['from'] == "home") {
| if($mybb->input['from'] == "home") {
|
Zeile 359 | Zeile 359 |
---|
$plugins->run_hooks("admin_user_users_add_commit");
// Log admin action
|
$plugins->run_hooks("admin_user_users_add_commit");
// Log admin action
|
log_admin_action($user_info['uid'], htmlspecialchars_uni($user_info['username']));
| log_admin_action($user_info['uid'], $user_info['username']);
|
flash_message($lang->success_user_created, 'success'); admin_redirect("index.php?module=user-users&action=edit&uid={$user_info['uid']}");
| flash_message($lang->success_user_created, 'success'); admin_redirect("index.php?module=user-users&action=edit&uid={$user_info['uid']}");
|
Zeile 512 | Zeile 512 |
---|
"profile_fields_editable" => true, "website" => $mybb->input['website'], "icq" => $mybb->input['icq'],
|
"profile_fields_editable" => true, "website" => $mybb->input['website'], "icq" => $mybb->input['icq'],
|
"aim" => $mybb->input['aim'],
| |
"yahoo" => $mybb->input['yahoo'], "skype" => $mybb->input['skype'], "google" => $mybb->input['google'],
| "yahoo" => $mybb->input['yahoo'], "skype" => $mybb->input['skype'], "google" => $mybb->input['google'],
|
Zeile 646 | Zeile 645 |
---|
}
// Because Gravatars are square, hijack the width
|
}
// Because Gravatars are square, hijack the width
|
list($maxwidth, $maxheight) = explode("x", my_strtolower($mybb->settings['maxavatardims']));
| list($maxwidth, $maxheight) = preg_split('/[|x]/', my_strtolower($mybb->settings['maxavatardims']));
|
$s = "?s={$maxwidth}"; $maxheight = (int)$maxwidth;
| $s = "?s={$maxwidth}"; $maxheight = (int)$maxwidth;
|
Zeile 694 | Zeile 693 |
---|
{ if($width && $height && $mybb->settings['maxavatardims'] != "") {
|
{ if($width && $height && $mybb->settings['maxavatardims'] != "") {
|
list($maxwidth, $maxheight) = explode("x", my_strtolower($mybb->settings['maxavatardims']));
| list($maxwidth, $maxheight) = preg_split('/[|x]/', my_strtolower($mybb->settings['maxavatardims']));
|
if(($maxwidth && $width > $maxwidth) || ($maxheight && $height > $maxheight)) { $lang->error_avatartoobig = $lang->sprintf($lang->error_avatartoobig, $maxwidth, $maxheight);
| if(($maxwidth && $width > $maxwidth) || ($maxheight && $height > $maxheight)) { $lang->error_avatartoobig = $lang->sprintf($lang->error_avatartoobig, $maxwidth, $maxheight);
|
Zeile 844 | Zeile 843 |
---|
}
// Log admin action
|
}
// Log admin action
|
log_admin_action($user['uid'], htmlspecialchars_uni($mybb->input['username']));
| log_admin_action($user['uid'], $mybb->input['username']);
|
flash_message($lang->success_user_updated, 'success'); admin_redirect("index.php?module=user-users");
| flash_message($lang->success_user_updated, 'success'); admin_redirect("index.php?module=user-users");
|
Zeile 955 | Zeile 954 |
---|
// 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']) {
|
echo $lang->sprintf($lang->warning_coppa_user, $user['uid']);
| echo $lang->sprintf($lang->warning_coppa_user, $user['uid'], $mybb->post_code);
|
}
$tabs = array(
| }
$tabs = array(
|
Zeile 978 | Zeile 977 |
---|
$table->construct_header($lang->general_account_stats, array('colspan' => '2', 'class' => 'align_center'));
// Avatar
|
$table->construct_header($lang->general_account_stats, array('colspan' => '2', 'class' => 'align_center'));
// Avatar
|
$avatar_dimensions = explode("|", $user['avatardimensions']);
| $avatar_dimensions = preg_split('/[|x]/', $user['avatardimensions']);
|
if($user['avatar'] && (my_strpos($user['avatar'], '://') === false || $mybb->settings['allowremoteavatars'])) { if($user['avatardimensions']) { require_once MYBB_ROOT."inc/functions_image.php";
|
if($user['avatar'] && (my_strpos($user['avatar'], '://') === false || $mybb->settings['allowremoteavatars'])) { if($user['avatardimensions']) { require_once MYBB_ROOT."inc/functions_image.php";
|
list($width, $height) = explode("|", $user['avatardimensions']);
| list($width, $height) = preg_split('/[|x]/', $user['avatardimensions']);
|
$scaled_dimensions = scale_image($width, $height, 120, 120); } else
| $scaled_dimensions = scale_image($width, $height, 120, 120); } else
|
Zeile 1163 | Zeile 1162 |
---|
$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->output_row($lang->icq_number, "", $form->generate_numeric_field('icq', $mybb->input['icq'], array('id' => 'icq', 'min' => 0)), 'icq');
|
$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->output_row($lang->icq_number, "", $form->generate_numeric_field('icq', $mybb->input['icq'], array('id' => 'icq', 'min' => 0)), 'icq');
|
$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->skype_handle, "", $form->generate_text_box('skype', $mybb->input['skype'], array('id' => 'skype')), 'skype'); $form_container->output_row($lang->google_handle, "", $form->generate_text_box('google', $mybb->input['google'], array('id' => 'google')), 'google');
| $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->skype_handle, "", $form->generate_text_box('skype', $mybb->input['skype'], array('id' => 'skype')), 'skype'); $form_container->output_row($lang->google_handle, "", $form->generate_text_box('google', $mybb->input['google'], array('id' => 'google')), 'google');
|
Zeile 1254 | Zeile 1252 |
---|
$form->generate_check_box("pmnotify", 1, $lang->email_notify_new_pms, array("checked" => $mybb->input['pmnotify'])), $form->generate_check_box("buddyrequestspm", 1, $lang->buddy_requests_pm, array("checked" => $mybb->input['buddyrequestspm'])), $form->generate_check_box("buddyrequestsauto", 1, $lang->buddy_requests_auto, array("checked" => $mybb->input['buddyrequestsauto'])),
|
$form->generate_check_box("pmnotify", 1, $lang->email_notify_new_pms, array("checked" => $mybb->input['pmnotify'])), $form->generate_check_box("buddyrequestspm", 1, $lang->buddy_requests_pm, array("checked" => $mybb->input['buddyrequestspm'])), $form->generate_check_box("buddyrequestsauto", 1, $lang->buddy_requests_auto, array("checked" => $mybb->input['buddyrequestsauto'])),
|
"<label for=\"subscriptionmethod\">{$lang->default_thread_subscription_mode}:</label><br />".$form->generate_select_box("subscriptionmethod", array($lang->do_not_subscribe, $lang->no_email_notification, $lang->instant_email_notification), $mybb->input['subscriptionmethod'], array('id' => 'subscriptionmethod'))
| "<label for=\"subscriptionmethod\">{$lang->default_thread_subscription_mode}:</label><br />".$form->generate_select_box("subscriptionmethod", array($lang->do_not_subscribe, $lang->no_notification, $lang->instant_email_notification, $lang->instant_pm_notification), $mybb->input['subscriptionmethod'], array('id' => 'subscriptionmethod'))
|
); $form_container->output_row($lang->messaging_and_notification, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $messaging_options)."</div>");
| ); $form_container->output_row($lang->messaging_and_notification, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $messaging_options)."</div>");
|
Zeile 1515 | Zeile 1513 |
---|
if($mybb->settings['maxavatardims'] != "") {
|
if($mybb->settings['maxavatardims'] != "") {
|
list($max_width, $max_height) = explode("x", my_strtolower($mybb->settings['maxavatardims']));
| list($max_width, $max_height) = preg_split('/[|x]/', my_strtolower($mybb->settings['maxavatardims']));
|
$max_size = "<br />{$lang->max_dimensions_are} {$max_width}x{$max_height}"; }
| $max_size = "<br />{$lang->max_dimensions_are} {$max_width}x{$max_height}"; }
|
Zeile 1764 | Zeile 1762 |
---|
$plugins->run_hooks("admin_user_users_delete_commit_end");
|
$plugins->run_hooks("admin_user_users_delete_commit_end");
|
log_admin_action($user['uid'], htmlspecialchars_uni($user['username']));
| log_admin_action($user['uid'], $user['username']);
|
flash_message($lang->success_user_deleted, 'success'); admin_redirect("index.php?module=user-users");
| flash_message($lang->success_user_deleted, 'success'); admin_redirect("index.php?module=user-users");
|
Zeile 1844 | Zeile 1842 |
---|
$user = $db->fetch_array($query);
// Log admin action
|
$user = $db->fetch_array($query);
// Log admin action
|
log_admin_action($user['uid'], htmlspecialchars_uni($user['username']));
| log_admin_action($user['uid'], $user['username']);
|
$table = new Table;
| $table = new Table;
|
Zeile 2092 | Zeile 2090 |
---|
"ignorelist" => $ignored ); $db->update_query("users", $lists, "uid='{$destination_user['uid']}'");
|
"ignorelist" => $ignored ); $db->update_query("users", $lists, "uid='{$destination_user['uid']}'");
|
// Set up user handler. require_once MYBB_ROOT.'inc/datahandlers/user.php'; $userhandler = new UserDataHandler('delete');
// Delete the old user $userhandler->delete_user($source_user['uid']);
| |
// Get a list of forums where post count doesn't apply $fids = array();
| // Get a list of forums where post count doesn't apply $fids = array();
|
Zeile 2137 | Zeile 2128 |
---|
}
$plugins->run_hooks("admin_user_users_merge_commit");
|
}
$plugins->run_hooks("admin_user_users_merge_commit");
|
| // Set up user handler. require_once MYBB_ROOT.'inc/datahandlers/user.php'; $userhandler = new UserDataHandler('delete');
// Delete the old user $userhandler->delete_user($source_user['uid']);
|
$cache->update_awaitingactivation();
// Log admin action
|
$cache->update_awaitingactivation();
// Log admin action
|
log_admin_action($source_user['uid'], htmlspecialchars_uni($source_user['username']), $destination_user['uid'], htmlspecialchars_uni($destination_user['username']));
| log_admin_action($source_user['uid'], $source_user['username'], $destination_user['uid'], $destination_user['username']);
|
// Redirect! $username = htmlspecialchars_uni($source_user['username']);
| // Redirect! $username = htmlspecialchars_uni($source_user['username']);
|
Zeile 2157 | Zeile 2155 |
---|
$page->output_nav_tabs($sub_tabs, 'merge_users');
|
$page->output_nav_tabs($sub_tabs, 'merge_users');
|
// If we have any error messages, show them if($errors) { $page->output_inline_error($errors); }
| // If we have any error messages, show them if($errors) { $page->output_inline_error($errors); }
|
$form = new Form("index.php?module=user-users&action=merge", "post");
|
$form = new Form("index.php?module=user-users&action=merge", "post");
|
|
|
$form_container = new FormContainer($lang->merge_users); $form_container->output_row($lang->source_account." <em>*</em>", $lang->source_account_desc, $form->generate_text_box('source_username', $mybb->input['source_username'], array('id' => 'source_username')), 'source_username'); $form_container->output_row($lang->destination_account." <em>*</em>", $lang->destination_account_desc, $form->generate_text_box('destination_username', $mybb->input['destination_username'], array('id' => 'destination_username')), 'destination_username');
| $form_container = new FormContainer($lang->merge_users); $form_container->output_row($lang->source_account." <em>*</em>", $lang->source_account_desc, $form->generate_text_box('source_username', $mybb->input['source_username'], array('id' => 'source_username')), 'source_username'); $form_container->output_row($lang->destination_account." <em>*</em>", $lang->destination_account_desc, $form->generate_text_box('destination_username', $mybb->input['destination_username'], array('id' => 'destination_username')), 'destination_username');
|
Zeile 2177 | Zeile 2175 |
---|
<script type="text/javascript"> <!-- $("#source_username").select2({
|
<script type="text/javascript"> <!-- $("#source_username").select2({
|
placeholder: "'.$lang->search_for_a_user.'", minimumInputLength: 2, multiple: false, ajax: { // instead of writing the function to execute the request we use Select2\'s convenient helper url: "../xmlhttp.php?action=get_users", dataType: \'json\', data: function (term, page) { return { query: term // search term }; }, results: function (data, page) { // parse the results into the format expected by Select2. // since we are using custom formatting functions we do not need to alter remote JSON data return {results: data}; } }, initSelection: function(element, callback) { var query = $(element).val(); if (query !== "") {
| placeholder: "'.$lang->search_for_a_user.'", minimumInputLength: 2, multiple: false, ajax: { // instead of writing the function to execute the request we use Select2\'s convenient helper url: "../xmlhttp.php?action=get_users", dataType: \'json\', data: function (term, page) { return { query: term // search term }; }, results: function (data, page) { // parse the results into the format expected by Select2. // since we are using custom formatting functions we do not need to alter remote JSON data return {results: data}; } }, initSelection: function(element, callback) { var query = $(element).val(); if (query !== "") {
|
$.ajax("../xmlhttp.php?action=get_users&getone=1", { data: { query: query
| $.ajax("../xmlhttp.php?action=get_users&getone=1", { data: { query: query
|
Zeile 2296 | Zeile 2294 |
---|
}
if($mybb->input['sortby'])
|
}
if($mybb->input['sortby'])
|
{
| {
|
$admin_view['sortby'] = $mybb->input['sortby']; }
| $admin_view['sortby'] = $mybb->input['sortby']; }
|
Zeile 2364 | Zeile 2362 |
---|
}
$form = new Form("index.php?module=user-users&action=search", "post");
|
}
$form = new Form("index.php?module=user-users&action=search", "post");
|
user_search_conditions($mybb->input, $form);
| user_search_conditions($mybb->input, $form);
|
$form_container = new FormContainer($lang->display_options); $sort_directions = array(
| $form_container = new FormContainer($lang->display_options); $sort_directions = array(
|
Zeile 2469 | Zeile 2467 |
---|
$to_update_count = count($to_update); $lang->inline_activated = $lang->sprintf($lang->inline_activated, my_number_format($to_update_count));
|
$to_update_count = count($to_update); $lang->inline_activated = $lang->sprintf($lang->inline_activated, my_number_format($to_update_count));
|
if($to_update_count != count($selected))
| if(is_array($selected) && $to_update_count != count($selected))
|
{ // The update count is different to how many we selected! $not_updated_count = count($selected) - $to_update_count;
| { // The update count is different to how many we selected! $not_updated_count = count($selected) - $to_update_count;
|
Zeile 2952 | Zeile 2950 |
---|
// Do the usergroup update for all those selected // If the a selected user is a super admin, don't update that user
|
// Do the usergroup update for all those selected // If the a selected user is a super admin, don't update that user
|
| $users_to_update = array();
|
foreach($selected as $user) { if(!is_super_admin($user))
| foreach($selected as $user) { if(!is_super_admin($user))
|
Zeile 2961 | Zeile 2960 |
---|
}
$to_update_count = count($users_to_update);
|
}
$to_update_count = count($users_to_update);
|
if($to_update_count > 0 && is_array($users_to_update))
| if($to_update_count > 0)
|
{ // Update the users in the database $sql = implode(",", $users_to_update);
| { // Update the users in the database $sql = implode(",", $users_to_update);
|
Zeile 3182 | Zeile 3181 |
---|
// If this is a custom view we need to save everything ready to pass it on from page to page global $admin_session; if(!$mybb->input['search_id'])
|
// If this is a custom view we need to save everything ready to pass it on from page to page global $admin_session; 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']); $mybb->input['search_id'] = $search_id; } $view['url'] .= "&search_id=".htmlspecialchars_uni($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']); $mybb->input['search_id'] = $search_id; } $view['url'] .= "&search_id=".htmlspecialchars_uni($mybb->input['search_id']);
|
}
| }
|
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'])){ $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))
|
// Do we not have any views? if(empty($view))
|
{
| {
|
return false; }
| return false; }
|
Zeile 3214 | Zeile 3213 |
---|
foreach($view['fields'] as $field) { if(!$user_view_fields[$field])
|
foreach($view['fields'] as $field) { if(!$user_view_fields[$field])
|
{ continue;
| { continue;
|
} $view_field = $user_view_fields[$field]; $field_options = array();
| } $view_field = $user_view_fields[$field]; $field_options = array();
|
Zeile 3237 | Zeile 3236 |
---|
// Build the search SQL for users
// List of valid LIKE search fields
|
// Build the search SQL for users
// List of valid LIKE search fields
|
$user_like_fields = array("username", "email", "website", "icq", "aim", "yahoo", "skype", "google", "signature", "usertitle");
| $user_like_fields = array("username", "email", "website", "icq", "yahoo", "skype", "google", "signature", "usertitle");
|
foreach($user_like_fields as $search_field) { if(!empty($view['conditions'][$search_field]) && !$view['conditions'][$search_field.'_blank'])
| foreach($user_like_fields as $search_field) { if(!empty($view['conditions'][$search_field]) && !$view['conditions'][$search_field.'_blank'])
|
Zeile 3318 | Zeile 3317 |
---|
{ $ip_range = fetch_ip_range($view['conditions']['postip']); if(!is_array($ip_range))
|
{ $ip_range = fetch_ip_range($view['conditions']['postip']); if(!is_array($ip_range))
|
{
| {
|
$ip_sql = "ipaddress=".$db->escape_binary($ip_range); } else
| $ip_sql = "ipaddress=".$db->escape_binary($ip_range); } else
|
Zeile 3386 | Zeile 3385 |
---|
}
if($userfield_sql != '1=1')
|
}
if($userfield_sql != '1=1')
|
{
| {
|
$userfield_uids = array(0); $query = $db->simple_select("userfields", "ufid", $userfield_sql); while($userfield = $db->fetch_array($query))
| $userfield_uids = array(0); $query = $db->simple_select("userfields", "ufid", $userfield_sql); while($userfield = $db->fetch_array($query))
|
Zeile 3455 | Zeile 3454 |
---|
if(!$num_results) { return false;
|
if(!$num_results) { return false;
|
}
| }
|
// Generate the list of results else { if(!$view['perpage'])
|
// Generate the list of results else { if(!$view['perpage'])
|
{
| {
|
$view['perpage'] = 20;
|
$view['perpage'] = 20;
|
}
| }
|
$view['perpage'] = (int)$view['perpage'];
// Establish which page we're viewing and the starting index for querying if(!isset($mybb->input['page']))
|
$view['perpage'] = (int)$view['perpage'];
// 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'] = $mybb->get_input('page', MyBB::INPUT_INT); }
if($mybb->input['page']) {
| { $mybb->input['page'] = 1; } else { $mybb->input['page'] = $mybb->get_input('page', MyBB::INPUT_INT); }
if($mybb->input['page']) {
|
$start = ($mybb->input['page'] - 1) * $view['perpage'];
|
$start = ($mybb->input['page'] - 1) * $view['perpage'];
|
| $pages = ceil($num_results / $view['perpage']); if($mybb->input['page'] > $pages) { $start = 0; $mybb->input['page'] = 1; }
|
} else {
| } else {
|
Zeile 3516 | Zeile 3521 |
---|
{ $view['sortorder'] = "asc"; }
|
{ $view['sortorder'] = "asc"; }
|
|
|
$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 3537 | Zeile 3542 |
---|
if($user['additionalgroups']) { $additional_groups = explode(",", $user['additionalgroups']);
|
if($user['additionalgroups']) { $additional_groups = explode(",", $user['additionalgroups']);
|
|
|
foreach($additional_groups as $group) { $groups_list .= $comma.htmlspecialchars_uni($usergroups[$group]['title']);
| foreach($additional_groups as $group) { $groups_list .= $comma.htmlspecialchars_uni($usergroups[$group]['title']);
|
Zeile 3600 | Zeile 3605 |
---|
}
if($mybb->settings['enablewarningsystem'] != 0 && $usergroups[$user['usergroup']]['canreceivewarnings'] != 0)
|
}
if($mybb->settings['enablewarningsystem'] != 0 && $usergroups[$user['usergroup']]['canreceivewarnings'] != 0)
|
{
| {
|
if($mybb->settings['maxwarningpoints'] < 1) { $mybb->settings['maxwarningpoints'] = 10;
| if($mybb->settings['maxwarningpoints'] < 1) { $mybb->settings['maxwarningpoints'] = 10;
|
Zeile 3608 | Zeile 3613 |
---|
$warning_level = round($user['warningpoints']/$mybb->settings['maxwarningpoints']*100); if($warning_level > 100)
|
$warning_level = round($user['warningpoints']/$mybb->settings['maxwarningpoints']*100); if($warning_level > 100)
|
{
| {
|
$warning_level = 100; } $user['view']['warninglevel'] = get_colored_warning_level($warning_level); }
|
$warning_level = 100; } $user['view']['warninglevel'] = get_colored_warning_level($warning_level); }
|
if($user['avatar'] && !my_validate_url($user['avatar'])) { $user['avatar'] = "../{$user['avatar']}"; }
| |
if($view['view_type'] == "card")
|
if($view['view_type'] == "card")
|
{ $scaled_avatar = fetch_scaled_avatar($user, 80, 80); }
| { $max_dimensions = '80x80'; }
|
else {
|
else {
|
$scaled_avatar = fetch_scaled_avatar($user, 34, 34); } if(!$user['avatar'] || (my_strpos($user['avatar'], '://') !== false && !$mybb->settings['allowremoteavatars'])) { if(my_validate_url($mybb->settings['useravatar'])) { $user['avatar'] = str_replace('{theme}', 'images', $mybb->settings['useravatar']); } else { $user['avatar'] = "../".str_replace('{theme}', 'images', $mybb->settings['useravatar']); }
| $max_dimensions = '34x34';
|
}
|
}
|
$user['view']['avatar'] = "<img src=\"".htmlspecialchars_uni($user['avatar'])."\" alt=\"\" width=\"{$scaled_avatar['width']}\" height=\"{$scaled_avatar['height']}\" />";
| $avatar = format_avatar($user['avatar'], $user['avatardimensions'], $max_dimensions);
$user['view']['avatar'] = "<img src=\"".$avatar['image']."\" alt=\"\" {$avatar['width_height']} />";
|
// Convert IP's to readable $user['regip'] = my_inet_ntop($db->unescape_binary($user['regip']));
| // Convert IP's to readable $user['regip'] = my_inet_ntop($db->unescape_binary($user['regip']));
|
Zeile 3787 | Zeile 3780 |
---|
}
$built_view .= '
|
}
$built_view .= '
|
<script type="text/javascript" src="'.$mybb->settings['bburl'].'/jscripts/inline_moderation.js?ver=1800"></script>
| <script type="text/javascript" src="'.$mybb->settings['bburl'].'/jscripts/inline_moderation.js?ver=1818"></script>
|
<form action="index.php?module=user-users" method="post"> <input type="hidden" name="my_post_key" value="'.$mybb->post_code.'" /> <input type="hidden" name="action" value="inline_edit" />
| <form action="index.php?module=user-users" method="post"> <input type="hidden" name="my_post_key" value="'.$mybb->post_code.'" /> <input type="hidden" name="action" value="inline_edit" />
|
Zeile 3943 | Zeile 3936 |
---|
$table->construct_cell("<input type=\"checkbox\" class=\"checkbox\" name=\"inlinemod_{$user['uid']}\" id=\"inlinemod_{$user['uid']}\" value=\"1\" onclick=\"$('#uid_{$user['uid']}').toggleClass('inline_selected');\" />");
$table->construct_row();
|
$table->construct_cell("<input type=\"checkbox\" class=\"checkbox\" name=\"inlinemod_{$user['uid']}\" id=\"inlinemod_{$user['uid']}\" value=\"1\" onclick=\"$('#uid_{$user['uid']}').toggleClass('inline_selected');\" />");
$table->construct_row();
|
}
/** * @param array $user * @param int $max_width * @param int $max_height * * @return array */ function fetch_scaled_avatar($user, $max_width=80, $max_height=80) { $scaled_dimensions = array( "width" => $max_width, "height" => $max_height, );
global $mybb;
if($user['avatar'] && (my_strpos($user['avatar'], '://') === false || $mybb->settings['allowremoteavatars'])) { 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']);
| |
}
/**
| }
/**
|
Zeile 3996 | Zeile 3960 |
---|
list($type, $options) = explode("\n", $profile_field['type'], 2); $type = trim($type); $field_name = "fid{$profile_field['fid']}";
|
list($type, $options) = explode("\n", $profile_field['type'], 2); $type = trim($type); $field_name = "fid{$profile_field['fid']}";
|
|
|
switch($type) { case "multiselect":
|
switch($type) { case "multiselect":
|
| $selected_options = array();
|
if(!is_array($values[$field_name])) { $user_options = explode("\n", $values[$field_name]);
| if(!is_array($values[$field_name])) { $user_options = explode("\n", $values[$field_name]);
|
Zeile 4009 | Zeile 3974 |
---|
$user_options = $values[$field_name]; }
|
$user_options = $values[$field_name]; }
|
$selected_options = array();
|
|
foreach($user_options as $val) { $selected_options[$val] = htmlspecialchars_uni($val);
| foreach($user_options as $val) { $selected_options[$val] = htmlspecialchars_uni($val);
|
Zeile 4074 | Zeile 4039 |
---|
} break; case "checkbox":
|
} break; case "checkbox":
|
| $select_options = array();
|
if(!is_array($values[$field_name])) { $user_options = explode("\n", $values[$field_name]); } else
|
if(!is_array($values[$field_name])) { $user_options = explode("\n", $values[$field_name]); } else
|
{
| {
|
$user_options = $values[$field_name]; }
|
$user_options = $values[$field_name]; }
|
| $selected_options = array();
|
foreach($user_options as $val) { $selected_options[$val] = $val;
|
foreach($user_options as $val) { $selected_options[$val] = $val;
|
} $select_options = array();
| }
|
if($search == true) { $select_options[''] = $lang->na;
| if($search == true) { $select_options[''] = $lang->na;
|
Zeile 4100 | Zeile 4068 |
---|
} break; case "textarea":
|
} break; case "textarea":
|
$extra = ''; 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 = ''; 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']));
|
}
$code = $form->generate_text_area("profile_fields[{$field_name}]", $values[$field_name], array('id' => "profile_field_{$field_name}", 'rows' => 6, 'cols' => 50)).$extra;
|
}
$code = $form->generate_text_area("profile_fields[{$field_name}]", $values[$field_name], array('id' => "profile_field_{$field_name}", 'rows' => 6, 'cols' => 50)).$extra;
|
break;
| break;
|
default: $extra = ''; if(isset($mybb->input['action']) && $mybb->input['action'] == "search")
| default: $extra = ''; if(isset($mybb->input['action']) && $mybb->input['action'] == "search")
|
Zeile 4118 | Zeile 4086 |
---|
$code = $form->generate_text_box("profile_fields[{$field_name}]", $values[$field_name], array('id' => "profile_field_{$field_name}", 'maxlength' => $profile_field['maxlength'], 'length' => $profile_field['length'])).$extra; break; }
|
$code = $form->generate_text_box("profile_fields[{$field_name}]", $values[$field_name], array('id' => "profile_field_{$field_name}", 'maxlength' => $profile_field['maxlength'], 'length' => $profile_field['length'])).$extra; break; }
|
|
|
$form_container->output_row($profile_field['name'], $profile_field['description'], $code, "", array('id' => "profile_field_{$field_name}")); $code = $user_options = $selected_options = $radio_options = $val = $options = ''; }
| $form_container->output_row($profile_field['name'], $profile_field['description'], $code, "", array('id' => "profile_field_{$field_name}")); $code = $user_options = $selected_options = $radio_options = $val = $options = ''; }
|
Zeile 4133 | Zeile 4101 |
---|
global $mybb, $db, $lang;
if(!$input)
|
global $mybb, $db, $lang;
if(!$input)
|
{
| {
|
$input = $mybb->input;
|
$input = $mybb->input;
|
}
| }
|
if(!is_array($input['conditions'])) { $input['conditions'] = my_unserialize($input['conditions']); }
if(!is_array($input['profile_fields']))
|
if(!is_array($input['conditions'])) { $input['conditions'] = my_unserialize($input['conditions']); }
if(!is_array($input['profile_fields']))
|
{
| {
|
$input['profile_fields'] = my_unserialize($input['profile_fields']);
|
$input['profile_fields'] = my_unserialize($input['profile_fields']);
|
}
| }
|
if(!is_array($input['fields'])) { $input['fields'] = my_unserialize($input['fields']);
|
if(!is_array($input['fields'])) { $input['fields'] = my_unserialize($input['fields']);
|
}
| }
|
$form_container = new FormContainer($lang->find_users_where); $form_container->output_row($lang->username_contains, "", $form->generate_text_box('conditions[username]', htmlspecialchars_uni($input['conditions']['username']), array('id' => 'username')), 'username');
| $form_container = new FormContainer($lang->find_users_where); $form_container->output_row($lang->username_contains, "", $form->generate_text_box('conditions[username]', htmlspecialchars_uni($input['conditions']['username']), array('id' => 'username')), 'username');
|
Zeile 4161 | Zeile 4129 |
---|
while($usergroup = $db->fetch_array($query)) { $options[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']);
|
while($usergroup = $db->fetch_array($query)) { $options[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']);
|
}
$form_container->output_row($lang->is_member_of_groups, $lang->additional_user_groups_desc, $form->generate_select_box('conditions[usergroup][]', $options, $input['conditions']['usergroup'], array('id' => 'usergroups', 'multiple' => true, 'size' => 5)), 'usergroups');
| }
$form_container->output_row($lang->is_member_of_groups, $lang->additional_user_groups_desc, $form->generate_select_box('conditions[usergroup][]', $options, $input['conditions']['usergroup'], array('id' => 'usergroups', 'multiple' => true, 'size' => 5)), 'usergroups');
|
$form_container->output_row($lang->website_contains, "", $form->generate_text_box('conditions[website]', $input['conditions']['website'], array('id' => 'website'))." {$lang->or} ".$form->generate_check_box('conditions[website_blank]', 1, $lang->is_not_blank, array('id' => 'website_blank', 'checked' => $input['conditions']['website_blank'])), 'website'); $form_container->output_row($lang->icq_number_contains, "", $form->generate_text_box('conditions[icq]', $input['conditions']['icq'], array('id' => 'icq'))." {$lang->or} ".$form->generate_check_box('conditions[icq_blank]', 1, $lang->is_not_blank, array('id' => 'icq_blank', 'checked' => $input['conditions']['icq_blank'])), 'icq');
|
$form_container->output_row($lang->website_contains, "", $form->generate_text_box('conditions[website]', $input['conditions']['website'], array('id' => 'website'))." {$lang->or} ".$form->generate_check_box('conditions[website_blank]', 1, $lang->is_not_blank, array('id' => 'website_blank', 'checked' => $input['conditions']['website_blank'])), 'website'); $form_container->output_row($lang->icq_number_contains, "", $form->generate_text_box('conditions[icq]', $input['conditions']['icq'], array('id' => 'icq'))." {$lang->or} ".$form->generate_check_box('conditions[icq_blank]', 1, $lang->is_not_blank, array('id' => 'icq_blank', 'checked' => $input['conditions']['icq_blank'])), 'icq');
|
$form_container->output_row($lang->aim_handle_contains, "", $form->generate_text_box('conditions[aim]', $input['conditions']['aim'], array('id' => 'aim'))." {$lang->or} ".$form->generate_check_box('conditions[aim_blank]', 1, $lang->is_not_blank, array('id' => 'aim_blank', 'checked' => $input['conditions']['aim_blank'])), 'aim');
| |
$form_container->output_row($lang->yahoo_contains, "", $form->generate_text_box('conditions[yahoo]', $input['conditions']['yahoo'], array('id' => 'yahoo'))." {$lang->or} ".$form->generate_check_box('conditions[yahoo_blank]', 1, $lang->is_not_blank, array('id' => 'yahoo_blank', 'checked' => $input['conditions']['yahoo_blank'])), 'yahoo'); $form_container->output_row($lang->skype_contains, "", $form->generate_text_box('conditions[skype]', $input['conditions']['skype'], array('id' => 'skype'))." {$lang->or} ".$form->generate_check_box('conditions[skype_blank]', 1, $lang->is_not_blank, array('id' => 'skype_blank', 'checked' => $input['conditions']['skype_blank'])), 'skype'); $form_container->output_row($lang->google_contains, "", $form->generate_text_box('conditions[google]', $input['conditions']['google'], array('id' => 'google'))." {$lang->or} ".$form->generate_check_box('conditions[google_blank]', 1, $lang->is_not_blank, array('id' => 'google_blank', 'checked' => $input['conditions']['google_blank'])), 'google');
| $form_container->output_row($lang->yahoo_contains, "", $form->generate_text_box('conditions[yahoo]', $input['conditions']['yahoo'], array('id' => 'yahoo'))." {$lang->or} ".$form->generate_check_box('conditions[yahoo_blank]', 1, $lang->is_not_blank, array('id' => 'yahoo_blank', 'checked' => $input['conditions']['yahoo_blank'])), 'yahoo'); $form_container->output_row($lang->skype_contains, "", $form->generate_text_box('conditions[skype]', $input['conditions']['skype'], array('id' => 'skype'))." {$lang->or} ".$form->generate_check_box('conditions[skype_blank]', 1, $lang->is_not_blank, array('id' => 'skype_blank', 'checked' => $input['conditions']['skype_blank'])), 'skype'); $form_container->output_row($lang->google_contains, "", $form->generate_text_box('conditions[google]', $input['conditions']['google'], array('id' => 'google'))." {$lang->or} ".$form->generate_check_box('conditions[google_blank]', 1, $lang->is_not_blank, array('id' => 'google_blank', 'checked' => $input['conditions']['google_blank'])), 'google');
|
Zeile 4193 | Zeile 4160 |
---|
// Fetch custom profile fields $query = $db->simple_select("profilefields", "*", "", array('order_by' => 'disporder'));
|
// Fetch custom profile fields $query = $db->simple_select("profilefields", "*", "", array('order_by' => 'disporder'));
|
|
|
$profile_fields = array(); while($profile_field = $db->fetch_array($query)) {
| $profile_fields = array(); while($profile_field = $db->fetch_array($query)) {
|
Zeile 4283 | Zeile 4250 |
---|
$delete_list[] = $rating['rid']; $decrement_list[$rating['tid']][] = (int) $rating['rating']; }
|
$delete_list[] = $rating['rid']; $decrement_list[$rating['tid']][] = (int) $rating['rating']; }
|
}
| }
|
// Attribute all of the source user's ratings to the destination user $db->update_query("threadratings", array("uid" => $destination_uid), "uid='{$source_uid}'");
|
// Attribute all of the source user's ratings to the destination user $db->update_query("threadratings", array("uid" => $destination_uid), "uid='{$source_uid}'");
|
|
|
// Remove ratings previously given to recently acquired threads $query = $db->query(" SELECT tr.rid, tr.rating, t.tid
| // Remove ratings previously given to recently acquired threads $query = $db->query(" SELECT tr.rid, tr.rating, t.tid
|
Zeile 4313 | Zeile 4280 |
---|
{ foreach($decrement_list as $tid => $ratings) {
|
{ foreach($decrement_list as $tid => $ratings) {
|
$db->update_query('threads', array('numratings' => 'numratings-'.count($ratings), 'totalratings' => 'totalratings-'.array_sum($ratings)), "tid='{$tid}'", 1, true);
| if(is_array($ratings)) { $db->update_query('threads', array('numratings' => 'numratings-'.count($ratings), 'totalratings' => 'totalratings-'.array_sum($ratings)), "tid='{$tid}'", 1, true); }
|
} } }
| } } }
|