Vergleich admin/modules/user/users.php - 1.8.31 - 1.8.34

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 942Zeile 942
	$page->extra_header .= <<<EOF

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

	$page->extra_header .= <<<EOF

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

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

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

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


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


Zeile 1093Zeile 1093
			$warning_level = 100;
}
$warning_level = get_colored_warning_level($warning_level);

			$warning_level = 100;
}
$warning_level = get_colored_warning_level($warning_level);

 
	}
else
{
$warning_level = "-";

	}

$age = $lang->na;

	}

$age = $lang->na;

Zeile 1112Zeile 1116
	$table->construct_row();
$table->construct_cell("<strong>{$lang->posts}:</strong> {$postnum}");
$table->construct_cell("<strong>{$lang->age}:</strong> {$age}");

	$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 1126Zeile 1130
	$username = htmlspecialchars_uni($user['username']);
$table->output("{$lang->user_overview}: {$username}");
$plugins->run_hooks("admin_user_users_edit_overview");

	$username = htmlspecialchars_uni($user['username']);
$table->output("{$lang->user_overview}: {$username}");
$plugins->run_hooks("admin_user_users_edit_overview");

	echo "</div>\n";

//
// PROFILE
//

	echo "</div>\n";

//
// PROFILE
//

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

$form_container = new FormContainer($lang->required_profile_info.": ".htmlspecialchars_uni($user['username']));

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

$form_container = new FormContainer($lang->required_profile_info.": ".htmlspecialchars_uni($user['username']));

Zeile 1166Zeile 1170
	}
output_custom_profile_fields($profile_fields['required'], $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY), $form_container, $form);


	}
output_custom_profile_fields($profile_fields['required'], $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY), $form_container, $form);


	$form_container->end();


	$form_container->end();


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

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

Zeile 1381Zeile 1385

$form_container->end();
$plugins->run_hooks("admin_user_users_edit_settings");


$form_container->end();
$plugins->run_hooks("admin_user_users_edit_settings");

	echo "</div>\n";

//

	echo "</div>\n";

//

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

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

Zeile 1564Zeile 1568
	$table->construct_row();

$table->output($lang->avatar.': '.htmlspecialchars_uni($user['username']));

	$table->construct_row();

$table->output($lang->avatar.': '.htmlspecialchars_uni($user['username']));





	// Custom avatar
if($mybb->settings['avatarresizing'] == "auto")
{
$auto_resize = $lang->avatar_auto_resize;

	// Custom avatar
if($mybb->settings['avatarresizing'] == "auto")
{
$auto_resize = $lang->avatar_auto_resize;

	}

	}

	else if($mybb->settings['avatarresizing'] == "user")
{
$auto_resize = "<input type=\"checkbox\" name=\"auto_resize\" value=\"1\" checked=\"checked\" id=\"auto_resize\" /> <label for=\"auto_resize\">{$lang->attempt_to_auto_resize}</label></span>";

	else if($mybb->settings['avatarresizing'] == "user")
{
$auto_resize = "<input type=\"checkbox\" name=\"auto_resize\" value=\"1\" checked=\"checked\" id=\"auto_resize\" /> <label for=\"auto_resize\">{$lang->attempt_to_auto_resize}</label></span>";

	}

	}

	$form_container = new FormContainer($lang->specify_custom_avatar);
$form_container->output_row($lang->upload_avatar, $auto_resize, $form->generate_file_upload_box('avatar_upload', array('id' => 'avatar_upload')), 'avatar_upload');
if($mybb->settings['allowremoteavatars'])

	$form_container = new FormContainer($lang->specify_custom_avatar);
$form_container->output_row($lang->upload_avatar, $auto_resize, $form->generate_file_upload_box('avatar_upload', array('id' => 'avatar_upload')), 'avatar_upload');
if($mybb->settings['allowremoteavatars'])

Zeile 1600Zeile 1604
	$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 1672Zeile 1676
			}

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

			}

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

		}

		}

	}

$suspost_div = '<div id="suspost">'.$existing_info.''.$lang->suspend_for.' '.$form->generate_numeric_field("suspost_time", $mybb->get_input('suspost_time'), array('style' => 'width: 3em;', 'min' => 0)).' '.$suspost_options.'</div>';

	}

$suspost_div = '<div id="suspost">'.$existing_info.''.$lang->suspend_for.' '.$form->generate_numeric_field("suspost_time", $mybb->get_input('suspost_time'), array('style' => 'width: 3em;', 'min' => 0)).' '.$suspost_options.'</div>';

Zeile 1685Zeile 1689
	echo "</div>\n";

$plugins->run_hooks("admin_user_users_edit_graph");

	echo "</div>\n";

$plugins->run_hooks("admin_user_users_edit_graph");





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


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


Zeile 1708Zeile 1712
		else if($("#moderateposting").is(":checked") == false)
{
$("#modpost").hide();

		else if($("#moderateposting").is(":checked") == false)
{
$("#modpost").hide();

		}
}

		}
}

	else if(action == "suspost")
{
$("#moderateposting").attr("checked", false);

	else if(action == "suspost")
{
$("#moderateposting").attr("checked", false);

Zeile 1781Zeile 1785

// Set up user handler.
require_once MYBB_ROOT.'inc/datahandlers/user.php';


// Set up user handler.
require_once MYBB_ROOT.'inc/datahandlers/user.php';

		$userhandler = new UserDataHandler('delete');

		$userhandler = new UserDataHandler('delete');


// Delete the user
if(!$userhandler->delete_user($user['uid']))


// Delete the user
if(!$userhandler->delete_user($user['uid']))

Zeile 1789Zeile 1793
			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();

		$cache->update_awaitingactivation();





		$plugins->run_hooks("admin_user_users_delete_commit_end");

		$plugins->run_hooks("admin_user_users_delete_commit_end");





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

flash_message($lang->success_user_deleted, 'success');

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

flash_message($lang->success_user_deleted, 'success');

Zeile 1809Zeile 1813
{
$page->add_breadcrumb_item($lang->show_referrers);
$page->output_header($lang->show_referrers);

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





	$sub_tabs['referrers'] = array(
'title' => $lang->show_referrers,
'link' => "index.php?module=user-users&amp;action=referrers&amp;uid={$mybb->input['uid']}",
'description' => $lang->show_referrers_desc

	$sub_tabs['referrers'] = array(
'title' => $lang->show_referrers,
'link' => "index.php?module=user-users&amp;action=referrers&amp;uid={$mybb->input['uid']}",
'description' => $lang->show_referrers_desc

	);

$plugins->run_hooks("admin_user_users_referrers");


	);

$plugins->run_hooks("admin_user_users_referrers");


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

// Fetch default admin view

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

// Fetch default admin view

Zeile 1836Zeile 1840

$admin_view['conditions'] = my_unserialize($admin_view['conditions']);
$admin_view['conditions']['referrer'] = $mybb->input['uid'];


$admin_view['conditions'] = my_unserialize($admin_view['conditions']);
$admin_view['conditions']['referrer'] = $mybb->input['uid'];





	$view = build_users_view($admin_view);

// No referred users

	$view = build_users_view($admin_view);

// No referred users

Zeile 1850Zeile 1854
	else
{
echo $view;

	else
{
echo $view;

	}

$page->output_footer();
}


	}

$page->output_footer();
}


if($mybb->input['action'] == "ipaddresses")
{
$page->add_breadcrumb_item($lang->ip_addresses);

if($mybb->input['action'] == "ipaddresses")
{
$page->add_breadcrumb_item($lang->ip_addresses);

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

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

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

		}

if((!empty($source_user)) && !empty($destination_user) && $source_user['uid'] == $destination_user['uid'] && !empty($source_user['uid']))

		}

if((!empty($source_user)) && !empty($destination_user) && $source_user['uid'] == $destination_user['uid'] && !empty($source_user['uid']))

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

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

		placeholder: "'.$lang->search_for_a_user.'",
minimumInputLength: 2,
multiple: false,
ajax: { // instead of writing the function to execute the request we use Select2\'s convenient helper
url: "../xmlhttp.php?action=get_users",
dataType: \'json\',
data: function (term, page) {
return {
query: term // search term
};
},
results: function (data, page) { // parse the results into the format expected by Select2.
// since we are using custom formatting functions we do not need to alter remote JSON data
return {results: data};
}
},
initSelection: function(element, callback) {
var query = $(element).val();
if (query !== "") {
$.ajax("../xmlhttp.php?action=get_users&getone=1", {
data: {
query: query
},
dataType: "json"
}).done(function(data) { callback(data); });
}
}

		placeholder: "'.$lang->search_for_a_user.'",
minimumInputLength: 2,
multiple: false,
ajax: { // instead of writing the function to execute the request we use Select2\'s convenient helper
url: "../xmlhttp.php?action=get_users",
dataType: \'json\',
data: function (term, page) {
return {
query: term // search term
};
},
results: function (data, page) { // parse the results into the format expected by Select2.
// since we are using custom formatting functions we do not need to alter remote JSON data
return {results: data};
}
},
initSelection: function(element, callback) {
var query = $(element).val();
if (query !== "") {
$.ajax("../xmlhttp.php?action=get_users&getone=1", {
data: {
query: query
},
dataType: "json"
}).done(function(data) { callback(data); });
}
}

	});
$("#destination_username").select2({
placeholder: "'.$lang->search_for_a_user.'",

	});
$("#destination_username").select2({
placeholder: "'.$lang->search_for_a_user.'",

Zeile 2286Zeile 2290
	</script>';

$buttons[] = $form->generate_submit_button($lang->merge_user_accounts);

	</script>';

$buttons[] = $form->generate_submit_button($lang->merge_user_accounts);

	$form->output_submit_wrapper($buttons);
$form->end();


	$form->output_submit_wrapper($buttons);
$form->end();


	$page->output_footer();
}


	$page->output_footer();
}


Zeile 2359Zeile 2363
		if($mybb->get_input('displayas'))
{
$admin_view['view_type'] = $mybb->get_input('displayas');

		if($mybb->get_input('displayas'))
{
$admin_view['view_type'] = $mybb->get_input('displayas');

		}


		}


		if(!empty($mybb->input['profile_fields']))
{
$admin_view['custom_profile_fields'] = $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY);

		if(!empty($mybb->input['profile_fields']))
{
$admin_view['custom_profile_fields'] = $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY);

Zeile 2467Zeile 2471
				$selected[] = (int)$id;
}
}

				$selected[] = (int)$id;
}
}

	}


	}


	// Verify incoming POST request
if(!verify_post_check($mybb->get_input('my_post_key')))
{

	// Verify incoming POST request
if(!verify_post_check($mybb->get_input('my_post_key')))
{

Zeile 2504Zeile 2508
					$user_mail_data[] = array('username' => $user['username'], 'email' => $user['email']);
}
}

					$user_mail_data[] = array('username' => $user['username'], 'email' => $user['email']);
}
}





			$plugins->run_hooks("admin_user_multiactivate", $to_update);

if(isset($to_update) && is_array($to_update))

			$plugins->run_hooks("admin_user_multiactivate", $to_update);

if(isset($to_update) && is_array($to_update))

Zeile 2516Zeile 2520

// send activation mail
foreach($user_mail_data as $mail_data)


// send activation mail
foreach($user_mail_data as $mail_data)

				{

				{

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

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

				}


				}


				// Action complete, grab stats and show success message - redirect user
$to_update_count = count($to_update);
$lang->inline_activated = $lang->sprintf($lang->inline_activated, my_number_format($to_update_count));

				// Action complete, grab stats and show success message - redirect user
$to_update_count = count($to_update);
$lang->inline_activated = $lang->sprintf($lang->inline_activated, my_number_format($to_update_count));

Zeile 2538Zeile 2542
				my_unsetcookie("inlinemod_useracp"); // Unset the cookie, so that the users aren't still selected when we're redirected

flash_message($lang->inline_activated, 'success');

				my_unsetcookie("inlinemod_useracp"); // Unset the cookie, so that the users aren't still selected when we're redirected

flash_message($lang->inline_activated, 'success');

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

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

			{
// Nothing was updated, show an error
flash_message($lang->inline_activated_failed, 'error');

			{
// Nothing was updated, show an error
flash_message($lang->inline_activated_failed, 'error');

Zeile 3409Zeile 3413
		$userfield_sql = '1=1';
foreach($view['custom_profile_fields'] as $column => $input)
{

		$userfield_sql = '1=1';
foreach($view['custom_profile_fields'] as $column => $input)
{

 
			if(!preg_match('/^fid[0-9]+(_blank)?$/', $column))
{
continue;
}


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

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

Zeile 4157Zeile 4166
				foreach($select_options as $val)
{
$val = trim($val);

				foreach($select_options as $val)
{
$val = trim($val);

					$code .= $form->generate_check_box("profile_fields[{$field_name}][]", $val, htmlspecialchars_uni($val), array('id' => "profile_field_{$field_name}", 'checked' => ($val == $selected_options[$val] ? true : false)))."<br />";

					$code .= $form->generate_check_box("profile_fields[{$field_name}][]", $val, htmlspecialchars_uni($val), array('id' => "profile_field_{$field_name}", 'checked' => (isset($selected_options[$val]) && $val == $selected_options[$val] ? true : false)))."<br />";

				}
break;
case "textarea":

				}
break;
case "textarea":