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

  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 4657 2009-12-24 20:31:25Z RyanGordon $

 */

// 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 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 1367Zeile 1368
	
$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 1383
	);

$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 1391
	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 1518Zeile 1519
					"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 1642
	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'])."'");
$admin_view = $db->fetch_array($query);

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

			// 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 1703Zeile 1704
		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);


		}

$results = build_users_view($admin_view);


		if($results)
{
$page->output_header($lang->find_users);

		if($results)
{
$page->output_header($lang->find_users);

Zeile 1714Zeile 1715
			$page->output_nav_tabs($sub_tabs, 'find_users');
echo $results;
$page->output_footer();

			$page->output_nav_tabs($sub_tabs, 'find_users');
echo $results;
$page->output_footer();

		}

		}

		else
{
if($mybb->input['from'] == "home")

		else
{
if($mybb->input['from'] == "home")

			{

			{

				flash_message($lang->error_no_users_found, 'error');
admin_redirect("index.php");
exit;

				flash_message($lang->error_no_users_found, 'error');
admin_redirect("index.php");
exit;

			}

			}

			else
{
$errors[] = $lang->error_no_users_found;

			else
{
$errors[] = $lang->error_no_users_found;

Zeile 1734Zeile 1735
	$page->output_header($lang->find_users);

$page->output_nav_tabs($sub_tabs, 'find_users');

	$page->output_header($lang->find_users);

$page->output_nav_tabs($sub_tabs, 'find_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);
}


Zeile 1745Zeile 1746
	{
$mybb->input['displayas'] = "card";
}

	{
$mybb->input['displayas'] = "card";
}





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

user_search_conditions($mybb->input, $form);

	$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);
$sort_directions = array(
"asc" => $lang->ascending,

	$form_container = new FormContainer($lang->display_options);
$sort_directions = array(
"asc" => $lang->ascending,

Zeile 1768Zeile 1769
}

if(!$mybb->input['action'])

}

if(!$mybb->input['action'])

{

{

	$plugins->run_hooks("admin_user_users_start");

$page->output_header($lang->browse_users);

	$plugins->run_hooks("admin_user_users_start");

$page->output_header($lang->browse_users);

Zeile 1830Zeile 1831
	{
// 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")

	{
// 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', '');

			flash_message($admin_session['data']['flash_message2']['message'], $admin_session['data']['flash_message2']['type']);
update_admin_session('flash_message2', '');
update_admin_session('from', '');

Zeile 1891Zeile 1892
	if($view['vid'])
{
$view['url'] .= "&amp;vid={$view['vid']}";

	if($view['vid'])
{
$view['url'] .= "&amp;vid={$view['vid']}";

	}

	}

	else
{
// If this is a custom view we need to save everything ready to pass it on from page to page

	else
{
// If this is a custom view we need to save everything ready to pass it on from page to page

Zeile 1904Zeile 1905
			$_REQUEST['search_id'] = $search_id;
}
$view['url'] .= "&amp;search_id=".htmlspecialchars($_REQUEST['search_id']);

			$_REQUEST['search_id'] = $search_id;
}
$view['url'] .= "&amp;search_id=".htmlspecialchars($_REQUEST['search_id']);

	}

	}

	
if($mybb->input['username'])

	
if($mybb->input['username'])

	{

	{

		$view['url'] .= "&amp;username=".urlencode(htmlspecialchars_uni($mybb->input['username']));
}

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

		$view['url'] .= "&amp;username=".urlencode(htmlspecialchars_uni($mybb->input['username']));
}

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

	
// Do we not have any views?
if(empty($view))

	{
return false;
}

$table = new Table;

	{
return false;
}

$table = new Table;


// Build header for table based view
if($view['view_type'] != "card")


// Build header for table based view
if($view['view_type'] != "card")

Zeile 2075Zeile 2076
			}
}
$search_sql .= " AND (u.usergroup IN (".implode(",", $view['conditions']['usergroup']).") {$additional_sql})";

			}
}
$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'])
{

Zeile 2131Zeile 2132
		
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";