Vergleich admin/modules/user/users.php - 1.4.6 - 1.4.11

  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 4657 2009-12-24 20:31:25Z 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 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 1334Zeile 1335
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 1346
	);

$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 1365
	$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 1457
	$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 1500Zeile 1501
			$db->update_query("pollvotes", $uid_update, "uid='{$source_user['uid']}'");
$db->update_query("posts", $uid_update, "uid='{$source_user['uid']}'");
$db->update_query("privatemessages", $uid_update, "uid='{$source_user['uid']}'");

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

			$db->update_query("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 1557
			// 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 1642
	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 1695Zeile 1735
	$page->output_header($lang->find_users);

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

	$page->output_header($lang->find_users);

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


// If we have any error messages, show them
if($errors)
{
$page->output_inline_error($errors);
}



// If we have any error messages, show them
if($errors)
{
$page->output_inline_error($errors);
}


	if(!$mybb->input['displayas'])
{
$mybb->input['displayas'] = "card";

	if(!$mybb->input['displayas'])
{
$mybb->input['displayas'] = "card";

Zeile 1720Zeile 1760
	$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->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->results_per_page, "", $form->generate_text_box('perpage', $mybb->input['perpage'], array('id' => 'perpage')), '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();





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

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





	$page->output_footer();
}

if(!$mybb->input['action'])
{
$plugins->run_hooks("admin_user_users_start");

	$page->output_footer();
}

if(!$mybb->input['action'])
{
$plugins->run_hooks("admin_user_users_start");

	

	

	$page->output_header($lang->browse_users);
echo "<script type=\"text/javascript\" src=\"jscripts/users.js\"></script>";


	$page->output_header($lang->browse_users);
echo "<script type=\"text/javascript\" src=\"jscripts/users.js\"></script>";


Zeile 1791Zeile 1831
	{
// If we came from the home page and clicked on the "Activate Users" link, send them back to here
if($admin_session['data']['from'] == "home")

	{
// If we came from the home page and clicked on the "Activate Users" link, send them back to here
if($admin_session['data']['from'] == "home")

		{

		{

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

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

Zeile 1807Zeile 1847
	// 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 1851Zeile 1892
	if($view['vid'])
{
$view['url'] .= "&amp;vid={$view['vid']}";

	if($view['vid'])
{
$view['url'] .= "&amp;vid={$view['vid']}";

	}

	}

	else
{
// If this is a custom view we need to save everything ready to pass it on from page to page

	else
{
// If this is a custom view we need to save everything ready to pass it on from page to page

Zeile 1864Zeile 1905
			$_REQUEST['search_id'] = $search_id;
}
$view['url'] .= "&amp;search_id=".htmlspecialchars($_REQUEST['search_id']);

			$_REQUEST['search_id'] = $search_id;
}
$view['url'] .= "&amp;search_id=".htmlspecialchars($_REQUEST['search_id']);

	}


	}


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

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

Zeile 1873Zeile 1914
	
if(!isset($admin_session['data']['last_users_view']) || $admin_session['data']['last_users_view'] != 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']));







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

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

	}

$table = new Table;

	}

$table = new Table;

Zeile 1909Zeile 1956
	// 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)

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

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

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

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

		}
}


		}
}


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

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

	{

	{

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

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

Zeile 1940Zeile 1987
					break;
case "less_than":
$direction = "<";

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

					break;
default:

					break;
default:

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

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

Zeile 1956Zeile 2003
		{
// 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 1964Zeile 2011
			{
$ip_range = fetch_longipv4_range($view['conditions'][$search_field]);
if(!is_array($ip_range))

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

				{

				{

					$ip_sql = "long{$search_field}='{$ip_range}'";
}
else
{
$ip_sql = "long{$search_field} > '{$ip_range[0]}' AND long{$search_field} < '{$ip_range[1]}'";
}

					$ip_sql = "long{$search_field}='{$ip_range}'";
}
else
{
$ip_sql = "long{$search_field} > '{$ip_range[0]}' AND long{$search_field} < '{$ip_range[1]}'";
}

			}

			}

			$search_sql .= " AND {$ip_sql}";
}
}

			$search_sql .= " AND {$ip_sql}";
}
}

Zeile 2085Zeile 2132
		
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 2573
				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":