📄 dms_0002fskin_0002fchkuser_0002ejsp_jsp.java
字号:
package DMS.skin;
import com.jestdoc.org.WinUser;
import java.sql.ResultSet;
import com.jestdoc.system.Style;
import java.lang.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
public class DMS_0002fskin_0002fChkUser_0002ejsp_jsp extends HttpJspBase {
// begin [file="/DMS/skin/ChkUser.jsp";from=(5,0);to=(5,75)]
// end
// begin [file="/DMS/skin/ChkUser.jsp";from=(6,0);to=(6,74)]
// end
static {
}
public DMS_0002fskin_0002fChkUser_0002ejsp_jsp( ) {
}
private static boolean _jspx_inited = false;
public final void _jspx_init() throws org.apache.jasper.runtime.JspException {
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
String _value = null;
try {
if (_jspx_inited == false) {
synchronized (this) {
if (_jspx_inited == false) {
_jspx_init();
_jspx_inited = true;
}
}
}
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html;charset=big5");
pageContext = _jspxFactory.getPageContext(this, request, response,
"", true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
// HTML // begin [file="/DMS/skin/ChkUser.jsp";from=(0,48);to=(1,0)]
out.write("\r\n");
// end
// HTML // begin [file="/DMS/skin/ChkUser.jsp";from=(1,45);to=(2,0)]
out.write("\r\n");
// end
// HTML // begin [file="/DMS/skin/ChkUser.jsp";from=(2,38);to=(3,0)]
out.write("\r\n");
// end
// HTML // begin [file="/DMS/skin/ChkUser.jsp";from=(3,44);to=(4,0)]
out.write("\r\n");
// end
// HTML // begin [file="/DMS/skin/ChkUser.jsp";from=(4,31);to=(5,0)]
out.write("\r\n");
// end
// begin [file="/DMS/skin/ChkUser.jsp";from=(5,0);to=(5,75)]
com.jestdoc.inc.ExtendString ExStr = null;
boolean _jspx_specialExStr = false;
synchronized (pageContext) {
ExStr= (com.jestdoc.inc.ExtendString)
pageContext.getAttribute("ExStr",PageContext.PAGE_SCOPE);
if ( ExStr == null ) {
_jspx_specialExStr = true;
try {
ExStr = (com.jestdoc.inc.ExtendString) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "com.jestdoc.inc.ExtendString");
} catch (ClassNotFoundException exc) {
throw new InstantiationException(exc.getMessage());
} catch (Exception exc) {
throw new ServletException (" Cannot create bean of class "+"com.jestdoc.inc.ExtendString", exc);
}
pageContext.setAttribute("ExStr", ExStr, PageContext.PAGE_SCOPE);
}
}
if(_jspx_specialExStr == true) {
// end
// begin [file="/DMS/skin/ChkUser.jsp";from=(5,0);to=(5,75)]
}
// end
// HTML // begin [file="/DMS/skin/ChkUser.jsp";from=(5,75);to=(6,0)]
out.write("\r\n");
// end
// begin [file="/DMS/skin/ChkUser.jsp";from=(6,0);to=(6,74)]
com.jestdoc.system.SysAdmin admin = null;
boolean _jspx_specialadmin = false;
synchronized (pageContext) {
admin= (com.jestdoc.system.SysAdmin)
pageContext.getAttribute("admin",PageContext.PAGE_SCOPE);
if ( admin == null ) {
_jspx_specialadmin = true;
try {
admin = (com.jestdoc.system.SysAdmin) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "com.jestdoc.system.SysAdmin");
} catch (ClassNotFoundException exc) {
throw new InstantiationException(exc.getMessage());
} catch (Exception exc) {
throw new ServletException (" Cannot create bean of class "+"com.jestdoc.system.SysAdmin", exc);
}
pageContext.setAttribute("admin", admin, PageContext.PAGE_SCOPE);
}
}
if(_jspx_specialadmin == true) {
// end
// begin [file="/DMS/skin/ChkUser.jsp";from=(6,0);to=(6,74)]
}
// end
// HTML // begin [file="/DMS/skin/ChkUser.jsp";from=(6,74);to=(7,0)]
out.write("\r\n");
// end
// begin [file="/DMS/skin/ChkUser.jsp";from=(7,2);to=(89,0)]
String UserNO=request.getParameter("UserNO"); //ExStr.nullToSpace(request.getParameter("UserNO"));
String Pwd=ExStr.nullToSpace(request.getParameter("Pwd"));
String errMsg="";
ResultSet rs=null;
String Password="";
WinUser wus=new WinUser();
Style style=new Style();
int uid=-1;
if(UserNO.toLowerCase().equals("sysadmin"))//系統管理員
{
if(!admin.isSysAdmin(UserNO,Pwd))
{
errMsg=admin.getErrorMsg();
}
else
{
if(session.getValue("UserID")!=null)
{
uid=Integer.parseInt((String)session.getValue("UserID"));
}
session.setAttribute("UserNO",UserNO);
session.setAttribute("UserID",admin.getSysAdminID());
session.setAttribute("UserName","系統管理員");
session.setAttribute("DeptName","系統管理");
rs=style.findUserStyleInfo(uid);
if(rs!=null&&rs.next())
{
session.setAttribute("sessStyleDesc",rs.getString("styledesc"));
session.setAttribute("sessStyleID",rs.getString("StyleID"));
}
style.close();
}
}
else//一般人員
{
rs=wus.findUserInfoByUserNo(UserNO);
if(rs==null)
{
errMsg="用戶編號錯誤!" + UserNO;
}
else
{
if(rs.next())
{
Password=ExStr.nullToSpace(rs.getString("Password"));
if(!Password.equals(Pwd))
{
errMsg="用戶密碼錯誤!";
}
else
{
session.setAttribute("UserNO",UserNO);
session.setAttribute("UserID",rs.getString("UserID"));
session.setAttribute("UserName",ExStr.dbDecode(rs.getString("UserName")));
session.setAttribute("DeptID",rs.getString("DeptID"));
session.setAttribute("DeptName",ExStr.dbDecode(rs.getString("DeptName")));
session.setAttribute("RoleID",rs.getString("RoleID"));
session.setAttribute("RoleName",ExStr.dbDecode(rs.getString("RoleName")));
}
}
else
{
errMsg="用戶編號錯誤!" + UserNO;
}
}
wus.close() ;
if(session.getValue("UserID")!=null)
{
uid=Integer.parseInt((String)session.getValue("UserID"));
}
rs=style.findUserStyleInfo(uid);
if(rs!=null&&rs.next())
{
session.setAttribute("sessStyleDesc",rs.getString("styledesc"));
session.setAttribute("sessStyleID",rs.getString("StyleID"));
}
style.close();
}
session.setAttribute("HiddenFrame","HiddenFrame"+(String)session.getValue("UserID")+"_"+String.valueOf(System.currentTimeMillis()));
// end
// HTML // begin [file="/DMS/skin/ChkUser.jsp";from=(89,2);to=(98,8)]
out.write("\r\n\r\n<html>\r\n<HEAD><TITLE>UniFlow系統</TITLE>\r\n<META content=\"Microsoft FrontPage 4.0\" name=GENERATOR>\r\n<META content=\"text/html; charset=big5\" http-equiv=Content-Type>\r\n</HEAD>\r\n<script>\r\nfunction chkErr()\r\n{alert(\"");
// end
// begin [file="/DMS/skin/ChkUser.jsp";from=(98,11);to=(98,42)]
out.print(session.getValue("HiddenFrame"));
// end
// HTML // begin [file="/DMS/skin/ChkUser.jsp";from=(98,44);to=(112,38)]
out.write("\");\r\n\tif(errMsg.value!=\"\")\r\n\t{\r\n\t\talert(errMsg.value)\r\n\t\thistory.back()\r\n\t}\r\n\telse\r\n\t{\r\n\t\tlocation.href=\"index.jsp\";\r\n\t}\r\n\r\n}\r\n</script>\r\n<body onload=chkErr()>\r\n<input type=hidden name=errMsg value=\"");
// end
// begin [file="/DMS/skin/ChkUser.jsp";from=(112,41);to=(112,47)]
out.print(errMsg);
// end
// HTML // begin [file="/DMS/skin/ChkUser.jsp";from=(112,49);to=(115,0)]
out.write("\">\r\n</body>\r\n</HTML>\r\n");
// end
} catch (Throwable t) {
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -