登录修改
This commit is contained in:
parent
8483e40c8e
commit
1141f328e1
@ -1,18 +1,21 @@
|
||||
<%@page import="com.amarsoft.dict.als.manage.NameManager"%>
|
||||
<%@page import="com.amarsoft.are.util.SpecialTools"%>
|
||||
<%@page contentType="text/html; charset=GBK" session="false"%>
|
||||
<%@page import="com.amarsoft.are.util.*"%>
|
||||
<%@page import="com.amarsoft.awe.util.*"%>
|
||||
<%@page import="com.amarsoft.context.*"%>
|
||||
<%@page import="com.amarsoft.web.*"%>
|
||||
<%@page import="com.amarsoft.web.dw.*"%>
|
||||
<%@page import="java.util.*"%>
|
||||
<%@page import="com.amarsoft.awe.*"%><%@
|
||||
page import="com.amarsoft.awe.control.SessionListener"%><%@
|
||||
page import="com.amarsoft.awe.control.model.*"%><%@
|
||||
page import="com.amarsoft.awe.util.*"%><%@
|
||||
page import="com.amarsoft.awe.Configure"%><%@
|
||||
page import="com.amarsoft.awe.security.*"%><%@
|
||||
page import="com.amarsoft.awe.security.pwdrule.*"%><%!
|
||||
<%@page import="com.amarsoft.are.util.StringFunction"%>
|
||||
<%@page import="com.amarsoft.awe.Configure"%>
|
||||
<%@page import="com.amarsoft.awe.RuntimeContext"%>
|
||||
<%@page import="com.amarsoft.awe.control.SessionListener"%>
|
||||
<%@page import="com.amarsoft.awe.control.model.ComponentSession"%>
|
||||
<%@page import="com.amarsoft.awe.security.*"%>
|
||||
<%@page import="com.amarsoft.awe.security.pwdrule.ALSPWDRules"%><%@
|
||||
page import="com.amarsoft.awe.security.pwdrule.IsPasswordOverdueRule"%><%@
|
||||
page import="com.amarsoft.awe.security.pwdrule.PasswordRuleManager"%><%@
|
||||
page import="com.amarsoft.awe.util.ASResultSet"%><%@
|
||||
page import="com.amarsoft.awe.util.SqlObject"%><%@
|
||||
page import="com.amarsoft.awe.util.Transaction"%><%@
|
||||
page import="com.amarsoft.context.ASPreference"%>
|
||||
<%@ page import="com.amarsoft.context.ASUser" %>
|
||||
<%@ page import="com.amarsoft.dict.als.manage.NameManager" %>
|
||||
<%!
|
||||
//检验验证码
|
||||
public boolean vaildCheckCode(HttpServletRequest request, HttpSession session) {
|
||||
String sCheckCode = request.getParameter("CheckCode");
|
||||
@ -179,6 +182,7 @@ public boolean validUserPassword(HttpServletRequest request, Transaction Sqlca,S
|
||||
so.setOriginalSql(so.getOriginalSql().replaceAll("△", ":"));
|
||||
so.setRunSql(so.getRunSql().replaceAll("△", ":"));
|
||||
Sqlca.executeSQL(so);
|
||||
Sqlca.commit();
|
||||
}
|
||||
|
||||
//设置运行上下文参数 CurARC 在IncludeBegin.jsp中使用
|
||||
@ -194,26 +198,26 @@ public boolean validUserPassword(HttpServletRequest request, Transaction Sqlca,S
|
||||
//用户登陆成功,记录登陆信息
|
||||
SessionListener sessionListener=new SessionListener(request,session,CurUser,CurConfig.getConfigure("DataSource"));
|
||||
session.setAttribute("listener",sessionListener);
|
||||
%><script type="text/javascript">
|
||||
<%
|
||||
String sPWDState = new UserMarkInfo(Sqlca,CurUser.getUserID()).getPasswordState();
|
||||
if(true && // 开发模式不做首次登录/密码过期校验
|
||||
(sPWDState.equals(String.valueOf(SecurityAuditConstants.CODE_USER_FIRST_LOGON)) || sPWDState.equals(String.valueOf(SecurityAuditConstants.CODE_PWD_OVERDUE)))){
|
||||
%>
|
||||
window.open("<%=CurConfig.getContextPath() %>/Redirector?ComponentURL=/AppMain/ModifyPassword.jsp","_top");
|
||||
<%
|
||||
}else{
|
||||
String mainPath=getCurUseMainPath(sUserID,Sqlca);
|
||||
%>
|
||||
window.open("<%=CurConfig.getContextPath() %>/Redirector?ComponentURL=<%=mainPath%>","_top");
|
||||
<%
|
||||
}
|
||||
%></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
<%
|
||||
String sPWDState = new UserMarkInfo(Sqlca,CurUser.getUserID()).getPasswordState();
|
||||
// 开发模式不做首次登录/密码过期校验
|
||||
if(sPWDState.equals(String.valueOf(SecurityAuditConstants.CODE_USER_FIRST_LOGON)) || sPWDState.equals(String.valueOf(SecurityAuditConstants.CODE_PWD_OVERDUE))){
|
||||
%>
|
||||
window.open("<%=CurConfig.getContextPath() %>/Redirector?ComponentURL=/AppMain/ModifyPassword.jsp", "_top");
|
||||
<%
|
||||
}else{ String mainPath=getCurUseMainPath(sUserID,Sqlca);
|
||||
%>
|
||||
window.open("<%=CurConfig.getContextPath() %>/Redirector?ComponentURL=<%=mainPath%>", "_top");
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
</script>
|
||||
<%
|
||||
} catch (Exception e) {
|
||||
//e.printStackTrace();
|
||||
//e.fillInStackTrace();
|
||||
//e.printStackTrace(new java.io.PrintWriter(System.out));
|
||||
%>
|
||||
<script type="text/javascript">
|
||||
//alert("登录失败,请检查用户名和密码是否输入正确!\n如果您忘记了密码,请与系统管理员联系,恢复初始密码。");
|
||||
@ -229,7 +233,6 @@ public boolean validUserPassword(HttpServletRequest request, Transaction Sqlca,S
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
return;
|
||||
} finally {
|
||||
if(Sqlca!=null) {
|
||||
//断掉当前数据连接
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user