Vergleich admin/modules/user/users.php - 1.6.0 - 1.6.8

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: users.php 5161 2010-08-01 20:45:07Z RyanGordon $

 * $Id: users.php 5803 2012-04-20 08:35:26Z 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'])
{

 
	if(!verify_post_check($mybb->input['my_post_key']))
{
echo $lang->invalid_post_verify_key2;
exit;
}


		$mybb->input['avatar'] = str_replace(array("./", ".."), "", $mybb->input['avatar']);

if(file_exists("../".$mybb->settings['avatardir']."/".$mybb->input['avatar']))

		$mybb->input['avatar'] = str_replace(array("./", ".."), "", $mybb->input['avatar']);

if(file_exists("../".$mybb->settings['avatardir']."/".$mybb->input['avatar']))

Zeile 334Zeile 340
			$scaled_dimensions = scale_image($avatar['width'], $avatar['height'], 80, 80);
$top = ceil((80-$scaled_dimensions['height'])/2);
$left = ceil((80-$scaled_dimensions['width'])/2);

			$scaled_dimensions = scale_image($avatar['width'], $avatar['height'], 80, 80);
$top = ceil((80-$scaled_dimensions['height'])/2);
$left = ceil((80-$scaled_dimensions['width'])/2);

			echo "<li><a href=\"index.php?module=user-users&amp;action=avatar_gallery&amp;uid={$user['uid']}&amp;avatar={$avatar['path']}\"><span class=\"image\"><img src=\"{$mybb->settings['avatardir']}/{$avatar['path']}\" alt=\"\" style=\"margin-top: {$top}px;\" height=\"{$scaled_dimensions['height']}\" width=\"{$scaled_dimensions['width']}\" /></span><span class=\"title\">{$avatar['friendly_name']}</span></a></li>\n";

			echo "<li><a href=\"index.php?module=user-users&amp;action=avatar_gallery&amp;uid={$user['uid']}&amp;avatar={$avatar['path']}&amp;my_post_key={$mybb->post_code}\"><span class=\"image\"><img src=\"{$mybb->settings['avatardir']}/{$avatar['path']}\" alt=\"\" style=\"margin-top: {$top}px;\" height=\"{$scaled_dimensions['height']}\" width=\"{$scaled_dimensions['width']}\" /></span><span class=\"title\">{$avatar['friendly_name']}</span></a></li>\n";

		}
}
echo "</ul>\n";

		}
}
echo "</ul>\n";

Zeile 347Zeile 353
if($mybb->input['action'] == "activate_user")
{
$plugins->run_hooks("admin_user_users_coppa_activate");

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

	








if(!verify_post_check($mybb->input['my_post_key']))
{
flash_message($lang->invalid_post_verify_key2, 'error');
admin_redirect("index.php?module=user-users");
}


	$query = $db->simple_select("users", "*", "uid='".intval($mybb->input['uid'])."'");
$user = $db->fetch_array($query);


	$query = $db->simple_select("users", "*", "uid='".intval($mybb->input['uid'])."'");
$user = $db->fetch_array($query);


Zeile 368Zeile 380
		);
}
else

		);
}
else

	{

	{

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


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


Zeile 381Zeile 393
	$db->update_query("users", $updated_user, "uid='{$user['uid']}'");

$plugins->run_hooks("admin_user_users_coppa_activate_commit");

	$db->update_query("users", $updated_user, "uid='{$user['uid']}'");

$plugins->run_hooks("admin_user_users_coppa_activate_commit");





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

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

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

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

	{
if($user['coppauser'])

	{
if($user['coppauser'])

		{
$message = $lang->success_coppa_activated;
}

		{
$message = $lang->success_coppa_activated;
}

Zeile 397Zeile 409
		}

update_admin_session('flash_message2', array('message' => $message, 'type' => 'success'));

		}

update_admin_session('flash_message2', array('message' => $message, 'type' => 'success'));

	}
else
{

	}
else
{

		if($user['coppauser'])
{
flash_message($lang->success_coppa_activated, 'success');
}
else

		if($user['coppauser'])
{
flash_message($lang->success_coppa_activated, 'success');
}
else

		{

		{

			flash_message($lang->success_activated, 'success');
}
}

			flash_message($lang->success_activated, 'success');
}
}

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

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

	

	

	admin_redirect($url);
}

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

	admin_redirect($url);
}

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

	
if($mybb->request_method == "post")
{
// Determine the usergroup stuff
if(is_array($mybb->input['additionalgroups']))
{
foreach($mybb->input['additionalgroups'] as $key => $gid)

	
if($mybb->request_method == "post")
{
// Determine the usergroup stuff
if(is_array($mybb->input['additionalgroups']))
{
foreach($mybb->input['additionalgroups'] as $key => $gid)

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

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

Zeile 490Zeile 502

flash_message($lang->success_user_created, 'success');
admin_redirect("index.php?module=user-users&action=edit&uid={$user_info['uid']}");


flash_message($lang->success_user_created, 'success');
admin_redirect("index.php?module=user-users&action=edit&uid={$user_info['uid']}");

		}
}


		}
}


	// Fetch custom profile fields - only need required profile fields here
$query = $db->simple_select("profilefields", "*", "required=1", array('order_by' => 'disporder'));
while($profile_field = $db->fetch_array($query))

	// Fetch custom profile fields - only need required profile fields here
$query = $db->simple_select("profilefields", "*", "required=1", array('order_by' => 'disporder'));
while($profile_field = $db->fetch_array($query))

Zeile 603Zeile 615
			"postnum" => $mybb->input['postnum'],
"usertitle" => $mybb->input['usertitle'],
"timezone" => $mybb->input['timezone'],

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

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

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

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

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

Zeile 611Zeile 623
			"aim" => $mybb->input['aim'],
"yahoo" => $mybb->input['yahoo'],
"msn" => $mybb->input['msn'],

			"aim" => $mybb->input['aim'],
"yahoo" => $mybb->input['yahoo'],
"msn" => $mybb->input['msn'],

 
			"birthday" => array(
"day" => $mybb->input['bday1'],
"month" => $mybb->input['bday2'],
"year" => $mybb->input['bday3']
),

			"style" => $mybb->input['style'],
"signature" => $mybb->input['signature'],
"dateformat" => intval($mybb->input['dateformat']),
"timeformat" => intval($mybb->input['timeformat']),
"language" => $mybb->input['language'],
"usernotes" => $mybb->input['usernotes']

			"style" => $mybb->input['style'],
"signature" => $mybb->input['signature'],
"dateformat" => intval($mybb->input['dateformat']),
"timeformat" => intval($mybb->input['timeformat']),
"language" => $mybb->input['language'],
"usernotes" => $mybb->input['usernotes']

		);

		);


if($user['usergroup'] == 5 && $mybb->input['usergroup'] != 5)
{


if($user['usergroup'] == 5 && $mybb->input['usergroup'] != 5)
{

Zeile 630Zeile 647
		{
$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['options'] = array(
"allownotices" => $mybb->input['allownotices'],
"hideemail" => $mybb->input['hideemail'],

		$updated_user['options'] = array(
"allownotices" => $mybb->input['allownotices'],
"hideemail" => $mybb->input['hideemail'],

Zeile 652Zeile 669
		);

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

		);

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

		{

		{

			$updated_user['options']['tpp'] = intval($mybb->input['tpp']);
}

if($mybb->settings['userpppoptions'])
{
$updated_user['options']['ppp'] = intval($mybb->input['ppp']);

			$updated_user['options']['tpp'] = intval($mybb->input['tpp']);
}

if($mybb->settings['userpppoptions'])
{
$updated_user['options']['ppp'] = intval($mybb->input['ppp']);

		}

		}


// Set the data of the user in the datahandler.
$userhandler->set_data($updated_user);


// Set the data of the user in the datahandler.
$userhandler->set_data($updated_user);

Zeile 714Zeile 731
				// Copy the avatar to the local server (work around remote URL access disabled for getimagesize)
$file = fetch_remote_file($mybb->input['avatar_url']);
if(!$file)

				// Copy the avatar to the local server (work around remote URL access disabled for getimagesize)
$file = fetch_remote_file($mybb->input['avatar_url']);
if(!$file)

				{

				{

					$avatar_error = $lang->error_invalidavatarurl;
}
else

					$avatar_error = $lang->error_invalidavatarurl;
}
else

Zeile 739Zeile 756
					}
}


					}
}


				if(empty($avatar_error))
{

				if(empty($avatar_error))
{

					if($width && $height && $mybb->settings['maxavatardims'] != "")
{
list($maxwidth, $maxheight) = explode("x", my_strtolower($mybb->settings['maxavatardims']));

					if($width && $height && $mybb->settings['maxavatardims'] != "")
{
list($maxwidth, $maxheight) = explode("x", my_strtolower($mybb->settings['maxavatardims']));

Zeile 768Zeile 785
				else
{
$errors = array($avatar_error);

				else
{
$errors = array($avatar_error);

				}
}

				}
}


// Moderator "Options" (suspend signature, suspend/moderate posting)
$moderator_options = array(


// Moderator "Options" (suspend signature, suspend/moderate posting)
$moderator_options = array(

Zeile 811Zeile 828
					// Skip this option if we haven't selected it
continue;
}

					// Skip this option if we haven't selected it
continue;
}





				if($mybb->input[$option['action']])
{
if(intval($mybb->input[$option['time']]) == 0 && $mybb->input[$option['period']] != "never" && $user[$option['update_field']] != 1)

				if($mybb->input[$option['action']])
{
if(intval($mybb->input[$option['time']]) == 0 && $mybb->input[$option['period']] != "never" && $user[$option['update_field']] != 1)

Zeile 824Zeile 841
					if(!is_array($errors))
{
$suspend_length = fetch_time_length(intval($mybb->input[$option['time']]), $mybb->input[$option['period']]);

					if(!is_array($errors))
{
$suspend_length = fetch_time_length(intval($mybb->input[$option['time']]), $mybb->input[$option['period']]);

	

	

						if($user[$option['update_field']] == 1 && ($mybb->input[$option['time']] || $mybb->input[$option['period']] == "never"))
{
// We already have a suspension, but entered a new time
if($suspend_length == "-1")
{
// Permanent ban on action

						if($user[$option['update_field']] == 1 && ($mybb->input[$option['time']] || $mybb->input[$option['period']] == "never"))
{
// We already have a suspension, but entered a new time
if($suspend_length == "-1")
{
// Permanent ban on action

								$extra_user_updates[$option['update_length']] = 0;
}

								$extra_user_updates[$option['update_length']] = 0;
}

							elseif($suspend_length && $suspend_length != "-1")
{
// Temporary ban on action

							elseif($suspend_length && $suspend_length != "-1")
{
// Temporary ban on action

								$extra_user_updates[$option['update_length']] = TIME_NOW + $suspend_length;
}
}

								$extra_user_updates[$option['update_length']] = TIME_NOW + $suspend_length;
}
}

						elseif(!$user[$option['update_field']])
{
// New suspension for this user... bad user!

						elseif(!$user[$option['update_field']])
{
// New suspension for this user... bad user!

Zeile 879Zeile 896

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


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





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

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

Zeile 894Zeile 911
		// We need to fetch this users profile field values
$query = $db->simple_select("userfields", "*", "ufid='{$user['uid']}'");
$mybb->input['profile_fields'] = $db->fetch_array($query);

		// We need to fetch this users profile field values
$query = $db->simple_select("userfields", "*", "ufid='{$user['uid']}'");
$mybb->input['profile_fields'] = $db->fetch_array($query);

 
	}

if($mybb->input['bday1'] || $mybb->input['bday2'] || $mybb->input['bday3'])
{
$mybb->input['bday'][0] = $mybb->input['bday1'];
$mybb->input['bday'][1] = $mybb->input['bday2'];
$mybb->input['bday'][2] = intval($mybb->input['bday3']);
}
else
{
$mybb->input['bday'] = array();

if($user['birthday'])
{
$mybb->input['bday'] = explode('-', $user['birthday']);
}

	}

// Fetch custom profile fields

	}

// Fetch custom profile fields

Zeile 933Zeile 966
	if($user['coppauser'])
{
echo $lang->sprintf($lang->warning_coppa_user, $user['uid']);

	if($user['coppauser'])
{
echo $lang->sprintf($lang->warning_coppa_user, $user['uid']);

	}


	}


	$tabs = array(
"overview" => $lang->overview,
"profile" => $lang->profile,

	$tabs = array(
"overview" => $lang->overview,
"profile" => $lang->profile,

Zeile 987Zeile 1020
	if($user['lastactive'])
{
$last_active = my_date($mybb->settings['dateformat'], $user['lastactive']).", ".my_date($mybb->settings['timeformat'], $user['lastactive']);

	if($user['lastactive'])
{
$last_active = my_date($mybb->settings['dateformat'], $user['lastactive']).", ".my_date($mybb->settings['timeformat'], $user['lastactive']);

	}
else
{

	}
else
{

		$last_active = $lang->never;
}
$reg_date = my_date($mybb->settings['dateformat'], $user['regdate']).", ".my_date($mybb->settings['timeformat'], $user['regdate']);
if($user['dst'] == 1)
{
$timezone = $user['timezone']+1;

		$last_active = $lang->never;
}
$reg_date = my_date($mybb->settings['dateformat'], $user['regdate']).", ".my_date($mybb->settings['timeformat'], $user['regdate']);
if($user['dst'] == 1)
{
$timezone = $user['timezone']+1;

	}

	}

	else
{
$timezone = $user['timezone'];

	else
{
$timezone = $user['timezone'];

Zeile 1010Zeile 1043
		if($posts_per_day > $user['postnum'])
{
$posts_per_day = $user['postnum'];

		if($posts_per_day > $user['postnum'])
{
$posts_per_day = $user['postnum'];

		}

		}

	}
$stats = $cache->read("stats");
$posts = $stats['numposts'];
if($posts == 0)
{
$percent_posts = "0";

	}
$stats = $cache->read("stats");
$posts = $stats['numposts'];
if($posts == 0)
{
$percent_posts = "0";

	}

	}

	else
{
$percent_posts = round($user['postnum']*100/$posts, 2);
}

$user_permissions = user_permissions($user['uid']);

	else
{
$percent_posts = round($user['postnum']*100/$posts, 2);
}

$user_permissions = user_permissions($user['uid']);





	// Fetch the reputation for this user
if($user_permissions['usereputationsystem'] == 1 && $mybb->settings['enablereputation'] == 1)
{
$reputation = get_reputation($user['reputation']);
}
else

	// Fetch the reputation for this user
if($user_permissions['usereputationsystem'] == 1 && $mybb->settings['enablereputation'] == 1)
{
$reputation = get_reputation($user['reputation']);
}
else

	{

	{

		$reputation = "-";
}


		$reputation = "-";
}


Zeile 1045Zeile 1078
		$warning_level = get_colored_warning_level($warning_level);
}


		$warning_level = get_colored_warning_level($warning_level);
}




	$age = $lang->na;

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

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

	}

else
{
$age = '';

 
	}

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

Zeile 1120Zeile 1148
	$form_container->output_row($lang->aim_handle, "", $form->generate_text_box('aim', $mybb->input['aim'], array('id' => 'aim')), 'aim');
$form_container->output_row($lang->yahoo_messanger_handle, "", $form->generate_text_box('yahoo', $mybb->input['yahoo'], array('id' => 'yahoo')), 'yahoo');
$form_container->output_row($lang->msn_messanger_handle, "", $form->generate_text_box('msn', $mybb->input['msn'], array('id' => 'msn')), 'msn');

	$form_container->output_row($lang->aim_handle, "", $form->generate_text_box('aim', $mybb->input['aim'], array('id' => 'aim')), 'aim');
$form_container->output_row($lang->yahoo_messanger_handle, "", $form->generate_text_box('yahoo', $mybb->input['yahoo'], array('id' => 'yahoo')), 'yahoo');
$form_container->output_row($lang->msn_messanger_handle, "", $form->generate_text_box('msn', $mybb->input['msn'], array('id' => 'msn')), 'msn');

 


	// Birthday

	// Birthday

 
	$birthday_days = array(0 => '');
for($i = 1; $i <= 31; $i++)
{
$birthday_days[$i] = $i;
}

$birthday_months = array(
0 => '',
1 => $lang->january,
2 => $lang->february,
3 => $lang->march,
4 => $lang->april,
5 => $lang->may,
6 => $lang->june,
7 => $lang->july,
8 => $lang->august,
9 => $lang->september,
10 => $lang->october,
11 => $lang->november,
12 => $lang->december
);

$birthday_row = $form->generate_select_box('bday1', $birthday_days, $mybb->input['bday'][0], array('id' => 'bday_day'));
$birthday_row .= ' '.$form->generate_select_box('bday2', $birthday_months, $mybb->input['bday'][1], array('id' => 'bday_month'));
$birthday_row .= ' '.$form->generate_text_box('bday3', $mybb->input['bday'][2], array('id' => 'bday_year', 'style' => 'width: 3em;'));

$form_container->output_row($lang->birthday, "", $birthday_row, 'birthday');


// Output custom profile fields - optional
output_custom_profile_fields($profile_fields['optional'], $mybb->input['profile_fields'], $form_container, $form);


// Output custom profile fields - optional
output_custom_profile_fields($profile_fields['optional'], $mybb->input['profile_fields'], $form_container, $form);

Zeile 1140Zeile 1196
		$form->generate_check_box("invisible", 1, $lang->hide_from_whos_online, array("checked" => $mybb->input['invisible'])),
);
$form_container->output_row($lang->login_cookies_privacy, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $login_options)."</div>");

		$form->generate_check_box("invisible", 1, $lang->hide_from_whos_online, array("checked" => $mybb->input['invisible'])),
);
$form_container->output_row($lang->login_cookies_privacy, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $login_options)."</div>");





	if($mybb->input['pmnotice'] > 1)
{
$mybb->input['pmnotice'] = 1;

	if($mybb->input['pmnotice'] > 1)
{
$mybb->input['pmnotice'] = 1;

Zeile 1161Zeile 1217
	foreach($date_formats as $key => $format)
{
$date_format_options[$key] = my_date($format, TIME_NOW, "", 0);

	foreach($date_formats as $key => $format)
{
$date_format_options[$key] = my_date($format, TIME_NOW, "", 0);

	}


	}


	$time_format_options = array($lang->use_default);
foreach($time_formats as $key => $format)
{
$time_format_options[$key] = my_date($format, TIME_NOW, "", 0);

	$time_format_options = array($lang->use_default);
foreach($time_formats as $key => $format)
{
$time_format_options[$key] = my_date($format, TIME_NOW, "", 0);

	}


	}


	$date_options = array(
"<label for=\"dateformat\">{$lang->date_format}:</label><br />".$form->generate_select_box("dateformat", $date_format_options, $mybb->input['dateformat'], array('id' => 'dateformat')),
"<label for=\"dateformat\">{$lang->time_format}:</label><br />".$form->generate_select_box("timeformat", $time_format_options, $mybb->input['timeformat'], array('id' => 'timeformat')),

	$date_options = array(
"<label for=\"dateformat\">{$lang->date_format}:</label><br />".$form->generate_select_box("dateformat", $date_format_options, $mybb->input['dateformat'], array('id' => 'dateformat')),
"<label for=\"dateformat\">{$lang->time_format}:</label><br />".$form->generate_select_box("timeformat", $time_format_options, $mybb->input['timeformat'], array('id' => 'timeformat')),

Zeile 1203Zeile 1259
		100 => $lang->show_threads_last_100_days,
365 => $lang->show_threads_last_year,
9999 => $lang->show_all_threads

		100 => $lang->show_threads_last_100_days,
365 => $lang->show_threads_last_year,
9999 => $lang->show_all_threads

	);

	);


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


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

Zeile 1216Zeile 1272
	{
$explodedppp = explode(",", $mybb->settings['userpppoptions']);
if(is_array($explodedppp))

	{
$explodedppp = explode(",", $mybb->settings['userpppoptions']);
if(is_array($explodedppp))

		{

		{

			foreach($explodedppp as $ppp)
{
if($ppp <= 0) continue;
$ppp_options[$ppp] = $ppp;
}
}

			foreach($explodedppp as $ppp)
{
if($ppp <= 0) continue;
$ppp_options[$ppp] = $ppp;
}
}

	}

	}


$thread_options = array(
$form->generate_check_box("showsigs", 1, $lang->display_users_sigs, array("checked" => $mybb->input['showsigs'])),


$thread_options = array(
$form->generate_check_box("showsigs", 1, $lang->display_users_sigs, array("checked" => $mybb->input['showsigs'])),

Zeile 1258Zeile 1314
	}
$sig_mycode = $lang->off;
if($mybb->settings['sigmycode'] == 1)

	}
$sig_mycode = $lang->off;
if($mybb->settings['sigmycode'] == 1)

	{

	{

		$sig_mycode = $lang->on;
$signature_editor .= build_mycode_inserter("signature");
}

		$sig_mycode = $lang->on;
$signature_editor .= build_mycode_inserter("signature");
}

Zeile 1271Zeile 1327
	if($mybb->settings['sigimgcode'] == 1)
{
$sig_imgcode = $lang->on;

	if($mybb->settings['sigimgcode'] == 1)
{
$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');

Zeile 1326Zeile 1382
			{
$("suspend_action").show();
}

			{
$("suspend_action").show();
}

		}

		}

	// -->
</script>


	// -->
</script>


Zeile 1447Zeile 1503
	);

echo "<div id=\"tab_modoptions\">\n";

	);

echo "<div id=\"tab_modoptions\">\n";

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

	$form_container = new FormContainer($lang->mod_options.": {$user['username']}");

	$form_container->output_row($lang->user_notes, '', $form->generate_text_area('usernotes', $mybb->input['usernotes'], array('id' => 'usernotes')), 'usernotes');

// Mod posts

	$form_container->output_row($lang->user_notes, '', $form->generate_text_area('usernotes', $mybb->input['usernotes'], array('id' => 'usernotes')), 'usernotes');

// Mod posts

Zeile 1490Zeile 1546
		{
$suspost_date = my_date($mybb->settings['dateformat'], $user['suspensiontime'])." ".my_date($mybb->settings['timeformat'], $user['suspensiontime']);
$existing_info = $lang->sprintf($lang->suspend_length, $suspost_date);

		{
$suspost_date = my_date($mybb->settings['dateformat'], $user['suspensiontime'])." ".my_date($mybb->settings['timeformat'], $user['suspensiontime']);
$existing_info = $lang->sprintf($lang->suspend_length, $suspost_date);

		}
}


		}
}


	$suspost_div = '<div id="suspost">'.$existing_info.''.$lang->suspend_for.' '.$form->generate_text_box("suspost_time", $mybb->input['suspost_time'], array('style' => 'width: 2em;')).' '.$suspost_options.'</div>';
$lang->suspend_posts_info = $lang->sprintf($lang->suspend_posts_info, $user['username']);
$form_container->output_row($form->generate_check_box("suspendposting", 1, $lang->suspend_posts, array("id" => "suspendposting", "onclick" => "toggleBox('suspost');", "checked" => $mybb->input['suspendposting'])), $lang->suspend_posts_info, $suspost_div);

	$suspost_div = '<div id="suspost">'.$existing_info.''.$lang->suspend_for.' '.$form->generate_text_box("suspost_time", $mybb->input['suspost_time'], array('style' => 'width: 2em;')).' '.$suspost_options.'</div>';
$lang->suspend_posts_info = $lang->sprintf($lang->suspend_posts_info, $user['username']);
$form_container->output_row($form->generate_check_box("suspendposting", 1, $lang->suspend_posts, array("id" => "suspendposting", "onclick" => "toggleBox('suspost');", "checked" => $mybb->input['suspendposting'])), $lang->suspend_posts_info, $suspost_div);

Zeile 1594Zeile 1650
	if($mybb->request_method == "post")
{
// Delete the user

	if($mybb->request_method == "post")
{
// Delete the user

		$db->update_query("posts", array('uid' => 0), "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']}'");

		$db->delete_query("moderators", "id='{$user['uid']}' AND isgroup = '0'");

 
		$db->delete_query("forumsubscriptions", "uid='{$user['uid']}'");
$db->delete_query("threadsubscriptions", "uid='{$user['uid']}'");
$db->delete_query("sessions", "uid='{$user['uid']}'");

		$db->delete_query("forumsubscriptions", "uid='{$user['uid']}'");
$db->delete_query("threadsubscriptions", "uid='{$user['uid']}'");
$db->delete_query("sessions", "uid='{$user['uid']}'");

Zeile 1608Zeile 1662
		$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']}'");

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

		$db->delete_query("awaitingactivation", "uid='{$uid}'");



		$db->delete_query("awaitingactivation", "uid='{$user['uid']}'");
$db->delete_query("posts", "uid = '{$user['uid']}' AND visible = '-2'");
$db->delete_query("threads", "uid = '{$user['uid']}' AND visible = '-2'");


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


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

		
$plugins->run_hooks("admin_user_users_delete_commit");





















// Update forums & threads if user is the lastposter
$db->update_query("posts", array('uid' => 0), "uid='{$user['uid']}'");
$db->update_query("forums", array("lastposteruid" => 0), "lastposteruid = '{$user['uid']}'");
$db->update_query("threads", array("lastposteruid" => 0), "lastposteruid = '{$user['uid']}'");

// Did this user have an uploaded avatar?
if($user['avatartype'] == "upload")
{
// Removes the ./ at the beginning the timestamp on the end...
@unlink("../".substr($user['avatar'], 2, -20));
}

// Was this user a moderator?
if(is_moderator($user['uid']))
{
$db->delete_query("moderators", "id='{$user['uid']}' AND isgroup = '0'");
$cache->update_moderators();
}

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

Zeile 1653Zeile 1727
	$admin_view = $db->fetch_array($query);

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

	$admin_view = $db->fetch_array($query);

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

	{

	{

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


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


Zeile 1769Zeile 1843
		if(!$destination_user['uid'])
{
$errors[] = $lang->error_invalid_user_destination;

		if(!$destination_user['uid'])
{
$errors[] = $lang->error_invalid_user_destination;

 
		}

// If we're not a super admin and we're merging a source super admin or a destination super admin then dissallow this action
if(!is_super_admin($mybb->user['uid']) && (is_super_admin($source_user['uid']) || is_super_admin($destination_user['uid'])))
{
flash_message($lang->error_no_perms_super_admin, 'error');
admin_redirect("index.php?module=user-users");

		}

if($source_user['uid'] == $destination_user['uid'])

		}

if($source_user['uid'] == $destination_user['uid'])

Zeile 1801Zeile 1882
			$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("reportedposts", $uid_update, "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->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']}'");

Zeile 1813Zeile 1895
				// Update the moderator cache...
$cache->update_moderators();
}

				// Update the moderator cache...
$cache->update_moderators();
}

 

// Forums & Threads
$db->update_query("forums", array("lastposteruid" => $destination_user['uid']), "lastposteruid = '{$source_user['uid']}'");
$db->update_query("threads", array("lastposteruid" => $destination_user['uid']), "lastposteruid = '{$source_user['uid']}'");

// Banning
$db->update_query("banned", array('admin' => $destination_user['uid']), "admin = '{$source_user['uid']}'");


// Merging Reputation
// First, let's change all the details over to our new user...


// Merging Reputation
// First, let's change all the details over to our new user...

Zeile 2025Zeile 2114
			$admin_view['sortby'] = $mybb->input['sortby'];
}


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


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

		if(intval($mybb->input['perpage']))

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

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

Zeile 2369Zeile 2458
				echo $form->generate_hidden_field('inline_action', 'multiban');
echo $form->generate_hidden_field('processed', '1');


				echo $form->generate_hidden_field('inline_action', 'multiban');
echo $form->generate_hidden_field('processed', '1');


				$form_container = new FormContainer('<div class="float_right"><a href="index.php?module=user-users&amp;action=inline_edit&amp;inline_action=multilift&amp;my_post_key={$mybb->post_code}">'.$lang->lift_bans.'</a></div>'.$lang->mass_ban);

				$form_container = new FormContainer('<div class="float_right"><a href="index.php?module=user-users&amp;action=inline_edit&amp;inline_action=multilift&amp;my_post_key='.$mybb->post_code.'">'.$lang->lift_bans.'</a></div>'.$lang->mass_ban);

				$form_container->output_row($lang->ban_reason, "", $form->generate_text_box('reason', $mybb->input['reason'], array('id' => 'reason')), 'reason');				
$ban_times = fetch_ban_times();
foreach($ban_times as $time => $period)

				$form_container->output_row($lang->ban_reason, "", $form->generate_text_box('reason', $mybb->input['reason'], array('id' => 'reason')), 'reason');				
$ban_times = fetch_ban_times();
foreach($ban_times as $time => $period)

Zeile 2382Zeile 2471
					$length_list[$time] = $period;
}
$form_container->output_row($lang->ban_time, "", $form->generate_select_box('bantime', $length_list, $mybb->input['bantime'], array('id' => 'bantime')), 'bantime');

					$length_list[$time] = $period;
}
$form_container->output_row($lang->ban_time, "", $form->generate_select_box('bantime', $length_list, $mybb->input['bantime'], array('id' => 'bantime')), 'bantime');

				$form_container->end();


				$form_container->end();


				$buttons[] = $form->generate_submit_button($lang->ban_users);
$form->output_submit_wrapper($buttons);
$form->end();

				$buttons[] = $form->generate_submit_button($lang->ban_users);
$form->output_submit_wrapper($buttons);
$form->end();

Zeile 2554Zeile 2643
						}

// Require the rebuild functions

						}

// Require the rebuild functions

						require_once(MYBB_ROOT.'/inc/functions.php');
require_once(MYBB_ROOT.'/inc/functions_rebuild.php');

						require_once MYBB_ROOT.'/inc/functions.php';
require_once MYBB_ROOT.'/inc/functions_rebuild.php';


// We've finished deleting user's posts, so let's delete the threads
if(is_array($prune_array['to_delete']) && count($prune_array['to_delete']) > 0)


// We've finished deleting user's posts, so let's delete the threads
if(is_array($prune_array['to_delete']) && count($prune_array['to_delete']) > 0)

Zeile 2661Zeile 2750
				}

$form_container->output_row($lang->relative_date, "", $lang->delete_posts." ".$form->generate_select_box('set', $set_options, $mybb->input['set']), 'set');

				}

$form_container->output_row($lang->relative_date, "", $lang->delete_posts." ".$form->generate_select_box('set', $set_options, $mybb->input['set']), 'set');

				$form_container->end();


				$form_container->end();


				$buttons[] = $form->generate_submit_button($lang->prune_posts);
$form->output_submit_wrapper($buttons);
$form->end();

				$buttons[] = $form->generate_submit_button($lang->prune_posts);
$form->output_submit_wrapper($buttons);
$form->end();

Zeile 2681Zeile 2770
								unset($mybb->input['additionalgroups'][$key]);
}
}

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

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

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

					}
else
{

					}
else
{

Zeile 2690Zeile 2779

// Create an update array
$update_array = array(


// Create an update array
$update_array = array(

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

						"usergroup" => intval($mybb->input['usergroup']),

						"additionalgroups" => $additionalgroups,

						"additionalgroups" => $additionalgroups,

						"displaygroup" => $mybb->input['displaygroup']

						"displaygroup" => intval($mybb->input['displaygroup'])

					);

// Do the usergroup update for all those selected

					);

// Do the usergroup update for all those selected

Zeile 2831Zeile 2920
	$admin_view['popup'] = $popup->fetch();

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

	$admin_view['popup'] = $popup->fetch();

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

	{

	{

		$admin_view['view_type'] = $mybb->input['type'];

		$admin_view['view_type'] = $mybb->input['type'];

	}

$results = build_users_view($admin_view);


	}

$results = build_users_view($admin_view);


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

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

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

Zeile 2868Zeile 2957

$page->output_footer();
}


$page->output_footer();
}





function build_users_view($view)
{
global $mybb, $db, $cache, $lang, $user_view_fields, $page;

function build_users_view($view)
{
global $mybb, $db, $cache, $lang, $user_view_fields, $page;

Zeile 2887Zeile 2976

// Build the URL to this view
if(!$view['url'])


// Build the URL to this view
if(!$view['url'])

	{

	{

		$view['url'] = "index.php?module=user-users";
}
if(!is_array($view['conditions']))

		$view['url'] = "index.php?module=user-users";
}
if(!is_array($view['conditions']))

Zeile 2905Zeile 2994
	if($mybb->input['username'])
{
$view['conditions']['username'] = $mybb->input['username'];

	if($mybb->input['username'])
{
$view['conditions']['username'] = $mybb->input['username'];

	}

	}

	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 2922Zeile 3011
			$_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']));

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

	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($view['conditions']['referrer'])){
$view['url'] .= "&amp;action=referrers&amp;uid=".htmlspecialchars($view['conditions']['referrer']);

	}

// Do we not have any views?

	}

// Do we not have any views?

Zeile 2974Zeile 3067
	$user_like_fields = array("username", "email", "website", "icq", "aim", "yahoo", "msn", "signature", "usertitle");
foreach($user_like_fields as $search_field)
{

	$user_like_fields = array("username", "email", "website", "icq", "aim", "yahoo", "msn", "signature", "usertitle");
foreach($user_like_fields as $search_field)
{

		if($view['conditions'][$search_field])

		if($view['conditions'][$search_field] && !$view['conditions'][$search_field.'_blank'])

		{
$search_sql .= " AND u.{$search_field} LIKE '%".$db->escape_string_like($view['conditions'][$search_field])."%'";

		{
$search_sql .= " AND u.{$search_field} LIKE '%".$db->escape_string_like($view['conditions'][$search_field])."%'";

		}
}






		}
else if(isset($view['conditions'][$search_field.'_blank']))
{
$search_sql .= " AND u.{$search_field} != ''";
}
}


	// EXACT matching fields
$user_exact_fields = array("referrer");
foreach($user_exact_fields as $search_field)

	// EXACT matching fields
$user_exact_fields = array("referrer");
foreach($user_exact_fields as $search_field)

	{

	{

		if($view['conditions'][$search_field])
{
$search_sql .= " AND u.{$search_field}='".$db->escape_string($view['conditions'][$search_field])."'";

		if($view['conditions'][$search_field])
{
$search_sql .= " AND u.{$search_field}='".$db->escape_string($view['conditions'][$search_field])."'";

		}

		}

	}

// LESS THAN or GREATER THAN

	}

// LESS THAN or GREATER THAN

Zeile 3001Zeile 3098
			{
case "greater_than":
$direction = ">";

			{
case "greater_than":
$direction = ">";

					break;

					break;

				case "less_than":
$direction = "<";
break;

				case "less_than":
$direction = "<";
break;

Zeile 3009Zeile 3106
					$direction = "=";
}
$search_sql .= " AND u.{$search_field}{$direction}'".$db->escape_string($view['conditions'][$search_field])."'";

					$direction = "=";
}
$search_sql .= " AND u.{$search_field}{$direction}'".$db->escape_string($view['conditions'][$search_field])."'";

 
		}
}

// Registration searching
$reg_fields = array("regdate");
foreach($reg_fields as $search_field)
{
if(intval($view['conditions'][$search_field]))
{
$threshold = TIME_NOW - (intval($view['conditions'][$search_field]) * 24 * 60 * 60);

$search_sql .= " AND u.{$search_field} >= '{$threshold}'";

		}
}


		}
}


Zeile 3053Zeile 3162
		{
$ip_range = fetch_longipv4_range($view['conditions']['postip']);
if(!is_array($ip_range))

		{
$ip_range = fetch_longipv4_range($view['conditions']['postip']);
if(!is_array($ip_range))

			{

			{

				$ip_sql = "longipaddress='{$ip_range}'";
}
else

				$ip_sql = "longipaddress='{$ip_range}'";
}
else

Zeile 3080Zeile 3189
			if(is_array($input))
{
foreach($input as $value => $text)

			if(is_array($input))
{
foreach($input as $value => $text)

				{
if($value == "N/A")
{






				{
if($value == $column)
{
$value = $text;
}

if($value == $lang->na)
{

						continue;
}

						continue;
}

					
$userfield_sql .= ' AND '.$db->escape_string($column)."='".$db->escape_string($value)."'";










if(strpos($column, '_blank') !== false)
{
$column = str_replace('_blank', '', $column);
$userfield_sql .= ' AND '.$db->escape_string($column)." != ''";
}
else
{
$userfield_sql .= ' AND '.$db->escape_string($column)."='".$db->escape_string($value)."'";
}

				}
}
else if(!empty($input))
{

				}
}
else if(!empty($input))
{

				if($input == "N/A")

				if($input == $lang->na)

				{
continue;
}

				{
continue;
}

					
$userfield_sql .= ' AND '.$db->escape_string($column)." LIKE '%".$db->escape_string($input)."%'";









				
if(strpos($column, '_blank') !== false)
{
$column = str_replace('_blank', '', $column);
$userfield_sql .= ' AND '.$db->escape_string($column)." != ''";
}
else
{
$userfield_sql .= ' AND '.$db->escape_string($column)." LIKE '%".$db->escape_string($input)."%'";
}

			}
}

			}
}

		



		if($userfield_sql != '1=1')
{
$userfield_uids = array(0);

		if($userfield_sql != '1=1')
{
$userfield_uids = array(0);

Zeile 3107Zeile 3237
			while($userfield = $db->fetch_array($query))
{
$userfield_uids[] = $userfield['ufid'];

			while($userfield = $db->fetch_array($query))
{
$userfield_uids[] = $userfield['ufid'];

			}

			}

			$search_sql .= " AND u.uid IN(".implode(',', $userfield_uids).")";
unset($userfield_uids);
}

			$search_sql .= " AND u.uid IN(".implode(',', $userfield_uids).")";
unset($userfield_uids);
}

Zeile 3119Zeile 3249
		if(!is_array($view['conditions']['usergroup']))
{
$view['conditions']['usergroup'] = array($view['conditions']['usergroup']);

		if(!is_array($view['conditions']['usergroup']))
{
$view['conditions']['usergroup'] = array($view['conditions']['usergroup']);

		}


		}


		foreach($view['conditions']['usergroup'] as $usergroup)
{

		foreach($view['conditions']['usergroup'] as $usergroup)
{

 
			$usergroup = intval($usergroup);

if(!$usergroup)
{
continue;
}


			switch($db->type)
{
case "pgsql":

			switch($db->type)
{
case "pgsql":

Zeile 3133Zeile 3270
					$additional_sql .= "OR CONCAT(',',additionalgroups,',') LIKE '%,{$usergroup},%'";
}
}

					$additional_sql .= "OR CONCAT(',',additionalgroups,',') LIKE '%,{$usergroup},%'";
}
}

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



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

	}

// COPPA users only?

	}

// COPPA users only?

Zeile 3250Zeile 3388
			{
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']}{$from_bit}");

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

				}
else
{

				}
else
{

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

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

				}
}


				}
}


Zeile 3616Zeile 3754
		list($type, $options) = explode("\n", $profile_field['type'], 2);
$type = trim($type);
$field_name = "fid{$profile_field['fid']}";

		list($type, $options) = explode("\n", $profile_field['type'], 2);
$type = trim($type);
$field_name = "fid{$profile_field['fid']}";

 


		switch($type)
{
case "multiselect":

		switch($type)
{
case "multiselect":

				if(!is_array($values[$field_name]))
{
$user_options = explode("\n", $values[$field_name]);
}
else
{
$user_options = $values[$field_name];
}
foreach($user_options as $val)
{
$selected_options[$val] = $val;
}
$select_options = array();



				if(!is_array($values[$field_name]))
{
$user_options = explode("\n", $values[$field_name]);
}
else
{
$user_options = $values[$field_name];
}

foreach($user_options as $val)
{
$selected_options[$val] = $val;
}

$select_options = explode("\n", $options);

				$options = array();
if($search == true)
{
$select_options[''] = $lang->na;
}

				$options = array();
if($search == true)
{
$select_options[''] = $lang->na;
}

				$select_options += explode("\n", $options);

 
				

				

				foreach($select_options as $val)
{
$val = trim($val);
$options[$val] = $val;
}
if(!$profile_field['length'])

				foreach($select_options as $val)
{
$val = trim($val);
$options[$val] = $val;
}
if(!$profile_field['length'])

				{
$profile_field['length'] = 3;

				{
$profile_field['length'] = 3;

				}

				}

				$code = $form->generate_select_box("profile_fields[{$field_name}][]", $options, $selected_options, array('id' => "profile_field_{$field_name}", 'multiple' => true, 'size' => $profile_field['length']));
break;
case "select":

				$code = $form->generate_select_box("profile_fields[{$field_name}][]", $options, $selected_options, array('id' => "profile_field_{$field_name}", 'multiple' => true, 'size' => $profile_field['length']));
break;
case "select":

Zeile 3657Zeile 3797
					$select_options[''] = $lang->na;
}
$select_options += explode("\n", $options);

					$select_options[''] = $lang->na;
}
$select_options += explode("\n", $options);

				$options = array();

				$options = array();

				foreach($select_options as $val)

				foreach($select_options as $val)

				{

				{

					$val = trim($val);
$options[$val] = $val;
}
if(!$profile_field['length'])

					$val = trim($val);
$options[$val] = $val;
}
if(!$profile_field['length'])

				{

				{

					$profile_field['length'] = 1;
}

					$profile_field['length'] = 1;
}

				$code = $form->generate_select_box("profile_fields[{$field_name}]", $options, $values[$field_name], array('id' => "profile_field_{$field_name}", 'size' => $profile_field['length']));








				if($search == true)
{
$code = $form->generate_select_box("profile_fields[{$field_name}][{$field_name}]", $options, $values[$field_name], array('id' => "profile_field_{$field_name}", 'size' => $profile_field['length']));
}
else
{
$code = $form->generate_select_box("profile_fields[{$field_name}]", $options, $values[$field_name], array('id' => "profile_field_{$field_name}", 'size' => $profile_field['length']));
}

				break;
case "radio":
$radio_options = array();

				break;
case "radio":
$radio_options = array();

				if($search == true)
{

				if($search == true)
{

					$radio_options[''] = $lang->na;

					$radio_options[''] = $lang->na;

				}

				}

				$radio_options += explode("\n", $options);
foreach($radio_options as $val)
{

				$radio_options += explode("\n", $options);
foreach($radio_options as $val)
{

Zeile 3686Zeile 3833
				if(!is_array($values[$field_name]))
{
$user_options = explode("\n", $values[$field_name]);

				if(!is_array($values[$field_name]))
{
$user_options = explode("\n", $values[$field_name]);

				}

				}

				else
{
$user_options = $values[$field_name];

				else
{
$user_options = $values[$field_name];

Zeile 3708Zeile 3855
				}
break;
case "textarea":

				}
break;
case "textarea":

				$code = $form->generate_text_area("profile_fields[{$field_name}]", $values[$field_name], array('id' => "profile_field_{$field_name}", 'rows' => 6, 'cols' => 50));
break;







				$extra = '';
if($mybb->input['action'] == "search")
{
$extra = " {$lang->or} ".$form->generate_check_box("profile_fields[{$field_name}_blank]", 1, $lang->is_not_blank, array('id' => "{$field_name}_blank", 'checked' => $values[$field_name.'_blank']));
}

$code = $form->generate_text_area("profile_fields[{$field_name}]", $values[$field_name], array('id' => "profile_field_{$field_name}", 'rows' => 6, 'cols' => 50)).$extra;
break;

			default:

			default:

				$code = $form->generate_text_box("profile_fields[{$field_name}]", $values[$field_name], array('id' => "profile_field_{$field_name}", 'maxlength' => $profile_field['maxlength'], 'length' => $profile_field['length']));







				$extra = '';
if($mybb->input['action'] == "search")
{
$extra = " {$lang->or} ".$form->generate_check_box("profile_fields[{$field_name}_blank]", 1, $lang->is_not_blank, array('id' => "{$field_name}_blank", 'checked' => $values[$field_name.'_blank']));
}

$code = $form->generate_text_box("profile_fields[{$field_name}]", $values[$field_name], array('id' => "profile_field_{$field_name}", 'maxlength' => $profile_field['maxlength'], 'length' => $profile_field['length'])).$extra;

				break;
}

				break;
}

 


		$form_container->output_row($profile_field['name'], $profile_field['description'], $code, "", array('id' => "profile_field_{$field_name}"));
$code = $user_options = $selected_options = $radio_options = $val = $options = '';

		$form_container->output_row($profile_field['name'], $profile_field['description'], $code, "", array('id' => "profile_field_{$field_name}"));
$code = $user_options = $selected_options = $radio_options = $val = $options = '';

	}

	}

}

}





function user_search_conditions($input=array(), &$form)
{
global $mybb, $db, $lang;

function user_search_conditions($input=array(), &$form)
{
global $mybb, $db, $lang;

Zeile 3728Zeile 3888
		$input = $mybb->input;
}


		$input = $mybb->input;
}


	if(!is_array($input['conditions']))






	if(!is_array($input['conditions']))
{
$input['conditions'] = unserialize($input['conditions']);
}

if(!is_array($input['profile_fields']))

	{

	{

		$input['conditions'] = unserialize($input['conditions']);

		$input['profile_fields'] = unserialize($input['profile_fields']);

	}

if(!is_array($input['fields']))

	}

if(!is_array($input['fields']))

Zeile 3750Zeile 3915

$form_container->output_row($lang->is_member_of_groups, $lang->additional_user_groups_desc, $form->generate_select_box('conditions[usergroup][]', $options, $input['conditions']['usergroup'], array('id' => 'usergroups', 'multiple' => true, 'size' => 5)), 'usergroups');



$form_container->output_row($lang->is_member_of_groups, $lang->additional_user_groups_desc, $form->generate_select_box('conditions[usergroup][]', $options, $input['conditions']['usergroup'], array('id' => 'usergroups', 'multiple' => true, 'size' => 5)), 'usergroups');


	$form_container->output_row($lang->website_contains, "", $form->generate_text_box('conditions[website]', $input['conditions']['website'], array('id' => 'website')), 'website');
$form_container->output_row($lang->icq_number_contains, "", $form->generate_text_box('conditions[icq]', $input['conditions']['icq'], array('id' => 'icq')), 'icq');
$form_container->output_row($lang->aim_handle_contains, "", $form->generate_text_box('conditions[aim]', $input['conditions']['aim'], array('id' => 'aim')), 'aim');
$form_container->output_row($lang->yahoo_contains, "", $form->generate_text_box('conditions[yahoo]', $input['conditions']['yahoo'], array('id' => 'yahoo')), 'yahoo');
$form_container->output_row($lang->msn_contains, "", $form->generate_text_box('conditions[msn]', $input['conditions']['msn'], array('id' => 'msn')), 'msn');
$form_container->output_row($lang->signature_contains, "", $form->generate_text_box('conditions[signature]', $input['conditions']['signature'], array('id' => 'signature')), 'signature');
$form_container->output_row($lang->user_title_contains, "", $form->generate_text_box('conditions[usertitle]', $input['conditions']['usertitle'], array('id' => 'usertitle')), 'usertitle');

	$form_container->output_row($lang->website_contains, "", $form->generate_text_box('conditions[website]', $input['conditions']['website'], array('id' => 'website'))." {$lang->or} ".$form->generate_check_box('conditions[website_blank]', 1, $lang->is_not_blank, array('id' => 'website_blank', 'checked' => $input['conditions']['website_blank'])), 'website');
$form_container->output_row($lang->icq_number_contains, "", $form->generate_text_box('conditions[icq]', $input['conditions']['icq'], array('id' => 'icq'))." {$lang->or} ".$form->generate_check_box('conditions[icq_blank]', 1, $lang->is_not_blank, array('id' => 'icq_blank', 'checked' => $input['conditions']['icq_blank'])), 'icq');
$form_container->output_row($lang->aim_handle_contains, "", $form->generate_text_box('conditions[aim]', $input['conditions']['aim'], array('id' => 'aim'))." {$lang->or} ".$form->generate_check_box('conditions[aim_blank]', 1, $lang->is_not_blank, array('id' => 'aim_blank', 'checked' => $input['conditions']['aim_blank'])), 'aim');
$form_container->output_row($lang->yahoo_contains, "", $form->generate_text_box('conditions[yahoo]', $input['conditions']['yahoo'], array('id' => 'yahoo'))." {$lang->or} ".$form->generate_check_box('conditions[yahoo_blank]', 1, $lang->is_not_blank, array('id' => 'yahoo_blank', 'checked' => $input['conditions']['yahoo_blank'])), 'yahoo');
$form_container->output_row($lang->msn_contains, "", $form->generate_text_box('conditions[msn]', $input['conditions']['msn'], array('id' => 'msn'))." {$lang->or} ".$form->generate_check_box('conditions[msn_blank]', 1, $lang->is_not_blank, array('id' => 'msn_blank', 'checked' => $input['conditions']['msn_blank'])), 'msn');
$form_container->output_row($lang->signature_contains, "", $form->generate_text_box('conditions[signature]', $input['conditions']['signature'], array('id' => 'signature'))." {$lang->or} ".$form->generate_check_box('conditions[signature_blank]', 1, $lang->is_not_blank, array('id' => 'signature_blank', 'checked' => $input['conditions']['signature_blank'])), 'signature');
$form_container->output_row($lang->user_title_contains, "", $form->generate_text_box('conditions[usertitle]', $input['conditions']['usertitle'], array('id' => 'usertitle'))." {$lang->or} ".$form->generate_check_box('conditions[usertitle_blank]', 1, $lang->is_not_blank, array('id' => 'usertitle_blank', 'checked' => $input['conditions']['usertitle_blank'])), 'usertitle');

	$greater_options = array(
"greater_than" => $lang->greater_than,
"is_exactly" => $lang->is_exactly,

	$greater_options = array(
"greater_than" => $lang->greater_than,
"is_exactly" => $lang->is_exactly,

Zeile 3764Zeile 3929
	);
$form_container->output_row($lang->post_count_is, "", $form->generate_select_box('conditions[postnum_dir]', $greater_options, $input['conditions']['postnum_dir'], array('id' => 'numposts_dir'))." ".$form->generate_text_box('conditions[postnum]', $input['conditions']['postnum'], array('id' => 'numposts')), 'numposts');


	);
$form_container->output_row($lang->post_count_is, "", $form->generate_select_box('conditions[postnum_dir]', $greater_options, $input['conditions']['postnum_dir'], array('id' => 'numposts_dir'))." ".$form->generate_text_box('conditions[postnum]', $input['conditions']['postnum'], array('id' => 'numposts')), 'numposts');


 
	$form_container->output_row($lang->reg_in_x_days, '', $form->generate_text_box('conditions[regdate]', $input['conditions']['regdate'], array('id' => 'regdate')).' '.$lang->days, 'regdate');

	$form_container->output_row($lang->reg_ip_matches, $lang->wildcard, $form->generate_text_box('conditions[regip]', $input['conditions']['regip'], array('id' => 'regip')), 'regip');
$form_container->output_row($lang->last_known_ip, $lang->wildcard, $form->generate_text_box('conditions[lastip]', $input['conditions']['lastip'], array('id' => 'lastip')), 'lastip');
$form_container->output_row($lang->posted_with_ip, $lang->wildcard, $form->generate_text_box('conditions[postip]', $input['conditions']['postip'], array('id' => 'postip')), 'postip');

	$form_container->output_row($lang->reg_ip_matches, $lang->wildcard, $form->generate_text_box('conditions[regip]', $input['conditions']['regip'], array('id' => 'regip')), 'regip');
$form_container->output_row($lang->last_known_ip, $lang->wildcard, $form->generate_text_box('conditions[lastip]', $input['conditions']['lastip'], array('id' => 'lastip')), 'lastip');
$form_container->output_row($lang->posted_with_ip, $lang->wildcard, $form->generate_text_box('conditions[postip]', $input['conditions']['postip'], array('id' => 'postip')), 'postip');

Zeile 3787Zeile 3953
		}
}


		}
}


	output_custom_profile_fields($profile_fields['required'], $mybb->input['profile_fields'], $form_container, $form, true);
output_custom_profile_fields($profile_fields['optional'], $mybb->input['profile_fields'], $form_container, $form, true);

	output_custom_profile_fields($profile_fields['required'], $input['profile_fields'], $form_container, $form, true);
output_custom_profile_fields($profile_fields['optional'], $input['profile_fields'], $form_container, $form, true);

	
$form_container->end();


	
$form_container->end();