Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* $Id: users.php 4180 2008-09-07 16:44:43Z Tikitiki $
| * $Id: users.php 4272 2008-11-16 23:25:10Z belloman $
|
*/
// Disallow direct access to this file for security reasons
| */
// Disallow direct access to this file for security reasons
|
Zeile 165 | Zeile 165 |
---|
$updated_avatar = array( "avatar" => $db->escape_string($mybb->settings['avatardir']."/".$mybb->input['avatar']), "avatardimensions" => "{$dimensions[0]}|{$dimensions[1]}",
|
$updated_avatar = array( "avatar" => $db->escape_string($mybb->settings['avatardir']."/".$mybb->input['avatar']), "avatardimensions" => "{$dimensions[0]}|{$dimensions[1]}",
|
|
|
"avatartype" => "gallery" );
| "avatartype" => "gallery" );
|
Zeile 175 | Zeile 176 |
---|
// Log admin action log_admin_action($user['uid'], $user['username']); }
|
// Log admin action log_admin_action($user['uid'], $user['username']); }
|
remove_avatars($mybb->user['uid']);
| remove_avatars($user['uid']);
|
// Now a tad of javascript to submit the parent window form echo "<script type=\"text/javascript\">window.parent.submitUserForm();</script>"; exit;
| // Now a tad of javascript to submit the parent window form echo "<script type=\"text/javascript\">window.parent.submitUserForm();</script>"; exit;
|
Zeile 199 | Zeile 200 |
---|
$mybb->settings['avatardir'] = "../".$mybb->settings['avatardir'];
|
$mybb->settings['avatardir'] = "../".$mybb->settings['avatardir'];
|
| if(!is_dir($mybb->settings['avatardir']) && is_dir(MYBB_ROOT."/images/avatars/")) { $mybb->settings['avatardir'] = "../images/avatars/"; }
|
// Within a gallery
|
// Within a gallery
|
if($gallery)
| if(!empty($gallery))
|
{ $path = $gallery."/"; $real_path = $mybb->settings['avatardir']."/".$path;
|
{ $path = $gallery."/"; $real_path = $mybb->settings['avatardir']."/".$path;
|
if(is_dir($path))
| if(is_dir($real_path))
|
{ // Build friendly gallery breadcrumb $gallery_path = explode("/", $gallery);
| { // Build friendly gallery breadcrumb $gallery_path = explode("/", $gallery);
|
Zeile 222 | Zeile 228 |
---|
else { $breadcrumb .= " » {$gallery_name}";
|
else { $breadcrumb .= " » {$gallery_name}";
|
} }
| } }
|
} else {
| } else {
|
Zeile 363 | Zeile 369 |
---|
// Move out of awaiting activation if they're in it. if($user['usergroup'] == 5)
|
// Move out of awaiting activation if they're in it. if($user['usergroup'] == 5)
|
{
| {
|
$updated_user['usergroup'] = 2; }
$db->update_query("users", $updated_user, "uid='{$user['uid']}'"); $plugins->run_hooks("admin_user_users_coppa_activate_commit");
|
$updated_user['usergroup'] = 2; }
$db->update_query("users", $updated_user, "uid='{$user['uid']}'"); $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']);
|
if($user['coppauser']) { flash_message($lang->success_coppa_activated, 'success'); } else { flash_message($lang->success_activated, 'success'); }
| if($mybb->input['from'] == "home") { if($user['coppauser']) { $message = $lang->success_coppa_activated; } else { $message = $lang->success_activated; } update_admin_session('flash_message2', array('message' => $message, 'type' => 'success')); } else { if($user['coppauser']) { flash_message($lang->success_coppa_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'); }
|
} else {
|
} else {
|
$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);
|
admin_redirect($url);
|
}
| }
|
if($mybb->input['action'] == "add") { $plugins->run_hooks("admin_user_users_add");
|
if($mybb->input['action'] == "add") { $plugins->run_hooks("admin_user_users_add");
|
if($mybb->request_method == "post") { // Determine the usergroup stuff if(is_array($mybb->input['additionalgroups'])) { foreach($mybb->input['additionalgroups'] as $gid) { if($gid == $mybb->input['usergroup']) { unset($mybb->input['additionalgroups'][$gid]); } } $additionalgroups = implode(",", $mybb->input['additionalgroups']); } else { $additionalgroups = ''; }
// Set up user handler.
| if($mybb->request_method == "post") { // Determine the usergroup stuff if(is_array($mybb->input['additionalgroups'])) { foreach($mybb->input['additionalgroups'] as $gid) { if($gid == $mybb->input['usergroup']) { unset($mybb->input['additionalgroups'][$gid]); } } $additionalgroups = implode(",", $mybb->input['additionalgroups']); } else { $additionalgroups = ''; }
// Set up user handler.
|
require_once MYBB_ROOT."inc/datahandlers/user.php"; $userhandler = new UserDataHandler('insert');
| require_once MYBB_ROOT."inc/datahandlers/user.php"; $userhandler = new UserDataHandler('insert');
|
Zeile 443 | Zeile 471 |
---|
// Validate the user and get any errors that might have occurred. if(!$userhandler->validate_user())
|
// Validate the user and get any errors that might have occurred. if(!$userhandler->validate_user())
|
{
| {
|
$errors = $userhandler->get_friendly_errors(); } else
| $errors = $userhandler->get_friendly_errors(); } else
|
Zeile 597 | Zeile 625 |
---|
$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']; }
|
$updated_user['birthday'] = array( "day" => $mybb->input['birthday_day'], "month" => $mybb->input['birthday_month'], "year" => $mybb->input['birthday_year'] );
| |
$updated_user['options'] = array( "allownotices" => $mybb->input['allownotices'],
| $updated_user['options'] = array( "allownotices" => $mybb->input['allownotices'],
|
Zeile 652 | Zeile 674 |
---|
"avatardimensions" => "", "avatartype" => "" );
|
"avatardimensions" => "", "avatartype" => "" );
|
remove_avatars($mybb->user['uid']);
| remove_avatars($user['uid']);
|
}
| }
|
Zeile 716 | Zeile 738 |
---|
{ if($width && $height && $mybb->settings['maxavatardims'] != "") {
|
{ if($width && $height && $mybb->settings['maxavatardims'] != "") {
|
list($maxwidth, $maxheight) = explode("x", $mybb->settings['maxavatardims']);
| 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);
| if(($maxwidth && $width > $maxwidth) || ($maxheight && $height > $maxheight)) { $lang->error_avatartoobig = $lang->sprintf($lang->error_avatartoobig, $maxwidth, $maxheight);
|
Zeile 844 | Zeile 866 |
---|
require_once MYBB_ROOT."inc/functions_image.php"; list($width, $height) = explode("|", $user['avatardimensions']); $scaled_dimensions = scale_image($width, $height, 120, 120);
|
require_once MYBB_ROOT."inc/functions_image.php"; list($width, $height) = explode("|", $user['avatardimensions']); $scaled_dimensions = scale_image($width, $height, 120, 120);
|
} else
| } else
|
{ $scaled_dimensions = array( "width" => 120,
| { $scaled_dimensions = array( "width" => 120,
|
Zeile 855 | Zeile 877 |
---|
if (!stristr($user['avatar'], 'http://')) { $user['avatar'] = "../{$user['avatar']}\n";
|
if (!stristr($user['avatar'], 'http://')) { $user['avatar'] = "../{$user['avatar']}\n";
|
} }
| } }
|
else { $user['avatar'] = "styles/{$page->style}/images/default_avatar.gif";
| else { $user['avatar'] = "styles/{$page->style}/images/default_avatar.gif";
|
Zeile 867 | Zeile 889 |
---|
} $avatar_top = ceil((126-$scaled_dimensions['height'])/2); if($user['lastactive'])
|
} $avatar_top = ceil((126-$scaled_dimensions['height'])/2); if($user['lastactive'])
|
{
| {
|
$last_active = my_date($mybb->settings['dateformat'], $user['lastactive']).", ".my_date($mybb->settings['timeformat'], $user['lastactive']);
|
$last_active = my_date($mybb->settings['dateformat'], $user['lastactive']).", ".my_date($mybb->settings['timeformat'], $user['lastactive']);
|
}
| }
|
else { $last_active = $lang->never;
| else { $last_active = $lang->never;
|
Zeile 878 | Zeile 900 |
---|
if($user['dst'] == 1) { $timezone = $user['timezone']+1;
|
if($user['dst'] == 1) { $timezone = $user['timezone']+1;
|
}
| }
|
else { $timezone = $user['timezone'];
| else { $timezone = $user['timezone'];
|
Zeile 899 | Zeile 921 |
---|
if($posts == 0) { $percent_posts = "0";
|
if($posts == 0) { $percent_posts = "0";
|
}
| }
|
else { $percent_posts = round($memprofile['postnum']*100/$posts, 2);;
| else { $percent_posts = round($memprofile['postnum']*100/$posts, 2);;
|
Zeile 932 | Zeile 954 |
---|
{ $age = get_age($user['birthday']); }
|
{ $age = get_age($user['birthday']); }
|
|
|
else { $age = '';
| else { $age = '';
|
Zeile 1193 | Zeile 1216 |
---|
if($mybb->settings['maxavatardims'] != "") {
|
if($mybb->settings['maxavatardims'] != "") {
|
list($max_width, $max_height) = explode("x", $mybb->settings['maxavatardims']);
| list($max_width, $max_height) = explode("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 1272 | Zeile 1295 |
---|
{ // Delete the user $db->update_query("posts", array('uid' => 0), "uid='{$user['uid']}'");
|
{ // Delete the user $db->update_query("posts", array('uid' => 0), "uid='{$user['uid']}'");
|
$db->delete_query("users", "uid='{$user['uid']}'");
| |
$db->delete_query("userfields", "ufid='{$user['uid']}'"); $db->delete_query("privatemessages", "uid='{$user['uid']}'"); $db->delete_query("events", "uid='{$user['uid']}'");
| $db->delete_query("userfields", "ufid='{$user['uid']}'"); $db->delete_query("privatemessages", "uid='{$user['uid']}'"); $db->delete_query("events", "uid='{$user['uid']}'");
|
Zeile 1282 | Zeile 1304 |
---|
$db->delete_query("sessions", "uid='{$user['uid']}'"); $db->delete_query("banned", "uid='{$user['uid']}'"); $db->delete_query("threadratings", "uid='{$user['uid']}'");
|
$db->delete_query("sessions", "uid='{$user['uid']}'"); $db->delete_query("banned", "uid='{$user['uid']}'"); $db->delete_query("threadratings", "uid='{$user['uid']}'");
|
| $db->delete_query("users", "uid='{$user['uid']}'");
|
// Update forum stats update_stats(array('numusers' => '-1'));
| // Update forum stats update_stats(array('numusers' => '-1'));
|
Zeile 1318 | Zeile 1341 |
---|
// Fetch default admin view $default_view = fetch_default_view("user");
|
// Fetch default admin view $default_view = fetch_default_view("user");
|
| if(!$default_view) { $default_view = "0"; }
|
$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'];
|
Zeile 1328 | Zeile 1355 |
---|
$admin_view['conditions'] = unserialize($admin_view['conditions']); $admin_view['conditions']['referrer'] = $mybb->input['uid'];
|
$admin_view['conditions'] = unserialize($admin_view['conditions']); $admin_view['conditions']['referrer'] = $mybb->input['uid'];
|
|
|
echo build_users_view($admin_view); $page->output_footer();
| echo build_users_view($admin_view); $page->output_footer();
|
Zeile 1337 | Zeile 1364 |
---|
if($mybb->input['action'] == "ipaddresses") { $plugins->run_hooks("admin_user_users_ipaddresses");
|
if($mybb->input['action'] == "ipaddresses") { $plugins->run_hooks("admin_user_users_ipaddresses");
|
|
|
$page->add_breadcrumb_item($lang->ip_addresses); $page->output_header($lang->ip_addresses);
|
$page->add_breadcrumb_item($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']}",
| $sub_tabs['ipaddresses'] = array( 'title' => $lang->show_ip_addresses, 'link' => "index.php?module=user/users&action=ipaddresses&uid={$mybb->input['uid']}",
|
Zeile 1348 | Zeile 1375 |
---|
); $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->construct_header($lang->ip_address);
| $table = new Table; $table->construct_header($lang->ip_address);
|
Zeile 1363 | Zeile 1390 |
---|
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);
|
Zeile 1395 | Zeile 1422 |
---|
$table->construct_cell($controls, array('class' => "align_center")); $table->construct_row();
|
$table->construct_cell($controls, array('class' => "align_center")); $table->construct_row();
|
$query = $db->simple_select("posts", "DISTINCT ipaddress, pid", "uid='{$mybb->input['uid']}'");
| $counter = 0; $query = $db->simple_select("posts", "DISTINCT ipaddress", "uid='{$mybb->input['uid']}'");
|
while($ip = $db->fetch_array($query)) {
|
while($ip = $db->fetch_array($query)) {
|
if(!$done_ip[$ip['ipaddress']]) { $popup = new PopupMenu("post_{$ip['pid']}", $lang->options); $popup->add_item($lang->show_users_regged_with_ip, "index.php?module=user/users&results=1&action=search&conditions=".urlencode(serialize(array("regip" => $ip['ipaddress'])))); $popup->add_item($lang->show_users_posted_with_ip, "index.php?module=user/users&results=1&action=search&conditions=".urlencode(serialize(array("postip" => $ip['ipaddress'])))); $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(); $done_ip[$ip['ipaddres']] = 1; }
| ++$counter; $popup = new PopupMenu("id_{$counter}", $lang->options); $popup->add_item($lang->show_users_regged_with_ip, "index.php?module=user/users&results=1&action=search&conditions=".urlencode(serialize(array("regip" => $ip['ipaddress'])))); $popup->add_item($lang->show_users_posted_with_ip, "index.php?module=user/users&results=1&action=search&conditions=".urlencode(serialize(array("postip" => $ip['ipaddress'])))); $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->output($lang->ip_address_for." {$user['username']}");
| } $table->output($lang->ip_address_for." {$user['username']}");
|
Zeile 1471 | Zeile 1497 |
---|
$db->update_query("reputation", array('adduid' => $destination_user['uid']), "adduid='{$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("reputation", array('adduid' => $destination_user['uid']), "adduid='{$source_user['uid']}'"); $db->update_query("threadratings", $uid_update, "uid='{$source_user['uid']}'"); $db->update_query("threads", $uid_update, "uid='{$source_user['uid']}'");
|
| $db->delete_query("sessions", "uid='{$source_user['uid']}'");
|
// Additional updates for non-uid fields $last_poster = array(
| // Additional updates for non-uid fields $last_poster = array(
|
Zeile 1523 | Zeile 1550 |
---|
$page->output_header($lang->merge_users); $page->output_nav_tabs($sub_tabs, 'merge_users');
|
$page->output_header($lang->merge_users); $page->output_nav_tabs($sub_tabs, 'merge_users');
|
// If we have any error messages, show them if($errors) {
| // If we have any error messages, show them if($errors) {
|
$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 1548 | Zeile 1575 |
---|
</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") {
| if($mybb->input['action'] == "search") {
|
Zeile 1562 | Zeile 1589 |
---|
{ // Build view options from incoming search options if($mybb->input['vid'])
|
{ // Build view options from incoming search options if($mybb->input['vid'])
|
{
| {
|
$query = $db->simple_select("adminviews", "*", "vid='".intval($mybb->input['vid'])."'"); $admin_view = $db->fetch_array($query); // View does not exist or this view is private and does not belong to the current user
| $query = $db->simple_select("adminviews", "*", "vid='".intval($mybb->input['vid'])."'"); $admin_view = $db->fetch_array($query); // View does not exist or this view is private and does not belong to the current user
|
Zeile 1571 | Zeile 1598 |
---|
unset($admin_view); } }
|
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']);
|
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']);
|
} else {
| } else {
|
// Don't have a view? Fetch the default if(!$admin_view['vid']) { $default_view = fetch_default_view("user");
|
// Don't have a view? Fetch the default if(!$admin_view['vid']) { $default_view = fetch_default_view("user");
|
| if(!$default_view) { $default_view = "0"; }
|
$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); }
|
Zeile 1633 | Zeile 1664 |
---|
} else {
|
} else {
|
$errors[] = $lang->error_no_users_found;
| if($mybb->input['from'] == "home") { flash_message($lang->error_no_users_found, 'error'); admin_redirect("index.php"); exit; } else { $errors[] = $lang->error_no_users_found; }
|
} }
| } }
|
Zeile 1680 | Zeile 1720 |
---|
$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'); if($mybb->input['search_id'] && $admin_session['data']['user_views'][$mybb->input['search_id']])
|
$page->output_nav_tabs($sub_tabs, 'browse_users'); 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 1699 | Zeile 1739 |
---|
if(!$admin_view['vid'] || ($admin_view['visibility'] == 1 && $admin_view['uid'] != $mybb->user['uid'])) { unset($admin_view);
|
if(!$admin_view['vid'] || ($admin_view['visibility'] == 1 && $admin_view['uid'] != $mybb->user['uid'])) { unset($admin_view);
|
}
| }
|
}
// Don't have a view? Fetch the default if(!$admin_view) { $default_view = fetch_default_view("user");
|
}
// Don't have a view? Fetch the default if(!$admin_view) { $default_view = fetch_default_view("user");
|
| if(!$default_view) { $default_view = "0"; }
|
$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); }
|
Zeile 1731 | Zeile 1775 |
---|
if(!$results) {
|
if(!$results) {
|
| // If we came from the home page and clicked on the "Activate Users" link, send them back to here if($admin_session['data']['from'] == "home") { flash_message($admin_session['data']['flash_message2']['message'], $admin_session['data']['flash_message2']['type']); update_admin_session('flash_message2', ''); update_admin_session('from', ''); admin_redirect("index.php"); exit; } else {
|
$errors[] = $lang->error_no_users_found;
|
$errors[] = $lang->error_no_users_found;
|
| }
|
}
// If we have any error messages, show them
| }
// If we have any error messages, show them
|
Zeile 1884 | Zeile 1940 |
---|
{ if($view['conditions'][$search_field]) {
|
{ if($view['conditions'][$search_field]) {
|
$view['conditions'][$search_field] = str_replace("*", "%", $view['conditions'][$search_field]);
| |
// IPv6 IP if(strpos($view['conditions'][$search_field], ":") !== false) {
|
// IPv6 IP if(strpos($view['conditions'][$search_field], ":") !== false) {
|
| $view['conditions'][$search_field] = str_replace("*", "%", $view['conditions'][$search_field]);
|
$ip_sql = "{$search_field} LIKE '".$db->escape_string($view['conditions'][$search_field])."'"; } else { $ip_range = fetch_longipv4_range($view['conditions'][$search_field]);
|
$ip_sql = "{$search_field} LIKE '".$db->escape_string($view['conditions'][$search_field])."'"; } else { $ip_range = fetch_longipv4_range($view['conditions'][$search_field]);
|
| $view['conditions'][$search_field] = str_replace("*", "%", $view['conditions'][$search_field]);
|
if(!is_array($ip_range)) { $ip_sql = "long{$search_field}='{$ip_range}'";
| if(!is_array($ip_range)) { $ip_sql = "long{$search_field}='{$ip_range}'";
|
Zeile 1905 | Zeile 1961 |
---|
} $search_sql .= " AND {$ip_sql}"; }
|
} $search_sql .= " AND {$ip_sql}"; }
|
| }
// Post IP searching if($view['conditions']['postip']) { // IPv6 IP if(strpos($view['conditions']['postip'], ":") !== false) { $view['conditions']['postip'] = str_replace("*", "%", $view['conditions']['postip']); $ip_sql = "ipaddress LIKE '".$db->escape_string($view['conditions']['postip'])."'"; } else { $ip_range = fetch_longipv4_range($view['conditions']['postip']); $view['conditions']['postip'] = str_replace("*", "%", $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]}'"; } } $search_sql .= " AND EXISTS (SELECT uid FROM ".TABLE_PREFIX."posts WHERE {$ip_sql} AND uid=u.uid)";
|
}
// Usergroup based searching
| }
// Usergroup based searching
|
Zeile 1923 | Zeile 2004 |
---|
case "sqlite3": case "sqlite2": $additional_sql .= " OR ','||additionalgroups||',' LIKE '%,{$usergroup},%'";
|
case "sqlite3": case "sqlite2": $additional_sql .= " OR ','||additionalgroups||',' LIKE '%,{$usergroup},%'";
|
| break;
|
default: $additional_sql .= "OR CONCAT(',',additionalgroups,',') LIKE '%,{$usergroup},%'"; } } $search_sql .= " AND (u.usergroup IN (".implode(",", $view['conditions']['usergroup']).") {$additional_sql})";
|
default: $additional_sql .= "OR CONCAT(',',additionalgroups,',') LIKE '%,{$usergroup},%'"; } } $search_sql .= " AND (u.usergroup IN (".implode(",", $view['conditions']['usergroup']).") {$additional_sql})";
|
}
| }
|
// COPPA users only? if($view['conditions']['coppa'])
|
// COPPA users only? if($view['conditions']['coppa'])
|
{
| {
|
$search_sql .= " AND u.coppauser=1 AND u.usergroup=5"; }
| $search_sql .= " AND u.coppauser=1 AND u.usergroup=5"; }
|
Zeile 1940 | Zeile 2022 |
---|
if($view['extra_sql']) { $search_sql .= $view['extra_sql'];
|
if($view['extra_sql']) { $search_sql .= $view['extra_sql'];
|
}
| }
|
// Lets fetch out how many results we have $query = $db->query("
| // Lets fetch out how many results we have $query = $db->query("
|
Zeile 1974 | Zeile 2056 |
---|
{ $start = 0; $mybb->input['page'] = 1;
|
{ $start = 0; $mybb->input['page'] = 1;
|
| } $from_bit = ""; if($mybb->input['from'] == "home") { $from_bit = "&from=home";
|
} switch($view['sortby'])
| } switch($view['sortby'])
|
Zeile 2032 | Zeile 2120 |
---|
{ if($user['coppauser']) {
|
{ if($user['coppauser']) {
|
$popup->add_item($lang->approve_coppa_user, "index.php?module=user/users&action=activate_user&uid={$user['uid']}");
| $popup->add_item($lang->approve_coppa_user, "index.php?module=user/users&action=activate_user&uid={$user['uid']}{$from_bit}");
|
} else {
|
} else {
|
$popup->add_item($lang->approve_user, "index.php?module=user/users&action=activate_user&uid={$user['uid']}");
| $popup->add_item($lang->approve_user, "index.php?module=user/users&action=activate_user&uid={$user['uid']}{$from_bit}");
|
} }
| } }
|