📄 _login__jsp.java
字号:
/*
* JSP generated by Resin-3.1.0 (built Fri, 22 Dec 2006 07:00:35 PST)
*/
package _jsp;
import javax.servlet.*;
import javax.servlet.jsp.*;
import javax.servlet.http.*;
import com.redmoon.forum.person.*;
import cn.js.fan.util.*;
import cn.js.fan.db.*;
import cn.js.fan.web.*;
import java.util.Vector;
import java.util.Iterator;
import com.redmoon.forum.ad.*;
import com.redmoon.forum.ui.*;
import com.redmoon.forum.security.*;
import com.redmoon.forum.*;
import com.redmoon.forum.Leaf;
import com.redmoon.forum.music.*;
public class _login__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;
com.redmoon.forum.ad.AdTag _jsp_AdTag_1 = 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);
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.login");
}
_jsp_LabelTag_0.setKey("login");
_jsp_LabelTag_0.doEndTag();
out.write(_jsp_string3, 0, _jsp_string3.length);
out.print((Global.AppName));
out.write(_jsp_string4, 0, _jsp_string4.length);
response.setHeader("Pragma","No-cache");
response.setHeader("Cache-Control","no-cache");
response.setDateHeader("Expires", 0);
out.write(_jsp_string5, 0, _jsp_string5.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_string6, 0, _jsp_string6.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_string6, 0, _jsp_string6.length);
com.redmoon.forum.security.LoginMonitor loginMonitor;
loginMonitor = (com.redmoon.forum.security.LoginMonitor) pageContext.getAttribute("loginMonitor");
if (loginMonitor == null) {
loginMonitor = new com.redmoon.forum.security.LoginMonitor();
pageContext.setAttribute("loginMonitor", loginMonitor);
}
out.write(_jsp_string6, 0, _jsp_string6.length);
boolean isValid = true;
try {
isValid = loginMonitor.canLogin(request);
}
catch (ErrMsgException e)
{
out.print(SkinUtil.makeErrMsg(request, e.getMessage()));
return;
}
boolean re = false;
if (isValid) {
String msg = "";
try{
re = privilege.login(request, response);
}
catch(WrongPasswordException e){
msg = e.getMessage();
}
catch (InvalidNameException e) {
msg = e.getMessage();
}
catch (ErrMsgException e) {
msg = e.getMessage();
}
try {
loginMonitor.afterLogin(request, re, true);
}
catch (ErrMsgException e) {
// msg = SkinUtil.makeErrMsg(request, msg + "<BR>" + e.getMessage());
msg += "<BR>" + e.getMessage();
}
if (!msg.equals("")) {
response.sendRedirect("info.jsp?op=login&info=" + StrUtil.UrlEncode(msg));
return;
}
}
out.write(_jsp_string7, 0, _jsp_string7.length);
String hUrl = StrUtil.getUrl(request);
// \u8fdb\u5165info.jsp\u9875\u9762\u65f6\u4e0d\u68c0\u6d4b\u5237\u65b0
if (hUrl.indexOf("/info.jsp")==-1) {
if (!ActionMonitor.canVisit(request, response)) {
String fastStr = SkinUtil.LoadString(request, "res.label.forum.inc.header", "visit_too_fast");
fastStr = StrUtil.format(fastStr, new Object[] {new Integer(com.redmoon.forum.Config.getInstance().getVisitInterval()/1000)});
out.print(SkinUtil.makeErrMsg(request, fastStr));
return;
}
}
if (ForumDb.getInstance().getStatus()==ForumDb.STATUS_STOP) {
// \u9632\u6b62\u8fdb\u5165info.jsp\u9875\u9762\u65f6\u53cd\u590dredirect
if (hUrl.indexOf("/info.jsp")==-1) {
response.sendRedirect(request.getContextPath() + "/info.jsp?info=" + cn.js.fan.util.StrUtil.UrlEncode(ForumDb.getInstance().getReason()));
return;
}
}
if (!com.redmoon.forum.Privilege.isUserLogin(request)) {
// \u9632\u6b62\u8fdb\u5165info.jsp\u9875\u9762\u65f6\u53cd\u590dredirect
if (hUrl.indexOf("/info.jsp")==-1) {
if (!ForumDb.getInstance().canGuestEnterIntoForum()) {
response.sendRedirect(request.getContextPath() + "/info.jsp?op=login&info=" + StrUtil.UrlEncode(SkinUtil.LoadString(request, "info_please_login")));
return;
}
}
}
out.write(_jsp_string8, 0, _jsp_string8.length);
out.print((request.getContextPath()));
out.write(_jsp_string9, 0, _jsp_string9.length);
com.redmoon.forum.security.IPMonitor ipm = new com.redmoon.forum.security.IPMonitor();
String rootpath = request.getContextPath(); // \u5f53\u8fd0\u7528\u4e8ehopenWin\u4e2d\u65f6\uff0crootpath\u4f1a\u4e3a\u7a7a\u5b57\u7b26\u4e32
if (!ipm.isIPCanVisit(request.getRemoteAddr())) {
// \u9632\u6b62\u8fdb\u5165info.jsp\u9875\u9762\u65f6\u53cd\u590dredirect
if (hUrl.indexOf("/info.jsp")==-1) {
response.sendRedirect(rootpath + "/info.jsp?info=" + StrUtil.UrlEncode(SkinUtil.LoadString(request, "res.label.forum.inc.header", "ipvisitlist")));
return;
}
}
TimeConfig tc = new TimeConfig();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -