📄 chkadmin.asp
字号:
<!--#include file="../include/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")),"'",""))
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
end if
set rs=server.createobject("adodb.recordset")
sql="select * from "&WebSqlType&"_admin where "&WebSqlType&"_password='"&password&"' and "&WebSqlType&"_nick='"&nick&"'"
rs.open sql,conn,1,1
if not(rs.bof and rs.eof) then
if password=rs(""&WebSqlType&"_password") then
session("admin")=rs(""&WebSqlType&"_nick")
session("adminflag")=rs(""&WebSqlType&"_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 + -