Line 61 | Line 61 |
---|
$default_key = 'c'; $sort_key = request_var('sk', $default_key); $sort_dir = request_var('sd', 'a');
|
$default_key = 'c'; $sort_key = request_var('sk', $default_key); $sort_dir = request_var('sd', 'a');
|
// Grab rank information for later $ranks = $cache->obtain_ranks();
| |
// What do you want to do today? ... oops, I think that line is taken ... switch ($mode)
| // What do you want to do today? ... oops, I think that line is taken ... switch ($mode)
|
Line 899 | Line 894 |
---|
$notify_type = NOTIFY_EMAIL; }
|
$notify_type = NOTIFY_EMAIL; }
|
$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']); $messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']); $messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']); $messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
| $messenger->anti_abuse_headers($config, $user);
|
$messenger->assign_vars(array( 'BOARD_CONTACT' => $config['board_contact'],
| $messenger->assign_vars(array( 'BOARD_CONTACT' => $config['board_contact'],
|
Line 1069 | Line 1061 |
---|
$sql_where .= ($msn) ? ' AND u.user_msnm ' . $db->sql_like_expression(str_replace('*', $db->any_char, $msn)) . ' ' : ''; $sql_where .= ($jabber) ? ' AND u.user_jabber ' . $db->sql_like_expression(str_replace('*', $db->any_char, $jabber)) . ' ' : ''; $sql_where .= (is_numeric($count) && isset($find_key_match[$count_select])) ? ' AND u.user_posts ' . $find_key_match[$count_select] . ' ' . (int) $count . ' ' : '';
|
$sql_where .= ($msn) ? ' AND u.user_msnm ' . $db->sql_like_expression(str_replace('*', $db->any_char, $msn)) . ' ' : ''; $sql_where .= ($jabber) ? ' AND u.user_jabber ' . $db->sql_like_expression(str_replace('*', $db->any_char, $jabber)) . ' ' : ''; $sql_where .= (is_numeric($count) && isset($find_key_match[$count_select])) ? ' AND u.user_posts ' . $find_key_match[$count_select] . ' ' . (int) $count . ' ' : '';
|
$sql_where .= (sizeof($joined) > 1 && isset($find_key_match[$joined_select])) ? " AND u.user_regdate " . $find_key_match[$joined_select] . ' ' . gmmktime(0, 0, 0, intval($joined[1]), intval($joined[2]), intval($joined[0])) : ''; $sql_where .= ($auth->acl_get('u_viewonline') && sizeof($active) > 1 && isset($find_key_match[$active_select])) ? " AND u.user_lastvisit " . $find_key_match[$active_select] . ' ' . gmmktime(0, 0, 0, $active[1], intval($active[2]), intval($active[0])) : '';
| if (isset($find_key_match[$joined_select]) && sizeof($joined) == 3) { // Before PHP 5.1 an error value -1 can be returned instead of false. // Theoretically gmmktime() can also legitimately return -1 as an actual timestamp. // But since we do not pass the $second parameter to gmmktime(), // an actual unix timestamp -1 cannot be returned in this case. // Thus we can check whether it is -1 and treat -1 as an error. $joined_time = gmmktime(0, 0, 0, (int) $joined[1], (int) $joined[2], (int) $joined[0]);
if ($joined_time !== false && $joined_time !== -1) { $sql_where .= " AND u.user_regdate " . $find_key_match[$joined_select] . ' ' . $joined_time; } }
if (isset($find_key_match[$active_select]) && sizeof($active) == 3 && $auth->acl_get('u_viewonline')) { $active_time = gmmktime(0, 0, 0, (int) $active[1], (int) $active[2], (int) $active[0]);
if ($active_time !== false && $active_time !== -1) { $sql_where .= " AND u.user_lastvisit " . $find_key_match[$active_select] . ' ' . $active_time; } }
|
$sql_where .= ($search_group_id) ? " AND u.user_id = ug.user_id AND ug.group_id = $search_group_id AND ug.user_pending = 0 " : '';
if ($search_group_id)
| $sql_where .= ($search_group_id) ? " AND u.user_id = ug.user_id AND ug.group_id = $search_group_id AND ug.user_pending = 0 " : '';
if ($search_group_id)
|
Line 1200 | Line 1216 |
---|
// Misusing the avatar function for displaying group avatars... $avatar_img = get_user_avatar($group_row['group_avatar'], $group_row['group_avatar_type'], $group_row['group_avatar_width'], $group_row['group_avatar_height'], 'GROUP_AVATAR');
|
// Misusing the avatar function for displaying group avatars... $avatar_img = get_user_avatar($group_row['group_avatar'], $group_row['group_avatar_type'], $group_row['group_avatar_width'], $group_row['group_avatar_height'], 'GROUP_AVATAR');
|
| // ... same for group rank
|
$rank_title = $rank_img = $rank_img_src = ''; if ($group_row['group_rank']) {
|
$rank_title = $rank_img = $rank_img_src = ''; if ($group_row['group_rank']) {
|
if (isset($ranks['special'][$group_row['group_rank']]))
| get_user_rank($group_row['group_rank'], false, $rank_title, $rank_img, $rank_img_src);
if ($rank_img)
|
{
|
{
|
$rank_title = $ranks['special'][$group_row['group_rank']]['rank_title'];
| $rank_img .= '<br />';
|
}
|
}
|
$rank_img = (!empty($ranks['special'][$group_row['group_rank']]['rank_image'])) ? '<img src="' . $config['ranks_path'] . '/' . $ranks['special'][$group_row['group_rank']]['rank_image'] . '" alt="' . $ranks['special'][$group_row['group_rank']]['rank_title'] . '" title="' . $ranks['special'][$group_row['group_rank']]['rank_title'] . '" /><br />' : ''; $rank_img_src = (!empty($ranks['special'][$group_row['group_rank']]['rank_image'])) ? $config['ranks_path'] . '/' . $ranks['special'][$group_row['group_rank']]['rank_image'] : ''; } else { $rank_title = ''; $rank_img = ''; $rank_img_src = '';
| |
}
$template->assign_vars(array(
| }
$template->assign_vars(array(
|
Line 1268 | Line 1279 |
---|
{ $total_users = $config['num_users']; }
|
{ $total_users = $config['num_users']; }
|
$s_char_options = '<option value=""' . ((!$first_char) ? ' selected="selected"' : '') . '> </option>'; for ($i = 97; $i < 123; $i++) { $s_char_options .= '<option value="' . chr($i) . '"' . (($first_char == chr($i)) ? ' selected="selected"' : '') . '>' . chr($i-32) . '</option>'; } $s_char_options .= '<option value="other"' . (($first_char == 'other') ? ' selected="selected"' : '') . '>' . $user->lang['OTHER'] . '</option>';
| |
// Build a relevant pagination_url $params = $sort_params = array();
| // Build a relevant pagination_url $params = $sort_params = array();
|
Line 1305 | Line 1309 |
---|
'first_char' => array('first_char', ''), );
|
'first_char' => array('first_char', ''), );
|
| $u_first_char_params = array();
|
foreach ($check_params as $key => $call) { if (!isset($_REQUEST[$key]))
| foreach ($check_params as $key => $call) { if (!isset($_REQUEST[$key]))
|
Line 1316 | Line 1321 |
---|
$param = urlencode($key) . '=' . ((is_string($param)) ? urlencode($param) : $param); $params[] = $param;
|
$param = urlencode($key) . '=' . ((is_string($param)) ? urlencode($param) : $param); $params[] = $param;
|
| if ($key != 'first_char') { $u_first_char_params[] = $param; }
|
if ($key != 'sk' && $key != 'sd') { $sort_params[] = $param;
| if ($key != 'sk' && $key != 'sd') { $sort_params[] = $param;
|
Line 1327 | Line 1336 |
---|
if ($mode) { $params[] = "mode=$mode";
|
if ($mode) { $params[] = "mode=$mode";
|
| $u_first_char_params[] = "mode=$mode";
|
} $sort_params[] = "mode=$mode";
| } $sort_params[] = "mode=$mode";
|
Line 1334 | Line 1344 |
---|
$sort_url = append_sid("{$phpbb_root_path}memberlist.$phpEx", implode('&', $sort_params));
unset($search_params, $sort_params);
|
$sort_url = append_sid("{$phpbb_root_path}memberlist.$phpEx", implode('&', $sort_params));
unset($search_params, $sort_params);
|
| $u_first_char_params = implode('&', $u_first_char_params); $u_first_char_params .= ($u_first_char_params) ? '&' : '';
$first_characters = array(); $first_characters[''] = $user->lang['ALL']; for ($i = 97; $i < 123; $i++) { $first_characters[chr($i)] = chr($i - 32); } $first_characters['other'] = $user->lang['OTHER'];
foreach ($first_characters as $char => $desc) { $template->assign_block_vars('first_char', array( 'DESC' => $desc, 'VALUE' => $char, 'S_SELECTED' => ($first_char == $char) ? true : false, 'U_SORT' => append_sid("{$phpbb_root_path}memberlist.$phpEx", $u_first_char_params . 'first_char=' . $char) . '#memberlist', )); }
|
// Some search user specific data if ($mode == 'searchuser' && ($config['load_search'] || $auth->acl_get('a_')))
| // Some search user specific data if ($mode == 'searchuser' && ($config['load_search'] || $auth->acl_get('a_')))
|
Line 1579 | Line 1610 |
---|
'S_LEADERS_SET' => $leaders_set, 'S_MODE_SELECT' => $s_sort_key, 'S_ORDER_SELECT' => $s_sort_dir,
|
'S_LEADERS_SET' => $leaders_set, 'S_MODE_SELECT' => $s_sort_key, 'S_ORDER_SELECT' => $s_sort_dir,
|
'S_CHAR_OPTIONS' => $s_char_options,
| |
'S_MODE_ACTION' => $pagination_url) ); }
| 'S_MODE_ACTION' => $pagination_url) ); }
|
Line 1643 | Line 1673 |
---|
if ($bday_year) {
|
if ($bday_year) {
|
$now = getdate(time() + $user->timezone + $user->dst - date('Z'));
| $now = phpbb_gmgetdate(time() + $user->timezone + $user->dst);
|
$diff = $now['mon'] - $bday_month; if ($diff == 0)
| $diff = $now['mon'] - $bday_month; if ($diff == 0)
|
Line 1655 | Line 1685 |
---|
$diff = ($diff < 0) ? 1 : 0; }
|
$diff = ($diff < 0) ? 1 : 0; }
|
$age = (int) ($now['year'] - $bday_year - $diff);
| $age = max(0, (int) ($now['year'] - $bday_year - $diff));
|
} }
| } }
|
Line 1692 | Line 1722 |
---|
'U_EMAIL' => $email, 'U_WWW' => (!empty($data['user_website'])) ? $data['user_website'] : '', 'U_SHORT_WWW' => (!empty($data['user_website'])) ? ((strlen($data['user_website']) > 55) ? substr($data['user_website'], 0, 39) . ' ... ' . substr($data['user_website'], -10) : $data['user_website']) : '',
|
'U_EMAIL' => $email, 'U_WWW' => (!empty($data['user_website'])) ? $data['user_website'] : '', 'U_SHORT_WWW' => (!empty($data['user_website'])) ? ((strlen($data['user_website']) > 55) ? substr($data['user_website'], 0, 39) . ' ... ' . substr($data['user_website'], -10) : $data['user_website']) : '',
|
'U_ICQ' => ($data['user_icq']) ? 'http://www.icq.com/people/webmsg.php?to=' . urlencode($data['user_icq']) : '',
| 'U_ICQ' => ($data['user_icq']) ? 'http://www.icq.com/people/' . urlencode($data['user_icq']) . '/' : '',
|
'U_AIM' => ($data['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=aim&u=' . $user_id) : '', 'U_YIM' => ($data['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($data['user_yim']) . '&.src=pg' : '', 'U_MSN' => ($data['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=msnm&u=' . $user_id) : '',
| 'U_AIM' => ($data['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=aim&u=' . $user_id) : '', 'U_YIM' => ($data['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($data['user_yim']) . '&.src=pg' : '', 'U_MSN' => ($data['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=msnm&u=' . $user_id) : '',
|