📄 check_in.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>登入错误</title>
</head>
<body>
<%@ include file="/commond/conn.jsp"%>
<div align="center">
<p>
<%if(session.isNew()){response.sendRedirect("index.jsp");}%>
<%
String topage=null,logname=null,logpwd=null,type=null;
int all=0;
logname=request.getParameter("logname");
if(logname==null){logname="";}
logpwd=request.getParameter("logpwd");
if(logpwd==null){logpwd="";}
type=request.getParameter("type");
if(type==null){type="";}
if(logname.equals("") && logpwd.equals(""))
{ out.print("请输入用户和密码");
}
else
{ if(logname.equals("")){out.print("请输入用户");}
if(logpwd.equals("")){out.print("请输入密码");}
}
if(!logpwd.equals("") && !logname.equals(""))
{ if(type.equals("super"))
{ String condition="select * from SUPER_MANAGER where ID="+"'"+logname+"' and PWD="+"'"+logpwd+"'";
rs=sql.executeQuery(condition);
while(rs.next())
{all++;}
if(all==1)
{ con.close();
String meb=response.encodeURL("index/supermanager_index.jsp");
String rs_type="super";
String rs_name=logname;
session.setAttribute("page_type",rs_type);
session.setAttribute("page_name",rs_name);
response.sendRedirect(meb);
}
if(all>1)
{ out.print("出现用户重复情况请与网站开发商联系");
}
if(all==0){out.print("超级管理员登入错误!请检查账号和密码!如有疑问请与网站开发商联系");}
}
if(all==0)
{ if(type.equals("rs"))
{ String condition="select * from MANAGER where ID="+"'"+logname+"'";
rs=sql.executeQuery(condition);
String rs_pwd=null,rs_type=null;
while(rs.next())
{all++;
rs_pwd=rs.getString("PWD");rs_type=rs.getString("TYPE");
}
if(all==0)
{ out.print("无此人事管理用户");}
else
{ if(all==1)
{ if(!rs_pwd.equals(logpwd)){out.print("密码错误");}
if(!(rs_type.equals("rs") || rs_type.equals("srs")))
{out.print("输入用户的权限与所选模式不符");}
if(rs_pwd.equals(logpwd) && (rs_type.equals("rs") || rs_type.equals("srs")))
{ con.close();
String meb=response.encodeURL("index/rs_index.jsp");
String rs_name=logname;
session.setAttribute("page_type",rs_type);
session.setAttribute("page_name",rs_name);
response.sendRedirect(meb);
}
}
if(all>1)
{ out.print("出现人事管理用户重复情况请与网站开发商联系");}
}
}
if(type.equals("cw"))
{ String condition="select * from MANAGER where ID="+"'"+logname+"'";
rs=sql.executeQuery(condition);
String rs_pwd=null,rs_type=null;
while(rs.next())
{all++;
rs_pwd=rs.getString("PWD");rs_type=rs.getString("TYPE");
}
if(all==0)
{ out.print("无此工资管理用户");}
else
{ if(all==1)
{ if(!rs_pwd.equals(logpwd)){out.print("密码错误");}
if(!rs_type.equals("sgz"))
{out.print("输入用户的权限与所选模式不符");}
if(rs_pwd.equals(logpwd) && rs_type.equals("sgz"))
{ con.close();
String meb=response.encodeURL("index/gz_index.jsp");
String rs_name=logname;
session.setAttribute("page_type",rs_type);
session.setAttribute("page_name",rs_name);
response.sendRedirect(meb);
}
}
if(all>1)
{ out.print("出现用户重复情况请与网站开发商联系");}
}
}
}
}
if(type.equals("") && all==0){out.print("<br>请选择登入模式");}
%>
</p>
<p><a href="index.jsp">点击这里返回登入页面</a> </p>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -