Zeile 1 | Zeile 1 |
---|
<?php /** * MyBB 1.4
|
<?php /** * MyBB 1.4
|
* Copyright � 2008 MyBB Group, All Rights Reserved
| * Copyright © 2008 MyBB Group, All Rights Reserved
|
* * 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 4337 2009-03-30 01:21:51Z Tikitiki $
| * $Id: users.php 4389 2009-06-26 04:29:32Z RyanGordon $
|
*/
// Disallow direct access to this file for security reasons
| */
// Disallow direct access to this file for security reasons
|
Zeile 924 | Zeile 924 |
---|
} else {
|
} else {
|
$percent_posts = round($memprofile['postnum']*100/$posts, 2);;
| $percent_posts = round($user['postnum']*100/$posts, 2);
|
}
$user_permissions = user_permissions($user['uid']);
| }
$user_permissions = user_permissions($user['uid']);
|
Zeile 960 | Zeile 960 |
---|
$age = ''; }
|
$age = ''; }
|
$table->construct_cell("<div style=\"width: 126px; height: 126px;\" class=\"user_avatar\"><img src=\"{$user['avatar']}\" style=\"margin-top: {$avatar_top}px\" width=\"{$scaled_dimensions['width']}\" height=\"{$scaled_dimensions['height']}\" alt=\"\" /></div>", array('rowspan' => 6, 'width' => 1));
| $table->construct_cell("<div style=\"width: 126px; height: 126px;\" class=\"user_avatar\"><img src=\"".htmlspecialchars_uni($user['avatar'])."\" style=\"margin-top: {$avatar_top}px\" width=\"{$scaled_dimensions['width']}\" height=\"{$scaled_dimensions['height']}\" alt=\"\" /></div>", array('rowspan' => 6, 'width' => 1));
|
$table->construct_cell("<strong>{$lang->email_address}:</strong> <a href=\"mailto:".htmlspecialchars_uni($user['email'])."\">".htmlspecialchars_uni($user['email'])."</a>"); $table->construct_cell("<strong>{$lang->last_active}:</strong> {$last_active}"); $table->construct_row();
| $table->construct_cell("<strong>{$lang->email_address}:</strong> <a href=\"mailto:".htmlspecialchars_uni($user['email'])."\">".htmlspecialchars_uni($user['email'])."</a>"); $table->construct_cell("<strong>{$lang->last_active}:</strong> {$last_active}"); $table->construct_row();
|
Zeile 1198 | Zeile 1198 |
---|
$table = new Table; $table->construct_header($lang->current_avatar, array('colspan' => 2));
|
$table = new Table; $table->construct_header($lang->current_avatar, array('colspan' => 2));
|
$table->construct_cell("<div style=\"width: 126px; height: 126px;\" class=\"user_avatar\"><img src=\"{$user['avatar']}\" width=\"{$scaled_dimensions['width']}\" style=\"margin-top: {$avatar_top}px\" height=\"{$scaled_dimensions['height']}\" alt=\"\" /></div>", array('width' => 1));
| $table->construct_cell("<div style=\"width: 126px; height: 126px;\" class=\"user_avatar\"><img src=\"".htmlspecialchars_uni($user['avatar'])."\" width=\"{$scaled_dimensions['width']}\" style=\"margin-top: {$avatar_top}px\" height=\"{$scaled_dimensions['height']}\" alt=\"\" /></div>", array('width' => 1));
|
if($user['avatartype'] == "upload" || stristr($user['avatar'], $mybb->settings['avataruploadpath'])) {
| if($user['avatartype'] == "upload" || stristr($user['avatar'], $mybb->settings['avataruploadpath'])) {
|
Zeile 1500 | Zeile 1500 |
---|
$db->update_query("pollvotes", $uid_update, "uid='{$source_user['uid']}'"); $db->update_query("posts", $uid_update, "uid='{$source_user['uid']}'"); $db->update_query("privatemessages", $uid_update, "uid='{$source_user['uid']}'");
|
$db->update_query("pollvotes", $uid_update, "uid='{$source_user['uid']}'"); $db->update_query("posts", $uid_update, "uid='{$source_user['uid']}'"); $db->update_query("privatemessages", $uid_update, "uid='{$source_user['uid']}'");
|
$db->update_query("reputation", $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']}'");
|
$db->update_query("threadratings", $uid_update, "uid='{$source_user['uid']}'"); $db->update_query("threads", $uid_update, "uid='{$source_user['uid']}'"); $db->delete_query("sessions", "uid='{$source_user['uid']}'");
|
$db->delete_query("reputation", "uid='{$destination_user['uid']}' AND adduid='{$destination_user['uid']}'");
| // Merging Reputation $query = $db->simple_select("reputation", "rid, uid", "adduid = '{$source_user['uid']}' OR adduid = '{$uid_update['uid']}'", array("order_by" => "dateline", "order_dir" => "DESC")); while($result = $db->fetch_array($query)) { // Let's try and remove old one if it's the same uid if($result['uid'] == $last['uid']) { $db->delete_query("reputation", "rid = '".$result['rid']."'"); $db->update_query("reputation", array("adduid" => $uid_update['uid']), "rid = '".$last['rid']."'"); } $last = array( "rid" => $result['rid'], "uid" => $result['uid'] ); }
|
// Calculate new reputation $query = $db->simple_select("reputation", "SUM(reputation) as total_rep", "uid='{$destination_user['uid']}'"); $total_reputation = $db->fetch_field($query, "total_rep"); $db->update_query("users", array('reputation' => $total_reputation), "uid='{$destination_user['uid']}'");
|
// Calculate new reputation $query = $db->simple_select("reputation", "SUM(reputation) as total_rep", "uid='{$destination_user['uid']}'"); $total_reputation = $db->fetch_field($query, "total_rep"); $db->update_query("users", array('reputation' => $total_reputation), "uid='{$destination_user['uid']}'");
|
|
|
// Additional updates for non-uid fields $last_poster = array( "lastposteruid" => $destination_user['uid'],
| // Additional updates for non-uid fields $last_poster = array( "lastposteruid" => $destination_user['uid'],
|
Zeile 1524 | Zeile 1537 |
---|
"edituid" => $destination_user['uid'] ); $db->update_query("posts", $edit_uid, "edituid='{$source_user['uid']}'");
|
"edituid" => $destination_user['uid'] ); $db->update_query("posts", $edit_uid, "edituid='{$source_user['uid']}'");
|
|
|
$from_uid = array( "fromid" => $destination_user['uid'] );
| $from_uid = array( "fromid" => $destination_user['uid'] );
|
Zeile 1552 | Zeile 1565 |
---|
// Log admin action log_admin_action($source_user['uid'], $source_user['username'], $destination_user['uid'], $destination_user['username']);
|
// Log admin action log_admin_action($source_user['uid'], $source_user['username'], $destination_user['uid'], $destination_user['username']);
|
|
|
// Redirect! flash_message("<strong>{$source_user['username']}</strong> {$lang->success_merged} {$destination_user['username']}", "success"); admin_redirect("index.php?module=user/users"); exit; }
|
// Redirect! flash_message("<strong>{$source_user['username']}</strong> {$lang->success_merged} {$destination_user['username']}", "success"); admin_redirect("index.php?module=user/users"); exit; }
|
}
| }
|
$page->add_breadcrumb_item($lang->merge_users); $page->output_header($lang->merge_users); $page->output_nav_tabs($sub_tabs, 'merge_users');
|
$page->add_breadcrumb_item($lang->merge_users); $page->output_header($lang->merge_users); $page->output_nav_tabs($sub_tabs, 'merge_users');
|
|
|
// If we have any error messages, show them if($errors) { $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_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 1587 | Zeile 1600 |
---|
new autoComplete("destination_username", "../xmlhttp.php?action=get_users", {valueSpan: "username"}); // --> </script>';
|
new autoComplete("destination_username", "../xmlhttp.php?action=get_users", {valueSpan: "username"}); // --> </script>';
|
|
|
$buttons[] = $form->generate_submit_button($lang->merge_user_accounts); $form->output_submit_wrapper($buttons); $form->end();
| $buttons[] = $form->generate_submit_button($lang->merge_user_accounts); $form->output_submit_wrapper($buttons); $form->end();
|
Zeile 1598 | Zeile 1611 |
---|
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 1610 | Zeile 1623 |
---|
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);
|
}
| }
|
}
if($mybb->input['search_id'] && $admin_session['data']['user_views'][$mybb->input['search_id']])
| }
if($mybb->input['search_id'] && $admin_session['data']['user_views'][$mybb->input['search_id']])
|
Zeile 1644 | Zeile 1657 |
---|
if($mybb->input['conditions']) { $admin_view['conditions'] = $mybb->input['conditions'];
|
if($mybb->input['conditions']) { $admin_view['conditions'] = $mybb->input['conditions'];
|
}
| }
|
if($mybb->input['sortby']) { $admin_view['sortby'] = $mybb->input['sortby'];
|
if($mybb->input['sortby']) { $admin_view['sortby'] = $mybb->input['sortby'];
|
}
| }
|
if($mybb->input['perpage']) { $admin_view['perpage'] = $mybb->input['perpage'];
|
if($mybb->input['perpage']) { $admin_view['perpage'] = $mybb->input['perpage'];
|
}
| }
|
if($mybb->input['order']) {
| if($mybb->input['order']) {
|
Zeile 1664 | Zeile 1677 |
---|
if($mybb->input['displayas']) { $admin_view['view_type'] = $mybb->input['displayas'];
|
if($mybb->input['displayas']) { $admin_view['view_type'] = $mybb->input['displayas'];
|
}
| }
|
$results = build_users_view($admin_view);
if($results)
| $results = build_users_view($admin_view);
if($results)
|
Zeile 1687 | Zeile 1700 |
---|
else { $errors[] = $lang->error_no_users_found;
|
else { $errors[] = $lang->error_no_users_found;
|
} } }
| } } }
|
$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);
|
Zeile 1708 | Zeile 1721 |
---|
}
$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);
$form_container = new FormContainer($lang->display_options);
| user_search_conditions($mybb->input, $form);
$form_container = new FormContainer($lang->display_options);
|
Zeile 1731 | Zeile 1744 |
---|
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_nav_tabs($sub_tabs, 'browse_users');
|
$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']]) { $admin_view = $admin_session['data']['user_views'][$mybb->input['search_id']];
| 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']];
|
Zeile 1807 | Zeile 1820 |
---|
// If we have any error messages, show them if($errors) {
|
// If we have any error messages, show them if($errors) {
|
| echo "<div style=\"display: inline; float: right;\">{$admin_view['popup']}</div><br />\n";
|
$page->output_inline_error($errors); }
| $page->output_inline_error($errors); }
|
Zeile 1874 | Zeile 1888 |
---|
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']));
|
| } // Do we not have any views? if(empty($view)) { return false;
|
}
$table = new Table;
| }
$table = new Table;
|
Zeile 2189 | Zeile 2209 |
---|
{ $user['avatar'] = "styles/{$page->style}/images/default_avatar.gif"; }
|
{ $user['avatar'] = "styles/{$page->style}/images/default_avatar.gif"; }
|
$user['view']['avatar'] = "<img src=\"{$user['avatar']}\" alt=\"\" width=\"{$scaled_avatar['width']}\" height=\"{$scaled_avatar['height']}\" />";
| $user['view']['avatar'] = "<img src=\"".htmlspecialchars_uni($user['avatar'])."\" alt=\"\" width=\"{$scaled_avatar['width']}\" height=\"{$scaled_avatar['height']}\" />";
|
if($view['view_type'] == "card") {
| if($view['view_type'] == "card") {
|