Vergleich admin/modules/user/users.php - 1.4.5 - 1.4.16

  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 5379 2011-02-21 11:06:42Z Tomm $

 */

// 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
{
flash_message($lang->success_activated, 'success');

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

Zeile 432Zeile 433
		// 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 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 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 960Zeile 961
		$age = '';
}


		$age = '';
}


	$table->construct_cell("<div style=\"width: 126px; height: 126px;\" class=\"user_avatar\"><img src=\"{$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("<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_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();

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





	$form_container->end();
echo "</div>\n";

	$form_container->end();
echo "</div>\n";


//


//

	// AVATAR MANAGER
//
echo "<div id=\"tab_avatar\">\n";
$table = new Table;
$table->construct_header($lang->current_avatar, array('colspan' => 2));


	// AVATAR MANAGER
//
echo "<div id=\"tab_avatar\">\n";
$table = new Table;
$table->construct_header($lang->current_avatar, array('colspan' => 2));


	$table->construct_cell("<div style=\"width: 126px; height: 126px;\" class=\"user_avatar\"><img src=\"{$user['avatar']}\" width=\"{$scaled_dimensions['width']}\" style=\"margin-top: {$avatar_top}px\" height=\"{$scaled_dimensions['height']}\" alt=\"\" /></div>", array('width' => 1));

	$table->construct_cell("<div style=\"width: 126px; height: 126px;\" class=\"user_avatar\"><img src=\"".htmlspecialchars_uni($user['avatar'])."\" width=\"{$scaled_dimensions['width']}\" style=\"margin-top: {$avatar_top}px\" height=\"{$scaled_dimensions['height']}\" alt=\"\" /></div>", array('width' => 1));


if($user['avatartype'] == "upload" || stristr($user['avatar'], $mybb->settings['avataruploadpath']))
{
$current_avatar_msg = "<br /><strong>{$lang->user_current_using_uploaded_avatar}</strong>";


if($user['avatartype'] == "upload" || stristr($user['avatar'], $mybb->settings['avataruploadpath']))
{
$current_avatar_msg = "<br /><strong>{$lang->user_current_using_uploaded_avatar}</strong>";

	}

	}

	else if($user['avatartype'] == "gallery" || stristr($user['avatar'], $mybb->settings['avatardir']))
{
$current_avatar_msg = "<br /><strong>{$lang->user_current_using_gallery_avatar}</strong>";

	else if($user['avatartype'] == "gallery" || stristr($user['avatar'], $mybb->settings['avatardir']))
{
$current_avatar_msg = "<br /><strong>{$lang->user_current_using_gallery_avatar}</strong>";

	}

	}

	elseif($user['avatartype'] == "remote" || my_strpos(my_strtolower($user['avatar']), "http://") !== false)
{
$current_avatar_msg = "<br /><strong>{$lang->user_current_using_remote_avatar}</strong>";

	elseif($user['avatartype'] == "remote" || my_strpos(my_strtolower($user['avatar']), "http://") !== false)
{
$current_avatar_msg = "<br /><strong>{$lang->user_current_using_remote_avatar}</strong>";

Zeile 1215Zeile 1216
	}

if($errors)

	}

if($errors)

	{

	{

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


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


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 2189Zeile 2241
			{
$user['avatar'] = "styles/{$page->style}/images/default_avatar.gif";
}

			{
$user['avatar'] = "styles/{$page->style}/images/default_avatar.gif";
}

			$user['view']['avatar'] = "<img src=\"{$user['avatar']}\" alt=\"\" width=\"{$scaled_avatar['width']}\" height=\"{$scaled_avatar['height']}\" />";

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


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


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

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":