📄 admin_logincheck.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ include file="../ch.jsp"%>
<%@ include file="checkadmin.jsp"%>
<jsp:useBean id="logincheck" class="conndb.DbConnBean" scope="request" />
<%
String username=request.getParameter("username");
String password=request.getParameter("password");
if(username==null||username.equals("")||password==null||password.equals(""))
{%>
<script language="javascript">history.back();</script>
<%}else{
String tusername=logincheck.chStr(username);
String tpassword=logincheck.chStr(password);
String sql="select * from admin where username='"+tusername+"' and password='"+tpassword+"'";
int temp=-2;
temp=logincheck.select(sql);
if(temp>0){
session.setAttribute("name",tusername);
response.sendRedirect("admin_index.jsp");
}else{
session.setAttribute("error","请检查你的用户名和密码!");
response.sendRedirect("../errorpage.jsp");
}}
%>
<!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>
检查管理员登录
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -