⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 check_userlogin.asp

📁 好用的管理,代码程序 好用的管理,代码程序
💻 ASP
字号:
<!--#include file="conn.asp" -->
<!--#include file="inc/Md5.asp"-->
<%
If Request.QueryString("action")="login" then
dim sql,mRs,username,password
username=replace(trim(request("username")),"'","")
password=replace(trim(Request("password")),"'","")
If username="" then
	FoundErr=True
	Response.Redirect "user_login.asp"
	Response.End
End If
If password="" then
	FoundErr=True
	Response.Redirect "user_login.asp"
	Response.End
End If
If FoundErr<>True then
	password=Md5(password)
	set mRs=server.createobject("adodb.recordset")
	sql="select * from A_admin where username='"&username&"'and password='"&password&"'"
	mRs.open sql,conn,1,1
	If not(mRs.eof and mRs.bof) then
		session("username")=mRs("username")
		session("edip")=("username")
        response.cookies("yhmc")=mRs("username")
		response.Redirect"index.asp"
	else
        response.cookies("yhmc")=""
		Response.Write "<script>alert('帐号或密码错误!');this.location.href='user_login.asp';</SCRIPT>"
	End If
	End If
End If
%>
<%
'退出
If Request.QueryString("action")="Quit" then
	session("username")=""
	session("edip")=""
    response.cookies("yhmc")=""
	Response.Write "<script>alert('已安全退出!');this.location.href='user_login.asp';</SCRIPT>"
End If
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -