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

📄 chklogin.asp

📁 在线点播系统
💻 ASP
字号:
<!--#include file="../inc/function.asp"-->
<!--#include file="../inc/conn.asp"-->
<%
if request.cookies("username")="" or request.cookies("password")="" then
	response.cookies("username")=""
	response.cookies("password")=""
	response.write"<script language=javascript>alert('身份验证失败,请重新登陆');location.href = 'login.asp';</script>"
	response.end
else
	if myobj.ChkID(request.cookies("username"))=false then
		response.cookies("username")=""
		response.cookies("password")=""
		response.write"<script language=javascript>alert('参数值格式错误,请重新登陆');location.href = 'login.asp';</script>"
		response.end
	end if
	set rs=server.createobject("adodb.recordset")
	rs.open "select * from agents where agent_id='"&request.cookies("username")&"'",conn,1,1
	if rs.eof then
		rs.close
		set rs=nothing
		conn.close
		set conn=nothing
		response.cookies("username")=""
		response.cookies("password")=""
		response.write"<script language=javascript>alert('身份验证失败,请重新登陆');location.href = 'login.asp';</script>"
		response.end
	else
		if request.cookies("password")<>rs("agent_pwd") then
			rs.close
			set rs=nothing
			conn.close
			set conn=nothing
			response.cookies("username")=""
			response.cookies("password")=""
			response.write"<script language=javascript>alert('身份验证失败,请重新登陆');location.href = 'login.asp';</script>"
			response.end
		end if
	end if
end if
%>

⌨️ 快捷键说明

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