admin_login_check.asp
来自「一个用ASP和ACCESS做的网络建站系统 1.WAP站长论坛网站系统【测试版」· ASP 代码 · 共 35 行
ASP
35 行
<!--#include file=conn.asp-->
<!--#include file=md5.asp-->
<%
Dim admin,password,sql
admin=utf8(session("adminname"))
password=utf8(Session("adminpassword"))
Set Rs = Server.CreateObject("Adodb.Recordset")
Sql = "SELECT * FROM admin WHERE username='" &admin&"' and password='" &password &"'"
Rs.Open Sql,conn,1,1
if not (rs.bof and rs.eof) then
session("flag")=rs("flag")
session("adminname")=rs("username")
Session("adminpassword")=rs("password")
else
Response.write "<script>top.location.href='admin_login.asp';</script>"
Response.End
end if
function utf8(str)
if str="" or isnull(str) then
tohtm=str
exit function
end if
utf8 = replace(str,"&","&")
utf8 = replace(utf8,"",""")
utf8 = replace(utf8,"<","<")
utf8 = replace(utf8,">",">")
utf8 = replace(utf8," "," ")
utf8 = replace(utf8,"$","$$")
utf8 = replace(utf8,"'","")
utf8 = replace(utf8,vbnewline,"<br/>")
utf8 = replace(utf8,chr(34),"")
utf8 = replace(utf8,chr(39),"")
end function%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?