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

📄 header.asp

📁 很好的一个论坛原代码
💻 ASP
字号:
<%
function loadtemplate(templatename)
	loadtemplate = application("sf_t_" & templatename)
end function

dim i
dim Conn, boardtitle, styleid, msgmax, uploadfilesizemax, 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
end if

boardtitle = rs("boardtitle")
boardurl = rs("boardurl")
badwordlist = rs("badwordlist")
reghint = rs("reghint")
defshowdays = rs("defshowdays")
regtime = rs("regtime")
posttime = rs("posttime")
msgmax = rs("msgmax")
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")
ratingthread = rs("ratingthread")
ratingreply = rs("ratingreply")
ratingbest = rs("ratingbest")
ratingdel = rs("ratingdel")

i = 0
newmsgnum = 0
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 newmsg = "<bgsound src=""image/sound/newmsg.wav"" loop=""-1"">" & 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, "{processed_time}", "Processed time: 0" & FormatNumber((timer() - t1) , 3) & " s")
		application("sf_t_copyright") = sfcopyright
	end if
end if

rs.close
sfcopyright = application("sf_t_copyright")

set rs = nothing
set i = nothing
%>

⌨️ 快捷键说明

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