Vergleich admin/modules/user/users.php - 1.4.7 - 1.4.14

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 1Zeile 1
<?php
/**
* MyBB 1.4

<?php
/**
* MyBB 1.4

 * Copyright � 2008 MyBB Group, All Rights Reserved

 * Copyright © 2008 MyBB Group, All Rights Reserved

 *
* Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 *
* Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: users.php 4337 2009-03-30 01:21:51Z Tikitiki $

 * $Id: users.php 4864 2010-04-10 09:13:19Z RyanGordon $

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 159Zeile 159
	// We've selected a new avatar for this user!
if($mybb->input['avatar'])
{

	// We've selected a new avatar for this user!
if($mybb->input['avatar'])
{

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


		if(file_exists("../".$mybb->settings['avatardir']."/".$mybb->input['avatar']))
{
$dimensions = @getimagesize("../".$mybb->settings['avatardir']."/".$mybb->input['avatar']);
$updated_avatar = array(
"avatar" => $db->escape_string($mybb->settings['avatardir']."/".$mybb->input['avatar']),
"avatardimensions" => "{$dimensions[0]}|{$dimensions[1]}",

		if(file_exists("../".$mybb->settings['avatardir']."/".$mybb->input['avatar']))
{
$dimensions = @getimagesize("../".$mybb->settings['avatardir']."/".$mybb->input['avatar']);
$updated_avatar = array(
"avatar" => $db->escape_string($mybb->settings['avatardir']."/".$mybb->input['avatar']),
"avatardimensions" => "{$dimensions[0]}|{$dimensions[1]}",



 
				"avatartype" => "gallery"
);


				"avatartype" => "gallery"
);


Zeile 308Zeile 309
				$gallery['thumb'] = "styles/{$page->style}/images/avatar_gallery.gif";
$gallery['thumb_width'] = 64;
$gallery['thumb_height'] = 64;

				$gallery['thumb'] = "styles/{$page->style}/images/avatar_gallery.gif";
$gallery['thumb_width'] = 64;
$gallery['thumb_height'] = 64;

			}

			}

			else
{
$gallery['thumb'] = "{$mybb->settings['avatardir']}/{$gallery['thumb']}";
}
$scaled_dimensions = scale_image($gallery['thumb_width'], $gallery['thumb_height'], 80, 80);

			else
{
$gallery['thumb'] = "{$mybb->settings['avatardir']}/{$gallery['thumb']}";
}
$scaled_dimensions = scale_image($gallery['thumb_width'], $gallery['thumb_height'], 80, 80);

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

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

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

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

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

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

	// Build the list of any actual avatars we have
echo "<ul id=\"avatars\">\n";
if(is_array($avatars))

	// Build the list of any actual avatars we have
echo "<ul id=\"avatars\">\n";
if(is_array($avatars))

Zeile 338Zeile 339
	echo "</html>";
exit;
}

	echo "</html>";
exit;
}





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

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

Zeile 398Zeile 399
		if($user['coppauser'])
{
flash_message($lang->success_coppa_activated, 'success');

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

		}
else

		}
else

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

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

		}
}


		}
}


	if($admin_session['data']['last_users_url'])
{
$url = $admin_session['data']['last_users_url'];

	if($admin_session['data']['last_users_url'])
{
$url = $admin_session['data']['last_users_url'];

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

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

	
if($mybb->request_method == "post")
{
// Determine the usergroup stuff

	
if($mybb->request_method == "post")
{
// Determine the usergroup stuff

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

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

			foreach($mybb->input['additionalgroups'] as $gid)

			foreach($mybb->input['additionalgroups'] as $key => $gid)

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

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

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

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

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

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

Zeile 445Zeile 446
		{
$additionalgroups = '';
}

		{
$additionalgroups = '';
}





		// Set up user handler.
require_once MYBB_ROOT."inc/datahandlers/user.php";
$userhandler = new UserDataHandler('insert');

		// Set up user handler.
require_once MYBB_ROOT."inc/datahandlers/user.php";
$userhandler = new UserDataHandler('insert');

Zeile 456Zeile 457
			"username" => $mybb->input['username'],
"password" => $mybb->input['password'],
"password2" => $mybb->input['confirm_password'],

			"username" => $mybb->input['username'],
"password" => $mybb->input['password'],
"password2" => $mybb->input['confirm_password'],

			"email" => $mybb->input['email'],
"email2" => $mybb->input['email'],
"usergroup" => $mybb->input['usergroup'],
"additionalgroups" => $additionalgroups,
"displaygroup" => $mybb->input['displaygroup'],
"profile_fields" => $mybb->input['profile_fields'],

			"email" => $mybb->input['email'],
"email2" => $mybb->input['email'],
"usergroup" => $mybb->input['usergroup'],
"additionalgroups" => $additionalgroups,
"displaygroup" => $mybb->input['displaygroup'],
"profile_fields" => $mybb->input['profile_fields'],

			"profile_fields_editable" => true,
);


			"profile_fields_editable" => true,
);


Zeile 473Zeile 474
		if(!$userhandler->validate_user())
{
$errors = $userhandler->get_friendly_errors();

		if(!$userhandler->validate_user())
{
$errors = $userhandler->get_friendly_errors();

		}

		}

		else
{
$user_info = $userhandler->insert_user();

		else
{
$user_info = $userhandler->insert_user();

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

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

	{

	{

		$profile_fields['required'][] = $profile_field;
}


		$profile_fields['required'][] = $profile_field;
}


Zeile 568Zeile 569
		// Determine the usergroup stuff
if(is_array($mybb->input['additionalgroups']))
{

		// Determine the usergroup stuff
if(is_array($mybb->input['additionalgroups']))
{

			foreach($mybb->input['additionalgroups'] as $gid)

			foreach($mybb->input['additionalgroups'] as $key => $gid)

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

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

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

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

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

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

Zeile 643Zeile 644
			"showcodebuttons" => intval($mybb->input['showcodebuttons']),
"pmnotify" => $mybb->input['pmnotify'],
"showredirect" => $mybb->input['showredirect']

			"showcodebuttons" => intval($mybb->input['showcodebuttons']),
"pmnotify" => $mybb->input['pmnotify'],
"showredirect" => $mybb->input['showredirect']

		);

		);


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


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

Zeile 714Zeile 715
				}
else
{

				}
else
{

					$tmp_name = "../".$mybb->settings['avataruploadpath']."/remote_".md5(uniqid(rand(), true));

					$tmp_name = "../".$mybb->settings['avataruploadpath']."/remote_".md5(random_str());

					$fp = @fopen($tmp_name, "wb");
if(!$fp)
{

					$fp = @fopen($tmp_name, "wb");
if(!$fp)
{

Zeile 924Zeile 925
	}
else
{

	}
else
{

		$percent_posts = round($memprofile['postnum']*100/$posts, 2);;

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

	}

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

	}

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

Zeile 1125Zeile 1126
			{
if($ppp <= 0) continue;
$ppp_options[$ppp] = $ppp;

			{
if($ppp <= 0) continue;
$ppp_options[$ppp] = $ppp;

			}

			}

		}
}


		}
}


Zeile 1184Zeile 1185
		$form->generate_radio_button("update_posts", "enable", $lang->enable_sig_in_all_posts, array("checked" => 0)),
$form->generate_radio_button("update_posts", "disable", $lang->disable_sig_in_all_posts, array("checked" => 0)),
$form->generate_radio_button("update_posts", "no", $lang->do_nothing, array("checked" => 1))

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

	);

	);


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



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


Zeile 1312Zeile 1313
		$db->delete_query("users", "uid='{$user['uid']}'");
$db->delete_query("joinrequests", "uid='{$user['uid']}'");
$db->delete_query("warnings", "uid='{$user['uid']}'");

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

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


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


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

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

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

	

	

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


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


Zeile 1345Zeile 1347
	);

$page->output_nav_tabs($sub_tabs, '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)

	{

	{

		$default_view = "0";
}
$query = $db->simple_select("adminviews", "*", "type='user' AND (vid='{$default_view}' OR uid=0)", array("order_by" => "uid", "order_dir" => "desc"));

		$default_view = "0";
}
$query = $db->simple_select("adminviews", "*", "type='user' AND (vid='{$default_view}' OR uid=0)", array("order_by" => "uid", "order_dir" => "desc"));

Zeile 1364Zeile 1366
	$admin_view['conditions']['referrer'] = $mybb->input['uid'];

echo build_users_view($admin_view);

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

echo build_users_view($admin_view);

	
$page->output_footer();
}

	
$page->output_footer();
}


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


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

Zeile 1456Zeile 1458
	$plugins->run_hooks("admin_user_users_merge");

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

	$plugins->run_hooks("admin_user_users_merge");

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

	{

	{

		$query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['source_username']))."'");
$source_user = $db->fetch_array($query);
if(!$source_user['uid'])

		$query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['source_username']))."'");
$source_user = $db->fetch_array($query);
if(!$source_user['uid'])

Zeile 1496Zeile 1498
			$db->update_query("events", $uid_update, "uid='{$source_user['uid']}'");
$db->update_query("threadsubscriptions", $uid_update, "uid='{$source_user['uid']}'");
$db->update_query("forumsubscriptions", $uid_update, "uid='{$source_user['uid']}'");

			$db->update_query("events", $uid_update, "uid='{$source_user['uid']}'");
$db->update_query("threadsubscriptions", $uid_update, "uid='{$source_user['uid']}'");
$db->update_query("forumsubscriptions", $uid_update, "uid='{$source_user['uid']}'");

 
			$db->update_query("joinrequests", $uid_update, "uid='{$source_user['uid']}'");

			$db->update_query("moderatorlog", $uid_update, "uid='{$source_user['uid']}'");
$db->update_query("pollvotes", $uid_update, "uid='{$source_user['uid']}'");
$db->update_query("posts", $uid_update, "uid='{$source_user['uid']}'");
$db->update_query("privatemessages", $uid_update, "uid='{$source_user['uid']}'");

			$db->update_query("moderatorlog", $uid_update, "uid='{$source_user['uid']}'");
$db->update_query("pollvotes", $uid_update, "uid='{$source_user['uid']}'");
$db->update_query("posts", $uid_update, "uid='{$source_user['uid']}'");
$db->update_query("privatemessages", $uid_update, "uid='{$source_user['uid']}'");

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

 
			$db->update_query("threadratings", $uid_update, "uid='{$source_user['uid']}'");
$db->update_query("threads", $uid_update, "uid='{$source_user['uid']}'");
$db->delete_query("sessions", "uid='{$source_user['uid']}'");

			$db->update_query("threadratings", $uid_update, "uid='{$source_user['uid']}'");
$db->update_query("threads", $uid_update, "uid='{$source_user['uid']}'");
$db->delete_query("sessions", "uid='{$source_user['uid']}'");

			$db->delete_query("reputation", "uid='{$destination_user['uid']}' AND adduid='{$destination_user['uid']}'");
















			
// Merging Reputation
$query = $db->simple_select("reputation", "rid, uid", "adduid = '{$source_user['uid']}' OR adduid = '{$uid_update['uid']}'", array("order_by" => "dateline", "order_dir" => "DESC"));
while($result = $db->fetch_array($query))
{
// Let's try and remove old one if it's the same uid
if($result['uid'] == $last['uid'])
{
$db->delete_query("reputation", "rid = '".$result['rid']."'");
$db->update_query("reputation", array("adduid" => $uid_update['uid']), "rid = '".$last['rid']."'");
}
$last = array(
"rid" => $result['rid'],
"uid" => $result['uid']
);
}

			
// Calculate new reputation
$query = $db->simple_select("reputation", "SUM(reputation) as total_rep", "uid='{$destination_user['uid']}'");
$total_reputation = $db->fetch_field($query, "total_rep");

			
// Calculate new reputation
$query = $db->simple_select("reputation", "SUM(reputation) as total_rep", "uid='{$destination_user['uid']}'");
$total_reputation = $db->fetch_field($query, "total_rep");

			








// No reputation?
if(!$total_reputation)
{
$total_reputation = '0';
}


			$db->update_query("users", array('reputation' => $total_reputation), "uid='{$destination_user['uid']}'");

// Additional updates for non-uid fields

			$db->update_query("users", array('reputation' => $total_reputation), "uid='{$destination_user['uid']}'");

// Additional updates for non-uid fields

Zeile 1537Zeile 1559
			// Delete the old user
$db->delete_query("users", "uid='{$source_user['uid']}'");
$db->delete_query("banned", "uid='{$source_user['uid']}'");

			// Delete the old user
$db->delete_query("users", "uid='{$source_user['uid']}'");
$db->delete_query("banned", "uid='{$source_user['uid']}'");

 
			
// Get a list of forums where post count doesn't apply
$fids = array();
$query = $db->simple_select("forums", "fid", "usepostcounts=0");
while($fid = $db->fetch_field($query, "fid"))
{
$fids[] = $fid;
}

$fids_not_in = '';
if(!empty($fids))
{
$fids_not_in = "AND fid NOT IN(".implode(',', $fids).")";
}

			
// Update user post count

			
// Update user post count

			$query = $db->simple_select("posts", "COUNT(*) AS postnum", "uid='".$destination_user['uid']."'");

			$query = $db->simple_select("posts", "COUNT(*) AS postnum", "uid='".$destination_user['uid']."' {$fids_not_in}");

			$num = $db->fetch_array($query);
$updated_count = array(
"postnum" => $num['postnum']
);
$db->update_query("users", $updated_count, "uid='{$destination_user['uid']}'");

			$num = $db->fetch_array($query);
$updated_count = array(
"postnum" => $num['postnum']
);
$db->update_query("users", $updated_count, "uid='{$destination_user['uid']}'");

 
			
// Use the earliest registration date
if($destination_user['regdate'] > $source_user['regdate'])
{
$db->update_query("users", array('regdate' => $source_user['regdate']), "uid='{$destination_user['uid']}'");
}


update_stats(array('numusers' => '-1'));



update_stats(array('numusers' => '-1'));


Zeile 1602Zeile 1644
	if($mybb->request_method == "post" || $mybb->input['results'] == 1)
{
// Build view options from incoming search options

	if($mybb->request_method == "post" || $mybb->input['results'] == 1)
{
// Build view options from incoming search options

		if($mybb->input['vid'])
{
$query = $db->simple_select("adminviews", "*", "vid='".intval($mybb->input['vid'])."'");
$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);
}

		if($mybb->input['vid'])
{
$query = $db->simple_select("adminviews", "*", "vid='".intval($mybb->input['vid'])."'");
$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);
}

		}

if($mybb->input['search_id'] && $admin_session['data']['user_views'][$mybb->input['search_id']])

		}

if($mybb->input['search_id'] && $admin_session['data']['user_views'][$mybb->input['search_id']])

Zeile 1807Zeile 1849
	// If we have any error messages, show them
if($errors)
{

	// If we have any error messages, show them
if($errors)
{

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

		$page->output_inline_error($errors);
}


		$page->output_inline_error($errors);
}


Zeile 1858Zeile 1901
		global $admin_session;
if(!$_REQUEST['search_id'])
{

		global $admin_session;
if(!$_REQUEST['search_id'])
{

			$search_id = md5(uniqid(rand(), true));

			$search_id = md5(random_str());

			$admin_session['data']['user_views'][$search_id] = $view;
update_admin_session('user_views', $admin_session['data']['user_views']);
$_REQUEST['search_id'] = $search_id;

			$admin_session['data']['user_views'][$search_id] = $view;
update_admin_session('user_views', $admin_session['data']['user_views']);
$_REQUEST['search_id'] = $search_id;

Zeile 1875Zeile 1918
	{
update_admin_session('last_users_url', str_replace("&amp;", "&", $view['url']));
}

	{
update_admin_session('last_users_url', str_replace("&amp;", "&", $view['url']));
}


$table = new Table;








	
// Do we not have any views?
if(empty($view))
{
return false;
}

$table = new Table;


	// Build header for table based view
if($view['view_type'] != "card")
{
foreach($view['fields'] as $field)
{
if(!$user_view_fields[$field])

	// Build header for table based view
if($view['view_type'] != "card")
{
foreach($view['fields'] as $field)
{
if(!$user_view_fields[$field])

			{

			{

				continue;
}
$view_field = $user_view_fields[$field];

				continue;
}
$view_field = $user_view_fields[$field];

Zeile 1898Zeile 1947
				$field_options['class'] = "align_".$view_field['align'];
}
$table->construct_header($view_field['title'], $field_options);

				$field_options['class'] = "align_".$view_field['align'];
}
$table->construct_header($view_field['title'], $field_options);

		}
}


$search_sql = '1=1';

		}
}


$search_sql = '1=1';


// Build the search SQL for users

// List of valid LIKE search fields
$user_like_fields = array("username", "email", "website", "icq", "aim", "yahoo", "msn", "signature", "usertitle");
foreach($user_like_fields as $search_field)


// Build the search SQL for users

// List of valid LIKE search fields
$user_like_fields = array("username", "email", "website", "icq", "aim", "yahoo", "msn", "signature", "usertitle");
foreach($user_like_fields as $search_field)

	{

	{

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

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

		}

		}

	}

// EXACT matching fields

	}

// EXACT matching fields

Zeile 1929Zeile 1978
	// LESS THAN or GREATER THAN
$direction_fields = array("postnum");
foreach($direction_fields as $search_field)

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

	{

	{

		$direction_field = $search_field."_dir";
if(($view['conditions'][$search_field] || $view['conditions'][$search_field] === '0') && $view['conditions'][$direction_field])
{

		$direction_field = $search_field."_dir";
if(($view['conditions'][$search_field] || $view['conditions'][$search_field] === '0') && $view['conditions'][$direction_field])
{

Zeile 1956Zeile 2005
		{
// IPv6 IP
if(strpos($view['conditions'][$search_field], ":") !== false)

		{
// IPv6 IP
if(strpos($view['conditions'][$search_field], ":") !== false)

			{

			{

				$view['conditions'][$search_field] = str_replace("*", "%", $view['conditions'][$search_field]);
$ip_sql = "{$search_field} LIKE '".$db->escape_string($view['conditions'][$search_field])."'";
}

				$view['conditions'][$search_field] = str_replace("*", "%", $view['conditions'][$search_field]);
$ip_sql = "{$search_field} LIKE '".$db->escape_string($view['conditions'][$search_field])."'";
}

Zeile 2085Zeile 2134
		
switch($view['sortby'])
{

		
switch($view['sortby'])
{

			case "numposts":
$view['sortby'] = "postnum";
break;

 
			case "regdate":
case "lastactive":
case "postnum":
case "reputation":

			case "regdate":
case "lastactive":
case "postnum":
case "reputation":

 
				$view['sortby'] = $db->escape_string($view['sortby']);
break;
case "numposts":
$view['sortby'] = "postnum";
break;

			case "warninglevel":

			case "warninglevel":

 
				$view['sortby'] = "warningpoints";

				break;
default:
$view['sortby'] = "username";

				break;
default:
$view['sortby'] = "username";

Zeile 2523Zeile 2575
				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, $val, array('id' => "profile_field_{$field_name}", 'checked' => ($val == $values[$field_name] ? true : false)))."<br />";

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

				}
break;
case "textarea":

				}
break;
case "textarea":