📄 chkadmin.asp
字号:
<%dbdns="../"%>
<!--#include file="../inc/md5.asp"-->
<!--#include file="../inc/conn.asp"-->
<%
if request("nick")="" then
response.write "<script>alert('用户登录出错,下面是产生错误的可能原因:\n\n·请输入用户名');history.go(-1);</Script>"
Response.End
elseif request("password")="" then
response.write "<script>alert('用户登录出错,下面是产生错误的可能原因:\n\n·请输入用户密码');history.go(-1);</Script>"
Response.End
end if
'-------------------------------------------
nick=replace(trim(request("nick")),"'","")
password=md5(replace(trim(Request("password")),"'",""))
'--------------------------------------------
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")
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 + -