Vergleich memberlist.php - 1.8.16 - 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();


$contact_fields = array();

	foreach(array('skype', 'google', 'yahoo', 'icq') as $field)

	foreach(array('skype', 'google', 'icq') as $field)

	{
$contact_fields[$field] = '';
$settingkey = 'allow'.$field.'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;

		{
$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').'";');
}

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

$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")."\";");

	}


	}


	eval("\$search_page = \"".$templates->get("memberlist_search")."\";");
output_page($search_page);
}

	eval("\$search_page = \"".$templates->get("memberlist_search")."\";");
output_page($search_page);
}

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

	{
$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 96Zeile 115
			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 151Zeile 170
		$mybb->input['order'] = "descending";
}
$order_check[$mybb->input['order']] = " checked=\"checked\"";

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

 

if($sort_field == 'u.lastactive' && $mybb->usergroup['canviewwolinvis'] == 0)
{
$sort_field = "u.invisible ASC, CASE WHEN u.invisible = 1 THEN u.regdate ELSE u.lastactive END";
}


// Incoming results per page?
$mybb->input['perpage'] = $mybb->get_input('perpage', MyBB::INPUT_INT);


// Incoming results per page?
$mybb->input['perpage'] = $mybb->get_input('perpage', MyBB::INPUT_INT);

Zeile 202Zeile 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->get_input('username_match') == "contains")
{
$search_query .= " AND u.username {$like} '%".$username_like_query."%'";
$search_url .= "&username_match=contains";
}
// Exact

		else
{

		else
{

			$search_query .= " AND u.username {$like} '%".$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']);
if(trim($mybb->input['website']))


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

	{

	{

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

// Search by contact field input

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

// Search by contact field input

	foreach(array('icq', 'google', 'skype', 'yahoo') as $cfield)

	foreach(array('icq', 'google', 'skype') as $cfield)

	{
$csetting = 'allow'.$cfield.'field';
$mybb->input[$cfield] = trim($mybb->get_input($cfield));

	{
$csetting = 'allow'.$cfield.'field';
$mybb->input[$cfield] = trim($mybb->get_input($cfield));

Zeile 247Zeile 278
						case 'pgsql':
case 'sqlite':
$search_query .= " OR ','||u.additionalgroups||',' LIKE '%,{$gid},%'";

						case 'pgsql':
case 'sqlite':
$search_query .= " OR ','||u.additionalgroups||',' LIKE '%,{$gid},%'";

							break;

							break;

						default:
$search_query .= " OR CONCAT(',',u.additionalgroups,',') LIKE '%,{$gid},%'";
break;

						default:
$search_query .= " OR CONCAT(',',u.additionalgroups,',') LIKE '%,{$gid},%'";
break;

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

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

			}
else

			}
else

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

			{
$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');

$group = array();
foreach($usergroups_cache as $gid => $groupcache)
{
if($groupcache['showmemberlist'] == 0)

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

$group = array();
foreach($usergroups_cache as $gid => $groupcache)
{
if($groupcache['showmemberlist'] == 0)

		{

		{

			$group[] = (int)$gid;
}
}

			$group[] = (int)$gid;
}
}

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

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

 
		$pages = ceil($num_users / $per_page);
if($page > $pages)
{
$start = 0;
$page = 1;
}

	}
else

	}
else

	{

	{

		$start = 0;
$page = 1;
}

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

		$start = 0;
$page = 1;
}

$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

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

// Cache a few things

Zeile 354Zeile 391
		$alt_bg = alt_trow();

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

		$alt_bg = alt_trow();

$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'])
{
$usergroup = usergroup_permissions($user['usergroup']);

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

// Get the display usergroup
if($user['usergroup'])
{
$usergroup = usergroup_permissions($user['usergroup']);

		}

		}

		else

		else

		{

		{

			$usergroup = usergroup_permissions(1);
}


			$usergroup = usergroup_permissions(1);
}


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







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

if(!$user['displaygroup'])
{
$user['displaygroup'] = $user['usergroup'];
}


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

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

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

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

 
			$referral_count = (int) $user['referrals'];
if($referral_count > 0)
{
$uid = (int) $user['uid'];
eval("\$user['referrals'] = \"".$templates->get('member_referrals_link')."\";");
}


			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 400Zeile 449

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


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

		{

		{

			$has_custom_title = 1;
}


			$has_custom_title = 1;
}


Zeile 422Zeile 471
					$user['starimage'] = $titleinfo['starimage'];
break;
}

					$user['starimage'] = $titleinfo['starimage'];
break;
}

			}
}

			}
}

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

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

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

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

		}

		}


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


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

Zeile 438Zeile 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']);

Zeile 458Zeile 507
		$useravatar = format_avatar($user['avatar'], $user['avatardimensions'], my_strtolower($mybb->settings['memberlistmaxavatarsize']));
eval("\$user['avatar'] = \"".$templates->get("memberlist_user_avatar")."\";");


		$useravatar = format_avatar($user['avatar'], $user['avatardimensions'], my_strtolower($mybb->settings['memberlistmaxavatarsize']));
eval("\$user['avatar'] = \"".$templates->get("memberlist_user_avatar")."\";");


		if($user['invisible'] == 1 && $mybb->usergroup['canviewwolinvis'] != 1 && $user['uid'] != $mybb->user['uid'])
{
$user['lastvisit'] = $lang->lastvisit_never;

if($user['lastvisit'])
{
// We have had at least some active time, hide it instead




		$last_seen = max(array($user['lastactive'], $user['lastvisit']));
if(empty($last_seen))
{
$user['lastvisit'] = $lang->lastvisit_never;
}
else
{
// We have some stamp here
if($user['invisible'] == 1 && $mybb->usergroup['canviewwolinvis'] != 1 && $user['uid'] != $mybb->user['uid'])
{

				$user['lastvisit'] = $lang->lastvisit_hidden;
}

				$user['lastvisit'] = $lang->lastvisit_hidden;
}

		}
else
{
$user['lastvisit'] = my_date('relative', $user['lastactive']);

			else
{
$user['lastvisit'] = my_date('relative', $last_seen);
}

		}

$user['regdate'] = my_date('relative', $user['regdate']);

		}

$user['regdate'] = my_date('relative', $user['regdate']);

Zeile 483Zeile 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");