diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-02-22 17:18:44 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-02-22 17:18:44 +0000 |
commit | a1f4ba0ed3fce73ad27e4ee71439d143240b64c1 (patch) | |
tree | 70c998cf498c2e2397ca24a7b279a5271b030353 /phpBB | |
parent | 5fc4d66994717c52098422ab6b69aa02b5333976 (diff) | |
download | forums-a1f4ba0ed3fce73ad27e4ee71439d143240b64c1.tar forums-a1f4ba0ed3fce73ad27e4ee71439d143240b64c1.tar.gz forums-a1f4ba0ed3fce73ad27e4ee71439d143240b64c1.tar.bz2 forums-a1f4ba0ed3fce73ad27e4ee71439d143240b64c1.tar.xz forums-a1f4ba0ed3fce73ad27e4ee71439d143240b64c1.zip |
Find user by posted IP
git-svn-id: file:///svn/phpbb/trunk@3510 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/language/en/lang_main.php | 185 | ||||
-rw-r--r-- | phpBB/memberlist.php | 221 | ||||
-rw-r--r-- | phpBB/templates/subSilver/memberlist_body.html | 10 |
3 files changed, 231 insertions, 185 deletions
diff --git a/phpBB/language/en/lang_main.php b/phpBB/language/en/lang_main.php index ada811e0ea..592af077ef 100644 --- a/phpBB/language/en/lang_main.php +++ b/phpBB/language/en/lang_main.php @@ -422,7 +422,6 @@ $lang = array_merge($lang, array( 'Send_a_reply' => 'Reply to a private message', 'Edit_message' => 'Edit private message', 'Notification_subject' => 'New Private Message has arrived', - 'FIND_USERNAME' => 'Find a username', 'Find' => 'Find', 'No_match' => 'No matches found', 'No_such_folder' => 'No such folder exists', @@ -564,6 +563,10 @@ $lang = array_merge($lang, array( 'Empty_message_email' => 'You must enter a message to be emailed', + 'FIND_USERNAME' => 'Find a member', + 'FIND_USERNAME_EXPLAIN' => 'Use this form to search for specific members. You do not need to fill out all fields, to partialy match data use * as a wildcard. When entering dates use the format yyyy-mm-dd, e.g. 2002-01-01. Click the username to automatically enter it into the form you are viewing (several usernames may be accepted depending on the form itself). Alternatively you can mark the users required and click the Insert Marked button.', + 'NO_MEMBERS' => 'No members found for this search criteria', + 'SEND_MESSAGE' => 'Message', 'POST_IP' => 'Posted from IP/domain', 'SELECT_SORT_METHOD' => 'Select sort method', 'SORT' => 'Sort', @@ -644,7 +647,6 @@ $lang = array_merge($lang, array( 'Search_keywords_explain' => 'You can use <u>AND</u> to define words which must be in the results, <u>OR</u> to define words which may be in the result and <u>NOT</u> to define words which should not be in the result. Use * as a wildcard for partial matches', 'Search_author' => 'Search for Author', 'Search_author_explain' => 'Use * as a wildcard for partial matches', - 'Find_username_explain' => 'Use this form to search for specific usernames. You do not need to fill out all fields, to partialy match data use * as a wildcard. When entering dates use the format yyyy-mm-dd, e.g. 2002-01-01. Click the username to automatically enter it into the form you are viewing (several usernames may be accepted depending on the form itself). Alternatively you can mark the users required and click the Insert Marked button.', 'Last_active' => 'Last active', 'Select_marked' => 'Select Marked', 'Search_for_any' => 'Search for any terms or use query as entered', @@ -743,84 +745,91 @@ $lang = array_merge($lang, array( 'logm_lock' => 'Locked following topic/s => %s', + 'All_times' => 'All times are %s %s', - '-13' => 'GMT - 13 Hours', - '-12' => 'GMT - 12 Hours', - '-11' => 'GMT - 11 Hours', - '-10' => 'GMT - 10 Hours', - '-9' => 'GMT - 9 Hours', - '-8' => 'GMT - 8 Hours', - '-7' => 'GMT - 7 Hours', - '-6' => 'GMT - 6 Hours', - '-5' => 'GMT - 5 Hours', - '-4' => 'GMT - 4 Hours', - '-3.5' => 'GMT - 3.5 Hours', - '-3' => 'GMT - 3 Hours', - '-2' => 'GMT - 2 Hours', - '-1' => 'GMT - 1 Hours', - '0' => 'GMT', - '1' => 'GMT + 1 Hour', - '2' => 'GMT + 2 Hours', - '3' => 'GMT + 3 Hours', - '3.5' => 'GMT + 3.5 Hours', - '4' => 'GMT + 4 Hours', - '4.5' => 'GMT + 4.5 Hours', - '5' => 'GMT + 5 Hours', - '5.5' => 'GMT + 5.5 Hours', - '6' => 'GMT + 6 Hours', - '6.5' => 'GMT + 6.5 Hours', - '7' => 'GMT + 7 Hours', - '8' => 'GMT + 8 Hours', - '9' => 'GMT + 9 Hours', - '9.5' => 'GMT + 9.5 Hours', - '10' => 'GMT + 10 Hours', - '11' => 'GMT + 11 Hours', - '12' => 'GMT + 12 Hours', - '13' => 'GMT + 13 Hours', - 'tz' => array( - '-13' => 'GMT - 13 Hours', - '-12' => 'GMT - 12 Hours', - '-11' => 'GMT - 11 Hours', - '-10' => 'GMT - 10 Hours', - '-9' => 'GMT - 9 Hours', - '-8' => 'GMT - 8 Hours', - '-7' => 'GMT - 7 Hours', - '-6' => 'GMT - 6 Hours', - '-5' => 'GMT - 5 Hours', - '-4' => 'GMT - 4 Hours', - '-3.5' => 'GMT - 3.5 Hours', - '-3' => 'GMT - 3 Hours', - '-2' => 'GMT - 2 Hours', - '-1' => 'GMT - 1 Hours', - '0' => 'GMT', - '1' => 'GMT + 1 Hour', - '2' => 'GMT + 2 Hours', - '3' => 'GMT + 3 Hours', - '3.5' => 'GMT + 3.5 Hours', - '4' => 'GMT + 4 Hours', - '4.5' => 'GMT + 4.5 Hours', - '5' => 'GMT + 5 Hours', - '5.5' => 'GMT + 5.5 Hours', - '6' => 'GMT + 6 Hours', - '6.5' => 'GMT + 6.5 Hours', - '7' => 'GMT + 7 Hours', - '8' => 'GMT + 8 Hours', - '9' => 'GMT + 9 Hours', - '9.5' => 'GMT + 9.5 Hours', - '10' => 'GMT + 10 Hours', - '11' => 'GMT + 11 Hours', - '12' => 'GMT + 12 Hours', - '13' => 'GMT + 13 Hours', - 'dst' => '[ DST ]' + '-13' => 'GMT - 13 Hours', + '-12' => 'GMT - 12 Hours', + '-11' => 'GMT - 11 Hours', + '-10' => 'GMT - 10 Hours', + '-9' => 'GMT - 9 Hours', + '-8' => 'GMT - 8 Hours', + '-7' => 'GMT - 7 Hours', + '-6' => 'GMT - 6 Hours', + '-5' => 'GMT - 5 Hours', + '-4' => 'GMT - 4 Hours', + '-3.5' => 'GMT - 3.5 Hours', + '-3' => 'GMT - 3 Hours', + '-2.5' => 'GMT - 2.5 Hours', + '-2' => 'GMT - 2 Hours', + '-1' => 'GMT - 1 Hours', + '0' => 'GMT', + '1' => 'GMT + 1 Hour', + '2' => 'GMT + 2 Hours', + '3' => 'GMT + 3 Hours', + '3.5' => 'GMT + 3.5 Hours', + '4' => 'GMT + 4 Hours', + '4.5' => 'GMT + 4.5 Hours', + '5' => 'GMT + 5 Hours', + '5.5' => 'GMT + 5.5 Hours', + '6' => 'GMT + 6 Hours', + '6.5' => 'GMT + 6.5 Hours', + '7' => 'GMT + 7 Hours', + '8' => 'GMT + 8 Hours', + '9' => 'GMT + 9 Hours', + '9.5' => 'GMT + 9.5 Hours', + '10' => 'GMT + 10 Hours', + '10.5' => 'GMT + 10.5 Hours', + '11' => 'GMT + 11 Hours', + '12' => 'GMT + 12 Hours', + '13' => 'GMT + 13 Hours', + 'tz' => array( + '-13' => 'GMT - 13 Hours', + '-12' => 'GMT - 12 Hours', + '-11' => 'GMT - 11 Hours', + '-10' => 'GMT - 10 Hours', + '-9' => 'GMT - 9 Hours', + '-8' => 'GMT - 8 Hours', + '-7' => 'GMT - 7 Hours', + '-6' => 'GMT - 6 Hours', + '-5' => 'GMT - 5 Hours', + '-4' => 'GMT - 4 Hours', + '-3.5' => 'GMT - 3.5 Hours', + '-3' => 'GMT - 3 Hours', + '-2.5' => 'GMT - 2.5 Hours', + '-2' => 'GMT - 2 Hours', + '-1' => 'GMT - 1 Hours', + '0' => 'GMT', + '1' => 'GMT + 1 Hour', + '2' => 'GMT + 2 Hours', + '3' => 'GMT + 3 Hours', + '3.5' => 'GMT + 3.5 Hours', + '4' => 'GMT + 4 Hours', + '4.5' => 'GMT + 4.5 Hours', + '5' => 'GMT + 5 Hours', + '5.5' => 'GMT + 5.5 Hours', + '6' => 'GMT + 6 Hours', + '6.5' => 'GMT + 6.5 Hours', + '7' => 'GMT + 7 Hours', + '8' => 'GMT + 8 Hours', + '9' => 'GMT + 9 Hours', + '9.5' => 'GMT + 9.5 Hours', + '10' => 'GMT + 10 Hours', + '10.5' => 'GMT + 10.5 Hours', + '11' => 'GMT + 11 Hours', + '12' => 'GMT + 12 Hours', + '13' => 'GMT + 13 Hours', + 'dst' => '[ DST ]' ), + 'AM' => 'AM', + 'PM' => 'PM', 'datetime' => array( - 'Sunday' => 'Sunday', - 'Monday' => 'Monday', - 'Tuesday' => 'Tuesday', + 'Sunday' => 'Sunday', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', 'Wednesday' => 'Wednesday', - 'Thursday' => 'Thursday', - 'Friday' => 'Friday', - 'Saturday' => 'Saturday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', 'Sun' => 'Sun', 'Mon' => 'Mon', 'Tue' => 'Tue', @@ -828,18 +837,18 @@ $lang = array_merge($lang, array( 'Thu' => 'Thu', 'Fri' => 'Fri', 'Sat' => 'Sat', - 'January' => 'January', - 'February' => 'February', - 'March' => 'March', - 'April' => 'April', - 'May' => 'May', - 'June' => 'June', - 'July' => 'July', - 'August' => 'August', + 'January' => 'January', + 'February' => 'February', + 'March' => 'March', + 'April' => 'April', + 'May' => 'May', + 'June' => 'June', + 'July' => 'July', + 'August' => 'August', 'September' => 'September', - 'October' => 'October', - 'November' => 'November', - 'December' => 'December', + 'October' => 'October', + 'November' => 'November', + 'December' => 'December', 'Jan' => 'Jan', 'Feb' => 'Feb', 'Mar' => 'Mar', @@ -851,8 +860,6 @@ $lang = array_merge($lang, array( 'Oct' => 'Oct', 'Nov' => 'Nov', 'Dec' => 'Dec', - 'AM' => 'AM', - 'PM' => 'PM' ), 'Information' => 'Information', diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index b2351e78f9..e031431b78 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -40,22 +40,26 @@ $field = (isset($_GET['field'])) ? $_GET['field'] : 'username'; $sort_key = (!empty($_REQUEST['sort_key'])) ? intval($_REQUEST['sort_key']) : 0; $sort_dir = (!empty($_REQUEST['sort_dir'])) ? $_REQUEST['sort_dir'] : 'd'; -$username = (!empty($_REQUEST['username'])) ? $_REQUEST['username'] : ''; -$email = (!empty($_REQUEST['email'])) ? $_REQUEST['email'] : ''; +$username = (!empty($_REQUEST['username'])) ? trim($_REQUEST['username']) : ''; +$email = (!empty($_REQUEST['email'])) ? trim($_REQUEST['email']) : ''; $icq = (!empty($_REQUEST['icq'])) ? intval($_REQUEST['icq']) : ''; -$aim = (!empty($_REQUEST['aim'])) ? $_REQUEST['aim'] : ''; -$yahoo = (!empty($_REQUEST['yahoo'])) ? $_REQUEST['yahoo'] : ''; -$msn = (!empty($_REQUEST['msn'])) ? $_REQUEST['msn'] : ''; +$aim = (!empty($_REQUEST['aim'])) ? trim($_REQUEST['aim']) : ''; +$yahoo = (!empty($_REQUEST['yahoo'])) ? trim($_REQUEST['yahoo']) : ''; +$msn = (!empty($_REQUEST['msn'])) ? trim($_REQUEST['msn']) : ''; $joined_select = (!empty($_REQUEST['joined_select'])) ? $_REQUEST['joined_select'] : 'lt'; $active_select = (!empty($_REQUEST['active_select'])) ? $_REQUEST['active_select'] : 'lt'; $count_select = (!empty($_REQUEST['count_select'])) ? $_REQUEST['count_select'] : 'eq'; -$joined = (!empty($_REQUEST['joined'])) ? explode('-', $_REQUEST['joined']) : array(); -$active = (!empty($_REQUEST['active'])) ? explode('-', $_REQUEST['active']) : array(); +$joined = (!empty($_REQUEST['joined'])) ? explode('-', trim($_REQUEST['joined'])) : array(); +$active = (!empty($_REQUEST['active'])) ? explode('-', trim($_REQUEST['active'])) : array(); $count = (!empty($_REQUEST['count'])) ? intval($_REQUEST['count']) : ''; +$ipdomain = (!empty($_REQUEST['ip'])) ? trim($_REQUEST['ip']) : ''; + + + // Memberlist sorting -$sort_key_text = array($user->lang['Sort_Joined'], $user->lang['Sort_Username'], $user->lang['Sort_Email'], $user->lang['Sort_Location'], $user->lang['Sort_Post_count'], $user->lang['Sort_Last_active']); +$sort_key_text = array($user->lang['SORT_JOINED'], $user->lang['SORT_USERNAME'], $user->lang['SORT_EMAIL'], $user->lang['SORT_LOCATION'], $user->lang['SORT_POST_COUNT'], $user->lang['SORT_LAST_ACTIVE']); $sort_key_fields = array('user_regdate', 'username', 'user_email', 'user_from', 'user_posts', 'user_lastvisit'); $s_sort_key = '<select name="sort_key">'; for($i = 0; $i < count($sort_key_text); $i++) @@ -65,7 +69,7 @@ for($i = 0; $i < count($sort_key_text); $i++) } $s_sort_key .= '</select>'; -$sort_dir_text = array('a' => $user->lang['Ascending'], 'd' => $user->lang['Descending']); +$sort_dir_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']); $s_sort_dir = '<select name="sort_dir">'; foreach ($sort_dir_text as $key => $value) { @@ -74,6 +78,9 @@ foreach ($sort_dir_text as $key => $value) } $s_sort_dir .= '</select>'; + + + // Clear var for where sql $where_sql = ''; @@ -82,7 +89,7 @@ if ($mode == 'searchuser') { $find_key_match = array('lt' => '<', 'gt' => '>', 'eq' => '='); - $find_count = array('lt' => $user->lang['Less_than'], 'eq' => $user->lang['Equal_to'], 'gt' => $user->lang['More_than']); + $find_count = array('lt' => $user->lang['LESS_THAN'], 'eq' => $user->lang['EQUAL_TO'], 'gt' => $user->lang['MORE_THAN']); $s_find_count = ''; foreach ($find_count as $key => $value) { @@ -90,13 +97,14 @@ if ($mode == 'searchuser') $s_find_count .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>'; } - $find_time = array('lt' => $user->lang['Before'], 'gt' => $user->lang['After']); + $find_time = array('lt' => $user->lang['BEFORE'], 'gt' => $user->lang['AFTER']); $s_find_join_time = ''; foreach ($find_time as $key => $value) { $selected = ($joined_select == $key) ? ' selected="selected"' : ''; $s_find_join_time .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>'; } + $s_find_active_time = ''; foreach ($find_time as $key => $value) { @@ -104,16 +112,42 @@ if ($mode == 'searchuser') $s_find_active_time .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>'; } - $where_sql .= ($username) ? " AND username LIKE '" . str_replace('*', '%', sql_quote($username)) ."'" : ''; - $where_sql .= ($email) ? " AND user_email LIKE '" . str_replace('*', '%', sql_quote($email)) ."' " : ''; - $where_sql .= ($icq) ? " AND user_icq LIKE '" . str_replace('*', '%', sql_quote($icq)) ."' " : ''; - $where_sql .= ($aim) ? " AND user_aim LIKE '" . str_replace('*', '%', sql_quote($aim)) ."' " : ''; - $where_sql .= ($yahoo) ? " AND user_yim LIKE '" . str_replace('*', '%', sql_quote($yahoo)) ."' " : ''; - $where_sql .= ($msn) ? " AND user_msnm LIKE '" . str_replace('*', '%', sql_quote($msn)) ."' " : ''; + $where_sql .= ($username) ? " AND username LIKE '" . str_replace('*', '%', $db->sql_escape($username)) ."'" : ''; + $where_sql .= ($email) ? " AND user_email LIKE '" . str_replace('*', '%', $db->sql_escape($email)) ."' " : ''; + $where_sql .= ($icq) ? " AND user_icq LIKE '" . str_replace('*', '%', $db->sql_escape($icq)) ."' " : ''; + $where_sql .= ($aim) ? " AND user_aim LIKE '" . str_replace('*', '%', $db->sql_escape($aim)) ."' " : ''; + $where_sql .= ($yahoo) ? " AND user_yim LIKE '" . str_replace('*', '%', $db->sql_escape($yahoo)) ."' " : ''; + $where_sql .= ($msn) ? " AND user_msnm LIKE '" . str_replace('*', '%', $db->sql_escape($msn)) ."' " : ''; $where_sql .= ($joined) ? " AND user_regdate " . $find_key_match[$joined_select] . " " . gmmktime(0, 0, 0, intval($joined[1]), intval($joined[2]), intval($joined[0])) : ''; $where_sql .= ($count) ? " AND user_posts " . $find_key_match[$count_select] . " $count " : ''; $where_sql .= ($active) ? " AND user_lastvisit " . $find_key_match[$active_select] . " " . gmmktime(0, 0, 0, $active[1], intval($active[2]), intval($active[0])) : ''; + if (!empty($ipdomain)) + { + $ips = (preg_match('#[a-z]#', $ipdomain)) ? implode(', ', preg_replace('#([0-9]{1,3}\.[0-9]{1,3}[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})#', "'\\1'", gethostbynamel($ipdomain))) : "'" . str_replace('*', '%', $ipdomain) . "'"; + + $sql = "SELECT DISTINCT poster_id + FROM " . POSTS_TABLE . " + WHERE poster_ip " . ((preg_match('#%#', $ips)) ? 'LIKE' : 'IN') . " ($ips)"; + $result = $db->sql_query($sql); + + if ($row = $db->sql_fetchrow($result)) + { + $ip_sql = ''; + do + { + $ip_sql .= (($ip_sql != '') ? ', ' : '') . $row['poster_id']; + } + while ($row = $db->sql_fetchrow($result)); + + $where_sql .= " AND user_id IN ($ip_sql)"; + } + else + { + // A minor fudge but it does the job :D + $where_sql .= " AND user_id IN ('-1')"; + } + } } // Sorting and order @@ -129,43 +163,42 @@ $result = $db->sql_query($sql); $total_users = ($row = $db->sql_fetchrow($result)) ? $row['total_users'] : 0; // Pagination string -$pagination_url = ($mode == 'searchuser') ? "memberlist.$phpEx$SID&mode=searchuser&form=$form&field=$field&username=" . urlencode($username) . "&email=" . urlencode($email) . "&icq=$icq&aim=" . urlencode($aim) . "&yahoo=" . urlencode($yahoo) . "&msn=" . urlencode($msn) . "&joined=" . urlencode(implode('-', $joined)) . "&active=" . urlencode(implode('-', $active)) . "&count=$count&sort_dir=$sort_dir&sort_key=$sort_key&joined_select=$joined_select&active_select=$active_select&count_select=$count_select" : "memberlist.$phpEx$SID&mode=$mode&sort_dir=$sort_dir"; +$pagination_url = ($mode == 'searchuser') ? "memberlist.$phpEx$SID&mode=searchuser&form=$form&field=$field&username=" . urlencode($username) . "&email=" . urlencode($email) . "&icq=$icq&aim=" . urlencode($aim) . "&yahoo=" . urlencode($yahoo) . "&msn=" . urlencode($msn) . "&joined=" . urlencode(implode('-', $joined)) . "&active=" . urlencode(implode('-', $active)) . "&count=$count&ip=" . urlencode($ipdomain) . "&sort_dir=$sort_dir&sort_key=$sort_key&joined_select=$joined_select&active_select=$active_select&count_select=$count_select" : "memberlist.$phpEx$SID&mode=$mode&sort_dir=$sort_dir"; // Some search user specific data if ($mode == 'searchuser') { $template->assign_vars(array( - 'USERNAME' => $username, - 'EMAIL' => $email, - 'ICQ' => $icq, - 'AIM' => $aim, - 'YAHOO' => $yahoo, - 'MSNM' => $msn, - 'JOINED' => implode('-', $joined), - 'ACTIVE' => implode('-', $active), - 'COUNT' => $count, - - 'L_SEARCH_USERNAME' => $user->lang['Find_username'], - 'L_SEARCH_EXPLAIN' => $user->lang['Find_username_explain'], - 'L_RESET' => $user->lang['Reset'], - 'L_ACTIVE' => $user->lang['Last_active'], - 'L_SORT_BY' => $user->lang['Sort_by'], - 'L_SORT_ASCENDING' => $user->lang['Sort_Ascending'], + 'USERNAME' => $username, + 'EMAIL' => $email, + 'ICQ' => $icq, + 'AIM' => $aim, + 'YAHOO' => $yahoo, + 'MSNM' => $msn, + 'JOINED' => implode('-', $joined), + 'ACTIVE' => implode('-', $active), + 'COUNT' => $count, + 'IP' => $ipdomain, + + 'L_RESET' => $user->lang['Reset'], + 'L_ACTIVE' => $user->lang['Last_active'], + 'L_SORT_BY' => $user->lang['Sort_by'], + 'L_SORT_ASCENDING' => $user->lang['Sort_Ascending'], 'L_SORT_DESCENDING' => $user->lang['Sort_Descending'], - 'L_SELECT_MARKED' => $user->lang['Select_marked'], - 'L_MARK' => $user->lang['Mark'], - 'L_MARK_ALL' => $user->lang['Mark_all'], - 'L_UNMARK_ALL' => $user->lang['Unmark_all'], - - 'S_SEARCH_USER' => true, - 'S_FORM_NAME' => $form, - 'S_FIELD_NAME' => $field, - 'S_COUNT_OPTIONS' => $s_find_count, - 'S_SORT_OPTIONS' => $s_sort_key, - 'S_USERNAME_OPTIONS'=> $username_list, + 'L_SELECT_MARKED' => $user->lang['Select_marked'], + 'L_MARK' => $user->lang['Mark'], + 'L_MARK_ALL' => $user->lang['Mark_all'], + 'L_UNMARK_ALL' => $user->lang['Unmark_all'], + + 'S_SEARCH_USER' => true, + 'S_FORM_NAME' => $form, + 'S_FIELD_NAME' => $field, + 'S_COUNT_OPTIONS' => $s_find_count, + 'S_SORT_OPTIONS' => $s_sort_key, + 'S_USERNAME_OPTIONS' => $username_list, 'S_JOINED_TIME_OPTIONS' => $s_find_join_time, 'S_ACTIVE_TIME_OPTIONS' => $s_find_active_time, - 'S_SEARCH_ACTION' => "memberslist.$phpEx$SID&mode=searchuser&field=$field") + 'S_SEARCH_ACTION' => "memberslist.$phpEx$SID&mode=searchuser&field=$field") ); } @@ -259,36 +292,36 @@ if ($row = $db->sql_fetchrow($result)) $search = '<a href="' . $temp_url . '">' . $user->lang['Search_user_posts'] . '</a>'; $template->assign_block_vars('memberrow', array( - 'ROW_NUMBER' => $i + ($start + 1), - 'USERNAME' => $username, - 'FROM' => $from, - 'JOINED' => $joined, - 'POSTS' => $posts, - 'AVATAR_IMG' => $poster_avatar, - 'PROFILE_IMG' => $profile_img, - 'PROFILE' => $profile, - 'SEARCH_IMG' => $search_img, - 'SEARCH' => $search, - 'PM_IMG' => $pm_img, - 'PM' => $pm, - 'EMAIL_IMG' => $email_img, - 'EMAIL' => $email, - 'WWW_IMG' => $www_img, - 'WWW' => $www, - 'ICQ_STATUS_IMG' => $icq_status_img, - 'ICQ_IMG' => $icq_img, - 'ICQ' => $icq, - 'AIM_IMG' => $aim_img, - 'AIM' => $aim, - 'MSN_IMG' => $msn_img, - 'MSN' => $msn, - 'YIM_IMG' => $yim_img, - 'YIM' => $yim, - 'ACTIVE' => $row['user_last_active'], - - 'S_ROW_COUNT' => $i, - - 'U_VIEWPROFILE' => "ucp.$phpEx$SID&mode=viewprofile&u=$user_id") + 'ROW_NUMBER' => $i + ($start + 1), + 'USERNAME' => $username, + 'FROM' => $from, + 'JOINED' => $joined, + 'POSTS' => $posts, + 'AVATAR_IMG' => $poster_avatar, + 'PROFILE_IMG' => $profile_img, + 'PROFILE' => $profile, + 'SEARCH_IMG' => $search_img, + 'SEARCH' => $search, + 'PM_IMG' => $pm_img, + 'PM' => $pm, + 'EMAIL_IMG' => $email_img, + 'EMAIL' => $email, + 'WWW_IMG' => $www_img, + 'WWW' => $www, + 'ICQ_STATUS_IMG'=> $icq_status_img, + 'ICQ_IMG' => $icq_img, + 'ICQ' => $icq, + 'AIM_IMG' => $aim_img, + 'AIM' => $aim, + 'MSN_IMG' => $msn_img, + 'MSN' => $msn, + 'YIM_IMG' => $yim_img, + 'YIM' => $yim, + 'ACTIVE' => $row['user_last_active'], + + 'S_ROW_COUNT' => $i, + + 'U_VIEWPROFILE' => "ucp.$phpEx$SID&mode=viewprofile&u=$user_id") ); $i++; @@ -301,23 +334,25 @@ $template->assign_vars(array( 'PAGINATION' => generate_pagination($pagination_url, $total_users, $config['topics_per_page'], $start). ' ', 'PAGE_NUMBER' => on_page($total_users, $config['topics_per_page'], $start), - 'L_EMAIL' => $user->lang['Email'], - 'L_WEBSITE' => $user->lang['Website'], - 'L_FROM' => $user->lang['Location'], - 'L_ORDER' => $user->lang['Order'], - 'L_SORT' => $user->lang['Sort'], - 'L_SUBMIT' => $user->lang['Sort'], - 'L_AIM' => $user->lang['AIM'], - 'L_YIM' => $user->lang['YIM'], - 'L_MSNM' => $user->lang['MSNM'], - 'L_ICQ' => $user->lang['ICQ'], - 'L_JOINED' => $user->lang['Joined'], - 'L_POSTS' => $user->lang['Posts'], - 'L_GOTO_PAGE' => $user->lang['Goto_page'], - - 'S_MODE_SELECT' => $s_sort_key, - 'S_ORDER_SELECT' => $s_sort_dir, - 'S_MODE_ACTION' => "memberlist.$phpEx$SID&mode=$mode&form=$form") + 'L_EMAIL' => $user->lang['Email'], + 'L_WEBSITE' => $user->lang['Website'], + 'L_FROM' => $user->lang['Location'], + 'L_ORDER' => $user->lang['Order'], + 'L_SORT' => $user->lang['Sort'], + 'L_SUBMIT' => $user->lang['Sort'], + 'L_AIM' => $user->lang['AIM'], + 'L_YIM' => $user->lang['YIM'], + 'L_MSNM' => $user->lang['MSNM'], + 'L_ICQ' => $user->lang['ICQ'], + 'L_JOINED' => $user->lang['Joined'], + 'L_POSTS' => $user->lang['Posts'], + 'L_GOTO_PAGE' => $user->lang['Goto_page'], + + 'U_FIND_MEMBER' => "memberlist.$phpEx$SID&mode=searchuser", + + 'S_MODE_SELECT' => $s_sort_key, + 'S_ORDER_SELECT'=> $s_sort_dir, + 'S_MODE_ACTION' => "memberlist.$phpEx$SID&mode=$mode&form=$form") ); // Output the page diff --git a/phpBB/templates/subSilver/memberlist_body.html b/phpBB/templates/subSilver/memberlist_body.html index 7867fa97c0..0108e798da 100644 --- a/phpBB/templates/subSilver/memberlist_body.html +++ b/phpBB/templates/subSilver/memberlist_body.html @@ -76,7 +76,7 @@ function marklist(status) </tr> <tr> <td class="row1"><span class="gen">{L_POST_IP}:</span></td> - <td class="row2"><input class="post" type="text" name="msn" value="{MSNM}" /></td> + <td class="row2"><input class="post" type="text" name="ip" value="{IP}" /></td> </tr> <tr> <td class="row1"><span class="gen">{L_SORT_BY}: </td> @@ -91,6 +91,7 @@ function marklist(status) <!-- IF S_SEARCH_USER --><form method="post" name="results" action="{S_MODE_ACTION}" onsubmit="insert_marked(this.user);return false"><!-- ELSE --><form method="post" action="{S_MODE_ACTION}"><!-- ENDIF --><table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> <tr> <td class="nav" align="left"><a href="{U_INDEX}">{L_INDEX}</a></td> + <!-- IF S_SEARCH_USER eq false --><td class="gensmall" align="right"><a href="{U_FIND_MEMBER}">{L_FIND_USERNAME}</a></td><!-- ENDIF --> </tr> </table> @@ -122,12 +123,15 @@ function marklist(status) <td class="gen" align="center"> {memberrow.WWW_IMG} </td> <!-- IF S_SEARCH_USER --><td align="center" valign="middle"><input type="checkbox" name="user" value="{memberrow.USERNAME}" /></td><!-- ENDIF --> </tr> + <!-- BEGINELSE --> + <tr> + <td class="row1" colspan="<!-- IF S_SEARCH_USER -->9<!-- ELSE -->8<!-- ENDIF -->" height="30" align="center" valign="middle"><span class="gen">{L_NO_MEMBERS}</span></td> + </tr> <!-- END memberrow --> <tr> <td class="cat" colspan="<!-- IF S_SEARCH_USER -->9<!-- ELSE -->8<!-- ENDIF -->" height="28"><table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> - <td align="center"><span class="gensmall">{L_SELECT_SORT_METHOD}:</span> {S_MODE_SELECT} <span class="gensmall">{L_ORDER}</span> {S_ORDER_SELECT} <input type="submit" name="submit" value="{L_SUBMIT}" class="liteoption" /></td> - <!-- IF S_SEARCH_USER --><td align="right"><input class="liteoption" type="submit" value="{L_SELECT_MARKED}" /></td><!-- ENDIF --> + <td align="center"><!-- IF S_SEARCH_USER --><input class="liteoption" type="submit" value="{L_SELECT_MARKED}" /><!-- ELSE --><span class="gensmall">{L_SELECT_SORT_METHOD}:</span> {S_MODE_SELECT} <span class="gensmall">{L_ORDER}</span> {S_ORDER_SELECT} <input type="submit" name="submit" value="{L_SUBMIT}" class="liteoption" /><!-- ENDIF --></td> </tr> </table></td> </tr> |