⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 check.asp

📁 我的课程设计
💻 ASP
字号:
<% response.buffer=true%>
<!-- #include file="conn.asp" -->
<%
 
    Dim cn,userright,strSQL,rs,password
    If Request("userright")="user" then
   	 cn=request.Form("user")
	 password=request.form("password")
	 set rs=server.createobject("adodb.recordset")
     strSQL="select * from  borrowers where cardno='"&cn&"'"
     rs.open strSQL,db,1,1
     if not rs.eof then
     if  rs("psw")=password and rs("cardno")=cn then
	 session("username")=rs("name")
	 session("cardnumber")=request.Form("user")
	 response.Redirect("default.asp")
	  else 
	      response.Redirect("index.asp")	  
	  end if
	  end if  
      end if
	   
	  If Request("userright")="admin" then 
	  usern=request.Form("user")
	  password=request.form("password")
	  set rs1=server.createobject("adodb.recordset")
      strSQL1="select * from  admin where admin='"&usern&"'"
      rs1.open strSQL1,db,1,1
	  if not rs1.eof then
      if  rs1("psw")=password and rs1("admin")=usern then
	  session("username")=rs1("admin")
	  response.Redirect("admin_default.asp")
	  else 
	      response.Redirect("index.asp")	  
	   end if
	   end if  
	   end if
	   
%>

⌨️ 快捷键说明

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