www.gusucode.com > 盐城分类信息网asp源码程序 > admin/admin_chk.asp

    <%
sub CloseConn()
	conn.close
	set conn=nothing
end sub

ComeUrl=lcase(trim(request.ServerVariables("HTTP_REFERER")))
if ComeUrl="" then
Response.Redirect "admin_login.asp"
	response.end
else
	cUrl=trim("http://" & Request.ServerVariables("SERVER_NAME"))
	if mid(ComeUrl,len(cUrl)+1,1)=":" then
		cUrl=cUrl & ":" & Request.ServerVariables("SERVER_PORT")
	end if
	cUrl=lcase(cUrl & request.ServerVariables("SCRIPT_NAME"))
	if lcase(left(ComeUrl,instrrev(ComeUrl,"/")))<>lcase(left(cUrl,instrrev(cUrl,"/"))) then
Response.Redirect "admin_login.asp"
		response.end
	end if
end if

AdminName=replace(session("AdminName"),"'","")
if AdminName=Empty then
	call CloseConn()
	response.redirect "Admin_login.asp"


end if


%>