Vergleich memberlist.php - 1.8.24 - 1.8.35

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 32Zeile 32
{
error_no_permission();
}

{
error_no_permission();
}

 

$orderarrow = $sort_selected = array(
'regdate' => '',
'lastvisit' => '',
'reputation' => '',
'postnum' => '',
'threadnum' => '',
'referrals' => '',
'username' => ''
);


// Showing advanced search page?
if($mybb->get_input('action') == "search")
{
$plugins->run_hooks("memberlist_search");
add_breadcrumb($lang->nav_memberlist_search);


// Showing advanced search page?
if($mybb->get_input('action') == "search")
{
$plugins->run_hooks("memberlist_search");
add_breadcrumb($lang->nav_memberlist_search);





















if(isset($mybb->usergroup['usergroup']))
{
$usergroup = $mybb->usergroup['usergroup'];
}
else
{
$usergroup = '';
}
if(isset($mybb->usergroup['additionalgroups']))
{
$additionalgroups = $mybb->usergroup['additionalgroups'];
}
else
{
$additionalgroups = '';
}


	$contact_fields = array();
foreach(array('skype', 'google', 'icq') as $field)
{
$contact_fields[$field] = '';
$settingkey = 'allow'.$field.'field';

	$contact_fields = array();
foreach(array('skype', 'google', 'icq') as $field)
{
$contact_fields[$field] = '';
$settingkey = 'allow'.$field.'field';


if($mybb->settings[$settingkey] != '' && is_member($mybb->settings[$settingkey], array('usergroup' => $mybb->usergroup['usergroup'], 'additionalgroups' => $mybb->usergroup['additionalgroups'])))


if($mybb->settings[$settingkey] != '' && is_member($mybb->settings[$settingkey], array('usergroup' => $usergroup, 'additionalgroups' => $additionalgroups)))

		{
$tmpl = 'memberlist_search_'.$field;

$lang_string = 'search_'.$field;
$lang_string = $lang->{$lang_string};

		{
$tmpl = 'memberlist_search_'.$field;

$lang_string = 'search_'.$field;
$lang_string = $lang->{$lang_string};





			$bgcolors[$field] = alt_trow();
eval('$contact_fields[\''.$field.'\'] = "'.$templates->get('memberlist_search_contact_field').'";');
}

			$bgcolors[$field] = alt_trow();
eval('$contact_fields[\''.$field.'\'] = "'.$templates->get('memberlist_search_contact_field').'";');
}

	}



	}

$referrals_option = '';

	if($mybb->settings['usereferrals'] == 1)
{
eval("\$referrals_option = \"".$templates->get("memberlist_referrals_option")."\";");

	if($mybb->settings['usereferrals'] == 1)
{
eval("\$referrals_option = \"".$templates->get("memberlist_referrals_option")."\";");

Zeile 74Zeile 102
	if(isset($mybb->input['sort']))
{
$mybb->input['sort'] = strtolower($mybb->get_input('sort'));

	if(isset($mybb->input['sort']))
{
$mybb->input['sort'] = strtolower($mybb->get_input('sort'));

	}

	}

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

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


$sort_selected = array(
'regdate' => '',
'lastvisit' => '',
'reputation' => '',
'postnum' => '',
'referrals' => '',
'username' => ''
);

 

switch($mybb->input['sort'])
{


switch($mybb->input['sort'])
{

Zeile 207Zeile 226
		$username_like_query = $db->escape_string_like($search_username);

// Name begins with

		$username_like_query = $db->escape_string_like($search_username);

// Name begins with

		if($mybb->input['username_match'] == "begins")

		if($mybb->get_input('username_match') == "begins")

		{
$search_query .= " AND u.username {$like} '".$username_like_query."%'";
$search_url .= "&username_match=begins";
}
// Just contains

		{
$search_query .= " AND u.username {$like} '".$username_like_query."%'";
$search_url .= "&username_match=begins";
}
// Just contains

		else if($mybb->input['username_match'] == "contains")

		else if($mybb->get_input('username_match') == "contains")

		{
$search_query .= " AND u.username {$like} '%".$username_like_query."%'";
$search_url .= "&username_match=contains";
}
// Exact

		{
$search_query .= " AND u.username {$like} '%".$username_like_query."%'";
$search_url .= "&username_match=contains";
}
// Exact

		else

		else

		{

		{

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


			$username_esc = $db->escape_string(my_strtolower($search_username));
$search_query .= " AND LOWER(u.username)='{$username_esc}'";

		}

		}





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

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

	}


	}


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

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

Zeile 268Zeile 288
				$search_query .= ")";
}
if($cfield == 'icq')

				$search_query .= ")";
}
if($cfield == 'icq')

			{

			{

				$search_query .= " AND u.{$cfield} LIKE '%".(int)$mybb->input[$cfield]."%'";

				$search_query .= " AND u.{$cfield} LIKE '%".(int)$mybb->input[$cfield]."%'";

			}

			}

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

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

		}
}

$usergroups_cache = $cache->read('usergroups');

		}
}

$usergroups_cache = $cache->read('usergroups');


$group = array();
foreach($usergroups_cache as $gid => $groupcache)


$group = array();
foreach($usergroups_cache as $gid => $groupcache)

Zeile 287Zeile 307
		if($groupcache['showmemberlist'] == 0)
{
$group[] = (int)$gid;

		if($groupcache['showmemberlist'] == 0)
{
$group[] = (int)$gid;

		}

		}

	}

if(is_array($group) && !empty($group))

	}

if(is_array($group) && !empty($group))

Zeile 308Zeile 328
					$search_query .= " AND CONCAT(',',u.additionalgroups,',') NOT LIKE '%,{$hidegid},%'";
break;
}

					$search_query .= " AND CONCAT(',',u.additionalgroups,',') NOT LIKE '%,{$hidegid},%'";
break;
}

		}
}

		}
}

  
$sorturl = htmlspecialchars_uni("memberlist.php?perpage={$mybb->input['perpage']}{$search_url}");
$search_url = htmlspecialchars_uni("memberlist.php?sort={$mybb->input['sort']}&order={$mybb->input['order']}&perpage={$mybb->input['perpage']}{$search_url}");

  
$sorturl = htmlspecialchars_uni("memberlist.php?perpage={$mybb->input['perpage']}{$search_url}");
$search_url = htmlspecialchars_uni("memberlist.php?sort={$mybb->input['sort']}&order={$mybb->input['order']}&perpage={$mybb->input['perpage']}{$search_url}");

Zeile 338Zeile 358

$sort = htmlspecialchars_uni($mybb->input['sort']);
eval("\$orderarrow['{$sort}'] = \"".$templates->get("memberlist_orderarrow")."\";");


$sort = htmlspecialchars_uni($mybb->input['sort']);
eval("\$orderarrow['{$sort}'] = \"".$templates->get("memberlist_orderarrow")."\";");





	// Referral?
if($mybb->settings['usereferrals'] == 1)
{
$colspan = 7;
eval("\$referral_header = \"".$templates->get("memberlist_referrals")."\";");

	// Referral?
if($mybb->settings['usereferrals'] == 1)
{
$colspan = 7;
eval("\$referral_header = \"".$templates->get("memberlist_referrals")."\";");

	}


	}


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

// Cache a few things
$usertitles = $cache->read('usertitles');
$usertitles_cache = array();
foreach($usertitles as $usertitle)

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

// Cache a few things
$usertitles = $cache->read('usertitles');
$usertitles_cache = array();
foreach($usertitles as $usertitle)

	{

	{

		$usertitles_cache[$usertitle['posts']] = $usertitle;
}
$users = '';

		$usertitles_cache[$usertitle['posts']] = $usertitle;
}
$users = '';

Zeile 373Zeile 393
		$user['username'] = format_name(htmlspecialchars_uni($user['username']), $user['usergroup'], $user['displaygroup']);

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

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

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





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

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

		{

		{

			$usergroup = usergroup_permissions($user['usergroup']);
}
else

			$usergroup = usergroup_permissions($user['usergroup']);
}
else

		{

		{

			$usergroup = usergroup_permissions(1);
}

			$usergroup = usergroup_permissions(1);
}





		$displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");

if(!$user['displaygroup'])

		$displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");

if(!$user['displaygroup'])

		{

		{

			$user['displaygroup'] = $user['usergroup'];

			$user['displaygroup'] = $user['usergroup'];

		}


		}


		$display_group = usergroup_displaygroup($user['displaygroup']);
if(is_array($display_group))
{
$usergroup = array_merge($usergroup, $display_group);

		$display_group = usergroup_displaygroup($user['displaygroup']);
if(is_array($display_group))
{
$usergroup = array_merge($usergroup, $display_group);

		}


		}


		// Build referral?
if($mybb->settings['usereferrals'] == 1)
{

		// Build referral?
if($mybb->settings['usereferrals'] == 1)
{

Zeile 408Zeile 428
			}

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

			}

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

			eval("\$referrals_option = \"".$templates->get("memberlist_referrals_option")."\";");

 
		}

$usergroup['groupimage'] = '';

		}

$usergroup['groupimage'] = '';

Zeile 420Zeile 439
				$language = $mybb->user['language'];
}
else

				$language = $mybb->user['language'];
}
else

			{

			{

				$language = $mybb->settings['bblanguage'];
}
$usergroup['image'] = str_replace("{lang}", $language, $usergroup['image']);
$usergroup['image'] = str_replace("{theme}", $theme['imgdir'], $usergroup['image']);
eval("\$usergroup['groupimage'] = \"".$templates->get("memberlist_user_groupimage")."\";");

				$language = $mybb->settings['bblanguage'];
}
$usergroup['image'] = str_replace("{lang}", $language, $usergroup['image']);
$usergroup['image'] = str_replace("{theme}", $theme['imgdir'], $usergroup['image']);
eval("\$usergroup['groupimage'] = \"".$templates->get("memberlist_user_groupimage")."\";");

		}


		}


		$has_custom_title = 0;
if(trim($user['usertitle']) != "")
{

		$has_custom_title = 0;
if(trim($user['usertitle']) != "")
{

Zeile 456Zeile 475
		}

$user['usertitle'] = htmlspecialchars_uni($user['usertitle']);

		}

$user['usertitle'] = htmlspecialchars_uni($user['usertitle']);





		if(!empty($usergroup['stars']))
{
$user['stars'] = $usergroup['stars'];

		if(!empty($usergroup['stars']))
{
$user['stars'] = $usergroup['stars'];

Zeile 468Zeile 487
		}

$user['userstars'] = '';

		}

$user['userstars'] = '';

		if(!empty($user['starimage']))

		if(!empty($user['starimage']) && isset($user['stars']))

		{
// Only display stars if we have an image to use...
$starimage = str_replace("{theme}", $theme['imgdir'], $user['starimage']);

		{
// Only display stars if we have an image to use...
$starimage = str_replace("{theme}", $theme['imgdir'], $user['starimage']);





			for($i = 0; $i < $user['stars']; ++$i)
{
eval("\$user['userstars'] .= \"".$templates->get("memberlist_user_userstar", 1, 0)."\";");

			for($i = 0; $i < $user['stars']; ++$i)
{
eval("\$user['userstars'] .= \"".$templates->get("memberlist_user_userstar", 1, 0)."\";");

Zeile 516Zeile 535
	if(!$users)
{
eval("\$users = \"".$templates->get("memberlist_error")."\";");

	if(!$users)
{
eval("\$users = \"".$templates->get("memberlist_error")."\";");

 
	}

$referrals_option = '';
if($mybb->settings['usereferrals'] == 1)
{
eval("\$referrals_option = \"".$templates->get("memberlist_referrals_option")."\";");

	}

$plugins->run_hooks("memberlist_end");

	}

$plugins->run_hooks("memberlist_end");