asp这个语句里如何加个会员等级的判断,pass=0和pass=1
DimoRsLogin,oRsLog,CopyrightDimUserName,UserPass,VerifyCode,System,SqlLog,SqlLogin,Ur...
Dim oRsLogin,oRsLog,Copyright
Dim UserName,UserPass,VerifyCode,System,SqlLog,SqlLogin,Url,strsql
Url = "index.asp"
UserName = Replace(Trim(Request.Form("Name")),"'","''")
UserPass = Replace(Trim(Request.Form("PassWord")),"'","''")
if UserName ="" or UserPass ="" then
response.write ("<script type='text/javascript'>alert(""用户名和密码都是必须的"&Copyright&""");location.href=""Login.asp"";</script>")
response.end
end if
if UserName = Name and UserPass=Pass1 then
LoginFlag = True
else
Set oRsLogin = BuildRecordset("webuser","*","Name='"&UserName&"' And pass1='"&UserPass&"'",1,2)
if oRsLogin.bof and oRsLogin.eof then
response.write ("<script type='text/javascript'>alert(""用户名或密码错误"&Copyright&""");location.href=""Login.asp"";</script>")
response.end
else
LoginFlag = True
end if
end if
if LoginFlag then
session("UserName")=UserName
response.write ("<script type='text/javascript'>alert(""欢迎登录"&Copyright&""");location.href=""a.asp"";</script>")
end if
%> 展开
Dim UserName,UserPass,VerifyCode,System,SqlLog,SqlLogin,Url,strsql
Url = "index.asp"
UserName = Replace(Trim(Request.Form("Name")),"'","''")
UserPass = Replace(Trim(Request.Form("PassWord")),"'","''")
if UserName ="" or UserPass ="" then
response.write ("<script type='text/javascript'>alert(""用户名和密码都是必须的"&Copyright&""");location.href=""Login.asp"";</script>")
response.end
end if
if UserName = Name and UserPass=Pass1 then
LoginFlag = True
else
Set oRsLogin = BuildRecordset("webuser","*","Name='"&UserName&"' And pass1='"&UserPass&"'",1,2)
if oRsLogin.bof and oRsLogin.eof then
response.write ("<script type='text/javascript'>alert(""用户名或密码错误"&Copyright&""");location.href=""Login.asp"";</script>")
response.end
else
LoginFlag = True
end if
end if
if LoginFlag then
session("UserName")=UserName
response.write ("<script type='text/javascript'>alert(""欢迎登录"&Copyright&""");location.href=""a.asp"";</script>")
end if
%> 展开
2个回答
Storm代理
2023-08-29 广告
2023-08-29 广告
"StormProxies是全球大数据IP资源服务商,其住宅代理网络由真实的家庭住宅IP组成,可为企业或个人提供满足各种场景的代理产品。点击免费测试(注册即送1G流量)StormProxies有哪些优势?1、IP+端口提取形式,不限带宽,I...
点击进入详情页
本回答由Storm代理提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询