managerlogin.jsp

来自「本系统应用JSP、flashMX2004软件结合flash communicat」· JSP 代码 · 共 30 行

JSP
30
字号
<%@ page contentType="text/html;charset=gb2312"%>
<%@ include file="top.jsp"%>
<%
String username=request.getParameter("username");
String password=request.getParameter("password");
if(username!=null&&password!=null){
username=new String(username.getBytes("iso-8859-1"));
password=new String(password.getBytes("iso-8859-1"));
%>
<%@ include file="class.jsp"%>
<%
ResultSet rs=stmt.executeQuery("select*from nj where username='"+username+"' and password='"+password+"'");
int exit=0;
while(rs.next()){
    String manager=rs.getString("管理员");
	if(manager.equals("1")){
		exit=1;
		session.setAttribute("njmanager",username);
	}
}
rs.close();
stmt.close();
conn.close();
if(exit==1){
	response.sendRedirect("njlist.jsp");
}else{
	response.sendRedirect("check.htm");
}
}
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?