Vergleich admin/modules/user/users.php - 1.4.1 - 1.4.4

  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 4111 2008-08-13 06:14:12Z 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 165Zeile 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 175Zeile 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 199Zeile 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 222Zeile 228
				else
{
$breadcrumb .= " &raquo; {$gallery_name}";

				else
{
$breadcrumb .= " &raquo; {$gallery_name}";

				}
}

				}
}

		}
else
{

		}
else
{

Zeile 374Zeile 380
	// 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($admin_session['data']['last_users_url'])

















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

	{
$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&amp;action=edit&amp;uid={$user['uid']}";

		$url = "index.php?module=user/users&action=edit&uid={$user['uid']}";

	}

	}

 
	

	admin_redirect($url);
}


	admin_redirect($url);
}


Zeile 569Zeile 597
			"displaygroup" => $mybb->input['displaygroup'],
"postnum" => $mybb->input['postnum'],
"usertitle" => $mybb->input['usertitle'],

			"displaygroup" => $mybb->input['displaygroup'],
"postnum" => $mybb->input['postnum'],
"usertitle" => $mybb->input['usertitle'],

			"timezone" => $mybb->input['timezoneoffset'],

			"timezone" => $mybb->input['timezone'],

			"language" => $mybb->input['language'],
"profile_fields" => $mybb->input['profile_fields'],
"profile_fields_editable" => true,

			"language" => $mybb->input['language'],
"profile_fields" => $mybb->input['profile_fields'],
"profile_fields_editable" => true,

Zeile 597Zeile 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 652Zeile 674
					"avatardimensions" => "",
"avatartype" => ""
);

					"avatardimensions" => "",
"avatartype" => ""
);

				remove_avatars($mybb->user['uid']);

				remove_avatars($user['uid']);

			}



			}



Zeile 716Zeile 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 932Zeile 954
	{
$age = get_age($user['birthday']);
}

	{
$age = get_age($user['birthday']);
}

 


	else
{
$age = '';

	else
{
$age = '';

Zeile 1109Zeile 1132
		"<label for=\"threadmode\">{$lang->default_thread_view_mode}:</label><br />".$form->generate_select_box("threadmode", array("" => $lang->use_default, "linear" => $lang->linear_mode, "threaded" => $lang->threaded_mode), $mybb->input['threadmode'], array('id' => 'threadmode'))
);
$form_container->output_row($lang->thread_view_options, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $thread_options)."</div>");

		"<label for=\"threadmode\">{$lang->default_thread_view_mode}:</label><br />".$form->generate_select_box("threadmode", array("" => $lang->use_default, "linear" => $lang->linear_mode, "threaded" => $lang->threaded_mode), $mybb->input['threadmode'], array('id' => 'threadmode'))
);
$form_container->output_row($lang->thread_view_options, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $thread_options)."</div>");

 

$languages = array_merge(array('' => $lang->use_default), $lang->get_languages());


$other_options = array(
$form->generate_check_box("showredirect", 1, $lang->show_redirect, array("checked" => $mybb->input['showredirect'])),
$form->generate_check_box("showcodebuttons", "1", $lang->show_code_buttons, array("checked" => $mybb->input['showcodebuttons'])),
"<label for=\"style\">{$lang->theme}:</label><br />".build_theme_select("style", $mybb->input['style'], 0, "", 1),


$other_options = array(
$form->generate_check_box("showredirect", 1, $lang->show_redirect, array("checked" => $mybb->input['showredirect'])),
$form->generate_check_box("showcodebuttons", "1", $lang->show_code_buttons, array("checked" => $mybb->input['showcodebuttons'])),
"<label for=\"style\">{$lang->theme}:</label><br />".build_theme_select("style", $mybb->input['style'], 0, "", 1),

		"<label for=\"language\">{$lang->board_language}:</label><br />".$form->generate_select_box("language", $lang->get_languages(), $mybb->input['language'], array('id' => 'language'))

		"<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->output_row($lang->other_options, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $other_options)."</div>");


Zeile 1125Zeile 1150
	// SIGNATURE EDITOR
//
$signature_editor = $form->generate_text_area("signature", $mybb->input['signature'], array('id' => 'signature', 'rows' => 15, 'cols' => '70', 'style' => 'width: 95%'));

	// SIGNATURE EDITOR
//
$signature_editor = $form->generate_text_area("signature", $mybb->input['signature'], array('id' => 'signature', 'rows' => 15, 'cols' => '70', 'style' => 'width: 95%'));

	$sig_smilies = "off";

	$sig_smilies = $lang->off;

	if($mybb->settings['sigsmilies'] == 1)
{

	if($mybb->settings['sigsmilies'] == 1)
{

		$sig_smilies = "on";

		$sig_smilies = $lang->on;

	}

	}

	$sig_mycode = "off";

	$sig_mycode = $lang->off;

	if($mybb->settings['sigmycode'] == 1)
{

	if($mybb->settings['sigmycode'] == 1)
{

		$sig_mycode = "on";

		$sig_mycode = $lang->on;

		$signature_editor .= build_mycode_inserter("signature");

		$signature_editor .= build_mycode_inserter("signature");

	}
$sig_html = "off";

	}
$sig_html = $lang->off;

	if($mybb->settings['sightml'] == 1)

	if($mybb->settings['sightml'] == 1)

	{
$sig_html = "on";

	{
$sig_html = $lang->on;

	}

	}

	$sig_imcode = "on";

	$sig_imgcode = $lang->off;

	if($mybb->settings['sigimgcode'] == 1)
{

	if($mybb->settings['sigimgcode'] == 1)
{

		$sig_imgcode = "off";

		$sig_imgcode = $lang->on;

	}
echo "<div id=\"tab_signature\">\n";
$form_container = new FormContainer("{$lang->signature}: {$user['username']}");
$form_container->output_row($lang->signature, $lang->sprintf($lang->signature_desc, $sig_mycode, $sig_smilies, $sig_imgcode, $sig_html), $signature_editor, 'signature');

	}
echo "<div id=\"tab_signature\">\n";
$form_container = new FormContainer("{$lang->signature}: {$user['username']}");
$form_container->output_row($lang->signature, $lang->sprintf($lang->signature_desc, $sig_mycode, $sig_smilies, $sig_imgcode, $sig_html), $signature_editor, 'signature');





	$signature_options = array(
$form->generate_radio_button("update_posts", "enable", $lang->enable_sig_in_all_posts, array("checked" => 0)),
$form->generate_radio_button("update_posts", "disable", $lang->disable_sig_in_all_posts, array("checked" => 0)),

	$signature_options = array(
$form->generate_radio_button("update_posts", "enable", $lang->enable_sig_in_all_posts, array("checked" => 0)),
$form->generate_radio_button("update_posts", "disable", $lang->disable_sig_in_all_posts, array("checked" => 0)),

Zeile 1157Zeile 1182
	);

$form_container->output_row($lang->singature_preferences, "", implode("<br />", $signature_options));

	);

$form_container->output_row($lang->singature_preferences, "", implode("<br />", $signature_options));





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

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


//


//

	// AVATAR MANAGER
//
echo "<div id=\"tab_avatar\">\n";
$table = new Table;
$table->construct_header($lang->current_avatar, array('colspan' => 2));

	// AVATAR MANAGER
//
echo "<div id=\"tab_avatar\">\n";
$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));

if($user['avatartype'] == "upload" || stristr($user['avatar'], $mybb->settings['avataruploadpath']))

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

if($user['avatartype'] == "upload" || stristr($user['avatar'], $mybb->settings['avataruploadpath']))

Zeile 1175Zeile 1200
		$current_avatar_msg = "<br /><strong>{$lang->user_current_using_uploaded_avatar}</strong>";
}
else if($user['avatartype'] == "gallery" || stristr($user['avatar'], $mybb->settings['avatardir']))

		$current_avatar_msg = "<br /><strong>{$lang->user_current_using_uploaded_avatar}</strong>";
}
else if($user['avatartype'] == "gallery" || stristr($user['avatar'], $mybb->settings['avatardir']))

	{

	{

		$current_avatar_msg = "<br /><strong>{$lang->user_current_using_gallery_avatar}</strong>";
}
elseif($user['avatartype'] == "remote" || my_strpos(my_strtolower($user['avatar']), "http://") !== false)
{
$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_gallery_avatar}</strong>";
}
elseif($user['avatartype'] == "remote" || my_strpos(my_strtolower($user['avatar']), "http://") !== false)
{
$current_avatar_msg = "<br /><strong>{$lang->user_current_using_remote_avatar}</strong>";
$avatar_url = $user['avatar'];

	}

	}


if($errors)
{
$avatar_url = $mybb->input['avatar_url'];


if($errors)
{
$avatar_url = $mybb->input['avatar_url'];

	}

	}


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}";

	}

	}


if($mybb->settings['avatarsize'])


if($mybb->settings['avatarsize'])

	{

	{

		$maximum_size = get_friendly_size($mybb->settings['avatarsize']*1024);
$max_size .= "<br />{$lang->avatar_max_size} {$maximum_size}";
}

		$maximum_size = get_friendly_size($mybb->settings['avatarsize']*1024);
$max_size .= "<br />{$lang->avatar_max_size} {$maximum_size}";
}

Zeile 1204Zeile 1229
	if($user['avatar'])
{
$remove_avatar = "<br /><br />".$form->generate_check_box("remove_avatar", 1, "<strong>{$lang->remove_avatar}</strong>");

	if($user['avatar'])
{
$remove_avatar = "<br /><br />".$form->generate_check_box("remove_avatar", 1, "<strong>{$lang->remove_avatar}</strong>");

	}


	}


	$table->construct_cell($lang->avatar_desc."{$remove_avatar}<br /><small>{$max_size}</small>");
$table->construct_row();


	$table->construct_cell($lang->avatar_desc."{$remove_avatar}<br /><small>{$max_size}</small>");
$table->construct_row();


Zeile 1270Zeile 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 1280Zeile 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'));

$plugins->run_hooks("admin_user_users_delete_commit");

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

$plugins->run_hooks("admin_user_users_delete_commit");





		// Log admin action
log_admin_action($user['uid'], $user['username']);

		// Log admin action
log_admin_action($user['uid'], $user['username']);






flash_message($lang->success_user_deleted, 'success');
admin_redirect("index.php?module=user/users");


flash_message($lang->success_user_deleted, 'success');
admin_redirect("index.php?module=user/users");

	}
else
{

	}
else
{

		$page->output_confirm_action("index.php?module=user/users&action=delete&uid={$user['uid']}", $lang->user_deletion_confirmation);
}
}

		$page->output_confirm_action("index.php?module=user/users&action=delete&uid={$user['uid']}", $lang->user_deletion_confirmation);
}
}

Zeile 1302Zeile 1327
if($mybb->input['action'] == "referrers")
{
$plugins->run_hooks("admin_user_users_referrers");

if($mybb->input['action'] == "referrers")
{
$plugins->run_hooks("admin_user_users_referrers");

	

	

	$page->add_breadcrumb_item($lang->show_referrers);
$page->output_header($lang->show_referrers);


	$page->add_breadcrumb_item($lang->show_referrers);
$page->output_header($lang->show_referrers);


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


Zeile 1344Zeile 1373
		'link' => "index.php?module=user/users&amp;action=ipaddresses&amp;uid={$mybb->input['uid']}",
'description' => $lang->show_ip_addresses_desc
);

		'link' => "index.php?module=user/users&amp;action=ipaddresses&amp;uid={$mybb->input['uid']}",
'description' => $lang->show_ip_addresses_desc
);

	

	

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

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

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

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

Zeile 1393Zeile 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&amp;results=1&amp;action=search&amp;conditions=".urlencode(serialize(array("regip" => $ip['ipaddress']))));
$popup->add_item($lang->show_users_posted_with_ip, "index.php?module=user/users&amp;results=1&amp;action=search&amp;conditions=".urlencode(serialize(array("postip" => $ip['ipaddress']))));
$popup->add_item($lang->ban_ip, "index.php?module=config/banning&amp;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&amp;results=1&amp;action=search&amp;conditions=".urlencode(serialize(array("regip" => $ip['ipaddress']))));
$popup->add_item($lang->show_users_posted_with_ip, "index.php?module=user/users&amp;results=1&amp;action=search&amp;conditions=".urlencode(serialize(array("postip" => $ip['ipaddress']))));
$popup->add_item($lang->ban_ip, "index.php?module=config/banning&amp;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']}");

$page->output_footer();

	$table->output($lang->ip_address_for." {$user['username']}");

$page->output_footer();

Zeile 1469Zeile 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 1521Zeile 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)
{
$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_container->output_row($lang->source_account." <em>*</em>", $lang->source_account_desc, $form->generate_text_box('source_username', $mybb->input['source_username'], array('id' => 'source_username')), 'source_username');
$form_container->output_row($lang->destination_account." <em>*</em>", $lang->destination_account_desc, $form->generate_text_box('destination_username', $mybb->input['destination_username'], array('id' => 'destination_username')), 'destination_username');
$form_container->end();

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

$form_container = new FormContainer($lang->merge_users);
$form_container->output_row($lang->source_account." <em>*</em>", $lang->source_account_desc, $form->generate_text_box('source_username', $mybb->input['source_username'], array('id' => 'source_username')), 'source_username');
$form_container->output_row($lang->destination_account." <em>*</em>", $lang->destination_account_desc, $form->generate_text_box('destination_username', $mybb->input['destination_username'], array('id' => 'destination_username')), 'destination_username');
$form_container->end();





	// Autocompletion for usernames
echo '
<script type="text/javascript" src="../jscripts/autocomplete.js?ver=140"></script>

	// Autocompletion for usernames
echo '
<script type="text/javascript" src="../jscripts/autocomplete.js?ver=140"></script>

Zeile 1544Zeile 1573
		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 1553Zeile 1582
}

if($mybb->input['action'] == "search")

}

if($mybb->input['action'] == "search")

{

{

	$plugins->run_hooks("admin_user_users_search");

if($mybb->request_method == "post" || $mybb->input['results'] == 1)

	$plugins->run_hooks("admin_user_users_search");

if($mybb->request_method == "post" || $mybb->input['results'] == 1)

Zeile 1581Zeile 1610
			if(!$admin_view['vid'])
{
$default_view = fetch_default_view("user");

			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 1592Zeile 1625
		if($mybb->input['type'])
{
$admin_view['view_type'] = $mybb->input['type'];

		if($mybb->input['type'])
{
$admin_view['view_type'] = $mybb->input['type'];

		}

		}

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

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

		{

		{

			$admin_view['conditions'] = $mybb->input['conditions'];
}

if($mybb->input['sortby'])
{
$admin_view['sortby'] = $mybb->input['sortby'];

			$admin_view['conditions'] = $mybb->input['conditions'];
}

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

		{

		{

			$admin_view['sortorder'] = $mybb->input['order'];
}


			$admin_view['sortorder'] = $mybb->input['order'];
}


Zeile 1628Zeile 1661
			$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
{

		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 1678Zeile 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');


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


	if($mybb->input['search_id'] && $admin_session['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']];
unset($admin_view['extra_sql']);
}

		$admin_view = $admin_session['data']['user_views'][$mybb->input['search_id']];
unset($admin_view['extra_sql']);
}

Zeile 1697Zeile 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 1729Zeile 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 1882Zeile 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 1903Zeile 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 1921Zeile 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 1938Zeile 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 1972Zeile 2056
		{
$start = 0;
$mybb->input['page'] = 1;

		{
$start = 0;
$mybb->input['page'] = 1;

 
		}

$from_bit = "";
if($mybb->input['from'] == "home")
{
$from_bit = "&amp;from=home";

		}

switch($view['sortby'])

		}

switch($view['sortby'])

Zeile 2030Zeile 2120
			{
if($user['coppauser'])
{

			{
if($user['coppauser'])
{

					$popup->add_item($lang->approve_coppa_user, "index.php?module=user/users&amp;action=activate_user&amp;uid={$user['uid']}");

					$popup->add_item($lang->approve_coppa_user, "index.php?module=user/users&amp;action=activate_user&amp;uid={$user['uid']}{$from_bit}");

				}
else
{

				}
else
{

					$popup->add_item($lang->approve_user, "index.php?module=user/users&amp;action=activate_user&amp;uid={$user['uid']}");

					$popup->add_item($lang->approve_user, "index.php?module=user/users&amp;action=activate_user&amp;uid={$user['uid']}{$from_bit}");

				}
}


				}
}