📄 chkadmin.asp
字号:
<!--#include file="../inc/md5.asp"-->
<%dbdns="../"%>
<!--#include file="../inc/conn.asp"-->
<%
dim sql
dim rs
dim from1
dim sq12
dim sq123
dim nick
dim password
nick=replace(trim(request("nick")),"'","")
password=md5(replace(trim(Request("password")),"'",""))
regjm=replace(trim(Request("regjm")),"'","")
regjm1=replace(trim(Request("regjm1")),"'","")
if nick="" then
response.write "<script>alert('用户登录出错,下面是产生错误的可能原因:\n\n·请输入用户名');history.go(-1);</Script>"
Response.End
elseif password="" then
response.write "<script>alert('用户登录出错,下面是产生错误的可能原因:\n\n·请输入用户密码');history.go(-1);</Script>"
Response.End
elseif regjm1="" then
response.write "<script>alert('用户登录出错,下面是产生错误的可能原因:\n\n·请输入认证码');history.go(-1);</Script>"
Response.End
elseif regjm<>regjm1 then
response.write "<script>alert('用户登录出错,下面是产生错误的可能原因:\n\n·认证码输入错误');history.go(-1);</Script>"
Response.End
end if
'--------------------企业过期数据检查------------------------
set rs=server.createobject("adodb.recordset")
sql="select * from SMT_yp"
rs.open sql,conn,1,3
do while not rs.eof
if cdate(year(rs("SMT_ktdate"))&"-"&month(rs("SMT_ktdate"))&"-"&day(rs("SMT_ktdate")))<=date() then
rs("SMT_key")=2
else
if rs("SMT_key")=2 then
rs("SMT_key")=1
end if
end if
rs.update
rs.movenext
loop
rs.close
set rs=nothing
'--------------------------------------------
set rs=server.createobject("adodb.recordset")
sql="select * from SMT_admin where SMT_password='"&password&"' and SMT_nick='"&nick&"'"
rs.open sql,conn,1,1
if not(rs.bof and rs.eof) then
if password=rs("SMT_password") then
session("admin")=rs("SMT_nick")
session("adminflag")=rs("SMT_flag")
response.write"<script>window.open('manage.asp','_parent')</script>"
else
call Error
end if
else
call Error()
end if
sub Error()
response.write "<script>alert('用户登录出错,下面是产生错误的可能原因:\n\n·用户名或密码错误');history.go(-1);</Script>"
Response.End
end sub
rs.close
conn.close
set rs=nothing
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -