admin_login_che.asp
来自「一个用ASP和ACCESS做的网络建站系统 1.WAP站长论坛网站系统【测试版」· ASP 代码 · 共 43 行
ASP
43 行
<!--#include file=conn.asp-->
<!--#include file=md5.asp-->
<%
Dim admin,password,verifycode
admin=utf8(Request.form("admin"))
password=md5(utf8(Request.form("password")))
verifycode=replace(trim(Request("verifycode")),"'","")
if verifycode=Session("GetCode") then
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("adminname")=admin
Session("adminpassword")=password
Session("flag")=rs("flag")
rs.Close
Set rs = Nothing
response.Redirect "admin_index.asp"
else
rs.Close
Set rs = Nothing
response.redirect "admin_login.asp"
end if
else
response.redirect "admin_login.asp"
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 + -
显示快捷键?