mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-19 07:08:09 +01:00
Modified as per Nathans suggestion
git-svn-id: file:///svn/phpbb/trunk@186 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
8870e21858
commit
1129c4e0aa
@ -297,9 +297,21 @@ $l_titletext = "Title & Text";
|
||||
$l_search = "Search";
|
||||
$l_nomatches = "No records match that query. Please broaden your search.";
|
||||
|
||||
// Whosonline
|
||||
|
||||
// Viewonline
|
||||
$l_whosonline = "Who's online?";
|
||||
$l_nousers = "No Users are currently browsing the forums";
|
||||
$l_forum_location = "Location in the forum";
|
||||
$l_last_updated = "Last Updated";
|
||||
$l_forum_index = "Forum Index";
|
||||
$l_loggin_on = "Logging on";
|
||||
$l_searching = "Searching the forum";
|
||||
$l_registering = "Registering";
|
||||
$l_viewing_profiles = "Viewing member profiles";
|
||||
$l_viewing_members = "Viewing member list";
|
||||
$l_altering_profile = "Altering their profile";
|
||||
$l_viewing_online = "Viewing who is online";
|
||||
$l_viewing_faq = "Viewing the board FAQ";
|
||||
|
||||
|
||||
// Editpost
|
||||
|
@ -3,19 +3,17 @@
|
||||
<tr>
|
||||
<td><table border="0" width="100%" cellpadding="3" cellspacing="1">
|
||||
<tr class="tableheader">
|
||||
<td colspan="4" align="center"><b>{L_WHOSONLINE}</b></td>
|
||||
<td colspan="4" align="center"><b>There are {L_ACTIVE_USERS} active users and {L_GUEST_USERS} guest users browsing this board.</b><br />This table lists all logged in users active in the past five minutes.</td>
|
||||
</tr>
|
||||
<tr class="catheader">
|
||||
<td width="30%" align="center"> {L_USERNAME} </td>
|
||||
<td width="20%" align="center"> {L_LAST_UPDATE} </td>
|
||||
<td width="10%" align="center"> {L_LOGGED_ON} </td>
|
||||
<td width="35%" align="center"> {L_USERNAME} </td>
|
||||
<td width="25%" align="center"> {L_LAST_UPDATE} </td>
|
||||
<td width="40%" align="center"> {L_LOCATION} </td>
|
||||
</tr>
|
||||
<!-- BEGIN userrow -->
|
||||
<tr bgcolor="{userrow.ROW_COLOR}" class="tablebody">
|
||||
<td width="30%"> <a href="profile.{PHPEX}?mode=viewprofile&{POST_USER_URL}={userrow.USER_ID}">{userrow.USERNAME}</a> </td>
|
||||
<td width="20%" align="center"> {userrow.LASTUPDATE} </td>
|
||||
<td width="10%" align="center"> {userrow.LOGGEDON} </td>
|
||||
<td width="35%"> <a href="profile.{PHPEX}?mode=viewprofile&{POST_USER_URL}={userrow.USER_ID}">{userrow.USERNAME}</a> </td>
|
||||
<td width="25%" align="center"> {userrow.LASTUPDATE} </td>
|
||||
<td width="40%"> <a href="{userrow.LOCATION_URL}"> {userrow.LOCATION}</a> </td>
|
||||
</tr>
|
||||
<!-- END userrow -->
|
||||
|
@ -48,6 +48,7 @@ $sql = "SELECT u.username, u.user_id, f.forum_name, f.forum_id, s.session_page,
|
||||
FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." s
|
||||
LEFT JOIN ".FORUMS_TABLE." f ON f.forum_id = s.session_page
|
||||
WHERE u.user_id = s.session_user_id
|
||||
AND s.session_time >= ".(time()-300)."
|
||||
ORDER BY s.session_time DESC";
|
||||
$result = $db->sql_query($sql);
|
||||
if(!$result)
|
||||
@ -66,12 +67,15 @@ $template->assign_vars(array(
|
||||
"POST_USER_URL" => POST_USERS_URL,
|
||||
"L_WHOSONLINE" => $l_whosonline,
|
||||
"L_USERNAME" => $l_username,
|
||||
"L_LOCATION" => $l_location,
|
||||
"L_LAST_UPDATE" => "Last Updated",
|
||||
"L_LOGGED_ON" => "Logged On"
|
||||
"L_LOCATION" => $l_forum_location,
|
||||
"L_LAST_UPDATE" => $l_last_updated
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
$active_users = 0;
|
||||
$guest_users = 0;
|
||||
|
||||
$online_count = $db->sql_numrows($result);
|
||||
if($online_count)
|
||||
{
|
||||
@ -87,59 +91,60 @@ if($online_count)
|
||||
$row_color = "#DDDDDD";
|
||||
}
|
||||
|
||||
if($onlinerow[$i]['user_id'] != ANONYMOUS && $onlinerow[$i]['user_id'] != DELETED)
|
||||
if($onlinerow[$i]['user_id'] != ANONYMOUS && $onlinerow[$i]['user_id'] != DELETED && $onlinerow[$i]['session_logged_in'])
|
||||
{
|
||||
$username = $onlinerow[$i]['username'];
|
||||
if($onlinerow[$i]['session_logged_in'])
|
||||
{
|
||||
$loggedon = " $l_yes ";
|
||||
}
|
||||
else
|
||||
{
|
||||
$loggedon = " $l_no ";
|
||||
}
|
||||
$active_users++;
|
||||
}
|
||||
else
|
||||
{
|
||||
$username = "$l_anonymous";
|
||||
$loggedon = " - ";
|
||||
$guest_users++;
|
||||
}
|
||||
|
||||
if($onlinerow[$i]['forum_name'] == "")
|
||||
if($onlinerow[$i]['forum_name'] == "" && $onlinerow[$i]['session_logged_in'])
|
||||
{
|
||||
switch($onlinerow[$i]['session_page'])
|
||||
{
|
||||
case PAGE_INDEX:
|
||||
$location = "Forum Index";
|
||||
$location = $l_forum_index;
|
||||
$location_url = "index.".$phpEx;
|
||||
break;
|
||||
case PAGE_LOGIN:
|
||||
$location = "Logging On";
|
||||
$location = $l_logging_on;
|
||||
$location_url = "index.".$phpEx;
|
||||
break;
|
||||
case PAGE_SEARCH:
|
||||
$location = "Topic Search";
|
||||
$location = $l_searching;
|
||||
$location_url = "search.".$phpEx;
|
||||
break;
|
||||
case PAGE_REGISTER:
|
||||
$location = "Registering";
|
||||
$location = $l_registering;
|
||||
$location_url = "index.".$phpEx;
|
||||
break;
|
||||
case PAGE_VIEWPROFILE:
|
||||
$location = "Viewing Profiles";
|
||||
$location = $l_viewing_profiles;
|
||||
$location_url = "index.".$phpEx;
|
||||
break;
|
||||
case PAGE_ALTERPROFILE:
|
||||
$location = "Altering Profile";
|
||||
$location = $l_altering_profile;
|
||||
$location_url = "index.".$phpEx;
|
||||
break;
|
||||
case PAGE_VIEWONLINE:
|
||||
$location = "Viewing Who's Online";
|
||||
$location = $l_viewing_online;
|
||||
$location_url = "viewonline.".$phpEx;
|
||||
break;
|
||||
case PAGE_VIEWMEMBERS:
|
||||
$location = "Viewing Memberlist";
|
||||
$location = $l_viewing_members;
|
||||
$location_url = "memberlist.".$phpEx;
|
||||
break;
|
||||
case PAGE_FAQ:
|
||||
$location = "Viewing FAQ";
|
||||
$location = $l_viewing_faq;
|
||||
$location_url = "faq.".$phpEx;
|
||||
break;
|
||||
default:
|
||||
$location = "Forum Index";
|
||||
$location = $l_forum_index;
|
||||
$location_url = "index.".$phpEx;
|
||||
}
|
||||
$location_url = "index.".$phpEx;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -147,19 +152,27 @@ if($online_count)
|
||||
$location = $onlinerow[$i]['forum_name'];
|
||||
}
|
||||
|
||||
$template->assign_block_vars("userrow",
|
||||
array("ROW_COLOR" => $row_color,
|
||||
"USER_ID" => $onlinerow[$i]['user_id'],
|
||||
"USERNAME" => $username,
|
||||
"LOGGEDON" => $loggedon,
|
||||
"LASTUPDATE" => create_date($date_format, $onlinerow[$i]['session_time'], $sys_timezone),
|
||||
"LOCATION" => $location,
|
||||
"LOCATION_URL" => $location_url
|
||||
)
|
||||
);
|
||||
if($onlinerow[$i]['session_logged_in'])
|
||||
{
|
||||
$template->assign_block_vars("userrow",
|
||||
array("ROW_COLOR" => $row_color,
|
||||
"USER_ID" => $onlinerow[$i]['user_id'],
|
||||
"USERNAME" => $username,
|
||||
"LASTUPDATE" => create_date($date_format, $onlinerow[$i]['session_time'], $sys_timezone),
|
||||
"LOCATION" => $location,
|
||||
"LOCATION_URL" => $location_url
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
"L_ACTIVE_USERS" => $active_users,
|
||||
"L_GUEST_USERS" => $guest_users
|
||||
)
|
||||
);
|
||||
|
||||
$template->pparse("body");
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user