Vergleich admin/modules/user/users.php - 1.8.27 - 1.8.36

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 210Zeile 210

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


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

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

	if(!verify_post_check($mybb->get_input('my_post_key')))

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

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

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 1667Zeile 1671
				$color = 'maroon';
}
elseif($remaining < 604800)

				$color = 'maroon';
}
elseif($remaining < 604800)

			{

			{

				$color = 'green';
}


				$color = 'green';
}


Zeile 1770Zeile 1774
	// User clicked no
if($mybb->get_input('no'))
{

	// User clicked no
if($mybb->get_input('no'))
{

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

$plugins->run_hooks("admin_user_users_delete");

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

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

$plugins->run_hooks("admin_user_users_delete");

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

		$plugins->run_hooks("admin_user_users_delete_commit");

// Set up user handler.

		$plugins->run_hooks("admin_user_users_delete_commit");

// Set up user handler.

Zeile 1846Zeile 1850
		$table->construct_cell($lang->error_no_referred_users);
$table->construct_row();
$table->output($lang->show_referrers);

		$table->construct_cell($lang->error_no_referred_users);
$table->construct_row();
$table->output($lang->show_referrers);

	}
else

	}
else

	{
echo $view;
}

	{
echo $view;
}

Zeile 1890Zeile 1894
	{
$user['lastip'] = my_inet_ntop($db->unescape_binary($user['lastip']));
$popup = new PopupMenu("user_last", $lang->options);

	{
$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(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->show_users_regged_with_ip, "index.php?module=user-users&amp;action=search&amp;results=1&amp;conditions[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[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 1910Zeile 1913
	{
$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(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->show_users_regged_with_ip, "index.php?module=user-users&amp;results=1&amp;action=search&amp;conditions[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[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 1924Zeile 1927

$query = $db->simple_select("posts", "DISTINCT ipaddress", "uid='{$mybb->input['uid']}'");
while($ip = $db->fetch_array($query))


$query = $db->simple_select("posts", "DISTINCT ipaddress", "uid='{$mybb->input['uid']}'");
while($ip = $db->fetch_array($query))

	{

	{

		++$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(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->show_users_regged_with_ip, "index.php?module=user-users&amp;results=1&amp;action=search&amp;conditions[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[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 1940Zeile 1943
	}

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

	}

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





	$page->output_footer();
}


	$page->output_footer();
}


Zeile 1961Zeile 1964

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


// 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((!empty($source_user)) && !empty($destination_user) && $source_user['uid'] == $destination_user['uid'] && !empty($source_user['uid']))

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

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

		{

		{

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


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


Zeile 2006Zeile 2009
			merge_thread_ratings($source_user['uid'], $destination_user['uid']);

// Banning

			merge_thread_ratings($source_user['uid'], $destination_user['uid']);

// Banning

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











			switch($db->type)
{
case 'mysql':
case 'mysqli':
$where = "`admin` = '{$source_user['uid']}'";
break;
default:
$where = "admin = '{$source_user['uid']}'";
break;
}
$db->update_query("banned", array('admin' => $destination_user['uid']), $where);


// Carry over referrals
$db->update_query("users", array("referrer" => $destination_user['uid']), "referrer='{$source_user['uid']}' AND uid!='{$destination_user['uid']}'");


// Carry over referrals
$db->update_query("users", array("referrer" => $destination_user['uid']), "referrer='{$source_user['uid']}' AND uid!='{$destination_user['uid']}'");

Zeile 2354Zeile 2367

if(!empty($mybb->input['profile_fields']))
{


if(!empty($mybb->input['profile_fields']))
{

			$admin_view['custom_profile_fields'] = $mybb->get_input('profile_fields');

			$admin_view['custom_profile_fields'] = $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY);

		}

$plugins->run_hooks("admin_user_users_search_commit");

		}

$plugins->run_hooks("admin_user_users_search_commit");

Zeile 2461Zeile 2474
	}

// Verify incoming POST request

	}

// Verify incoming POST request

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

	if(!verify_post_check($mybb->get_input('my_post_key')))

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

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

Zeile 2822Zeile 2835
				else
{
$errors[] = $lang->no_prune_option;

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

				}

if(!$errors)
{

				}

if(!$errors)
{

					$sql_array = implode(",", $selected);
$prune_array = array();
$query = $db->simple_select("users", "uid", "uid IN (".$sql_array.")");
while($user = $db->fetch_array($query))

					$sql_array = implode(",", $selected);
$prune_array = array();
$query = $db->simple_select("users", "uid", "uid IN (".$sql_array.")");
while($user = $db->fetch_array($query))

					{

					{

						// Protect Super Admins
if(is_super_admin($user['uid']) && !is_super_admin($mybb->user['uid']))
{

						// Protect Super Admins
if(is_super_admin($user['uid']) && !is_super_admin($mybb->user['uid']))
{

Zeile 2842Zeile 2855
						{
$prune_array = array_merge_recursive($prune_array, $return_array);
}

						{
$prune_array = array_merge_recursive($prune_array, $return_array);
}

					}


					}


					$plugins->run_hooks("admin_user_multiprune_threads", $prune_array);

// No posts were found for the user, return error
if(!is_array($prune_array) || count($prune_array) == 0)

					$plugins->run_hooks("admin_user_multiprune_threads", $prune_array);

// No posts were found for the user, return error
if(!is_array($prune_array) || count($prune_array) == 0)

					{

					{

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

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





					// Require the rebuild functions
require_once MYBB_ROOT.'/inc/functions.php';
require_once MYBB_ROOT.'/inc/functions_rebuild.php';

					// Require the rebuild functions
require_once MYBB_ROOT.'/inc/functions.php';
require_once MYBB_ROOT.'/inc/functions_rebuild.php';

Zeile 2861Zeile 2874
					if(is_array($prune_array['to_delete']) && count($prune_array['to_delete']) > 0)
{
foreach($prune_array['to_delete'] as $tid)

					if(is_array($prune_array['to_delete']) && count($prune_array['to_delete']) > 0)
{
foreach($prune_array['to_delete'] as $tid)

						{

						{

							$db->delete_query("threads", "tid='$tid'");
$db->delete_query("threads", "closed='moved|$tid'");
$db->delete_query("threadsubscriptions", "tid='$tid'");
$db->delete_query("polls", "tid='$tid'");
$db->delete_query("threadsread", "tid='$tid'");
$db->delete_query("threadratings", "tid='$tid'");

							$db->delete_query("threads", "tid='$tid'");
$db->delete_query("threads", "closed='moved|$tid'");
$db->delete_query("threadsubscriptions", "tid='$tid'");
$db->delete_query("polls", "tid='$tid'");
$db->delete_query("threadsread", "tid='$tid'");
$db->delete_query("threadratings", "tid='$tid'");

						}
}

						}
}


// After deleting threads, rebuild the thread counters for the affected threads
if(is_array($prune_array['thread_update']) && count($prune_array['thread_update']) > 0)


// After deleting threads, rebuild the thread counters for the affected threads
if(is_array($prune_array['thread_update']) && count($prune_array['thread_update']) > 0)

Zeile 2896Zeile 2909
							}
$looped_forum = $forum['fid'];
rebuild_forum_counters($forum['fid']);

							}
$looped_forum = $forum['fid'];
rebuild_forum_counters($forum['fid']);

						}
}

						}
}


//log_admin_action();
my_unsetcookie("inlinemod_useracp"); // We've got our users, remove the cookie


//log_admin_action();
my_unsetcookie("inlinemod_useracp"); // We've got our users, remove the cookie

Zeile 2915Zeile 2928
			$table->construct_cell($lang->mass_prune_info);
$table->construct_row();
$table->output($lang->important);

			$table->construct_cell($lang->mass_prune_info);
$table->construct_row();
$table->output($lang->important);





			if($errors)
{
$page->output_inline_error($errors);
}

			if($errors)
{
$page->output_inline_error($errors);
}





			// Display the prune options
$form = new Form("index.php?module=user-users", "post");
echo $form->generate_hidden_field('action', 'inline_edit');

			// Display the prune options
$form = new Form("index.php?module=user-users", "post");
echo $form->generate_hidden_field('action', 'inline_edit');

Zeile 2933Zeile 2946
			$day_options = array();
$day_options[] = "&nbsp;";
for($i = 1; $i <= 31; ++$i)

			$day_options = array();
$day_options[] = "&nbsp;";
for($i = 1; $i <= 31; ++$i)

			{

			{

				$day_options[] = $i;
}


				$day_options[] = $i;
}


Zeile 3112Zeile 3125
			$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']))

			{

			{

				unset($admin_view);
}
}

				unset($admin_view);
}
}

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

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

	{

	{

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

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

Zeile 3289Zeile 3302
			$table->construct_header($view_field['title'], $field_options);
}
$table->construct_header("<input type=\"checkbox\" name=\"allbox\" onclick=\"inlineModeration.checkAll(this);\" />"); // Create a header for the "select" boxes

			$table->construct_header($view_field['title'], $field_options);
}
$table->construct_header("<input type=\"checkbox\" name=\"allbox\" onclick=\"inlineModeration.checkAll(this);\" />"); // Create a header for the "select" boxes

	}

$search_sql = '1=1';


	}

$search_sql = '1=1';


	// Build the search SQL for users

// List of valid LIKE search fields

	// Build the search SQL for users

// List of valid LIKE search fields

Zeile 3400Zeile 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 4148Zeile 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":