Zeile 40 | Zeile 40 |
---|
add_breadcrumb($lang->nav_memberlist_search);
$contact_fields = array();
|
add_breadcrumb($lang->nav_memberlist_search);
$contact_fields = array();
|
foreach(array('aim', 'skype', 'google', 'yahoo', 'icq') as $field)
| foreach(array('skype', 'google', 'yahoo', 'icq') as $field)
|
{ $contact_fields[$field] = ''; $settingkey = 'allow'.$field.'field';
| { $contact_fields[$field] = ''; $settingkey = 'allow'.$field.'field';
|
Zeile 55 | Zeile 55 |
---|
$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').'";'); }
|
| }
if($mybb->settings['usereferrals'] == 1) { eval("\$referrals_option = \"".$templates->get("memberlist_referrals_option")."\";");
|
}
eval("\$search_page = \"".$templates->get("memberlist_search")."\";");
| }
eval("\$search_page = \"".$templates->get("memberlist_search")."\";");
|
Zeile 74 | Zeile 79 |
---|
{ $mybb->input['sort'] = $mybb->settings['default_memberlist_sortby']; }
|
{ $mybb->input['sort'] = $mybb->settings['default_memberlist_sortby']; }
|
|
|
$sort_selected = array( 'regdate' => '', 'lastvisit' => '',
| $sort_selected = array( 'regdate' => '', 'lastvisit' => '',
|
Zeile 91 | Zeile 96 |
---|
break; case "lastvisit": $sort_field = "u.lastactive";
|
break; case "lastvisit": $sort_field = "u.lastactive";
|
break;
| break;
|
case "reputation": $sort_field = "u.reputation";
|
case "reputation": $sort_field = "u.reputation";
|
break;
| break;
|
case "postnum": $sort_field = "u.postnum"; break;
| case "postnum": $sort_field = "u.postnum"; break;
|
Zeile 102 | Zeile 107 |
---|
$sort_field = "u.threadnum"; break; case "referrals":
|
$sort_field = "u.threadnum"; break; case "referrals":
|
$sort_field = "u.referrals";
| if($mybb->settings['usereferrals'] == 1) { $sort_field = "u.referrals"; } else { $sort_field = "u.username"; }
|
break; default: $sort_field = "u.username";
| break; default: $sort_field = "u.username";
|
Zeile 157 | Zeile 169 |
---|
$search_query = '1=1'; $search_url = "";
|
$search_query = '1=1'; $search_url = "";
|
| switch($db->type) { // PostgreSQL's LIKE is case sensitive case "pgsql": $like = "ILIKE"; break; default: $like = "LIKE"; }
|
// Limiting results to a certain letter if(isset($mybb->input['letter']))
| // Limiting results to a certain letter if(isset($mybb->input['letter']))
|
Zeile 168 | Zeile 190 |
---|
} else if(strlen($letter) == 1) {
|
} else if(strlen($letter) == 1) {
|
$search_query .= " AND u.username LIKE '".$db->escape_string_like($letter)."%'";
| $search_query .= " AND u.username {$like} '".$db->escape_string_like($letter)."%'";
|
} $search_url .= "&letter={$letter}"; }
| } $search_url .= "&letter={$letter}"; }
|
Zeile 182 | Zeile 204 |
---|
// Name begins with if($mybb->input['username_match'] == "begins") {
|
// Name begins with if($mybb->input['username_match'] == "begins") {
|
$search_query .= " AND u.username LIKE '".$username_like_query."%'";
| $search_query .= " AND u.username {$like} '".$username_like_query."%'";
|
$search_url .= "&username_match=begins"; } // Just contains
|
$search_url .= "&username_match=begins"; } // Just contains
|
| else if($mybb->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."%'";
| $search_query .= " AND u.username='{$username_like_query}'";
|
}
|
}
|
|
|
$search_url .= "&username=".urlencode($search_username); }
| $search_url .= "&username=".urlencode($search_username); }
|
Zeile 199 | Zeile 227 |
---|
$search_website = htmlspecialchars_uni($mybb->input['website']); if(trim($mybb->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_query .= " AND u.website {$like} '%".$db->escape_string_like($mybb->input['website'])."%'";
|
$search_url .= "&website=".urlencode($mybb->input['website']);
|
$search_url .= "&website=".urlencode($mybb->input['website']);
|
}
| }
|
// Search by contact field input
|
// Search by contact field input
|
foreach(array('aim', 'icq', 'google', 'skype', 'yahoo') as $cfield)
| foreach(array('icq', 'google', 'skype', 'yahoo') as $cfield)
|
{ $csetting = 'allow'.$cfield.'field'; $mybb->input[$cfield] = trim($mybb->get_input($cfield)); if($mybb->input[$cfield] && $mybb->settings[$csetting] != '') { if($mybb->settings[$csetting] != -1)
|
{ $csetting = 'allow'.$cfield.'field'; $mybb->input[$cfield] = trim($mybb->get_input($cfield)); if($mybb->input[$cfield] && $mybb->settings[$csetting] != '') { if($mybb->settings[$csetting] != -1)
|
{
| {
|
$gids = explode(',', (string)$mybb->settings[$csetting]);
$search_query .= " AND (";
| $gids = explode(',', (string)$mybb->settings[$csetting]);
$search_query .= " AND (";
|
Zeile 237 | Zeile 265 |
---|
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_query .= " AND u.{$cfield} {$like} '%".$db->escape_string_like($mybb->input[$cfield])."%'";
|
} $search_url .= "&{$cfield}=".urlencode($mybb->input[$cfield]); }
| } $search_url .= "&{$cfield}=".urlencode($mybb->input[$cfield]); }
|
Zeile 290 | Zeile 318 |
---|
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;
|
$start = 0; $page = 1;
|
}
| }
|
$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")."\";");
|
Zeile 305 | Zeile 339 |
---|
{ $colspan = 7; eval("\$referral_header = \"".$templates->get("memberlist_referrals")."\";");
|
{ $colspan = 7; eval("\$referral_header = \"".$templates->get("memberlist_referrals")."\";");
|
}
$multipage = multipage($num_users, $per_page, $page, $search_url);
| }
$multipage = multipage($num_users, $per_page, $page, $search_url);
|
// Cache a few things $usertitles = $cache->read('usertitles'); $usertitles_cache = array(); foreach($usertitles as $usertitle)
|
// 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 330 | Zeile 364 |
---|
$user = $plugins->run_hooks("memberlist_user", $user);
$alt_bg = alt_trow();
|
$user = $plugins->run_hooks("memberlist_user", $user);
$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']);
|
$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
|
// Get the display usergroup
|
if(empty($user['displaygroup'])) {
| if($user['usergroup']) { $usergroup = usergroup_permissions($user['usergroup']); } else { $usergroup = usergroup_permissions(1); }
$displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");
if(!$user['displaygroup']) {
|
$user['displaygroup'] = $user['usergroup']; }
|
$user['displaygroup'] = $user['usergroup']; }
|
$usergroup = $usergroups_cache[$user['displaygroup']];
| $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) {
|
| $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'] = '';
|