📄 logincheck.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>
<style type="text/css">
<!--
body {
background-image: url(Picture/index-top_2.gif);
}
a:link {
color: #00FF66;
text-decoration: none;
}
a:visited {
color: #00FF66;
text-decoration: none;
}
a:hover {
color: #FF0000;
text-decoration: none;
}
a:active {
color: #FF0000;
text-decoration: none;
}
.style1 {font-size: 16px}
.style2 {font-size: 16px}
-->
</style></head>
<body> <% String target;
String Manager = request.getParameter("username");
String pwd = request.getParameter("password");
String usr = Manager;
session.setAttribute("Manager",Manager);
Statement sql=null;
Connection con=null;
ResultSet re=null;
try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(ClassNotFoundException e){}
try{ con=DriverManager.getConnection("jdbc:odbc:nbos","","");
sql=con.createStatement();
String condition="select * from Manager where ManagerID='"+usr+"' and Password='"+pwd+"'";
re=sql.executeQuery(condition);
if (re.next()){
response.sendRedirect("Update/updateSet.htm");
}
else{ %>
<span class="style2"><strong>你输入的用户名或密码不正确!请重新输入 </strong><a href="javascript:history.back();" class="style1">返回修改 </a></span>
<% }
re.close(); }
catch(Exception e)
{} %>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -