?? listonlineusers.jsp
字號:
<%--
- $Header: /cvsroot/mvnforum/mvnforum/srcweb/mvnplugin/mvnforum/user/listonlineusers.jsp,v 1.25 2004/02/16 18:49:46 minhnn Exp $
- $Author: minhnn $
- $Revision: 1.25 $
- $Date: 2004/02/16 18:49:46 $
-
- ====================================================================
-
- Copyright (C) 2002-2004 by MyVietnam.net
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or any later version.
-
- All copyright notices regarding mvnForum MUST remain intact
- in the scripts and in the outputted HTML.
- The "powered by" text/logo with a link back to
- http://www.mvnForum.com and http://www.MyVietnam.net in the
- footer of the pages MUST remain visible when the pages
- are viewed on the internet or intranet.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
- Support can be obtained from support forums at:
- http://www.mvnForum.com/mvnforum/index
-
- Correspondence and Marketing Questions can be sent to:
- info@MyVietnam.net
-
- @author: Minh Nguyen minhnn@MyVietnam.net
- @author: Mai Nguyen mai.nh@MyVietnam.net
--%>
<%@ page contentType="text/html;charset=utf-8" %>
<%@ page errorPage="fatalerror.jsp"%>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.Timestamp" %>
<%@ page import="net.myvietnam.mvncore.util.DateUtil" %>
<%@ page import="com.mvnforum.auth.OnlineUserAction" %>
<%@ page import="com.mvnforum.MVNForumConstant" %>
<%@ page import="com.mvnforum.MVNForumConfig" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ include file="inc_common.jsp"%>
<html [mvnforum.common.i18n.html_dir]>
<head>
<title>[mvnforum.common.forum.title_name] - [mvnforum.user.listonlineusers.title]</title>
<%@ include file="/mvnplugin/mvnforum/meta.jsp"%>
<link href="<%=contextPath%>/mvnplugin/mvnforum/css/style.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0">
<%@ include file="header.jsp"%>
<br/>
<table width="95%" align="center">
<tr class="nav">
<td><img src="<%=contextPath%>/mvnplugin/mvnforum/images/nav.gif"></td>
<td width="100%" nowrap>
<a class="nav" href="index">[mvnforum.common.nav.index]</a> »
[mvnforum.user.listonlineusers.title]
</td>
</tr>
</table>
<br/>
<%
Collection onlineUserActions = (Collection) request.getAttribute("OnlineUserActions");
int guestCount = 0;
int memberCount = 0;
int anonymousCount = 0;
for (Iterator countIterator = onlineUserActions.iterator(); countIterator.hasNext(); ) {
OnlineUserAction onlineUserAction = (OnlineUserAction)countIterator.next();
int mID = onlineUserAction.getMemberID();
if ( (mID==0) || (mID==MVNForumConstant.MEMBER_ID_OF_GUEST) ) {
guestCount++;
} else {
memberCount++;
}
}
%>
<table width="95%" align="center">
<tr>
<td class="hightlight">[mvnforum.common.there_are] <%=onlineUserActions.size()%> [mvnforum.common.online_users]
(<b><%=guestCount%></b> <%=(guestCount>1) ?"[mvnforum.common.guests]":"[mvnforum.common.guest]"%>,
<b><%=memberCount%></b> <%=(memberCount>1)?"[mvnforum.common.members]":"[mvnforum.common.member]"%>)
</td>
</tr>
</table>
<table class="tborder" width="95%" cellspacing="1" cellpadding="3" align="center">
<tr class="theader">
<td>[mvnforum.common.user]</td>
<td>[mvnforum.user.listonlineusers.table.what_are_doing]</td>
<td align="center">[mvnforum.user.listonlineusers.table.duration_since_last_activity]</td>
<td align="center">[mvnforum.user.listonlineusers.table.online_time]</td>
</tr>
<%
boolean odd = false;
Timestamp now = DateUtil.getCurrentGMTTimestamp();
for (Iterator iterator = onlineUserActions.iterator(); iterator.hasNext(); ) {
OnlineUserAction onlineUserAction = (OnlineUserAction)iterator.next();
odd = !odd;
%>
<%if (odd) {%>
<tr class="trow1">
<%} else {%>
<tr class="trow2">
<%}%>
<td>
<%
int mID = onlineUserAction.getMemberID();
String mName = onlineUserAction.getMemberName();
if ( (mID==0) || (mID==MVNForumConstant.MEMBER_ID_OF_GUEST) ) {
out.print("<span class=\"memberName\">");
if ((mName==null) || (mName.length()<=0)) {
out.print(MVNForumConfig.getDefaultGuestName());
} else {
out.print(mName);
}
out.print("</span>");
} else {
%>
<a href="viewmember?memberid=<%=mID%>" class="memberName"><%=mName%></a>
<% } %>
</td>
<td>
<%
String desc = onlineUserAction.getDesc();
String url = onlineUserAction.getUrl();
if (desc == null) {
desc = "Unknown action";
}
if (url == null) {
out.print(desc);
} else {
%>
<a href="<%=url%>"><%=desc%></a>
<% } %>
<%if ( permission.canAdminSystem() ) {%>
<br>
[<%=onlineUserAction.getRemoteAddr()%>] <%=onlineUserAction.getUserAgent()%>
<%}/*if can admin system*/%>
</td>
<td align="center"><%=onlineUserAction.getDurationSinceLastRequestDesc(now)%></td>
<td align="center"><%=onlineUserAction.getOnlineDurarionDesc(now)%></td>
</tr>
<% }//for %>
</table>
<br/>
<%@ include file="footer.jsp"%>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -