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

📄 chkadmin.asp

📁 针对网上商城批发零售销售特点开发的综合商城系统,既适合商城零售VIP会员特点,又适合批发商城批发商等级价格体系,同时三种价格体系能更精确调整价格和优惠价格定义
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="func.asp"-->
<%dim admin,UserPassword,passcode
admin=FormatSQL(replace(trim(request.form("admin")),"'",""))
UserPassword=md5(FormatSQL(replace(trim(request.Form("UserPassword")),"'","")))
if admin="" or UserPassword="" then
response.Write "<script LANGUAGE='javascript'>alert('登录失败!请检查您的登录名和密码!');history.go(-1);</script>"
conn.Close
set conn=nothing
response.end
end if
if not isnumeric(request.form("passcode")) then
response.Write "<script LANGUAGE='javascript'>alert('登录失败!验证码必须是数字,请正确填写!');history.go(-1);</script>"
conn.Close
set conn=nothing
response.end
end if
passcode=Cint(request.form("passcode"))
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from [admin] where UserPassword='"&UserPassword&"' and admin='"&admin&"' " ,conn,1,1
if rs.bof and rs.eof then
response.write "<script LANGUAGE='javascript'>alert('你的用户名或者密码错误,登录失败!');history.go(-1);</script>"
rs.Close
set rs=nothing
conn.Close
set conn=nothing
response.end
else
if passcode<>Session("GetCode") then
response.Write "<script LANGUAGE='javascript'>alert('登录失败!验证码错误!');history.go(-1);</script>"
rs.Close
set rs=nothing
conn.Close
set conn=nothing
response.end
end if
if UserPassword=rs("UserPassword") and admin=rs("admin") then
session("admin")=trim(rs("admin"))
session("rank")=int(rs("rank"))
session.Timeout=20
response.Cookies("sundxshop")("admin")=trim(request.form("admin"))
rs.Close
set rs=nothing
conn.Close
set conn=nothing
response.Redirect "index.asp"
else
response.write "<script LANGUAGE='javascript'>alert('你的密码错误,登录失败!');history.go(-1);</script>"
rs.Close
set rs=nothing
conn.Close
set conn=nothing
end if
end if
%>

⌨️ 快捷键说明

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