📄 check.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ include file="connection.jsp" %>
<%
ResultSet rsVerify;
String cs_user,cs_password,cs_power,cs_age,cs_findyou,cs_addr,cs_ybno,cs_perno,sqlVerify,username,password,power,age,findyou,addr,ybno,perno;
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<%
cs_user=request.getParameter("cs_user");
cs_password=request.getParameter("cs_password");
sqlVerify="select * from cs_user where username='"+cs_user+"' and password='"+cs_password+"'";
rsVerify=sql.executeQuery(sqlVerify);
if(rsVerify.next())
{
session.setAttribute("cs_user",rsVerify.getString("username"));
session.setAttribute("cs_password",rsVerify.getString("password"));
session.setAttribute("cs_power",rsVerify.getString("power"));
session.setAttribute("cs_age",rsVerify.getString("age"));
session.setAttribute("cs_findyou",rsVerify.getString("findyou"));
session.setAttribute("cs_addr",rsVerify.getString("addr"));
session.setAttribute("cs_ybno",rsVerify.getString("ybno"));
session.setAttribute("cs_perno",rsVerify.getString("perno"));
cs_power=(String)session.getAttribute("cs_power");
if(cs_power.equals("1"))
{
response.sendRedirect("mvp.jsp");
}
else
{
response.sendRedirect("manage.jsp");
}
}
else
{
out.print("用户名或密码错误");
}
%>
<p><a href="index.jsp">返回<<<<<<<</a></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -