WebRoot/adminyanzheng.jsp

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<%@ page language="java"  pageEncoding="gb2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ page language="java" import="java.sql.*" %>
<jsp:useBean id="connDbBean" scope="page" class="db.db"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'adminyanzheng.jsp' starting page</title>
    

  </head>
  
  <body>
  <%
 
 String uid=request.getParameter("username");
 String pwd=request.getParameter("pwd");
 String cx=new String(request.getParameter("cx").getBytes("8859_1"));
 String sql="";
 if(cx.equals("教师"))
 {
 	sql="select * from jiaoshixinxi where gonghao='"+uid+"' and mima='"+pwd+"'";
 }
  if(cx.equals("学生"))
 {
 	sql="select * from yonghuzhuce where yonghuming='"+uid+"' and mima='"+pwd+"'";
 }
 if(cx.equals("管理员"))
 {
 	sql="select * from allusers where username='"+uid+"' and pwd='"+pwd+"'";
 }
 ResultSet RS_result=connDbBean.executeQuery(sql);
 if(!RS_result.next())
{
	out.print("<script>alert('你输入的用户不存在或密码错误,请重新登录!');window.history.go(-1);</script>");
	}
else{
	
  	  session.setAttribute("username",uid);
	if(cx.equals("管理员"))
 	{
	session.setAttribute("cx",RS_result.getString("cx"));
  	 
  	  }
	  else
	  {
	  	 session.setAttribute("cx",cx);
	  }
	 response.sendRedirect("main.jsp");	 
	} 
RS_result.close();

 %>
  </body>
</html>
后面还有 1 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。