diff --git a/phpBB/adm/pagestart.php b/phpBB/adm/pagestart.php
index 752a3bbfe7..e47f6c319e 100644
--- a/phpBB/adm/pagestart.php
+++ b/phpBB/adm/pagestart.php
@@ -32,6 +32,13 @@ require_once($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
// Start session management
$user->start($update);
$user->setup();
+
+// Did user forget to login? Give 'em a chance to here ...
+if ($user->data['user_id'] == ANONYMOUS)
+{
+ login_box("index.$phpEx$SID", '', $user->lang['LOGIN_ADMIN']);
+}
+
$auth->acl($user->data);
// End session management
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 102b786798..19a4b9fc75 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -444,7 +444,7 @@ function watch_topic_forum($mode, &$s_watching, &$s_watching_img, $user_id, $mat
'META' => '')
);
- $message = $user->lang['No_longer_watching_' . $mode] . '
' . sprintf($user->lang['Click_return_' . $mode], '', '');
+ $message = $user->lang['NOT_WATCHING_' . strtoupper($mode)] . '
' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '', '');
trigger_error($message);
}
else
@@ -478,7 +478,7 @@ function watch_topic_forum($mode, &$s_watching, &$s_watching_img, $user_id, $mat
'META' => '')
);
- $message = $user->lang['You_are_watching_' . $mode] . '
' . sprintf($user->lang['Click_return_' . $mode], '', '');
+ $message = $user->lang['ARE_WATCHING_' . strtoupper($mode)] . '
' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '', '');
trigger_error($message);
}
else
@@ -493,7 +493,7 @@ function watch_topic_forum($mode, &$s_watching, &$s_watching_img, $user_id, $mat
{
if ($_GET['unwatch'] == $mode)
{
- redirect("login.$phpEx$SID&redirect=view$mode.$phpEx&" . $u_url . "=$match_id&unwatch=forum");
+ login_box(preg_replace('#.*?([a-z]+?\.' . $phpEx . '.*?)$#i', '\1', htmlspecialchars($_SERVER['REQUEST_URI'])));
}
}
else
@@ -505,7 +505,7 @@ function watch_topic_forum($mode, &$s_watching, &$s_watching_img, $user_id, $mat
if ($can_watch)
{
- $s_watching = ($is_watching) ? '' . $user->lang['Stop_watching_' . $mode] . '' : '' . $user->lang['Start_watching_' . $mode] . '';
+ $s_watching = ($is_watching) ? '' . $user->lang['STOP_WATCHING_' . strtoupper($mode)] . '' : '' . $user->lang['START_WATCHING_' . strtoupper($mode)] . '';
}
return;
@@ -840,6 +840,56 @@ function validate_optional_fields(&$icq, &$aim, &$msnm, &$yim, &$website, &$loca
return;
}
+// Generate login box or verify password
+function login_box($s_action, $s_hidden_fields = '', $login_explain = '')
+{
+ global $SID, $db, $user, $template, $auth, $phpbb_root_path, $phpEx;
+
+ $err = '';
+ if (isset($_POST['login']))
+ {
+ $autologin = (!empty($_POST['autologin'])) ? TRUE : FALSE;
+ $viewonline = (!empty($_POST['viewonline'])) ? 0 : 1;
+
+ if (($result = $auth->login($_POST['username'], $_POST['password'], $autologin, $viewonline)) === true)
+ {
+ return true;
+ }
+
+ // If we get a non-numeric (e.g. string) value we output an error
+ if (is_string($result))
+ {
+ trigger_error($result, E_USER_ERROR);
+ }
+
+ // If we get an integer zero then we are inactive, else the username/password is wrong
+ $err = ($result === 0) ? $user->lang['ACTIVE_ERROR'] : $user->lang['LOGIN_ERROR'];
+ }
+
+ $template->assign_vars(array(
+ 'LOGIN_ERROR' => $err,
+ 'LOGIN_EXPLAIN' => $login_explain,
+
+ 'U_SEND_PASSWORD' => "ucp.$phpEx$SID&mode=sendpassword",
+ 'U_TERMS_USE' => "ucp.$phpEx$SID&mode=terms",
+ 'U_PRIVACY' => "ucp.$phpEx$SID&mode=privacy",
+
+ 'S_LOGIN_ACTION' => $s_action,
+ 'S_HIDDEN_FIELDS' => $s_hidden_fields)
+ );
+
+ $page_title = $user->lang['LOGIN'];
+ include($phpbb_root_path . 'includes/page_header.'.$phpEx);
+
+ $template->set_filenames(array(
+ 'body' => 'login_body.html')
+ );
+ make_jumpbox('viewforum.'.$phpEx);
+
+ include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
+}
+
+
// Error and message handler, call with trigger_error if reqd
function msg_handler($errno, $msg_text, $errfile, $errline)
{
diff --git a/phpBB/includes/page_header.php b/phpBB/includes/page_header.php
index f16fcd1b05..70bbef9e73 100644
--- a/phpBB/includes/page_header.php
+++ b/phpBB/includes/page_header.php
@@ -38,12 +38,12 @@ if ($config['gzip_compress'])
// Generate logged in/logged out status
if ($user->data['user_id'] != ANONYMOUS)
{
- $u_login_logout = 'login.'.$phpEx. $SID . '&logout=true';
+ $u_login_logout = 'ucp.'.$phpEx. $SID . '&mode=logout';
$l_login_logout = sprintf($user->lang['LOGOUT_USER'], $user->data['username']);
}
else
{
- $u_login_logout = 'login.'.$phpEx . $SID;
+ $u_login_logout = 'ucp.'.$phpEx . $SID . '&mode=login';
$l_login_logout = $user->lang['LOGIN'];
}
@@ -304,7 +304,6 @@ $template->assign_vars(array(
'S_CONTENT_ENCODING' => $user->lang['ENCODING'],
'S_CONTENT_DIR_LEFT' => $user->lang['LEFT'],
'S_CONTENT_DIR_RIGHT' => $user->lang['RIGHT'],
- 'S_LOGIN_ACTION' => 'login.'.$phpEx.$SID,
'S_TIMEZONE' => ($user->data['user_dst']) ? sprintf($user->lang['All_times'], $user->lang[$tz], $user->lang['tz']['dst']) : sprintf($user->lang['All_times'], $user->lang[$tz], ''),
'T_STYLESHEET_DATA' => $user->theme['css_data'],
@@ -312,6 +311,7 @@ $template->assign_vars(array(
'NAV_LINKS' => $nav_links_html)
);
+// 'S_LOGIN_ACTION' => 'login.'.$phpEx.$SID,
/*if ($config['send_encoding'])
{
diff --git a/phpBB/language/en/lang_admin.php b/phpBB/language/en/lang_admin.php
index 7663920180..fe41659f18 100644
--- a/phpBB/language/en/lang_admin.php
+++ b/phpBB/language/en/lang_admin.php
@@ -22,6 +22,7 @@
$lang = array_merge($lang, array(
'ADMIN_TITLE' => 'Administration Panel',
'ADMIN' => 'Administration',
+ 'LOGIN_ADMIN' => 'You must be a registered, logged in user before attempting to administer the board.',
'NO_ADMIN' => 'You are not authorised to administer this board.',
'NO_FRAMES' => 'Sorry, your browser does not support frames.',
'RETURN_TO' => 'Return to ...',
diff --git a/phpBB/language/en/lang_main.php b/phpBB/language/en/lang_main.php
index 77422c0ca5..e0bb5b76b4 100644
--- a/phpBB/language/en/lang_main.php
+++ b/phpBB/language/en/lang_main.php
@@ -156,33 +156,33 @@ $lang = array(
'You_new_pms' => 'New private messages are waiting for you in your Inbox',
'You_no_new_pm' => 'No new private messages are waiting for you',
- 'LEGEND' => 'Legend',
- 'RECORD_ONLINE_USERS' => 'Most users ever online was %1$s on %2$s',
- 'Registered_users' => 'Registered Users:',
- 'Browsing_forum_guest' => 'Users browsing this forum: %1$s and %2$d guest',
- 'Browsing_forum_guests' => 'Users browsing this forum: %1$s and %2$d guests',
- 'Online_users_zero_total' => 'In total there are 0 users online :: ',
- 'Online_users_total' => 'In total there are %d users online :: ',
- 'Online_user_total' => 'In total there is %d user online :: ',
- 'Reg_users_zero_total' => '0 Registered, ',
- 'Reg_users_total' => '%d Registered, ',
- 'Reg_user_total' => '%d Registered, ',
- 'Hidden_users_zero_total' => '0 Hidden and ',
- 'Hidden_user_total' => '%d Hidden and ',
- 'Hidden_users_total' => '%d Hidden and ',
- 'Guest_users_zero_total' => '0 Guests',
- 'Guest_users_total' => '%d Guests',
- 'Guest_user_total' => '%d Guest',
- 'Posted_articles_zero_total' => 'Our users have posted a total of 0 article',
- 'Posted_articles_total' => 'Our users have posted a total of %d articles',
- 'Posted_article_total' => 'Our users have posted a total of %d article',
- 'Posted_topics_zero_total' => 'Our users have posted a total of 0 topic',
- 'Posted_topics_total' => 'Our users have posted a total of %d topics',
- 'Posted_topic_total' => 'Our users have posted a total of %d topic',
- 'Registered_users_zero_total' => 'We have 0 registered users',
- 'Registered_users_total' => 'We have %d registered users',
- 'Registered_user_total' => 'We have %d registered user',
- 'Newest_user' => 'The newest registered user is %s%s%s',
+ 'LEGEND' => 'Legend',
+ 'RECORD_ONLINE_USERS' => 'Most users ever online was %1$s on %2$s',
+ 'Registered_users' => 'Registered Users:',
+ 'Browsing_forum_guest' => 'Users browsing this forum: %1$s and %2$d guest',
+ 'Browsing_forum_guests' => 'Users browsing this forum: %1$s and %2$d guests',
+ 'Online_users_zero_total' => 'In total there are 0 users online :: ',
+ 'Online_users_total' => 'In total there are %d users online :: ',
+ 'Online_user_total' => 'In total there is %d user online :: ',
+ 'Reg_users_zero_total' => '0 Registered, ',
+ 'Reg_users_total' => '%d Registered, ',
+ 'Reg_user_total' => '%d Registered, ',
+ 'Hidden_users_zero_total' => '0 Hidden and ',
+ 'Hidden_user_total' => '%d Hidden and ',
+ 'Hidden_users_total' => '%d Hidden and ',
+ 'Guest_users_zero_total'=> '0 Guests',
+ 'Guest_users_total' => '%d Guests',
+ 'Guest_user_total' => '%d Guest',
+ 'Posted_articles_zero_total'=> 'Our users have posted a total of 0 article',
+ 'Posted_articles_total' => 'Our users have posted a total of %d articles',
+ 'Posted_article_total' => 'Our users have posted a total of %d article',
+ 'Posted_topics_zero_total' => 'Our users have posted a total of 0 topic',
+ 'Posted_topics_total' => 'Our users have posted a total of %d topics',
+ 'Posted_topic_total' => 'Our users have posted a total of %d topic',
+ 'Registered_users_zero_total' => 'We have 0 registered users',
+ 'Registered_users_total' => 'We have %d registered users',
+ 'Registered_user_total' => 'We have %d registered user',
+ 'Newest_user' => 'The newest registered user is %s%s%s',
'No_new_posts_last_visit' => 'No new posts since your last visit',
@@ -201,6 +201,11 @@ $lang = array(
'POST_TOPIC_LOCKED' => 'Topic is locked',
+ 'FOUND_USERS_TOTAL' => '%s Users',
+ 'FOUND_TOPIC_TOTAL' => '%s Topics',
+ 'FOUND_POSTS_TOTAL' => '%s Posts',
+
+
'LOGIN' => 'Login',
'TERMS_USE' => 'Terms of Use',
'PRIVACY' => 'Privacy Policy',
@@ -258,50 +263,52 @@ $lang = array(
'NO_POST' => 'The requested post does not exist.',
'NO_USER' => 'The requested user does not exist.',
- 'Stop_watching_forum' => 'Stop watching this forum',
- 'Start_watching_forum' => 'Watch this forum for new posts',
- 'No_longer_watching_forum' => 'You are no longer watching this forum',
- 'You_are_watching_forum' => 'You are now watching this forum',
- 'View_topic' => 'View topic',
+ 'LOGIN_VIEWFORUM' => 'The board administrator requires you to be registered and logged in to view this forum.',
+ 'STOP_WATCHING_FORUM' => 'Stop watching this forum',
+ 'START_WATCHING_FORUM' => 'Watch this forum for new posts',
+ 'NOT_WATCHING_FORUM' => 'You are no longer watching this forum',
+ 'ARE_WATCHING_FORUM' => 'You are now watching this forum',
- 'POST_SUBJECT' => 'Post subject',
- 'PRINT_TOPIC' => 'Printable version',
- 'VIEW_NEXT_TOPIC' => 'View next topic',
- 'VIEW_PREVIOUS_TOPIC' => 'View previous topic',
+ 'VIEW_TOPIC' => 'View topic',
+ 'LOGIN_VIEWTOPIC' => 'The board administrator requires you to be registered and logged in to view this topic.',
+ 'PRINT_TOPIC' => 'Printable version',
+ 'VIEW_NEXT_TOPIC' => 'View next topic',
+ 'VIEW_PREVIOUS_TOPIC' => 'View previous topic',
+
'NO_NEWER_TOPICS' => 'There are no newer topics in this forum',
'NO_OLDER_TOPICS' => 'There are no older topics in this forum',
'POST_IGNORE' => 'This post was made by %1$s who is on your ignore list. To display this post click %sHERE%s.',
'POST_BELOW_KARMA' => 'This post was made by %1$s whose karma rating of %2$d is below your desired minimum. To display this post click %3$sHERE%4$s.',
'POST_ENCODING' => 'This post by %1$s was made in a character set different to yours. To view this post in its proper encoding click %2$sHERE%3$s.',
- 'DISPLAY_POSTS' => 'Display posts from previous',
- 'ALL_POSTS' => 'All Posts',
+ 'DISPLAY_POSTS' => 'Display posts from previous',
+ 'ALL_POSTS' => 'All Posts',
- 'BACK_TO_TOP' => 'Back to top',
- 'READ_PROFILE' => 'Profile',
- 'SEND_EMAIL' => 'Email',
- 'VISIT_WEBSITE' => 'WWW',
- 'ICQ_STATUS' => 'ICQ Status',
- 'EDIT_POST' => 'Edit',
- 'VIEW_IP' => 'IP',
- 'DELETE_POST' => 'Delete',
- 'DELETE_POST_WARN' => 'Once deleted the post cannot be recovered',
- 'REPORT_TO_ADMIN' => 'Report this post',
+ 'BACK_TO_TOP' => 'Back to top',
+ 'POST_SUBJECT' => 'Post subject',
+ 'READ_PROFILE' => 'Profile',
+ 'SEND_EMAIL' => 'Email',
+ 'VISIT_WEBSITE' => 'WWW',
+ 'ICQ_STATUS' => 'ICQ Status',
+ 'EDIT_POST' => 'Edit',
+ 'VIEW_IP' => 'IP',
+ 'DELETE_POST' => 'Delete',
+ 'DELETE_POST_WARN' => 'Once deleted the post cannot be recovered',
+ 'REPORT_TO_ADMIN' => 'Report this post',
+ 'EDITED_TIME_TOTAL' => 'Last edited by %1$s on %2$s, edited %3$d time in total',
+ 'EDITED_TIMES_TOTAL' => 'Last edited by %1$s on %2$s, edited %3$d times in total',
- 'POST_BEEN_REPORTED' => 'This post has been reported',
- 'POST_NOT_BEEN_APPROVED' => 'This post has not been approved',
- 'TOPIC_BEEN_REPORTED' => 'This topic has been reported',
- 'TOPIC_NOT_BEEN_APPROVED' => 'This topic has not been approved',
+ 'POST_BEEN_REPORTED' => 'This post has been reported',
+ 'POST_NOT_BEEN_APPROVED' => 'This post has not been approved',
+ 'TOPIC_BEEN_REPORTED' => 'This topic has been reported',
+ 'TOPIC_NOT_BEEN_APPROVED' => 'This topic has not been approved',
+ 'APPROVE_POST' => 'Approve this post',
+ 'READ_REPORTS' => 'Read post reports',
- 'APPROVE_POST' => 'Approve this post',
- 'READ_REPORTS' => 'Read post reports',
-
- 'wrote' => 'wrote',
- 'Quote' => 'Quote',
- 'Code' => 'Code',
- 'EDITED_TIME_TOTAL' => 'Last edited by %1$s on %2$s, edited %3$d time in total',
- 'EDITED_TIMES_TOTAL' => 'Last edited by %1$s on %2$s, edited %3$d times in total',
+ 'WROTE' => 'wrote',
+ 'QUOTE' => 'Quote',
+ 'CODE' => 'Code',
'QUICK_MOD' => 'Quick-mod tools',
'LOCK_TOPIC' => 'Lock topic',
@@ -312,12 +319,12 @@ $lang = array(
'MERGE_TOPIC' => 'Merge topic',
'CHANGE_TOPIC_TYPE' => 'Change topic type to: ',
- 'Stop_watching_topic' => 'Stop watching this topic',
- 'Start_watching_topic' => 'Watch this topic for replies',
- 'No_longer_watching_topic' => 'You are no longer watching this topic',
- 'You_are_watching_topic' => 'You are now watching this topic',
+ 'STOP_WATCHING_TOPIC' => 'Stop watching this topic',
+ 'START_WATCHING_TOPIC' => 'Watch this topic for replies',
+ 'NOT_WATCHING_TOPIC' => 'You are no longer watching this topic',
+ 'NOW_WATCHING_TOPIC' => 'You are now watching this topic',
- 'Total_votes' => 'Total Votes',
+ 'TOTAL_VOTES' => 'Total Votes',
'VIEW_RESULTS' => 'View Results',
@@ -624,6 +631,7 @@ $lang = array(
'NO_MEMBERS' => 'No members found for this search criteria',
'SEND_MESSAGE' => 'Message',
'POST_IP' => 'Posted from IP/domain',
+ 'LAST_ACTIVE' => 'Last active',
'SELECT_SORT_METHOD'=> 'Select sort method',
'SORT' => 'Sort',
'ORDER' => 'Order',
@@ -735,7 +743,7 @@ $lang = array(
'Search_author' => 'Search for Author',
'Search_author_explain' => 'Use * as a wildcard for partial matches',
'Last_active' => 'Last active',
- 'Select_marked' => 'Select Marked',
+ 'SELECT_MARKED' => 'Select Marked',
'Search_for_any' => 'Search for any terms or use query as entered',
'Search_for_all' => 'Search for all terms',
'Search_title_msg' => 'Search topic title and message text',
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index ebe0557e39..e7a7c4abed 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -28,45 +28,43 @@ include($phpbb_root_path . 'common.'.$phpEx);
$user->start();
$user->setup();
$auth->acl($user->data);
-// End session management
-
-
// Grab data
-$mode = (isset($_REQUEST['mode'])) ? $_REQUEST['mode'] : '';
+$mode = (isset($_REQUEST['mode'])) ? htmlspecialchars($_REQUEST['mode']) : '';
$user_id = (isset($_GET['u'])) ? intval($_GET['u']) : ANONYMOUS;
// Can this user view profiles/memberslist?
if (!$auth->acl_gets('u_viewprofile', 'a_'))
{
- if ($user->data['user_id'] == ANONYMOUS)
+ if ($user->data['user_id'] != ANONYMOUS)
{
- redirect("login.$phpEx$SID&redirect=memberlist&mode=$mode&u=$user_id");
+ trigger_error($user->lang['NO_VIEW_USERS']);
}
- trigger_error($user->lang['NO_VIEW_USERS']);
+
+ login_box(preg_replace('#.*?([a-z]+?\.' . $phpEx . '.*?)$#i', '\1', htmlspecialchars($_SERVER['REQUEST_URI'])));
}
$start = (isset($_GET['start'])) ? intval($_GET['start']) : 0;
-$form = (!empty($_GET['form'])) ? $_GET['form'] : 0;
-$field = (isset($_GET['field'])) ? $_GET['field'] : 'username';
+$form = (!empty($_GET['form'])) ? htmlspecialchars($_GET['form']) : 0;
+$field = (isset($_GET['field'])) ? htmlspecialchars($_GET['field']) : 'username';
$sort_key = (!empty($_REQUEST['sk'])) ? htmlspecialchars($_REQUEST['sk']) : 'c';
$sort_dir = (!empty($_REQUEST['sd'])) ? htmlspecialchars($_REQUEST['sd']) : 'a';
-$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'])) ? trim($_REQUEST['aim']) : '';
-$yahoo = (!empty($_REQUEST['yahoo'])) ? trim($_REQUEST['yahoo']) : '';
-$msn = (!empty($_REQUEST['msn'])) ? trim($_REQUEST['msn']) : '';
+$username = (!empty($_REQUEST['username'])) ? trim(htmlspecialchars($_REQUEST['username'])) : '';
+$email = (!empty($_REQUEST['email'])) ? trim(htmlspecialchars($_REQUEST['email'])) : '';
+$icq = (!empty($_REQUEST['icq'])) ? intval(htmlspecialchars($_REQUEST['icq'])) : '';
+$aim = (!empty($_REQUEST['aim'])) ? trim(htmlspecialchars($_REQUEST['aim'])) : '';
+$yahoo = (!empty($_REQUEST['yahoo'])) ? trim(htmlspecialchars($_REQUEST['yahoo'])) : '';
+$msn = (!empty($_REQUEST['msn'])) ? trim(htmlspecialchars($_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('-', trim($_REQUEST['joined'])) : array();
-$active = (!empty($_REQUEST['active'])) ? explode('-', trim($_REQUEST['active'])) : array();
+$joined_select = (!empty($_REQUEST['joined_select'])) ? htmlspecialchars($_REQUEST['joined_select']) : 'lt';
+$active_select = (!empty($_REQUEST['active_select'])) ? htmlspecialchars($_REQUEST['active_select']) : 'lt';
+$count_select = (!empty($_REQUEST['count_select'])) ? htmlspecialchars($_REQUEST['count_select']) : 'eq';
+$joined = (!empty($_REQUEST['joined'])) ? explode('-', trim(htmlspecialchars($_REQUEST['joined']))) : array();
+$active = (!empty($_REQUEST['active'])) ? explode('-', trim(htmlspecialchars($_REQUEST['active']))) : array();
$count = (!empty($_REQUEST['count'])) ? intval($_REQUEST['count']) : '';
-$ipdomain = (!empty($_REQUEST['ip'])) ? trim($_REQUEST['ip']) : '';
+$ipdomain = (!empty($_REQUEST['ip'])) ? trim(htmlspecialchars($_REQUEST['ip'])) : '';
// Grab rank information for later
$sql = "SELECT *
@@ -81,9 +79,13 @@ while ($row = $db->sql_fetchrow($result))
}
$db->sql_freeresult($result);
-
+// What do you want to do today? ... oops, I think that line is taken ...
switch ($mode)
{
+ case 'leaders':
+ // Display a listing of board admins, moderators
+ break;
+
case 'viewprofile':
// Display a profile
$page_title = sprintf($user->lang['VIEWING_PROFILE'], $row['username']);
@@ -145,6 +147,7 @@ switch ($mode)
$active_t_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
+ // We left join on the session table to see if the user is currently online
$sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_rank, user_from, user_occ, user_interests, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_avatar, user_avatar_type, user_allowavatar, user_lastvisit, MAX(session_time) AS session_time
FROM " . USERS_TABLE . "
LEFT JOIN " . SESSIONS_TABLE . " ON session_user_id = user_id
@@ -219,7 +222,7 @@ switch ($mode)
trigger_error($user->lang['NO_USER']);
}
- if (empty($config['board_email_form']) || empty($config['email_enable']) || !$auth->acl_gets('u_sendemail', 'a_'))
+ if (empty($config['board_email_form']) || empty($config['email_enable']) || !$auth->acl_gets('u_sendemail', 'a_user'))
{
trigger_error($user->lang['NO_EMAIL']);
}
@@ -237,7 +240,7 @@ switch ($mode)
}
// Can we send email to this user?
- if (empty($row['user_viewemail']) && !$auth->acl_get('a_'))
+ if (empty($row['user_viewemail']) && !$auth->acl_get('a_user'))
{
trigger_error($user->lang['NO_EMAIL']);
}
@@ -340,21 +343,19 @@ switch ($mode)
$sort_dir_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']);
- $s_sort_key = '';
- $s_sort_dir = '';
// Additional sorting options for user search
$where_sql = '';
@@ -440,11 +441,22 @@ switch ($mode)
$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&ip=" . urlencode($ipdomain) . "&sd=$sort_dir&sk=$sort_key&joined_select=$joined_select&active_select=$active_select&count_select=$count_select" : "memberlist.$phpEx$SID&mode=$mode&sk=$sort_key&sd=$sort_dir";
+ $pagination_url = "memberlist.$phpEx$SID&mode=$mode";
// Some search user specific data
if ($mode == 'searchuser')
{
+ // Build a relevant pagination_url
+ $global_var = (isset($_POST['submit'])) ? '_POST' : '_GET';
+ foreach ($$global_var as $key => $var)
+ {
+ if (in_array($key, array('submit', 'start', 'mode')) || $var == '')
+ {
+ continue;
+ }
+ $pagination_url .= '&' . $key . '=' . urlencode($var);
+ }
+
$template->assign_vars(array(
'USERNAME' => $username,
'EMAIL' => $email,
@@ -487,6 +499,7 @@ switch ($mode)
$sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_rank, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_avatar, user_avatar_type, user_allowavatar, user_lastvisit
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS . "
+ $where_sql
ORDER BY $order_by
LIMIT $start, " . $config['topics_per_page'];
$result = $db->sql_query($sql);
@@ -514,7 +527,8 @@ switch ($mode)
// Generate page
$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),
+ 'PAGE_NUMBER' => on_page($total_users, $config['topics_per_page'], $start),
+ 'TOTAL_USERS' => sprintf($user->lang['FOUND_USERS_TOTAL'], $total_users),
'U_FIND_MEMBER' => "memberlist.$phpEx$SID&mode=searchuser",
'U_SORT_USERNAME' => "memberlist.$phpEx$SID&sk=a&sd=" . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'),
diff --git a/phpBB/templates/subSilver/login_body.html b/phpBB/templates/subSilver/login_body.html
index f096fcdf6c..cf26571028 100644
--- a/phpBB/templates/subSilver/login_body.html
+++ b/phpBB/templates/subSilver/login_body.html
@@ -11,11 +11,18 @@
{LOGIN_ERROR} | +|||
{L_USERNAME}: | {L_REGISTER} |
@@ -32,6 +39,9 @@
{L_HIDE_ME} | |
{L_TERMS_USE} | {L_PRIVACY} | +