Vergleich admin/modules/user/users.php - 1.8.0 - 1.8.6

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 243Zeile 243
	{
$updated_user['usergroup'] = 2;
}

	{
$updated_user['usergroup'] = 2;
}

 

$plugins->run_hooks("admin_user_users_coppa_activate_commit");


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

$cache->update_awaitingactivation();


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

$cache->update_awaitingactivation();


$plugins->run_hooks("admin_user_users_coppa_activate_commit");

 

$message = $lang->sprintf($lang->email_adminactivateaccount, $user['username'], $mybb->settings['bbname'], $mybb->settings['bburl']);
my_mail($user['email'], $lang->sprintf($lang->emailsubject_activateaccount, $mybb->settings['bbname']), $message);


$message = $lang->sprintf($lang->email_adminactivateaccount, $user['username'], $mybb->settings['bbname'], $mybb->settings['bburl']);
my_mail($user['email'], $lang->sprintf($lang->emailsubject_activateaccount, $mybb->settings['bbname']), $message);

Zeile 403Zeile 403
	$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title'));
while($usergroup = $db->fetch_array($query))
{

	$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title'));
while($usergroup = $db->fetch_array($query))
{

		$options[$usergroup['gid']] = $usergroup['title'];
$display_group_options[$usergroup['gid']] = $usergroup['title'];

		$options[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']);
$display_group_options[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']);

	}

$form_container->output_row($lang->primary_user_group." <em>*</em>", "", $form->generate_select_box('usergroup', $options, $mybb->input['usergroup'], array('id' => 'usergroup')), 'usergroup');

	}

$form_container->output_row($lang->primary_user_group." <em>*</em>", "", $form->generate_select_box('usergroup', $options, $mybb->input['usergroup'], array('id' => 'usergroup')), 'usergroup');

Zeile 476Zeile 476

$return_month = (int)substr($mybb->input['away_month'], 0, 2);
$return_day = (int)substr($mybb->input['away_day'], 0, 2);


$return_month = (int)substr($mybb->input['away_month'], 0, 2);
$return_day = (int)substr($mybb->input['away_day'], 0, 2);

			$return_year = min((int)$mybb->input['away_year'], 9999);

			$return_year = min($mybb->get_input('away_year', MyBB::INPUT_INT), 9999);


// Check if return date is after the away date.
$returntimestamp = gmmktime(0, 0, 0, $return_month, $return_day, $return_year);


// Check if return date is after the away date.
$returntimestamp = gmmktime(0, 0, 0, $return_month, $return_day, $return_year);

Zeile 522Zeile 522
			),
"style" => $mybb->input['style'],
"signature" => $mybb->input['signature'],

			),
"style" => $mybb->input['style'],
"signature" => $mybb->input['signature'],

			"dateformat" => (int)$mybb->input['dateformat'],
"timeformat" => (int)$mybb->input['timeformat'],

			"dateformat" => $mybb->get_input('dateformat', MyBB::INPUT_INT),
"timeformat" => $mybb->get_input('timeformat', MyBB::INPUT_INT),

			"language" => $mybb->input['language'],
"usernotes" => $mybb->input['usernotes'],
"away" => array(

			"language" => $mybb->input['language'],
"usernotes" => $mybb->input['usernotes'],
"away" => array(

Zeile 567Zeile 567
			"showcodebuttons" => $mybb->input['showcodebuttons'],
"sourceeditor" => $mybb->input['sourceeditor'],
"pmnotify" => $mybb->input['pmnotify'],

			"showcodebuttons" => $mybb->input['showcodebuttons'],
"sourceeditor" => $mybb->input['sourceeditor'],
"pmnotify" => $mybb->input['pmnotify'],

 
			"buddyrequestspm" => $mybb->input['buddyrequestspm'],
"buddyrequestsauto" => $mybb->input['buddyrequestsauto'],

			"showredirect" => $mybb->input['showredirect']
);

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

			"showredirect" => $mybb->input['showredirect']
);

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

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

			$updated_user['options']['tpp'] = $mybb->get_input('tpp', MyBB::INPUT_INT);

		}

if($mybb->settings['userpppoptions'])
{

		}

if($mybb->settings['userpppoptions'])
{

			$updated_user['options']['ppp'] = (int)$mybb->input['ppp'];

			$updated_user['options']['ppp'] = $mybb->get_input('ppp', MyBB::INPUT_INT);

		}

// Set the data of the user in the datahandler.

		}

// Set the data of the user in the datahandler.

Zeile 652Zeile 654
				else
{
$mybb->input['avatar_url'] = preg_replace("#script:#i", "", $mybb->input['avatar_url']);

				else
{
$mybb->input['avatar_url'] = preg_replace("#script:#i", "", $mybb->input['avatar_url']);

					$mybb->input['avatar_url'] = htmlspecialchars($mybb->input['avatar_url']);

 
					$ext = get_extension($mybb->input['avatar_url']);

// Copy the avatar to the local server (work around remote URL access disabled for getimagesize)

					$ext = get_extension($mybb->input['avatar_url']);

// Copy the avatar to the local server (work around remote URL access disabled for getimagesize)

Zeile 868Zeile 869
	{
$mybb->input['bday'][0] = $mybb->input['bday1'];
$mybb->input['bday'][1] = $mybb->input['bday2'];

	{
$mybb->input['bday'][0] = $mybb->input['bday1'];
$mybb->input['bday'][1] = $mybb->input['bday2'];

		$mybb->input['bday'][2] = (int)$mybb->input['bday3'];

		$mybb->input['bday'][2] = $mybb->get_input('bday3', MyBB::INPUT_INT);

	}
else
{

	}
else
{

Zeile 882Zeile 883

if($mybb->input['away_day'] || $mybb->input['away_month'] || $mybb->input['away_year'])
{


if($mybb->input['away_day'] || $mybb->input['away_month'] || $mybb->input['away_year'])
{

		$mybb->input['away_year'] = (int)$mybb->input['away_year'];

		$mybb->input['away_year'] = $mybb->get_input('away_year', MyBB::INPUT_INT);

	}
else
{

	}
else
{

Zeile 917Zeile 918
	$page->extra_header .= <<<EOF

<link rel="stylesheet" href="../jscripts/sceditor/editor_themes/mybb.css" type="text/css" media="all" />

	$page->extra_header .= <<<EOF

<link rel="stylesheet" href="../jscripts/sceditor/editor_themes/mybb.css" type="text/css" media="all" />

	<script type="text/javascript" src="../jscripts/sceditor/jquery.sceditor.bbcode.min.js"></script>
<script type="text/javascript" src="../jscripts/bbcodes_sceditor.js"></script>


	<script type="text/javascript" src="../jscripts/sceditor/jquery.sceditor.bbcode.min.js?ver=1805"></script>
<script type="text/javascript" src="../jscripts/bbcodes_sceditor.js?ver=1804"></script>
<script type="text/javascript" src="../jscripts/sceditor/editor_plugins/undo.js?ver=1805"></script>

EOF;
$page->output_header($lang->edit_user);


EOF;
$page->output_header($lang->edit_user);


Zeile 1051Zeile 1053

if($mybb->settings['enablewarningsystem'] != 0 && $user_permissions['canreceivewarnings'] != 0)
{


if($mybb->settings['enablewarningsystem'] != 0 && $user_permissions['canreceivewarnings'] != 0)
{

 
		if($mybb->settings['maxwarningpoints'] < 1)
{
$mybb->settings['maxwarningpoints'] = 10;
}


		$warning_level = round($user['warningpoints']/$mybb->settings['maxwarningpoints']*100);
if($warning_level > 100)
{
$warning_level = 100;
}
$warning_level = get_colored_warning_level($warning_level);

		$warning_level = round($user['warningpoints']/$mybb->settings['maxwarningpoints']*100);
if($warning_level > 100)
{
$warning_level = 100;
}
$warning_level = get_colored_warning_level($warning_level);

	}


	}


	$age = $lang->na;
if($user['birthday'])
{

	$age = $lang->na;
if($user['birthday'])
{

Zeile 1070Zeile 1077
	$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("<strong>{$lang->email_address}:</strong> <a href=\"mailto:".htmlspecialchars_uni($user['email'])."\">".htmlspecialchars_uni($user['email'])."</a>");
$table->construct_cell("<strong>{$lang->last_active}:</strong> {$last_active}");

	$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("<strong>{$lang->email_address}:</strong> <a href=\"mailto:".htmlspecialchars_uni($user['email'])."\">".htmlspecialchars_uni($user['email'])."</a>");
$table->construct_cell("<strong>{$lang->last_active}:</strong> {$last_active}");

	$table->construct_row();

	$table->construct_row();

	$table->construct_cell("<strong>{$lang->registration_date}:</strong> {$reg_date}");
$table->construct_cell("<strong>{$lang->local_time}:</strong> {$localtime}");
$table->construct_row();
$table->construct_cell("<strong>{$lang->posts}:</strong> {$postnum}");
$table->construct_cell("<strong>{$lang->age}:</strong> {$age}");

	$table->construct_cell("<strong>{$lang->registration_date}:</strong> {$reg_date}");
$table->construct_cell("<strong>{$lang->local_time}:</strong> {$localtime}");
$table->construct_row();
$table->construct_cell("<strong>{$lang->posts}:</strong> {$postnum}");
$table->construct_cell("<strong>{$lang->age}:</strong> {$age}");

	$table->construct_row();

	$table->construct_row();

	$table->construct_cell("<strong>{$lang->posts_per_day}:</strong> {$posts_per_day}");
$table->construct_cell("<strong>{$lang->reputation}:</strong> {$reputation}");
$table->construct_row();

	$table->construct_cell("<strong>{$lang->posts_per_day}:</strong> {$posts_per_day}");
$table->construct_cell("<strong>{$lang->reputation}:</strong> {$reputation}");
$table->construct_row();

Zeile 1088Zeile 1095
	$table->construct_row();

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

	$table->construct_row();

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

	echo "</div>\n";


	echo "</div>\n";


	//
// PROFILE
//
echo "<div id=\"tab_profile\">\n";

	//
// PROFILE
//
echo "<div id=\"tab_profile\">\n";





	$form_container = new FormContainer($lang->required_profile_info.": {$user['username']}");
$form_container->output_row($lang->username." <em>*</em>", "", $form->generate_text_box('username', $mybb->input['username'], array('id' => 'username')), 'username');
$form_container->output_row($lang->new_password, $lang->new_password_desc, $form->generate_password_box('new_password', $mybb->input['new_password'], array('id' => 'new_password', 'autocomplete' => 'off')), 'new_password');

	$form_container = new FormContainer($lang->required_profile_info.": {$user['username']}");
$form_container->output_row($lang->username." <em>*</em>", "", $form->generate_text_box('username', $mybb->input['username'], array('id' => 'username')), 'username');
$form_container->output_row($lang->new_password, $lang->new_password_desc, $form->generate_password_box('new_password', $mybb->input['new_password'], array('id' => 'new_password', 'autocomplete' => 'off')), 'new_password');

Zeile 1106Zeile 1113
	$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title'));
while($usergroup = $db->fetch_array($query))
{

	$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title'));
while($usergroup = $db->fetch_array($query))
{

		$options[$usergroup['gid']] = $usergroup['title'];
$display_group_options[$usergroup['gid']] = $usergroup['title'];

		$options[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']);
$display_group_options[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']);

	}

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

	}

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

	{

	{

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

$form_container->output_row($lang->primary_user_group." <em>*</em>", "", $form->generate_select_box('usergroup', $options, $mybb->input['usergroup'], array('id' => 'usergroup')), 'usergroup');
$form_container->output_row($lang->additional_user_groups, $lang->additional_user_groups_desc, $form->generate_select_box('additionalgroups[]', $options, $mybb->input['additionalgroups'], array('id' => 'additionalgroups', 'multiple' => true, 'size' => 5)), 'additionalgroups');
$form_container->output_row($lang->display_user_group." <em>*</em>", "", $form->generate_select_box('displaygroup', $display_group_options, $mybb->input['displaygroup'], array('id' => 'displaygroup')), 'displaygroup');

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

$form_container->output_row($lang->primary_user_group." <em>*</em>", "", $form->generate_select_box('usergroup', $options, $mybb->input['usergroup'], array('id' => 'usergroup')), 'usergroup');
$form_container->output_row($lang->additional_user_groups, $lang->additional_user_groups_desc, $form->generate_select_box('additionalgroups[]', $options, $mybb->input['additionalgroups'], array('id' => 'additionalgroups', 'multiple' => true, 'size' => 5)), 'additionalgroups');
$form_container->output_row($lang->display_user_group." <em>*</em>", "", $form->generate_select_box('displaygroup', $display_group_options, $mybb->input['displaygroup'], array('id' => 'displaygroup')), 'displaygroup');

	$form_container->output_row($lang->post_count." <em>*</em>", "", $form->generate_text_box('postnum', $mybb->input['postnum'], array('id' => 'postnum')), 'postnum');
$form_container->output_row($lang->thread_count." <em>*</em>", "", $form->generate_text_box('threadnum', $mybb->input['threadnum'], array('id' => 'threadnum')), 'threadnum');

	$form_container->output_row($lang->post_count." <em>*</em>", "", $form->generate_numeric_field('postnum', $mybb->input['postnum'], array('id' => 'postnum', 'min' => 0)), 'postnum');
$form_container->output_row($lang->thread_count." <em>*</em>", "", $form->generate_numeric_field('threadnum', $mybb->input['threadnum'], array('id' => 'threadnum', 'min' => 0)), 'threadnum');


// Output custom profile fields - required
if(!isset($profile_fields['required']))


// Output custom profile fields - required
if(!isset($profile_fields['required']))

Zeile 1133Zeile 1140
	$form_container = new FormContainer($lang->optional_profile_info.": {$user['username']}");
$form_container->output_row($lang->custom_user_title, $lang->custom_user_title_desc, $form->generate_text_box('usertitle', $mybb->input['usertitle'], array('id' => 'usertitle')), 'usertitle');
$form_container->output_row($lang->website, "", $form->generate_text_box('website', $mybb->input['website'], array('id' => 'website')), 'website');

	$form_container = new FormContainer($lang->optional_profile_info.": {$user['username']}");
$form_container->output_row($lang->custom_user_title, $lang->custom_user_title_desc, $form->generate_text_box('usertitle', $mybb->input['usertitle'], array('id' => 'usertitle')), 'usertitle');
$form_container->output_row($lang->website, "", $form->generate_text_box('website', $mybb->input['website'], array('id' => 'website')), 'website');

	$form_container->output_row($lang->icq_number, "", $form->generate_text_box('icq', $mybb->input['icq'], array('id' => 'icq')), 'icq');

	$form_container->output_row($lang->icq_number, "", $form->generate_numeric_field('icq', $mybb->input['icq'], array('id' => 'icq', 'min' => 0)), 'icq');

	$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->skype_handle, "", $form->generate_text_box('skype', $mybb->input['skype'], array('id' => 'skype')), 'skype');

	$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->skype_handle, "", $form->generate_text_box('skype', $mybb->input['skype'], array('id' => 'skype')), 'skype');

Zeile 1164Zeile 1171

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

	$birthday_row .= ' '.$form->generate_numeric_field('bday3', $mybb->input['bday'][2], array('id' => 'bday_year', 'style' => 'width: 4em;', 'min' => 0));


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



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


Zeile 1172Zeile 1179
	output_custom_profile_fields($profile_fields['optional'], $mybb->input['profile_fields'], $form_container, $form);

$form_container->end();

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

$form_container->end();







	if($mybb->settings['allowaway'] != 0)
{
$form_container = new FormContainer($lang->away_information.": {$user['username']}");

	if($mybb->settings['allowaway'] != 0)
{
$form_container = new FormContainer($lang->away_information.": {$user['username']}");

Zeile 1188Zeile 1195
		//Return date (we can use the arrays from birthday)
$return_row = $form->generate_select_box('away_day', $birthday_days, $mybb->input['away_day'], array('id' => 'away_day'));
$return_row .= ' '.$form->generate_select_box('away_month', $birthday_months, $mybb->input['away_month'], array('id' => 'away_month'));

		//Return date (we can use the arrays from birthday)
$return_row = $form->generate_select_box('away_day', $birthday_days, $mybb->input['away_day'], array('id' => 'away_day'));
$return_row .= ' '.$form->generate_select_box('away_month', $birthday_months, $mybb->input['away_month'], array('id' => 'away_month'));

		$return_row .= ' '.$form->generate_text_box('away_year', $mybb->input['away_year'], array('id' => 'away_year', 'style' => 'width: 3em;'));


		$return_row .= ' '.$form->generate_numeric_field('away_year', $mybb->input['away_year'], array('id' => 'away_year', 'style' => 'width: 4em;', 'min' => 0));


		$form_container->output_row($lang->return_date, $lang->return_date_desc, $return_row, 'away_date');

$form_container->end();
}

		$form_container->output_row($lang->return_date, $lang->return_date_desc, $return_row, 'away_date');

$form_container->end();
}





	echo "</div>\n";

	echo "</div>\n";


//


//

	// ACCOUNT SETTINGS
//

// Plugin hook note - we should add hooks in above each output_row for the below so users can add their own options to each group :>

	// ACCOUNT SETTINGS
//

// Plugin hook note - we should add hooks in above each output_row for the below so users can add their own options to each group :>





	echo "<div id=\"tab_settings\">\n";
$form_container = new FormContainer($lang->account_settings.": {$user['username']}");
$login_options = array(

	echo "<div id=\"tab_settings\">\n";
$form_container = new FormContainer($lang->account_settings.": {$user['username']}");
$login_options = array(

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

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

	}

	}


$messaging_options = array(
$form->generate_check_box("allownotices", 1, $lang->recieve_admin_emails, array("checked" => $mybb->input['allownotices'])),


$messaging_options = array(
$form->generate_check_box("allownotices", 1, $lang->recieve_admin_emails, array("checked" => $mybb->input['allownotices'])),

Zeile 1222Zeile 1229
		$form->generate_check_box("receivefrombuddy", 1, $lang->recieve_pms_from_buddy, array("checked" => $mybb->input['receivefrombuddy'])),
$form->generate_check_box("pmnotice", 1, $lang->alert_new_pms, array("checked" => $mybb->input['pmnotice'])),
$form->generate_check_box("pmnotify", 1, $lang->email_notify_new_pms, array("checked" => $mybb->input['pmnotify'])),

		$form->generate_check_box("receivefrombuddy", 1, $lang->recieve_pms_from_buddy, array("checked" => $mybb->input['receivefrombuddy'])),
$form->generate_check_box("pmnotice", 1, $lang->alert_new_pms, array("checked" => $mybb->input['pmnotice'])),
$form->generate_check_box("pmnotify", 1, $lang->email_notify_new_pms, array("checked" => $mybb->input['pmnotify'])),

 
		$form->generate_check_box("buddyrequestspm", 1, $lang->buddy_requests_pm, array("checked" => $mybb->input['buddyrequestspm'])),
$form->generate_check_box("buddyrequestsauto", 1, $lang->buddy_requests_auto, array("checked" => $mybb->input['buddyrequestsauto'])),

		"<label for=\"subscriptionmethod\">{$lang->default_thread_subscription_mode}:</label><br />".$form->generate_select_box("subscriptionmethod", array($lang->do_not_subscribe, $lang->no_email_notification, $lang->instant_email_notification), $mybb->input['subscriptionmethod'], array('id' => 'subscriptionmethod'))
);
$form_container->output_row($lang->messaging_and_notification, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $messaging_options)."</div>");

		"<label for=\"subscriptionmethod\">{$lang->default_thread_subscription_mode}:</label><br />".$form->generate_select_box("subscriptionmethod", array($lang->do_not_subscribe, $lang->no_email_notification, $lang->instant_email_notification), $mybb->input['subscriptionmethod'], array('id' => 'subscriptionmethod'))
);
$form_container->output_row($lang->messaging_and_notification, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $messaging_options)."</div>");

Zeile 1272Zeile 1281
		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')),
"<label for=\"daysprune\">{$lang->default_thread_age_view}:</label><br />".$form->generate_select_box("daysprune", $thread_age_options, $mybb->input['daysprune'], array('id' => 'daysprune'))

	$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')),
"<label for=\"daysprune\">{$lang->default_thread_age_view}:</label><br />".$form->generate_select_box("daysprune", $thread_age_options, $mybb->input['daysprune'], array('id' => 'daysprune'))

Zeile 1306Zeile 1315
	);
$form_container->output_row($lang->thread_view_options, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $thread_options)."</div>");


	);
$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($lang->get_languages(), array('' => $lang->use_default));

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


$other_options = array(
$form->generate_check_box("showredirect", 1, $lang->show_redirect, array("checked" => $mybb->input['showredirect'])),

Zeile 1371Zeile 1380
		else
{
// There's a limit to the suspension!

		else
{
// There's a limit to the suspension!

			$expired = my_date('relative', $user['suspendsigtime']);
$lang->suspend_expire_info = $lang->sprintf($lang->suspend_expire_info, $expired);

















			$remaining = $user['suspendsigtime']-TIME_NOW;
$expired = nice_time($remaining, array('seconds' => false));

$color = 'inherit';
if($remaining < 3600)
{
$color = 'red';
}
elseif($remaining < 86400)
{
$color = 'maroon';
}
elseif($remaining < 604800)
{
$color = 'green';
}

$lang->suspend_expire_info = $lang->sprintf($lang->suspend_expire_info, $expired, $color);

		}
$user_suspend_info = '
<tr>
<td colspan="2">'.$lang->suspend_expire_info.'<br />'.$lang->suspend_sig_extend.'</td>
</tr>';

		}
$user_suspend_info = '
<tr>
<td colspan="2">'.$lang->suspend_expire_info.'<br />'.$lang->suspend_sig_extend.'</td>
</tr>';

	}

	}

	else
{
$sig_checked = 0;
$user_suspend_info = '';
}

	else
{
$sig_checked = 0;
$user_suspend_info = '';
}





	$actions = '
<script type="text/javascript">
<!--

	$actions = '
<script type="text/javascript">
<!--

Zeile 1395Zeile 1420
			if($("#suspend_action").is(\':visible\'))
{
$("#suspend_action").hide();

			if($("#suspend_action").is(\':visible\'))
{
$("#suspend_action").hide();

			}

			}

			else
{
$("#suspend_action").show();

			else
{
$("#suspend_action").show();

Zeile 1410Zeile 1435
			<table cellpadding="4">'.$user_suspend_info.'
<tr>
<td width="30%"><small>'.$lang->expire_length.'</small></td>

			<table cellpadding="4">'.$user_suspend_info.'
<tr>
<td width="30%"><small>'.$lang->expire_length.'</small></td>

					<td>'.$form->generate_text_box('action_time', $mybb->input['action_time'], array('style' => 'width: 2em;')).' '.$form->generate_select_box('action_period', $periods, $mybb->input['action_period']).'</td>

					<td>'.$form->generate_numeric_field('action_time', $mybb->input['action_time'], array('style' => 'width: 3em;', 'min' => 0)).' '.$form->generate_select_box('action_period', $periods, $mybb->input['action_period']).'</td>

				</tr>
</table>
</dd>

				</tr>
</table>
</dd>

Zeile 1460Zeile 1485

if($errors)
{


if($errors)
{

		$avatar_url = $mybb->input['avatar_url'];

		$avatar_url = htmlspecialchars_uni($mybb->input['avatar_url']);

	}

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

	}

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

Zeile 1516Zeile 1541
	$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

	// Generate check box

	// Generate check box

	$modpost_options = $form->generate_select_box('modpost_period', $periods, $mybb->input['modpost_period'], array('id' => 'modpost_period'));

// Do we have any existing suspensions here?

	$modpost_options = $form->generate_select_box('modpost_period', $periods, $mybb->input['modpost_period'], array('id' => 'modpost_period'));

// Do we have any existing suspensions here?

Zeile 1525Zeile 1550
	{
$mybb->input['moderateposting'] = 1;
if($user['moderationtime'] != 0)

	{
$mybb->input['moderateposting'] = 1;
if($user['moderationtime'] != 0)

		{
$expired = my_date('relative', $user['moderationtime']);
$existing_info = $lang->sprintf($lang->moderate_length, $expired);

















		{
$remaining = $user['moderationtime']-TIME_NOW;
$expired = nice_time($remaining, array('seconds' => false));

$color = 'inherit';
if($remaining < 3600)
{
$color = 'red';
}
elseif($remaining < 86400)
{
$color = 'maroon';
}
elseif($remaining < 604800)
{
$color = 'green';
}

$existing_info = $lang->sprintf($lang->moderate_length, $expired, $color);

		}
else
{

		}
else
{

Zeile 1535Zeile 1576
		}
}


		}
}


	$modpost_div = '<div id="modpost">'.$existing_info.''.$lang->moderate_for.' '.$form->generate_text_box("modpost_time", $mybb->input['modpost_time'], array('style' => 'width: 2em;')).' '.$modpost_options.'</div>';

	$modpost_div = '<div id="modpost">'.$existing_info.''.$lang->moderate_for.' '.$form->generate_numeric_field("modpost_time", $mybb->input['modpost_time'], array('style' => 'width: 3em;', 'min' => 0)).' '.$modpost_options.'</div>';

	$lang->moderate_posts_info = $lang->sprintf($lang->moderate_posts_info, $user['username']);
$form_container->output_row($form->generate_check_box("moderateposting", 1, $lang->moderate_posts, array("id" => "moderateposting", "onclick" => "toggleBox('modpost');", "checked" => $mybb->input['moderateposting'])), $lang->moderate_posts_info, $modpost_div);


	$lang->moderate_posts_info = $lang->sprintf($lang->moderate_posts_info, $user['username']);
$form_container->output_row($form->generate_check_box("moderateposting", 1, $lang->moderate_posts, array("id" => "moderateposting", "onclick" => "toggleBox('modpost');", "checked" => $mybb->input['moderateposting'])), $lang->moderate_posts_info, $modpost_div);


Zeile 1549Zeile 1590
		$mybb->input['suspendposting'] = 1;

if($user['suspensiontime'] == 0 || $mybb->input['suspost_period'] == "never")

		$mybb->input['suspendposting'] = 1;

if($user['suspensiontime'] == 0 || $mybb->input['suspost_period'] == "never")

		{

		{

			$existing_info = $lang->suspended_perm;
}
else
{

			$existing_info = $lang->suspended_perm;
}
else
{

			$suspost_date = my_date('relative', $user['suspensiontime']);
$existing_info = $lang->sprintf($lang->suspend_length, $suspost_date);

















			$remaining = $user['suspensiontime']-TIME_NOW;
$suspost_date = nice_time($remaining, array('seconds' => false));

$color = 'inherit';
if($remaining < 3600)
{
$color = 'red';
}
elseif($remaining < 86400)
{
$color = 'maroon';
}
elseif($remaining < 604800)
{
$color = 'green';
}

$existing_info = $lang->sprintf($lang->suspend_length, $suspost_date, $color);

		}
}


		}
}


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

	$suspost_div = '<div id="suspost">'.$existing_info.''.$lang->suspend_for.' '.$form->generate_numeric_field("suspost_time", $mybb->input['suspost_time'], array('style' => 'width: 3em;', 'min' => 0)).' '.$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);


	$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 1641Zeile 1698
	if(!$user['uid'])
{
flash_message($lang->error_invalid_user, 'error');

	if(!$user['uid'])
{
flash_message($lang->error_invalid_user, 'error');

		admin_redirect("index.php?module=user-users");
}


		admin_redirect("index.php?module=user-users");
}


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


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


	// User clicked no
if($mybb->input['no'])
{
admin_redirect("index.php?module=user-users");
}

$plugins->run_hooks("admin_user_users_delete");

	// User clicked no
if($mybb->input['no'])
{
admin_redirect("index.php?module=user-users");
}

$plugins->run_hooks("admin_user_users_delete");


if($mybb->request_method == "post")
{


if($mybb->request_method == "post")
{

Zeile 1672Zeile 1729
			flash_message($lang->error_cannot_delete_user, 'error');
admin_redirect("index.php?module=user-users");
}

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

 

$cache->update_awaitingactivation();


$plugins->run_hooks("admin_user_users_delete_commit_end");



$plugins->run_hooks("admin_user_users_delete_commit_end");


Zeile 1700Zeile 1759
	$plugins->run_hooks("admin_user_users_referrers");

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

	$plugins->run_hooks("admin_user_users_referrers");

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





	// Fetch default admin view
$default_view = fetch_default_view("user");
if(!$default_view)

	// Fetch default admin view
$default_view = fetch_default_view("user");
if(!$default_view)

Zeile 1772Zeile 1831
		$user['lastip'] = my_inet_ntop($db->unescape_binary($user['lastip']));
$popup = new PopupMenu("user_last", $lang->options);
$popup->add_item($lang->show_users_regged_with_ip,

		$user['lastip'] = my_inet_ntop($db->unescape_binary($user['lastip']));
$popup = new PopupMenu("user_last", $lang->options);
$popup->add_item($lang->show_users_regged_with_ip,

			"index.php?module=user-users&amp;action=search&amp;results=1&amp;conditions=".urlencode(serialize(array("regip" => $user['lastip']))));
$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" => $user['lastip']))));

			"index.php?module=user-users&amp;action=search&amp;results=1&amp;conditions=".urlencode(my_serialize(array("regip" => $user['lastip']))));
$popup->add_item($lang->show_users_posted_with_ip, "index.php?module=user-users&amp;results=1&amp;action=search&amp;conditions=".urlencode(my_serialize(array("postip" => $user['lastip']))));

		$popup->add_item($lang->info_on_ip, "index.php?module=user-users&amp;action=iplookup&ipaddress={$user['lastip']}", "MyBB.popupWindow('index.php?module=user-users&amp;action=iplookup&ipaddress={$user['lastip']}', null, true); return false;");
$popup->add_item($lang->ban_ip, "index.php?module=config-banning&amp;filter={$user['lastip']}");
$controls = $popup->fetch();

		$popup->add_item($lang->info_on_ip, "index.php?module=user-users&amp;action=iplookup&ipaddress={$user['lastip']}", "MyBB.popupWindow('index.php?module=user-users&amp;action=iplookup&ipaddress={$user['lastip']}', null, true); return false;");
$popup->add_item($lang->ban_ip, "index.php?module=config-banning&amp;filter={$user['lastip']}");
$controls = $popup->fetch();

Zeile 1791Zeile 1850
	{
$user['regip'] = my_inet_ntop($db->unescape_binary($user['regip']));
$popup = new PopupMenu("user_reg", $lang->options);

	{
$user['regip'] = my_inet_ntop($db->unescape_binary($user['regip']));
$popup = new PopupMenu("user_reg", $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" => $user['regip']))));
$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" => $user['regip']))));

		$popup->add_item($lang->show_users_regged_with_ip, "index.php?module=user-users&amp;results=1&amp;action=search&amp;conditions=".urlencode(my_serialize(array("regip" => $user['regip']))));
$popup->add_item($lang->show_users_posted_with_ip, "index.php?module=user-users&amp;results=1&amp;action=search&amp;conditions=".urlencode(my_serialize(array("postip" => $user['regip']))));

		$popup->add_item($lang->info_on_ip, "index.php?module=user-users&amp;action=iplookup&ipaddress={$user['regip']}", "MyBB.popupWindow('index.php?module=user-users&amp;action=iplookup&ipaddress={$user['regip']}', null, true); return false;");
$popup->add_item($lang->ban_ip, "index.php?module=config-banning&amp;filter={$user['regip']}");
$controls = $popup->fetch();

		$popup->add_item($lang->info_on_ip, "index.php?module=user-users&amp;action=iplookup&ipaddress={$user['regip']}", "MyBB.popupWindow('index.php?module=user-users&amp;action=iplookup&ipaddress={$user['regip']}', null, true); return false;");
$popup->add_item($lang->ban_ip, "index.php?module=config-banning&amp;filter={$user['regip']}");
$controls = $popup->fetch();

Zeile 1809Zeile 1868
		++$counter;
$ip['ipaddress'] = my_inet_ntop($db->unescape_binary($ip['ipaddress']));
$popup = new PopupMenu("id_{$counter}", $lang->options);

		++$counter;
$ip['ipaddress'] = my_inet_ntop($db->unescape_binary($ip['ipaddress']));
$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->show_users_regged_with_ip, "index.php?module=user-users&amp;results=1&amp;action=search&amp;conditions=".urlencode(my_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(my_serialize(array("postip" => $ip['ipaddress']))));

		$popup->add_item($lang->info_on_ip, "index.php?module=user-users&amp;action=iplookup&ipaddress={$ip['ipaddress']}", "MyBB.popupWindow('index.php?module=user-users&amp;action=iplookup&ipaddress={$ip['ipaddress']}', null, true); return false;");
$popup->add_item($lang->ban_ip, "index.php?module=config-banning&amp;filter={$ip['ipaddress']}");
$controls = $popup->fetch();

		$popup->add_item($lang->info_on_ip, "index.php?module=user-users&amp;action=iplookup&ipaddress={$ip['ipaddress']}", "MyBB.popupWindow('index.php?module=user-users&amp;action=iplookup&ipaddress={$ip['ipaddress']}', null, true); return false;");
$popup->add_item($lang->ban_ip, "index.php?module=config-banning&amp;filter={$ip['ipaddress']}");
$controls = $popup->fetch();

Zeile 2046Zeile 2105
			}

$plugins->run_hooks("admin_user_users_merge_commit");

			}

$plugins->run_hooks("admin_user_users_merge_commit");

 

$cache->update_awaitingactivation();


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


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

Zeile 2078Zeile 2139
	// Autocompletion for usernames
echo '
<link rel="stylesheet" href="../jscripts/select2/select2.css">

	// Autocompletion for usernames
echo '
<link rel="stylesheet" href="../jscripts/select2/select2.css">

	<script type="text/javascript" src="../jscripts/select2/select2.min.js"></script>

	<script type="text/javascript" src="../jscripts/select2/select2.min.js?ver=1804"></script>

	<script type="text/javascript">
<!--
$("#source_username").select2({

	<script type="text/javascript">
<!--
$("#source_username").select2({

		placeholder: "Search for a user",

		placeholder: "'.$lang->search_for_a_user.'",

		minimumInputLength: 3,
maximumSelectionSize: 3,
multiple: false,

		minimumInputLength: 3,
maximumSelectionSize: 3,
multiple: false,

Zeile 2112Zeile 2173
		}
});
$("#destination_username").select2({

		}
});
$("#destination_username").select2({

		placeholder: "Search for a user",

		placeholder: "'.$lang->search_for_a_user.'",

		minimumInputLength: 3,
maximumSelectionSize: 3,
multiple: false,

		minimumInputLength: 3,
maximumSelectionSize: 3,
multiple: false,

Zeile 2160Zeile 2221
		// Build view options from incoming search options
if($mybb->input['vid'])
{

		// Build view options from incoming search options
if($mybb->input['vid'])
{

			$query = $db->simple_select("adminviews", "*", "vid='".$mybb->get_input('vid', 1)."'");

			$query = $db->simple_select("adminviews", "*", "vid='".$mybb->get_input('vid', MyBB::INPUT_INT)."'");

			$admin_view = $db->fetch_array($query);
// View does not exist or this view is private and does not belong to the current user
if(!$admin_view['vid'] || ($admin_view['visibility'] == 1 && $admin_view['uid'] != $mybb->user['uid']))

			$admin_view = $db->fetch_array($query);
// View does not exist or this view is private and does not belong to the current user
if(!$admin_view['vid'] || ($admin_view['visibility'] == 1 && $admin_view['uid'] != $mybb->user['uid']))

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


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


		if($mybb->get_input('perpage', 1))

		if($mybb->get_input('perpage', MyBB::INPUT_INT))

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

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

Zeile 2280Zeile 2341
		"desc" => $lang->descending
);
$form_container->output_row($lang->sort_results_by, "", $form->generate_select_box('sortby', $sort_options, $mybb->input['sortby'], array('id' => 'sortby'))." {$lang->in} ".$form->generate_select_box('order', $sort_directions, $mybb->input['order'], array('id' => 'order')), 'sortby');

		"desc" => $lang->descending
);
$form_container->output_row($lang->sort_results_by, "", $form->generate_select_box('sortby', $sort_options, $mybb->input['sortby'], array('id' => 'sortby'))." {$lang->in} ".$form->generate_select_box('order', $sort_directions, $mybb->input['order'], array('id' => 'order')), 'sortby');

	$form_container->output_row($lang->results_per_page, "", $form->generate_text_box('perpage', $mybb->input['perpage'], array('id' => 'perpage')), 'perpage');

	$form_container->output_row($lang->results_per_page, "", $form->generate_numeric_field('perpage', $mybb->input['perpage'], array('id' => 'perpage', 'min' => 1)), 'perpage');

	$form_container->output_row($lang->display_results_as, "", $form->generate_radio_button('displayas', 'table', $lang->table, array('checked' => ($mybb->input['displayas'] != "card" ? true : false)))."<br />".$form->generate_radio_button('displayas', 'card', $lang->business_card, array('checked' => ($mybb->input['displayas'] == "card" ? true : false))));
$form_container->end();


	$form_container->output_row($lang->display_results_as, "", $form->generate_radio_button('displayas', 'table', $lang->table, array('checked' => ($mybb->input['displayas'] != "card" ? true : false)))."<br />".$form->generate_radio_button('displayas', 'card', $lang->business_card, array('checked' => ($mybb->input['displayas'] == "card" ? true : false))));
$form_container->end();


Zeile 2500Zeile 2561
							// Not currently banned - insert the ban
$insert_array = array(
'uid' => $user['uid'],

							// Not currently banned - insert the ban
$insert_array = array(
'uid' => $user['uid'],

								'gid' => (int)$mybb->input['usergroup'],

								'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT),

								'oldgroup' => $user['usergroup'],
'oldadditionalgroups' => $user['additionalgroups'],
'olddisplaygroup' => $user['displaygroup'],

								'oldgroup' => $user['usergroup'],
'oldadditionalgroups' => $user['additionalgroups'],
'olddisplaygroup' => $user['displaygroup'],

Zeile 2600Zeile 2661
						log_admin_action($to_be_deleted);

$lang->users_deleted = $lang->sprintf($lang->users_deleted, $to_be_deleted);

						log_admin_action($to_be_deleted);

$lang->users_deleted = $lang->sprintf($lang->users_deleted, $to_be_deleted);

 

$cache->update_awaitingactivation();


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

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

Zeile 2615Zeile 2679
					if(($mybb->input['day'] || $mybb->input['month'] || $mybb->input['year']) && $mybb->input['set'])
{
$errors[] = $lang->multi_selected_dates;

					if(($mybb->input['day'] || $mybb->input['month'] || $mybb->input['year']) && $mybb->input['set'])
{
$errors[] = $lang->multi_selected_dates;

					}

$day = (int)$mybb->input['day'];
$month = (int)$mybb->input['month'];
$year = (int)$mybb->input['year'];

					}

$day = $mybb->get_input('day', MyBB::INPUT_INT);
$month = $mybb->get_input('month', MyBB::INPUT_INT);
$year = $mybb->get_input('year', MyBB::INPUT_INT);


// Selected a date - check if the date the user entered is valid
if($mybb->input['day'] || $mybb->input['month'] || $mybb->input['year'])


// Selected a date - check if the date the user entered is valid
if($mybb->input['day'] || $mybb->input['month'] || $mybb->input['year'])

Zeile 2630Zeile 2694
							$errors[] = $lang->incorrect_date;
}


							$errors[] = $lang->incorrect_date;
}


						// Check the month
$months = get_bdays($year);
if($day > $months[$month]-1)
{
$errors[] = $lang->incorrect_date;
}


						// Check the month
$months = get_bdays($year);
if($day > $months[$month-1])
{
$errors[] = $lang->incorrect_date;
}


						// Check the year
if($year != 0 && ($year < (date("Y")-100)) || $year > date("Y"))
{

						// Check the year
if($year != 0 && ($year < (date("Y")-100)) || $year > date("Y"))
{

Zeile 2644Zeile 2708
						}

if(!$errors)

						}

if(!$errors)

						{

						{

							// No errors, so let's continue and set the date to delete from
$date = mktime(date('H'), date('i'), date('s'), $month, $day, $year); // Generate a unix time stamp
}

							// No errors, so let's continue and set the date to delete from
$date = mktime(date('H'), date('i'), date('s'), $month, $day, $year); // Generate a unix time stamp
}

Zeile 2668Zeile 2732
								break;
case '4':
$threshold = $base_time * 365; // 1 year = 365 days

								break;
case '4':
$threshold = $base_time * 365; // 1 year = 365 days

								break;

								break;

							case '5':
$threshold = $base_time * 548; // 18 months = 365 + 183
break;

							case '5':
$threshold = $base_time * 548; // 18 months = 365 + 183
break;

Zeile 2813Zeile 2877
				}
$date_box = $form->generate_select_box('day', $day_options, $mybb->input['day']);
$month_box = $form->generate_select_box('month', $month_options, $mybb->input['month']);

				}
$date_box = $form->generate_select_box('day', $day_options, $mybb->input['day']);
$month_box = $form->generate_select_box('month', $month_options, $mybb->input['month']);

				$year_box = $form->generate_text_box('year', $mybb->input['year'], array('id' => 'year', 'style' => 'width: 50px;'));

				$year_box = $form->generate_numeric_field('year', $mybb->input['year'], array('id' => 'year', 'style' => 'width: 50px;', 'min' => 0));


$prune_select = $date_box.$month_box.$year_box;
$form_container->output_row($lang->manual_date, "", $prune_select, 'date');


$prune_select = $date_box.$month_box.$year_box;
$form_container->output_row($lang->manual_date, "", $prune_select, 'date');

Zeile 2847Zeile 2911
							{
unset($mybb->input['additionalgroups'][$key]);
}

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

						}


						}


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

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

Zeile 2858Zeile 2922

// Create an update array
$update_array = array(


// Create an update array
$update_array = array(

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

						"usergroup" => $mybb->get_input('usergroup', MyBB::INPUT_INT),

						"additionalgroups" => $additionalgroups,

						"additionalgroups" => $additionalgroups,

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

						"displaygroup" => $mybb->get_input('displaygroup', MyBB::INPUT_INT)

					);

// Do the usergroup update for all those selected

					);

// Do the usergroup update for all those selected

Zeile 2923Zeile 2987
				$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title'));
while($usergroup = $db->fetch_array($query))
{

				$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title'));
while($usergroup = $db->fetch_array($query))
{

					$options[$usergroup['gid']] = $usergroup['title'];
$display_group_options[$usergroup['gid']] = $usergroup['title'];

					$options[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']);
$display_group_options[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']);

				}

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

				}

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

Zeile 2966Zeile 3030
		// Showing a specific view
if(isset($mybb->input['vid']))
{

		// Showing a specific view
if(isset($mybb->input['vid']))
{

			$query = $db->simple_select("adminviews", "*", "vid='".$mybb->get_input('vid', 1)."'");

			$query = $db->simple_select("adminviews", "*", "vid='".$mybb->get_input('vid', MyBB::INPUT_INT)."'");

			$admin_view = $db->fetch_array($query);
// View does not exist or this view is private and does not belong to the current user
if(!$admin_view['vid'] || ($admin_view['visibility'] == 1 && $admin_view['uid'] != $mybb->user['uid']))

			$admin_view = $db->fetch_array($query);
// View does not exist or this view is private and does not belong to the current user
if(!$admin_view['vid'] || ($admin_view['visibility'] == 1 && $admin_view['uid'] != $mybb->user['uid']))

Zeile 3031Zeile 3095
			echo "<div style=\"display: inline; float: right;\">{$admin_view['popup']}</div><br />\n";
}
$page->output_inline_error($errors);

			echo "<div style=\"display: inline; float: right;\">{$admin_view['popup']}</div><br />\n";
}
$page->output_inline_error($errors);

	}

	}


echo $results;

$page->output_footer();
}



echo $results;

$page->output_footer();
}


 
/**
* @param array $view
*
* @return string
*/

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 3046Zeile 3115
	if($view['title'])
{
$title_string = "view_title_{$view['vid']}";

	if($view['title'])
{
$title_string = "view_title_{$view['vid']}";





		if($lang->$title_string)
{
$view['title'] = $lang->$title_string;

		if($lang->$title_string)
{
$view['title'] = $lang->$title_string;

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

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

	{

	{

		$view['conditions'] = my_unserialize($view['conditions']);
}
if(!is_array($view['fields']))

		$view['conditions'] = my_unserialize($view['conditions']);
}
if(!is_array($view['fields']))

Zeile 3090Zeile 3159
			$admin_session['data']['user_views'][$search_id] = $view;
update_admin_session('user_views', $admin_session['data']['user_views']);
$mybb->input['search_id'] = $search_id;

			$admin_session['data']['user_views'][$search_id] = $view;
update_admin_session('user_views', $admin_session['data']['user_views']);
$mybb->input['search_id'] = $search_id;

		}

		}

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

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

	}


	}


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

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

Zeile 3112Zeile 3181
	if(empty($view))
{
return false;

	if(empty($view))
{
return false;

	}


	}


	$table = new Table;

// Build header for table based view

	$table = new Table;

// Build header for table based view

Zeile 3149Zeile 3218
	foreach($user_like_fields as $search_field)
{
if(!empty($view['conditions'][$search_field]) && !$view['conditions'][$search_field.'_blank'])

	foreach($user_like_fields as $search_field)
{
if(!empty($view['conditions'][$search_field]) && !$view['conditions'][$search_field.'_blank'])

		{

		{

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

			$search_sql .= " AND u.{$search_field} LIKE '%".$db->escape_string_like($view['conditions'][$search_field])."%'";
}
else if(!empty($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(!empty($view['conditions'][$search_field]))
{
$search_sql .= " AND u.{$search_field}='".$db->escape_string($view['conditions'][$search_field])."'";

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

		}
}


		}
}


	// LESS THAN or GREATER THAN
$direction_fields = array("postnum", "threadnum");
foreach($direction_fields as $search_field)

	// LESS THAN or GREATER THAN
$direction_fields = array("postnum", "threadnum");
foreach($direction_fields as $search_field)

Zeile 3179Zeile 3248
			{
case "greater_than":
$direction = ">";

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

					break;

					break;

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

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

Zeile 3197Zeile 3266
		if(!empty($view['conditions'][$search_field]) && (int)$view['conditions'][$search_field])
{
$threshold = TIME_NOW - ((int)$view['conditions'][$search_field] * 24 * 60 * 60);

		if(!empty($view['conditions'][$search_field]) && (int)$view['conditions'][$search_field])
{
$threshold = TIME_NOW - ((int)$view['conditions'][$search_field] * 24 * 60 * 60);





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

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

Zeile 3288Zeile 3357
				}
else
{

				}
else
{

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

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

				}
}
}

				}
}
}

Zeile 3380Zeile 3449
		}
else
{

		}
else
{

			$mybb->input['page'] = $mybb->get_input('page', 1);

			$mybb->input['page'] = $mybb->get_input('page', MyBB::INPUT_INT);

		}

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

		}

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

Zeile 3388Zeile 3457
			$start = ($mybb->input['page'] - 1) * $view['perpage'];
}
else

			$start = ($mybb->input['page'] - 1) * $view['perpage'];
}
else

		{

		{

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

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

Zeile 3440Zeile 3509
		{
$comma = $groups_list = '';
$user['view']['username'] = "<a href=\"index.php?module=user-users&amp;action=edit&amp;uid={$user['uid']}\">".format_name($user['username'], $user['usergroup'], $user['displaygroup'])."</a>";

		{
$comma = $groups_list = '';
$user['view']['username'] = "<a href=\"index.php?module=user-users&amp;action=edit&amp;uid={$user['uid']}\">".format_name($user['username'], $user['usergroup'], $user['displaygroup'])."</a>";

			$user['view']['usergroup'] = $usergroups[$user['usergroup']]['title'];

			$user['view']['usergroup'] = htmlspecialchars_uni($usergroups[$user['usergroup']]['title']);

			if($user['additionalgroups'])
{
$additional_groups = explode(",", $user['additionalgroups']);

foreach($additional_groups as $group)
{

			if($user['additionalgroups'])
{
$additional_groups = explode(",", $user['additionalgroups']);

foreach($additional_groups as $group)
{

					$groups_list .= "{$comma}{$usergroups[$group]['title']}";

					$groups_list .= $comma.htmlspecialchars_uni($usergroups[$group]['title']);

					$comma = $lang->comma;
}
}

					$comma = $lang->comma;
}
}

Zeile 3485Zeile 3554
					$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

					$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

				{

				{

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

					$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 3508Zeile 3577

if($mybb->settings['enablewarningsystem'] != 0 && $usergroups[$user['usergroup']]['canreceivewarnings'] != 0)
{


if($mybb->settings['enablewarningsystem'] != 0 && $usergroups[$user['usergroup']]['canreceivewarnings'] != 0)
{

 
				if($mybb->settings['maxwarningpoints'] < 1)
{
$mybb->settings['maxwarningpoints'] = 10;
}


				$warning_level = round($user['warningpoints']/$mybb->settings['maxwarningpoints']*100);
if($warning_level > 100)
{
$warning_level = 100;
}
$user['view']['warninglevel'] = get_colored_warning_level($warning_level);

				$warning_level = round($user['warningpoints']/$mybb->settings['maxwarningpoints']*100);
if($warning_level > 100)
{
$warning_level = 100;
}
$user['view']['warninglevel'] = get_colored_warning_level($warning_level);

			}


			}


			if($user['avatar'] && my_substr($user['avatar'], 0, 7) !== 'http://' && my_substr($user['avatar'], 0, 8) !== 'https://')
{
$user['avatar'] = "../{$user['avatar']}";
}
if($view['view_type'] == "card")

			if($user['avatar'] && my_substr($user['avatar'], 0, 7) !== 'http://' && my_substr($user['avatar'], 0, 8) !== 'https://')
{
$user['avatar'] = "../{$user['avatar']}";
}
if($view['view_type'] == "card")

			{

			{

				$scaled_avatar = fetch_scaled_avatar($user, 80, 80);
}
else
{
$scaled_avatar = fetch_scaled_avatar($user, 34, 34);

				$scaled_avatar = fetch_scaled_avatar($user, 80, 80);
}
else
{
$scaled_avatar = fetch_scaled_avatar($user, 34, 34);

			}

			}

			if(!$user['avatar'])
{
$user['avatar'] = "../".$mybb->settings['useravatar'];
}
$user['view']['avatar'] = "<img src=\"".htmlspecialchars_uni($user['avatar'])."\" alt=\"\" width=\"{$scaled_avatar['width']}\" height=\"{$scaled_avatar['height']}\" />";

			if(!$user['avatar'])
{
$user['avatar'] = "../".$mybb->settings['useravatar'];
}
$user['view']['avatar'] = "<img src=\"".htmlspecialchars_uni($user['avatar'])."\" alt=\"\" width=\"{$scaled_avatar['width']}\" height=\"{$scaled_avatar['height']}\" />";

 

// Convert IP's to readable
$user['regip'] = my_inet_ntop($db->unescape_binary($user['regip']));
$user['lastip'] = my_inet_ntop($db->unescape_binary($user['lastip']));


if($view['view_type'] == "card")
{


if($view['view_type'] == "card")
{

Zeile 3561Zeile 3639
	$switch_url = $view['url'];
if($mybb->input['page'] > 0)
{

	$switch_url = $view['url'];
if($mybb->input['page'] > 0)
{

		$switch_url .= "&amp;page=".$mybb->get_input('page', 1);

		$switch_url .= "&amp;page=".$mybb->get_input('page', MyBB::INPUT_INT);

	}
if($view['view_type'] != "card")
{

	}
if($view['view_type'] != "card")
{

Zeile 3706Zeile 3784
	return $built_view;
}


	return $built_view;
}


 
/**
* @param array $user
* @param array $view
* @param int $i
*
* @return string
*/

function build_user_view_card($user, $view, &$i)
{
global $user_view_fields;

function build_user_view_card($user, $view, &$i)
{
global $user_view_fields;

Zeile 3786Zeile 3871

}



}


 
/**
* @param array $user
* @param array $view
* @param DefaultTable $table
*/

function build_user_view_table($user, $view, &$table)
{
global $user_view_fields;

function build_user_view_table($user, $view, &$table)
{
global $user_view_fields;

Zeile 3823Zeile 3913
	$table->construct_row();
}


	$table->construct_row();
}


 
/**
* @param array $user
* @param int $max_width
* @param int $max_height
*
* @return array
*/

function fetch_scaled_avatar($user, $max_width=80, $max_height=80)
{
$scaled_dimensions = array(

function fetch_scaled_avatar($user, $max_width=80, $max_height=80)
{
$scaled_dimensions = array(

Zeile 3843Zeile 3940
	return array("width" => $scaled_dimensions['width'], "height" => $scaled_dimensions['height']);
}


	return array("width" => $scaled_dimensions['width'], "height" => $scaled_dimensions['height']);
}


 
/**
* @param array $fields
* @param array $values
* @param DefaultFormContainer $form_container
* @param DefaultForm $form
* @param bool $search
*/

function output_custom_profile_fields($fields, $values, &$form_container, &$form, $search=false)
{
global $lang;

function output_custom_profile_fields($fields, $values, &$form_container, &$form, $search=false)
{
global $lang;

Zeile 3853Zeile 3957
	}
foreach($fields as $profile_field)
{

	}
foreach($fields as $profile_field)
{

 
		$profile_field['name'] = htmlspecialchars_uni($profile_field['name']);
$profile_field['description'] = htmlspecialchars_uni($profile_field['description']);

		$profile_field['type'] = htmlspecialchars_uni($profile_field['type']);
list($type, $options) = explode("\n", $profile_field['type'], 2);
$type = trim($type);

		$profile_field['type'] = htmlspecialchars_uni($profile_field['type']);
list($type, $options) = explode("\n", $profile_field['type'], 2);
$type = trim($type);

Zeile 3985Zeile 4091
	}
}


	}
}


 
/**
* @param array $input
* @param DefaultForm $form
*/

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

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

Zeile 4017Zeile 4127
	$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title'));
while($usergroup = $db->fetch_array($query))
{

	$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title'));
while($usergroup = $db->fetch_array($query))
{

		$options[$usergroup['gid']] = $usergroup['title'];

		$options[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']);

	}

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

Zeile 4072Zeile 4182
	// Autocompletion for usernames
echo '
<link rel="stylesheet" href="../jscripts/select2/select2.css">

	// Autocompletion for usernames
echo '
<link rel="stylesheet" href="../jscripts/select2/select2.css">

<script type="text/javascript" src="../jscripts/select2/select2.min.js"></script>

<script type="text/javascript" src="../jscripts/select2/select2.min.js?ver=1804"></script>

<script type="text/javascript">
<!--
$("#username").select2({

<script type="text/javascript">
<!--
$("#username").select2({

	placeholder: "Search for a user",

	placeholder: "'.$lang->search_for_a_user.'",

	minimumInputLength: 3,
maximumSelectionSize: 3,
multiple: false,

	minimumInputLength: 3,
maximumSelectionSize: 3,
multiple: false,

Zeile 4108Zeile 4218
// -->
</script>';
}

// -->
</script>';
}


?>