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

📄 logincheck.asp

📁 简单的客户信息数据查询
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
 strusn=Trim(Request.QueryString("usn"))
 strpwd=Trim(Request.QueryString("pwd"))
 isadmin=Trim(Request.QueryString("isadmin"))
 if strusn<>"" and strpwd<>"" then
	' Response.Write isadmin
	if isadmin<>"" and isadmin="DBMS" then
		strSQL="Select * from AdminLogin Where usn='" & Trim(strusn) & "' and pwd='" & Trim(strpwd) & "'"
		set rs=Server.CreateObject("ADODB.RECORDSET")
		rs.Open strSQL,con,1,3
		Response.Write strSQL
			if rs.RecordCount>0 then
			Session("usn")=strusn
			Session("pwd")=strpwd
			Session("isAdmin")="T"
			response.Redirect "main.asp"
			else
			Response.Redirect "error.asp?info=不存在该用户信息"
			end if
	else
	    if  isadmin="" or isadmin<>"DBMS" then
			strSQL="Select * from UserLogin Where usn='" & Trim(strusn) & "' and pwd='" & Trim(strpwd) & "'"
			set rs=Server.CreateObject("ADODB.RECORDSET")
			rs.Open strSQL,con,1,3
			Response.Write strSQL
				if rs.RecordCount>0 then
				Session("usn")=strusn
				Session("pwd")=strpwd
				Session("isAdmin")="F"
				response.Redirect "main.asp"
				else
				Response.Redirect "error.asp?info=不存在该用户信息"
				end if
		end if
	end if
	'Response.Write strSQL
 else
  Response.Redirect "error.asp?info=没有填写用户名或密码!"
 end if
%>

⌨️ 快捷键说明

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