Vergleich admin/modules/user/users.php - 1.4.10 - 1.4.15

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 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 4555 2009-11-29 00:29:29Z RyanGordon $

 * $Id: users.php 5379 2011-02-21 11:06:42Z Tomm $

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 159Zeile 159
	// We've selected a new avatar for this user!
if($mybb->input['avatar'])
{

	// We've selected a new avatar for this user!
if($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']);
$updated_avatar = array(
"avatar" => $db->escape_string($mybb->settings['avatardir']."/".$mybb->input['avatar']),
"avatardimensions" => "{$dimensions[0]}|{$dimensions[1]}",

		if(file_exists("../".$mybb->settings['avatardir']."/".$mybb->input['avatar']))
{
$dimensions = @getimagesize("../".$mybb->settings['avatardir']."/".$mybb->input['avatar']);
$updated_avatar = array(
"avatar" => $db->escape_string($mybb->settings['avatardir']."/".$mybb->input['avatar']),
"avatardimensions" => "{$dimensions[0]}|{$dimensions[1]}",



 
				"avatartype" => "gallery"
);


				"avatartype" => "gallery"
);


Zeile 432Zeile 433
		// Determine the usergroup stuff
if(is_array($mybb->input['additionalgroups']))
{

		// Determine the usergroup stuff
if(is_array($mybb->input['additionalgroups']))
{

			foreach($mybb->input['additionalgroups'] as $gid)

			foreach($mybb->input['additionalgroups'] as $key => $gid)

			{
if($gid == $mybb->input['usergroup'])
{

			{
if($gid == $mybb->input['usergroup'])
{

					unset($mybb->input['additionalgroups'][$gid]);

					unset($mybb->input['additionalgroups'][$key]);

				}
}
$additionalgroups = implode(",", $mybb->input['additionalgroups']);

				}
}
$additionalgroups = implode(",", $mybb->input['additionalgroups']);

Zeile 568Zeile 569
		// Determine the usergroup stuff
if(is_array($mybb->input['additionalgroups']))
{

		// Determine the usergroup stuff
if(is_array($mybb->input['additionalgroups']))
{

			foreach($mybb->input['additionalgroups'] as $gid)

			foreach($mybb->input['additionalgroups'] as $key => $gid)

			{
if($gid == $mybb->input['usergroup'])
{

			{
if($gid == $mybb->input['usergroup'])
{

					unset($mybb->input['additionalgroups'][$gid]);

					unset($mybb->input['additionalgroups'][$key]);

				}
}
$additionalgroups = implode(",", $mybb->input['additionalgroups']);

				}
}
$additionalgroups = implode(",", $mybb->input['additionalgroups']);

Zeile 714Zeile 715
				}
else
{

				}
else
{

					$tmp_name = "../".$mybb->settings['avataruploadpath']."/remote_".md5(uniqid(rand(), true));

					$tmp_name = "../".$mybb->settings['avataruploadpath']."/remote_".md5(random_str());

					$fp = @fopen($tmp_name, "wb");
if(!$fp)
{

					$fp = @fopen($tmp_name, "wb");
if(!$fp)
{

Zeile 1147Zeile 1148
		"<label for=\"language\">{$lang->board_language}:</label><br />".$form->generate_select_box("language", $languages, $mybb->input['language'], array('id' => 'language'))
);
$form_container->output_row($lang->other_options, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $other_options)."</div>");

		"<label for=\"language\">{$lang->board_language}:</label><br />".$form->generate_select_box("language", $languages, $mybb->input['language'], array('id' => 'language'))
);
$form_container->output_row($lang->other_options, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $other_options)."</div>");


$form_container->end();
echo "</div>\n";



$form_container->end();
echo "</div>\n";


	//
// SIGNATURE EDITOR
//

	//
// SIGNATURE EDITOR
//

Zeile 1212Zeile 1213
	{
$current_avatar_msg = "<br /><strong>{$lang->user_current_using_remote_avatar}</strong>";
$avatar_url = $user['avatar'];

	{
$current_avatar_msg = "<br /><strong>{$lang->user_current_using_remote_avatar}</strong>";
$avatar_url = $user['avatar'];

	}

	}


if($errors)
{


if($errors)
{

Zeile 1220Zeile 1221
	}

if($mybb->settings['maxavatardims'] != "")

	}

if($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}";

		list($max_width, $max_height) = explode("x", my_strtolower($mybb->settings['maxavatardims']));
$max_size = "<br />{$lang->max_dimensions_are} {$max_width}x{$max_height}";

	}


	}


	if($mybb->settings['avatarsize'])
{
$maximum_size = get_friendly_size($mybb->settings['avatarsize']*1024);

	if($mybb->settings['avatarsize'])
{
$maximum_size = get_friendly_size($mybb->settings['avatarsize']*1024);

Zeile 1243Zeile 1244

// Custom avatar
if($mybb->settings['avatarresizing'] == "auto")


// Custom avatar
if($mybb->settings['avatarresizing'] == "auto")

	{

	{

		$auto_resize = $lang->avatar_auto_resize;
}
else if($mybb->settings['avatarresizing'] == "user")

		$auto_resize = $lang->avatar_auto_resize;
}
else if($mybb->settings['avatarresizing'] == "user")

Zeile 1312Zeile 1313
		$db->delete_query("users", "uid='{$user['uid']}'");
$db->delete_query("joinrequests", "uid='{$user['uid']}'");
$db->delete_query("warnings", "uid='{$user['uid']}'");

		$db->delete_query("users", "uid='{$user['uid']}'");
$db->delete_query("joinrequests", "uid='{$user['uid']}'");
$db->delete_query("warnings", "uid='{$user['uid']}'");

 
		$db->delete_query("reputation", "uid='{$user['uid']}' OR adduid='{$user['uid']}'");


// Update forum stats
update_stats(array('numusers' => '-1'));


// Update forum stats
update_stats(array('numusers' => '-1'));

Zeile 1367Zeile 1369
	
$page->output_footer();
}

	
$page->output_footer();
}





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);


Zeile 1382Zeile 1384
	);

$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);


	$query = $db->simple_select("users", "uid, regip, username, lastip", "uid='{$mybb->input['uid']}'", array('limit' => 1));
$user = $db->fetch_array($query);


Zeile 1390Zeile 1392
	log_admin_action($user['uid'], $user['username']);

$table = new Table;

	log_admin_action($user['uid'], $user['username']);

$table = new Table;

	

	

	$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;

	$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;

		$controls = '';

		$controls = '';

	}
else
{

	}
else
{

Zeile 1496Zeile 1498
			$db->update_query("events", $uid_update, "uid='{$source_user['uid']}'");
$db->update_query("threadsubscriptions", $uid_update, "uid='{$source_user['uid']}'");
$db->update_query("forumsubscriptions", $uid_update, "uid='{$source_user['uid']}'");

			$db->update_query("events", $uid_update, "uid='{$source_user['uid']}'");
$db->update_query("threadsubscriptions", $uid_update, "uid='{$source_user['uid']}'");
$db->update_query("forumsubscriptions", $uid_update, "uid='{$source_user['uid']}'");

 
			$db->update_query("joinrequests", $uid_update, "uid='{$source_user['uid']}'");

			$db->update_query("moderatorlog", $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("moderatorlog", $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']}'");

Zeile 1518Zeile 1521
					"rid" => $result['rid'],
"uid" => $result['uid']
);

					"rid" => $result['rid'],
"uid" => $result['uid']
);

			}

			}

			
// Calculate new reputation
$query = $db->simple_select("reputation", "SUM(reputation) as total_rep", "uid='{$destination_user['uid']}'");

			
// Calculate new reputation
$query = $db->simple_select("reputation", "SUM(reputation) as total_rep", "uid='{$destination_user['uid']}'");

Zeile 1641Zeile 1644
	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

		if($mybb->input['vid'])
{
$query = $db->simple_select("adminviews", "*", "vid='".intval($mybb->input['vid'])."'");

		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
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']))

Zeile 1898Zeile 1901
		global $admin_session;
if(!$_REQUEST['search_id'])
{

		global $admin_session;
if(!$_REQUEST['search_id'])
{

			$search_id = md5(uniqid(rand(), true));

			$search_id = md5(random_str());

			$admin_session['data']['user_views'][$search_id] = $view;
update_admin_session('user_views', $admin_session['data']['user_views']);
$_REQUEST['search_id'] = $search_id;

			$admin_session['data']['user_views'][$search_id] = $view;
update_admin_session('user_views', $admin_session['data']['user_views']);
$_REQUEST['search_id'] = $search_id;

Zeile 2131Zeile 2134
		
switch($view['sortby'])
{

		
switch($view['sortby'])
{

			case "numposts":
$view['sortby'] = "postnum";
break;

 
			case "regdate":
case "lastactive":
case "postnum":
case "reputation":

			case "regdate":
case "lastactive":
case "postnum":
case "reputation":

 
				$view['sortby'] = $db->escape_string($view['sortby']);
break;
case "numposts":
$view['sortby'] = "postnum";
break;

			case "warninglevel":

			case "warninglevel":

 
				$view['sortby'] = "warningpoints";

				break;
default:
$view['sortby'] = "username";

				break;
default:
$view['sortby'] = "username";