📄 _online__jsp.java
字号:
/*
* JSP generated by Resin-3.1.0 (built Fri, 22 Dec 2006 07:00:35 PST)
*/
package _jsp._forum;
import javax.servlet.*;
import javax.servlet.jsp.*;
import javax.servlet.http.*;
import cn.js.fan.db.*;
import cn.js.fan.base.*;
import cn.js.fan.web.*;
import cn.js.fan.util.*;
import com.redmoon.forum.*;
import com.redmoon.forum.ui.*;
import com.redmoon.forum.util.*;
import cn.js.fan.security.*;
import com.redmoon.forum.person.*;
public class _online__jsp extends com.caucho.jsp.JavaPage
{
private final java.util.HashMap<String,java.lang.reflect.Method> _jsp_functionMap = new java.util.HashMap<String,java.lang.reflect.Method>();
private boolean _caucho_isDead;
public void
_jspService(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException, javax.servlet.ServletException
{
javax.servlet.http.HttpSession session = request.getSession(true);
com.caucho.server.webapp.WebApp _jsp_application = _caucho_getApplication();
javax.servlet.ServletContext application = _jsp_application;
com.caucho.jsp.PageContextImpl pageContext = com.caucho.jsp.QJspFactory.allocatePageContext(this, _jsp_application, request, response, null, session, 8192, true, false);
javax.servlet.jsp.JspWriter out = pageContext.getOut();
final javax.el.ELContext _jsp_env = pageContext.getELContext();
javax.servlet.ServletConfig config = getServletConfig();
javax.servlet.Servlet page = this;
response.setContentType("text/html;charset=utf-8");
request.setCharacterEncoding("UTF-8");
com.redmoon.forum.ui.LabelTag _jsp_LabelTag_0 = null;
try {
out.write(_jsp_string0, 0, _jsp_string0.length);
String skincode = UserSet.getSkin(request);
if (skincode.equals(""))
skincode = UserSet.defaultSkin;
SkinMgr skm = new SkinMgr();
Skin skin = skm.getSkin(skincode);
if (skin==null)
skin = skm.getSkin(UserSet.defaultSkin);
String skinPath = skin.getPath();
out.write(_jsp_string1, 0, _jsp_string1.length);
out.print((skinPath));
out.write(_jsp_string2, 0, _jsp_string2.length);
cn.js.fan.util.StrUtil StrUtil;
StrUtil = (cn.js.fan.util.StrUtil) pageContext.getAttribute("StrUtil");
if (StrUtil == null) {
StrUtil = new cn.js.fan.util.StrUtil();
pageContext.setAttribute("StrUtil", StrUtil);
}
out.write(_jsp_string3, 0, _jsp_string3.length);
com.redmoon.forum.Privilege privilege;
privilege = (com.redmoon.forum.Privilege) pageContext.getAttribute("privilege");
if (privilege == null) {
privilege = new com.redmoon.forum.Privilege();
pageContext.setAttribute("privilege", privilege);
}
out.write(_jsp_string4, 0, _jsp_string4.length);
String querystring = StrUtil.getNullString(request.getQueryString());
String privurl = request.getRequestURL()+"?"+StrUtil.UrlEncode(querystring,"utf-8");
String boardcode = StrUtil.getNullString(request.getParameter("boardcode"));
String sql = "";
if (boardcode.equals(""))
sql = "select name from sq_online ORDER BY isguest,logtime";
else
sql = "select name from sq_online where boardcode="+StrUtil.sqlstr(boardcode)+" ORDER BY isguest,logtime";
if (!SecurityUtil.isValidSql(sql)) {
out.print(StrUtil.p_center(SkinUtil.LoadString(request, SkinUtil.ERR_SQL)));
return;
}
OnlineUserDb ou = new OnlineUserDb();
int total = ou.getObjectCount(sql);
int pagesize = 35; // 20;
int curpage,totalpages;
Paginator paginator = new Paginator(request, total, pagesize);
// \u8bbe\u7f6e\u5f53\u524d\u9875\u6570\u548c\u603b\u9875\u6570
totalpages = paginator.getTotalPages();
curpage = paginator.getCurrentPage();
if (totalpages==0)
{
curpage = 1;
totalpages = 1;
}
ObjectBlockIterator oir = ou.getOnlineUsers(sql, (curpage-1)*pagesize, curpage*pagesize);
String id="",name="",ip="",logtime="",doing="",myface="",boardname="";
boolean isguest = false;
String RealPic = "";
boolean covered = false;
int layer = 1;
int i = 1;
UserDb user = new UserDb();
Directory dir = new Directory();
Leaf leaf = null;
int rowCount = 7; // \u4e00\u884c\u663e\u793a7\u4e2a\u7528\u6237
IPStoreDb ipd = new IPStoreDb();
int n = 0;
BoardManagerDb bmd = new BoardManagerDb();
while (oir.hasNext())
{
if (n==0)
out.print("<tr>");
ou = (OnlineUserDb) oir.next();
i++;
name = ou.getName();
logtime = DateUtil.format(ou.getLogTime(), "yyyy-MM-dd HH:mm:ss");
doing = ou.getDoing();
isguest = ou.isGuest();
covered = ou.isCovered();
if (!isguest)
user = user.getUser(name);
RealPic = user.getRealPic();
myface = user.getMyface();
ip = ou.getIp();
if (!privilege.isMasterLogin(request)) {
int p = ip.indexOf(".");
p = ip.indexOf(".",p+1);
ip = ip.substring(0,p)+".*.*";
}
boardcode = StrUtil.getNullString(ou.getBoardCode());
boardname = "";
if (!boardcode.equals("")) {
leaf = dir.getLeaf(boardcode);
if (leaf==null)
leaf = new Leaf();
boardname = leaf.getName();
}
out.print("<td width='14%'>");
if (!isguest) {
if (!covered) {
String icon = "member";
if (privilege.isMasterLogin(request)) {
icon = "admin";
}
else if (bmd.isUserManager(name))
icon = "manager";
out.write(_jsp_string5, 0, _jsp_string5.length);
out.print((StrUtil.UrlEncode(name)));
out.write(_jsp_string6, 0, _jsp_string6.length);
out.print((skinPath));
out.write(_jsp_string7, 0, _jsp_string7.length);
out.print((icon));
out.write(_jsp_string8, 0, _jsp_string8.length);
out.print((user.getNick()));
out.write(_jsp_string9, 0, _jsp_string9.length);
if (_jsp_LabelTag_0 == null) {
_jsp_LabelTag_0 = new com.redmoon.forum.ui.LabelTag();
_jsp_LabelTag_0.setPageContext(pageContext);
_jsp_LabelTag_0.setParent((javax.servlet.jsp.tagext.Tag) null);
}
_jsp_LabelTag_0.setRes("res.label.forum.showonline");
_jsp_LabelTag_0.setKey("cur_pos");
_jsp_LabelTag_0.doEndTag();
out.write('\uff1a');
out.print((boardname));
out.write(_jsp_string10, 0, _jsp_string10.length);
if (_jsp_LabelTag_0 == null) {
_jsp_LabelTag_0 = new com.redmoon.forum.ui.LabelTag();
_jsp_LabelTag_0.setPageContext(pageContext);
_jsp_LabelTag_0.setParent((javax.servlet.jsp.tagext.Tag) null);
}
_jsp_LabelTag_0.setRes("res.label.forum.showonline");
_jsp_LabelTag_0.setKey("login_date");
_jsp_LabelTag_0.doEndTag();
out.write('\uff1a');
out.print((ForumSkin.formatDateTime(request, ou.getLogTime())));
out.write(_jsp_string11, 0, _jsp_string11.length);
if (_jsp_LabelTag_0 == null) {
_jsp_LabelTag_0 = new com.redmoon.forum.ui.LabelTag();
_jsp_LabelTag_0.setPageContext(pageContext);
_jsp_LabelTag_0.setParent((javax.servlet.jsp.tagext.Tag) null);
}
_jsp_LabelTag_0.setRes("res.label.forum.showonline");
_jsp_LabelTag_0.setKey("reg_date");
_jsp_LabelTag_0.doEndTag();
out.write('\uff1a');
out.print((ForumSkin.formatDate(request, user.getRegDate())));
out.write(_jsp_string11, 0, _jsp_string11.length);
if (_jsp_LabelTag_0 == null) {
_jsp_LabelTag_0 = new com.redmoon.forum.ui.LabelTag();
_jsp_LabelTag_0.setPageContext(pageContext);
_jsp_LabelTag_0.setParent((javax.servlet.jsp.tagext.Tag) null);
}
_jsp_LabelTag_0.setRes("res.label.forum.showonline");
_jsp_LabelTag_0.setKey("ip_address");
_jsp_LabelTag_0.doEndTag();
out.write('\uff1a');
out.print((ipd.getPosition(ip)));
out.write(_jsp_string12, 0, _jsp_string12.length);
out.print((ip));
out.write(_jsp_string13, 0, _jsp_string13.length);
}
else {
out.write(_jsp_string14, 0, _jsp_string14.length);
out.print((skinPath));
out.write(_jsp_string15, 0, _jsp_string15.length);
out.print((SkinUtil.LoadString(request, "res.label.forum.index", "login_hide")));
out.write(_jsp_string16, 0, _jsp_string16.length);
}
}
else {
out.write(_jsp_string17, 0, _jsp_string17.length);
out.print((skinPath));
out.write(_jsp_string18, 0, _jsp_string18.length);
out.print((SkinUtil.LoadString(request, "res.label.forum.index", "guest")));
out.write(_jsp_string19, 0, _jsp_string19.length);
if (_jsp_LabelTag_0 == null) {
_jsp_LabelTag_0 = new com.redmoon.forum.ui.LabelTag();
_jsp_LabelTag_0.setPageContext(pageContext);
_jsp_LabelTag_0.setParent((javax.servlet.jsp.tagext.Tag) null);
}
_jsp_LabelTag_0.setRes("res.label.forum.showonline");
_jsp_LabelTag_0.setKey("cur_pos");
_jsp_LabelTag_0.doEndTag();
out.write('\uff1a');
out.print((boardname));
out.write(_jsp_string20, 0, _jsp_string20.length);
if (_jsp_LabelTag_0 == null) {
_jsp_LabelTag_0 = new com.redmoon.forum.ui.LabelTag();
_jsp_LabelTag_0.setPageContext(pageContext);
_jsp_LabelTag_0.setParent((javax.servlet.jsp.tagext.Tag) null);
}
_jsp_LabelTag_0.setRes("res.label.forum.showonline");
_jsp_LabelTag_0.setKey("login_date");
_jsp_LabelTag_0.doEndTag();
out.write('\uff1a');
out.print((ForumSkin.formatDateTime(request, ou.getLogTime())));
out.write(_jsp_string21, 0, _jsp_string21.length);
if (_jsp_LabelTag_0 == null) {
_jsp_LabelTag_0 = new com.redmoon.forum.ui.LabelTag();
_jsp_LabelTag_0.setPageContext(pageContext);
_jsp_LabelTag_0.setParent((javax.servlet.jsp.tagext.Tag) null);
}
_jsp_LabelTag_0.setRes("res.label.forum.showonline");
_jsp_LabelTag_0.setKey("ip_address");
_jsp_LabelTag_0.doEndTag();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -