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

📄 logout.asp

📁 很好的一个论坛原代码
💻 ASP
字号:
<%response.buffer = true%>
<!--#INCLUDE FILE="inc/db_inc.asp"-->
<!--#INCLUDE FILE="inc/char_inc.asp"-->
<!--#INCLUDE FILE="header.asp"-->
<%
dim StrSql, toptext, rs, StrHtml

StrHtml = loadtemplate("htmltop")
StrHtml = Replace(StrHtml, "{pagetitle}", loadtemplate("logouttitle"))
StrHtml = Replace(StrHtml, "{forumtitle}", boardtitle)
response.write StrHtml
StrHtml = loadtemplate("pagetitle")
if request.cookies("sf")("username") = "" then
	toptext = loadtemplate("toptextguest")
else
	toptext = loadtemplate("toptextuser")

	StrSql = "select userid from sf_user where username = '" & request.cookies("sf")("username") & "'"
	Set rs2 = Conn.Execute(StrSql)
	userid = rs2("userid")
	Conn.Execute("delete from sf_guestonline where userid = "& userid &"")
end if

toptext = toptext & loadtemplate("toptext")
StrHtml = Replace(StrHtml, "{top_text}", toptext)
StrHtml = Replace(StrHtml, "{username}", request.cookies("sf")("username"))
response.write StrHtml

' 论坛关闭
StrSql = "select * from sf_setup"
Set rs2 = Conn.Execute(StrSql)
if rs2("forumclose") = 1 then
StrHtml = loadtemplate("error")
StrHtml = Replace(StrHtml, "{error_text}", rs2("forumclosehint"))
response.write StrHtml
response.end
end if	

' 禁止IP访问
if rs2("killip") = 1 then
	userip = cstr(request.ServerVariables("REMOTE_ADDR"))
	killiplist = rs2("killiplist")
	if killiplist <> "" and userip <> "" then
		killip = split(killiplist, "|")
		struserip = split(userip, ".")
		i = 0
		do until i > ubound(killip)
			strkillip = split(killip(i), ".")
			bolkill = true
			if (struserip(0) <> strkillip(0)) and (strkillip(0) <> "*") then bolkill = false
			if (struserip(1) <> strkillip(1)) and (strkillip(1) <> "*") then bolkill = false
			if (struserip(2) <> strkillip(2)) and (strkillip(2) <> "*") then bolkill = false
			if (struserip(3) <> strkillip(3)) and (strkillip(3) <> "*") then bolkill = false
			if bolkill then
				StrHtml = loadtemplate("error")
				StrHtml = Replace(StrHtml, "{error_text}", rs2("killiphint"))
				response.write StrHtml
				Response.End
			end if
			i = i + 1
		loop
	end if
end if

response.cookies("sf")("username")= ""
response.cookies("sf")("password")= ""
response.cookies("sf")("userid")= ""
response.cookies("sf")("pmpop")= ""
response.cookies("sf").expires = dateadd("d", -1, date())
StrHtml = loadtemplate("hint")
StrHtml = Replace(StrHtml, "{hint_text}", loadtemplate("hint_logout"))
StrHtml = Replace(StrHtml, "{pro_name}", "index.asp")
response.write StrHtml

response.write loadtemplate("htmlbottom")
response.end
Conn.Close
Set Conn = nothing
%>

⌨️ 快捷键说明

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