Vergleich admin/modules/user/users.php - 1.4.7 - 1.4.9

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 1Zeile 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 924Zeile 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 1500Zeile 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 1524Zeile 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 1552Zeile 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&amp;action=merge", "post");

$form_container = new FormContainer($lang->merge_users);

	$form = new Form("index.php?module=user/users&amp;action=merge", "post");

$form_container = new FormContainer($lang->merge_users);

Zeile 1587Zeile 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 1598Zeile 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 1610Zeile 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 1644Zeile 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 1664Zeile 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 1687Zeile 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 1708Zeile 1721
	}

$form = new Form("index.php?module=user/users&amp;action=search", "post");

	}

$form = new Form("index.php?module=user/users&amp;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 1731Zeile 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 1807Zeile 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 1874Zeile 1888
	if(!isset($admin_session['data']['last_users_view']) || $admin_session['data']['last_users_view'] != str_replace("&amp;", "&", $view['url']))
{
update_admin_session('last_users_url', str_replace("&amp;", "&", $view['url']));

	if(!isset($admin_session['data']['last_users_view']) || $admin_session['data']['last_users_view'] != str_replace("&amp;", "&", $view['url']))
{
update_admin_session('last_users_url', str_replace("&amp;", "&", $view['url']));

 
	}

// Do we not have any views?
if(empty($view))
{
return false;

	}

$table = new Table;

	}

$table = new Table;