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

📄 chkuser.asp

📁 BJXSHOP购物管理系统是一个功能完善、展示信息丰富的电子商店销售平台;针对企业与个人的网上销售系统;开放式远程商店管理;完善的订单管理、销售统计、结算系统;强力搜索引擎支持;提供网上多种在线支付方
💻 ASP
字号:
<!--#include file="connection.asp"-->
<!--#include file="admin/md5.asp"-->
<%dim username,userpassword,comeurl
username=replace(trim(request("username")),"'","")
userpassword=md5(replace(trim(request("userpassword")),"'",""))
if trim(request("comeurl"))="" then
comeurl="index.asp"
else
comeurl=trim(request("comeurl"))
end if
if comeurl="book123" then comeurl=Request.ServerVariables("HTTP_REFERER")
if username="" or userpassword="" then
response.Write "<center><a href=myuser.asp?action=login><font color=red size=2>对不起,登陆失败,请检查您的登陆名和密码</font></a></center>"
response.end
end if
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from [shop_users] where username='"&username&"' and userpassword='"&userpassword&"' " ,conn,1,3
if not(rs.bof and rs.eof) then
if userpassword=trim(rs("userpassword")) then
response.Cookies("bookshop")("username")=trim(request("username"))
response.Cookies("bookshop")("grtt")=int(rs("grtt"))
'response.Cookies("bookshop").expires=date+1
rs("lastlogin")=now()
rs("logins")=rs("logins")+1
rs.Update
rs.Close
set rs=nothing
call loginok()
else
response.write "<script LANGUAGE='javascript'>alert('对不起,您的用户名或密码有误!');window.location.reload('javascript:history.go(-1)')</script>"
end if
else
response.write "<script LANGUAGE='javascript'>alert('对不起,您的用户名或密码有误!');window.location.reload('javascript:history.go(-1)')</script>"
end if
sub loginok()
response.Write "<font size=2>欢迎您 <font color=red size=2>"&request.Cookies("bookshop")("username")&"</font>,两秒种后将自动跳转到相应页!</font>"
response.Write "<meta http-equiv=refresh content=2;URL="&comeurl&">"
end sub
%>

</body>
</html>

⌨️ 快捷键说明

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