%@ page import="java.util.*" %> <%@ page import="java.io.*" %> <%@ page import="java.text.*" %> <%@ page import="com.hof.util.*" %> <%@ page import="com.hof.data.*" %> <%@ page import="com.hof.process.BuildDataProcess" %> <%@ page import="com.hof.servlet.SysSessionListener" %> <%@ page import="java.lang.ref.WeakReference" %> <%! private String dateString(long l) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd h:mm:ss a (z)"); return sdf.format(new java.util.Date(l)); } private String secString(int sec) { int h = Math.abs(sec / 3600); int m = Math.abs((sec / 60) % 60); int s = Math.abs(sec % 60); String str = ""; if (sec < 0) str = "-"; str += h + ":"; if (m < 10) str += "0"; str += m + ":"; if (s < 10) str += "0"; str += s; return str; } %>
SysSessionListener.getCurrentSessions(): | <%=SysSessionListener.getCurrentSessions()%> |
SessionId | CreationTime | LastAccessedTime | MaxInactiveInterval | Timeout In | YF Session | YF IpPerson | YF PersonName | YF Role | YF Guest Role | RemoteHost | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<%=sss.getId()%> | <% if (valid) { sec = (int)(sss.getMaxInactiveInterval() - ((now - sss.getLastAccessedTime()) / 1000)); %><%=dateString(sss.getCreationTime())%> | <%=dateString(sss.getLastAccessedTime())%> | <%=secString(sss.getMaxInactiveInterval())%> | <%=secString(sec)%> | <% if (sb == null) { %>null | <% } else { if (sb.isLoggedOn()) { %> | Logged In | <% } else { %>Not Logged In | <% } %><%=sb.getPrsnBean() == null ? null : sb.getPrsnBean().getIpPerson()%> | <%=sb.getPrsnBean() == null ? null : sb.getPrsnBean().getFormattedFullName()%> | <% if (sb.getCurrRole() == null) { %>null | <% } else { %> | <%=sb.getCurrRole().getRoleDescription()%> | <%=sb.getCurrRole().isGuest()%> | <% } %><%=sb.getRemoteHost()%> | <% } } else { %>Session invalidated | <% } %>