Vergleich memberlist.php - 1.6.8 - 1.6.12

  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 5619 2011-09-26 18:11:43Z ralgith $

 * $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)

	// 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'];
}
else if($mybb->settings['membersperpage'])
{

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

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

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

	}
else
{
$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 135Zeile 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}";
}


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


Zeile 205Zeile 205
	if($page && $page > 0)
{
$start = ($page - 1) * $per_page;

	if($page && $page > 0)
{
$start = ($page - 1) * $per_page;

	}

	}

	else
{
$start = 0;
$page = 1;

	else
{
$start = 0;
$page = 1;

	}

	}

	$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 236Zeile 236
		{
continue;
}

		{
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 255Zeile 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 308Zeile 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 325Zeile 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 343Zeile 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']);