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

📄 header.asp

📁 苹果风格的论坛 asp编写
💻 ASP
字号:
<!--#INCLUDE FILE="inc/fun_inc.asp"-->
<%
dim ip, strip, killip, i
dim Conn, boardtitle, styleid, msgmax, favmax, uploadfilesizemax, welcomehint, defreplyshowpost, forumrow, postrow, hothit, hotreply, postmaxlength, onlinetime

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open StrConn

Set rs = Conn.Execute("select top 1 * from sf_setup")
if rs.bof or rs.eof then
	response.write "sf cannot be initialized. (001)"
	response.end
else
	if rs("forumclose") = 1 then
		showmsgbox(rs("forumclosehint"))
		response.end
	end if
end if

if rs("killip") = 1 then
	userip = cstr(request.ServerVariables("REMOTE_ADDR"))
	killiplist = rs("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
				showmsgbox(rs("killiphint"))
				Response.End
			end if
			i = i + 1
		loop
	end if
end if

boardtitle = rs("boardtitle")
boardurl = rs("boardurl")
badwordlist = rs("badwordlist")
welcomehint = rs("welcomehint")
reghint = rs("reghint")
defshowdays = rs("defshowdays")
regtime = rs("regtime")
posttime = rs("posttime")
msgmax = rs("msgmax")
favmax = rs("favmax")
uploadfilesizemax = rs("uploadfilesizemax")
defreplyshowpost = rs("defreplyshowpost")
forumrow = rs("forumrow")
postrow = rs("postrow")
hothit = rs("hothit")
hotreply = rs("hotreply")
postmaxlength = rs("postmaxlength")
onlinetime = rs("onlinetime")
allowtrashbox = rs("allowtrashbox")
styleid = rs("styleid")
allowsendemail = rs("allowsendemail")
ratingthread = rs("ratingthread")
ratingreply = rs("ratingreply")
ratingbest = rs("ratingbest")
ratingdel = rs("ratingdel")

i = 0
newmsgnum = 0
pmpopwin = ""
if IsNumeric(ChkSql(request.cookies("sf")("userid"))) then
	i = cint(request.cookies("sf")("userid"))
	Set rs = Conn.Execute("select count(privatemessageid) as newmsgnum from sf_privatemessage where folderid = 0 and messageread = 0 and userid = " & i)
	if not (rs.bof or rs.eof) then
		newmsgnum = rs("newmsgnum")
		if newmsgnum > 0 then pmpopwin = "<bgsound src=""sound/sfnewmsg.wav"" loop=""1""><script language=""JavaScript"">window.open('showmessage.asp?action=showinbox', 'sf_pmwin', 'width=420,height=360,resizable=1,scrollbars=yes,menubar=no,status=no')</script>" & chr(10)
	end if
end if

if application("sf_t_styleid") = "" then
	Set rs = Conn.Execute("select * from sf_style where styleid=" & styleid)
	if rs.bof or rs.eof then
		response.write "sf cannot be initialized. (002)"
		response.end
	else
		for each fldName In rs.Fields
			application("sf_t_" & fldName.name) = rs(fldName.name)
		next
		sfcopyright = application("sf_t_copyright")
		sfcopyright = Replace(sfcopyright, "{board_title}", "<a href=""" & boardurl & """>" & boardtitle & "</a>")
		sfcopyright = Replace(sfcopyright, "{powered_by}", "<a href=""http://www.xinboard.net"" target=""_blank"">Powered by SF v2.0</a>")
		application("sf_t_copyright") = sfcopyright
	end if
end if

rs.close
sfcopyright = application("sf_t_copyright")

set rs = nothing
set ip = nothing
set strip = nothing
set killip = nothing
set i = nothing
%>

⌨️ 快捷键说明

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