Vergleich memberlist.php - 1.6.1 - 1.6.13

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: memberlist.php 5127 2010-07-27 19:49:14Z RyanGordon $

 * $Id$

 */

define("IN_MYBB", 1);
define('THIS_SCRIPT', 'memberlist.php');


 */

define("IN_MYBB", 1);
define('THIS_SCRIPT', 'memberlist.php');


$templatelist = "memberlist,memberlist_member,memberlist_search,memberlist_user,memberlist_user_groupimage,memberlist_user_avatar";
$templatelist .= ",postbit_www,postbit_email,multipage_nextpage,multipage_page_current,multipage_page,multipage_start,multipage_end,multipage,memberlist_referrals,memberlist_referrals_bit";

$templatelist = "memberlist,memberlist_search,memberlist_user,memberlist_user_groupimage,memberlist_user_avatar,multipage_prevpage";
$templatelist .= ",multipage_nextpage,multipage_page_current,multipage_page,multipage_start,multipage_end,multipage,memberlist_referrals,memberlist_referrals_bit";

require_once "./global.php";

// Load global language phrases

require_once "./global.php";

// Load global language phrases

Zeile 38Zeile 38
{
$plugins->run_hooks("memberlist_search");
eval("\$search_page = \"".$templates->get("memberlist_search")."\";");

{
$plugins->run_hooks("memberlist_search");
eval("\$search_page = \"".$templates->get("memberlist_search")."\";");

	output_page($search_page);	

	output_page($search_page);

}
else
{

}
else
{

Zeile 61Zeile 61
	{
$mybb->input['sort'] = $mybb->settings['default_memberlist_sortby'];
}

	{
$mybb->input['sort'] = $mybb->settings['default_memberlist_sortby'];
}

	



	switch($mybb->input['sort'])
{
case "regdate":

	switch($mybb->input['sort'])
{
case "regdate":

Zeile 69Zeile 69
			break;
case "lastvisit":
$sort_field = "u.lastactive";

			break;
case "lastvisit":
$sort_field = "u.lastactive";

			break;

			break;

		case "reputation":
$sort_field = "u.reputation";
break;

		case "reputation":
$sort_field = "u.reputation";
break;

Zeile 85Zeile 85
			break;
}
$sort_selected[$mybb->input['sort']] = " selected=\"selected\"";

			break;
}
$sort_selected[$mybb->input['sort']] = " selected=\"selected\"";

	



	// Incoming sort order?
if($mybb->input['order'])
{
$mybb->input['order'] = strtolower($mybb->input['order']);

	// Incoming sort order?
if($mybb->input['order'])
{
$mybb->input['order'] = strtolower($mybb->input['order']);

	}

	}

	else
{
$mybb->input['order'] = strtolower($mybb->settings['default_memberlist_order']);
}

	else
{
$mybb->input['order'] = strtolower($mybb->settings['default_memberlist_order']);
}

	



	if($mybb->input['order'] == "ascending" || (!$mybb->input['order'] && $mybb->input['sort'] == 'username'))
{
$sort_order = "ASC";

	if($mybb->input['order'] == "ascending" || (!$mybb->input['order'] && $mybb->input['sort'] == 'username'))
{
$sort_order = "ASC";

Zeile 107Zeile 107
		$mybb->input['order'] = "descending";
}
$order_check[$mybb->input['order']] = " checked=\"checked\"";

		$mybb->input['order'] = "descending";
}
$order_check[$mybb->input['order']] = " checked=\"checked\"";

	



	// Incoming results per page?
$mybb->input['perpage'] = intval($mybb->input['perpage']);
if($mybb->input['perpage'] > 0 && $mybb->input['perpage'] <= 500)
{
$per_page = $mybb->input['perpage'];

	// Incoming results per page?
$mybb->input['perpage'] = intval($mybb->input['perpage']);
if($mybb->input['perpage'] > 0 && $mybb->input['perpage'] <= 500)
{
$per_page = $mybb->input['perpage'];

	}





	}
else if($mybb->settings['membersperpage'])
{
$per_page = $mybb->input['perpage'] = intval($mybb->settings['membersperpage']);
}

	else
{

	else
{

		$per_page = $mybb->input['perpage'] = intval($mybb->settings['membersperpage']);	

		$per_page = $mybb->input['perpage'] = 20;

	}

	}

	



	$search_query = '1=1';
$search_url = "memberlist.php?sort={$mybb->input['sort']}&order={$mybb->input['order']}&perpage={$mybb->input['perpage']}";

	$search_query = '1=1';
$search_url = "memberlist.php?sort={$mybb->input['sort']}&order={$mybb->input['order']}&perpage={$mybb->input['perpage']}";

	



	// Limiting results to a certain letter
if($mybb->input['letter'])
{

	// Limiting results to a certain letter
if($mybb->input['letter'])
{

Zeile 131Zeile 135
			$search_query .= " AND u.username NOT REGEXP('[a-zA-Z]')";
}
else if(strlen($letter) == 1)

			$search_query .= " AND u.username NOT REGEXP('[a-zA-Z]')";
}
else if(strlen($letter) == 1)

		{
$search_query .= " AND u.username LIKE '".$db->escape_string($letter)."%'";
}

		{
$search_query .= " AND u.username LIKE '".$db->escape_string_like($letter)."%'";
}

		$search_url .= "&letter={$letter}";
}

// Searching for a matching username

		$search_url .= "&letter={$letter}";
}

// Searching for a matching username

	$search_username = htmlspecialchars_uni($mybb->input['username']);
if(trim($mybb->input['username']))
{
$username_like_query = $db->escape_string_like($mybb->input['username']);


	$search_username = htmlspecialchars_uni(trim($mybb->input['username']));
if($search_username != '')
{
$username_like_query = $db->escape_string_like($search_username);


		// Name begins with
if($mybb->input['username_match'] == "begins")
{

		// Name begins with
if($mybb->input['username_match'] == "begins")
{

Zeile 153Zeile 158
		{
$search_query .= " AND u.username LIKE '%".$username_like_query."%'";
}

		{
$search_query .= " AND u.username LIKE '%".$username_like_query."%'";
}

		$search_url .= "&username=".urlencode($mybb->input['username']);
}



$search_url .= "&username=".urlencode($search_username);
}


// Website contains
$search_website = htmlspecialchars_uni($mybb->input['website']);


// Website contains
$search_website = htmlspecialchars_uni($mybb->input['website']);

Zeile 169Zeile 175
	{
$search_query .= " AND u.aim LIKE '%".$db->escape_string_like($mybb->input['aim'])."%'";
$search_url .= "&aim=".urlencode($mybb->input['aim']);

	{
$search_query .= " AND u.aim LIKE '%".$db->escape_string_like($mybb->input['aim'])."%'";
$search_url .= "&aim=".urlencode($mybb->input['aim']);

	}


	}


	// ICQ Number
if(trim($mybb->input['icq']))
{

	// ICQ Number
if(trim($mybb->input['icq']))
{

Zeile 207Zeile 213
	}
$search_url = htmlspecialchars_uni($search_url);
$multipage = multipage($num_users, $per_page, $page, $search_url);

	}
$search_url = htmlspecialchars_uni($search_url);
$multipage = multipage($num_users, $per_page, $page, $search_url);

	



	// Cache a few things
$usergroups_cache = $cache->read('usergroups');
$query = $db->simple_select("usertitles", "*", "", array('order_by' => 'posts', 'order_dir' => 'DESC'));

	// Cache a few things
$usergroups_cache = $cache->read('usergroups');
$query = $db->simple_select("usertitles", "*", "", array('order_by' => 'posts', 'order_dir' => 'DESC'));

Zeile 225Zeile 231
	");
while($user = $db->fetch_array($query))
{

	");
while($user = $db->fetch_array($query))
{

		$plugins->run_hooks("memberlist_user");






		$user = $plugins->run_hooks("memberlist_user", $user);
if(!$user['username'])
{
continue;
}


		$alt_bg = alt_trow();

$user['username'] = format_name($user['username'], $user['usergroup'], $user['displaygroup']);

$user['profilelink'] = build_profile_link($user['username'], $user['uid']);

		$alt_bg = alt_trow();

$user['username'] = format_name($user['username'], $user['usergroup'], $user['displaygroup']);

$user['profilelink'] = build_profile_link($user['username'], $user['uid']);

		



		// Get the display usergroup
if(!$user['displaygroup'])
{

		// Get the display usergroup
if(!$user['displaygroup'])
{

Zeile 244Zeile 255
		{
eval("\$referral_bit = \"".$templates->get("memberlist_referrals_bit")."\";");
}

		{
eval("\$referral_bit = \"".$templates->get("memberlist_referrals_bit")."\";");
}

		



		// Work out the usergroup/title stuff
if(!empty($usergroup['image']))
{

		// Work out the usergroup/title stuff
if(!empty($usergroup['image']))
{

Zeile 297Zeile 308
		{
$user['starimage'] = $usergroup['starimage'];
}

		{
$user['starimage'] = $usergroup['starimage'];
}

		



		if($user['starimage'])
{
// Only display stars if we have an image to use...

		if($user['starimage'])
{
// Only display stars if we have an image to use...

Zeile 314Zeile 325
		{
$user['userstars'] = "<br />".$user['userstars'];
}

		{
$user['userstars'] = "<br />".$user['userstars'];
}

	



		// Show avatar
if($user['avatar'] != '')

		// Show avatar
if($user['avatar'] != '')

		{

		{

			$user['avatar'] = htmlspecialchars_uni($user['avatar']);
$avatar_dimensions = explode("|", $user['avatardimensions']);

			$user['avatar'] = htmlspecialchars_uni($user['avatar']);
$avatar_dimensions = explode("|", $user['avatardimensions']);

			



			if($avatar_dimensions[0] && $avatar_dimensions[1])
{
list($max_width, $max_height) = explode("x", my_strtolower($mybb->settings['memberlistmaxavatarsize']));

			if($avatar_dimensions[0] && $avatar_dimensions[1])
{
list($max_width, $max_height) = explode("x", my_strtolower($mybb->settings['memberlistmaxavatarsize']));

Zeile 332Zeile 343
				}
else
{

				}
else
{

					$avatar_width_height = "width=\"{$avatar_dimensions[0]}\" height=\"{$avatar_dimensions[1]}\"";	

					$avatar_width_height = "width=\"{$avatar_dimensions[0]}\" height=\"{$avatar_dimensions[1]}\"";

				}
}

				}
}

			



			eval("\$user['avatar'] = \"".$templates->get("memberlist_user_avatar")."\";");
}
else
{
$user['avatar'] = "";

			eval("\$user['avatar'] = \"".$templates->get("memberlist_user_avatar")."\";");
}
else
{
$user['avatar'] = "";

		}		


		}


		$user['regdate'] = my_date($mybb->settings['dateformat'], $user['regdate']).", ".my_date($mybb->settings['timeformat'], $user['regdate']);
$user['lastvisit'] = my_date($mybb->settings['dateformat'], $user['lastactive']).", ".my_date($mybb->settings['timeformat'], $user['lastactive']);
$user['postnum'] = my_number_format($user['postnum']);

		$user['regdate'] = my_date($mybb->settings['dateformat'], $user['regdate']).", ".my_date($mybb->settings['timeformat'], $user['regdate']);
$user['lastvisit'] = my_date($mybb->settings['dateformat'], $user['lastactive']).", ".my_date($mybb->settings['timeformat'], $user['lastactive']);
$user['postnum'] = my_number_format($user['postnum']);