55 lines
1.9 KiB
Plaintext
55 lines
1.9 KiB
Plaintext
|
<%@ page language="java" contentType="text/html; charset=GB18030"
|
|||
|
pageEncoding="GB18030" import="java.sql.*"%>
|
|||
|
|
|||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|||
|
<jsp:useBean id="guanli" class="com.DB" scope="page" />
|
|||
|
<html>
|
|||
|
<head>
|
|||
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
|||
|
<title>Insert title here</title>
|
|||
|
</head>
|
|||
|
<body>
|
|||
|
<%
|
|||
|
|
|||
|
String username=new String(request.getParameter("username").getBytes("ISO-8859-1"),"GB18030");
|
|||
|
String password=new String(request.getParameter("password").getBytes("ISO-8859-1"),"GB18030");
|
|||
|
String quanxian=new String(request.getParameter("quanxian").getBytes("ISO-8859-1"),"GB18030");
|
|||
|
Connection con=guanli.getCon();
|
|||
|
|
|||
|
if(quanxian.equals("<22><><EFBFBD><EFBFBD>Ա")){
|
|||
|
|
|||
|
String sql="select * from login where username='"+username+"' and password='"+password+"'";
|
|||
|
ResultSet rs=guanli.GetRs(sql);
|
|||
|
if(rs.next()){
|
|||
|
//session.setAttribute("jibie",""+quanxian+"");
|
|||
|
session.setAttribute("guanliyuan",""+username+"");
|
|||
|
out.println("<script lanage='javascript'>alert('<27><>¼<EFBFBD>ɹ<EFBFBD>');window.location.href='admin/index.jsp';</script>");
|
|||
|
}
|
|||
|
else{
|
|||
|
out.println("<script lanage='javascript'>alert('<27><>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');javascript:history.go(-1);</script>");
|
|||
|
}
|
|||
|
guanli.closed();
|
|||
|
}
|
|||
|
|
|||
|
if(quanxian.equals("<22>û<EFBFBD>")){
|
|||
|
|
|||
|
String sql="select * from reg where username='"+username+"' and password='"+password+"'";
|
|||
|
ResultSet rs=guanli.GetRs(sql);
|
|||
|
if(rs.next()){
|
|||
|
|
|||
|
//session.setAttribute("bianhao",""+rs.getString("bianhao")+"");
|
|||
|
session.setAttribute("ck",""+username+"");
|
|||
|
out.println("<script lanage='javascript'>alert('<27><>¼<EFBFBD>ɹ<EFBFBD>');window.location.href='huiyuan/h_index.jsp';</script>");
|
|||
|
}
|
|||
|
else{
|
|||
|
out.println("<script lanage='javascript'>alert('<27><>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');javascript:history.go(-1);</script>");
|
|||
|
}
|
|||
|
guanli.closed();
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
%>
|
|||
|
</body>
|
|||
|
</html>
|