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

📄 forum.asp

📁 此程序是一个个人主页创造程序,该程序无插件,无任何恶意程序.
💻 ASP
📖 第 1 页 / 共 3 页
字号:
		if (AdminAllowed = 1) then %>
			<a href="post.asp?method=Topic&FORUM_ID=<% Response.Write Request.QueryString("FORUM_ID")%>&CAT_ID=<% Response.Write Request.QueryString("CAT_ID")%>"><img src="<% Response.Write strImageURL %>newthread.gif" alt="发表新主题" border=0></a>
<%		else %>
			&nbsp;分类已锁定
<%		end if
	else
		if rsFStatus("F_STATUS") <> 0 then %>
			<a href="post.asp?method=Topic&FORUM_ID=<% Response.Write Request.QueryString("FORUM_ID")%>&CAT_ID=<% Response.Write Request.QueryString("CAT_ID")%>"><img src="<% Response.Write strImageURL %>newthread.gif" alt="发表新主题" border=0></a>
<%		else %>
			&nbsp;论坛已锁定
<%		end if
	end if
else
	SELECT CASE cInt(strPrivateForums)
		CASE 10
			Response.Write "只有管理员和版主可以在本论坛回复主题"
		CASE 11
			Response.Write "只有管理员和版主可以在本论坛发表新主题"
		CASE 12
			Response.Write "这是一个加密论坛,无法发表"
		CASE else
	END SELECT
end if%>
</font>
<%
end sub

sub ForumAdminOptions()

	if lCase(Request.Querystring("MODE"))<>"best" then
%>
<font face="<% Response.Write strDefaultFontFace %>" size="<% Response.Write strDefaultFontSize %>">
<%	if (AdminAllowed = 1) or (lcase(strNoCookies) = "1") then
		if rsCStatus("CAT_STATUS") = 0 then
			if mlev = 4 then %>
				<a href="pop_open.asp?mode=Category&CAT_ID=<% Response.Write Request.QueryString("CAT_ID") %>" onClick="return openAdminWindow(this.href)"><img src="<% Response.Write strImageURL %>icon_unlock.gif" alt="解开分类锁定" border=0></a>
<%			end if
		else
			if rsFStatus("F_STATUS") <> 0 then %>
				<a href="pop_lock.asp?mode=Forum&FORUM_ID=<% Response.Write Request.QueryString("FORUM_ID") %>&CAT_ID=<% Response.Write Request.QueryString("CAT_ID") %>" onClick="return openAdminWindow(this.href)"><img src="<% Response.Write strImageURL %>icon_lock.gif" alt="锁定讨论区" border=0></a>
<%			else %>
				<a href="pop_open.asp?mode=Forum&FORUM_ID=<% Response.Write Request.QueryString("FORUM_ID") %>&CAT_ID=<% Response.Write Request.QueryString("CAT_ID") %>" onClick="return openAdminWindow(this.href)"><img src="<% Response.Write strImageURL %>icon_unlock.gif" alt="解开讨论区锁定" border=0></a>
<%			end if
		end if
		if (rsCStatus("CAT_STATUS") <> 0 and rsFStatus("F_STATUS") <> 0) or (AdminAllowed = 1) then %>
			<a href="post.asp?method=EditForum&FORUM_ID=<% Response.Write Request.QueryString("FORUM_ID") %>&CAT_ID=<% Response.Write Request.QueryString("CAT_ID") %>&type=0"><img src="<% Response.Write strImageURL %>icon_pencil.gif" alt="编辑讨论区属性" border="0" hspace="0"></a>
<%		end if %>
<%		if (mlev = 4) or (lcase(strNoCookies) = "1") then  %>
		<a href="pop_delete.asp?mode=Forum&FORUM_ID=<% Response.Write Request.QueryString("FORUM_ID") %>&CAT_ID=<% Response.Write Request.QueryString("CAT_ID") %> onClick="return openAdminWindow(this.href)"><img src="<% Response.Write strImageURL %>icon_trashcan.gif" alt="删除讨论区" border=0></a>
<%		end if %>
<%	end if %>
</font>
<%
	end if
end sub

Function AdminFunction()
if lCase(Request.Querystring("MODE"))<>"best" then
	AdminFunction = ""
	if AdminAllowed = 1 or strNoCookies = "1" then
		AdminFunction = "<DIV align=right style=""color:" & strHeadCellColor & """>|"
		AdminFunction = AdminFunction & "<a href=""pop_lock.asp?mode=Best&TOPIC_ID=" & rs("TOPIC_ID") & "&FORUM_ID=" & rs("FORUM_ID") & "&CAT_ID=" & Request.QueryString("CAT_ID") & """ onClick=""return openAdminWindow(this.href)"" style=""color:" & strHeadCellColor & """>精</A>|"

		if rsCStatus("CAT_STATUS") = 0 then
			AdminFunction = AdminFunction & "<a href=""pop_open.asp?mode=Category&CAT_ID=" & Request.QueryString("CAT_ID") & """ onClick=""return openAdminWindow(this.href)"" style=""color:" & strHeadCellColor & """>解</a>|"
		else
			if rsFStatus("F_STATUS") = 0 then
				AdminFunction = AdminFunction & "<a href=""pop_open.asp?mode=Forum&FORUM_ID=" & Request.QueryString("FORUM_ID") & "&CAT_ID=" & Request.QueryString("CAT_ID") & """ onClick=""return openAdminWindow(this.href)"" style=""color:" & strHeadCellColor & """>解</a>|"
			else
				if rs("T_STATUS") <> 0 then
					AdminFunction = AdminFunction & "<a href=""pop_lock.asp?mode=Topic&TOPIC_ID=" & rs("TOPIC_ID") & "&FORUM_ID=" & rs("FORUM_ID") & "&CAT_ID=" & Request.QueryString("CAT_ID") & """ onClick=""return openAdminWindow(this.href)"" style=""color:" & strHeadCellColor & """>锁</a>|"
				else
					AdminFunction = AdminFunction & "<a href=""pop_open.asp?mode=Topic&TOPIC_ID=" & rs("TOPIC_ID")& "&FORUM_ID=" & rs("FORUM_ID") & "&CAT_ID=" & Request.QueryString("CAT_ID") & """ onClick=""return openAdminWindow(this.href)"" style=""color:" & strHeadCellColor & """>解</a>|"
				end if
			end if
		end if
		if (AdminAllowed = 1) or (rsCStatus("CAT_STATUS") <> 0 and rsFStatus("F_STATUS") <> 0 and rs("T_STATUS") <> 0) then
			If rs("T_INPLACE")<>0 Then
				AdminFunction = AdminFunction & "<a href=""pop_open.asp?mode=LockTop&TOPIC_ID=" & rs("TOPIC_ID") & "&FORUM_ID=" & rs("FORUM_ID") & "&CAT_ID=" & Request.QueryString("CAT_ID") & """ onClick=""return openAdminWindow(this.href)"" style=""color:" & strHeadCellColor & """>活</a>|"
			else
				AdminFunction = AdminFunction & "<a href=""pop_lock.asp?mode=LockTop&TOPIC_ID=" & rs("TOPIC_ID") & "&FORUM_ID=" & rs("FORUM_ID") & "&CAT_ID=" & Request.QueryString("CAT_ID") & """ onClick=""return openAdminWindow(this.href)"" style=""color:" & strHeadCellColor & """>固</a>|"
			end if
			AdminFunction = AdminFunction & "<A href=""post.asp?method=EditTopic&TOPIC_ID=" & rs("TOPIC_ID") & "&FORUM_ID=" & rs("FORUM_ID") & "&CAT_ID=" & rs("CAT_ID") & "&AUTH=" & ChkString(rs("T_AUTHOR"),"urlpath") & """ style=""color:" & strHeadCellColor & """>改</a>|"
			AdminFunction = AdminFunction & "<A href=""post.asp?method=EditTopic&TOPIC_ID=" & rs("TOPIC_ID") & "&FORUM_ID=" & rs("FORUM_ID") & "&CAT_ID=" & rs("CAT_ID") & "&AUTH=" & ChkString(rs("T_AUTHOR"),"urlpath") & """ style=""color:" & strHeadCellColor & """>移</a>|"
		end if
		AdminFunction = AdminFunction & "<a href=""pop_delete.asp?mode=Topic&TOPIC_ID=" & rs("TOPIC_ID") & "&FORUM_ID=" & rs("FORUM_ID") & "&CAT_ID=" & Request.QueryString("CAT_ID")
		if RS("T_FILEID")<>"" and RS("T_FILENAME")<>"" then
			AdminFunction = AdminFunction & "&FILE_ID=" & RS("T_FILEID")
			AdminFunction = AdminFunction & "&FILE_NAME=" & RS("T_FILENAME")
		end if
		AdminFunction = AdminFunction & """ onClick=""return openAdminWindow(this.href)"" style=""color:" & strHeadCellColor & """>删</a>|"
		AdminFunction = AdminFunction & "<a href=""post.asp?method=Reply&TOPIC_ID=" & rs("TOPIC_ID") & "&FORUM_ID=" & rs("FORUM_ID") & "&CAT_ID=" & Request.QueryString("CAT_ID") &  """ style=""color:" & strHeadCellColor & """>复</a>|"
		AdminFunction = AdminFunction & "</DIV>"
	end if
end if
End Function

sub Paging()
	if maxpages > 1 then
		sScriptName = Request.ServerVariables("script_name")

		ref2 = "&FORUM_ID=" & Request.QueryString("FORUM_ID")
		ref2 = ref2 & "&CAT_ID=" & Request.QueryString("CAT_ID")
		'ref2 = ref2 & "&Forum_Title=" & ChkString(strSubForumTitle,"urlpath")

		'####################################
		if sortorder <> "" then
			ref2 = ref2 & "&sort=" & sortorder
		end if
		if lCase(Request.Querystring("MODE"))="best" then
			ref2 = ref2 & "&MODE=best"
		end if
		'####################################

		ref = "<B>[&nbsp;"
		if myPage-10 > 0 then
			ref = ref & "<A HREF=""" & sScriptName
			ref = ref & "?whichpage=" & StartPageNum - 1
			ref = ref & ref2
			ref = ref & """>←</a>&nbsp;"
		end if

		For I = StartPageNum to EndPageNum
			if I <> myPage then
				ref = ref & "<A href=""" & sScriptName & "?whichpage=" & I
				ref = ref & ref2
				ref = ref & """>" & I & "</a>&nbsp;"
			else
				ref = ref & "<font face=" & strDefaultFontFace & " size=" & strDefaultFontSize & " color=" & strInsistFontColor & ">" & I & "</FONT>&nbsp;"
			end if
		Next

		if EndPageNum < maxpages then
			ref = ref & "<A href=""" & sScriptName & "?whichpage=" & EndPageNum + 1
			ref = ref & ref2
			ref = ref & """>→</a>&nbsp;"
		end if
		ref = ref & "]</B>"
		str_Table = "<TABLE border=0 align=""left"">" & vbCrLf & "<TR>" & vbCrLf
		str_Table = str_Table & "<TD valign=""top""><font face=" & strDefaultFontFace & " size=" & strDefaultFontSize & "><b>本论坛共有 " & maxpages & " 页:</font></TD>" & vbCrLf
		str_Table = str_Table & "<TD valign=""top"" align=""left""><font face=" & strDefaultFontFace & " size=" & strDefaultFontSize & ">" & ref & "</font></TD>" & vbCrLf & "</TR>" & vbCrLf & "</TABLE>" & vbCrLf
	else
		str_Table = "<TABLE border=0 align=""left"">" & vbCrLf & "<TR>" & vbCrLf
		str_Table = str_Table & "<TD valign=""top"" align=""left""><font face=" & strDefaultFontFace & " size=" & strDefaultFontSize & "><B>本论坛只有一页</B></font></TD>" & vbCrLf & "</TR>" & vbCrLf & "</TABLE>" & vbCrLf
	end if
	Response.Write str_Table
	set str_Table = Nothing
end sub

sub TopicPaging()
	strPageSizeTemp = 10
	mxpages = (RS("T_REPLIES")) / strPageSizeTemp
	if mxPages <> cInt(mxPages) then
		mxpages = Int(mxPages) + 1
	end if
	if mxpages > 1 then
'		Response.Write("<TABLE border=0 cellspacing=0 cellpadding=0><TR><TD valign=""center""><font face=" & strDefaultFontFace & " size=" & strFooterFontSize & "><img src=""" & strImageURL & "icon_posticon.gif"" border=""0""></font></TD>")
		if strTopicPaging then
			Response.Write("<br>")
		end if
		Response.Write("<font face=" & strDefaultFontFace & " size=" & strFooterFontSize & ">  [第")
		for counter = 1 to mxPages
			ref = ""
'			ref = "<TD align=right bgcolor=" & strForumCellColor  & "><font face=" & strDefaultFontFace & " size=" & strFooterFontSize & ">"
			if ((mxpages > 9) and (mxpages > strPageSizeTemp)) or ((counter > 9) and (mxpages < strPageSizeTemp)) then
				ref = ref & "&nbsp;"
			end if		
			ref = ref & widenum(counter) & "<a href='topic.asp?"
			ref = ref & "TOPIC_ID=" & rs("TOPIC_ID")
			ref = ref & "&FORUM_ID=" & rs("FORUM_ID")
			ref = ref & "&CAT_ID=" & rs("CAT_ID")
			'ref = ref & "&Topic_Title=" & ChkString(left(rs("T_SUBJECT"), 50),"urlpath")
			'ref = ref & "&Forum_Title=" & ChkString(strSubForumTitle,"urlpath")
			ref = ref & "&whichpage=" & counter
			'############################################
			if sortorder <> "" then
				ref = ref & "&sort=" & sortorder
			end if
			'############################################
			ref = ref & "'><font face=" & strDefaultFontFace & " size=" & strFooterFontSize & " color=" & strINSISTFontColor & "><B>" & counter & "</font></B></a>"

'			ref = ref & "'><font face=" & strDefaultFontFace & " size=" & strFooterFontSize & " color=" & strINSISTFontColor & "><B>" & counter & "</font></B></a></TD>"
			Response.Write ref
			if counter mod strPageSizeTemp = 0 then
'				Response.Write("</TR><TR><TD>&nbsp;</TD>")
			end if
		next
	Response.Write("&nbsp;页]")
'	Response.Write("</TR></TABLE>")
	end if
end sub
%>
<% if strDBNTUserName = "" then %>
<!--别致的固定页面右下角的登陆窗口。-->
<!--开始-->
<script language=JavaScript>
	self.onError=null;
	currentX = currentY = 0;
	whichIt = null;
	lastScrollX = 0; lastScrollY = 0;
	NS = (document.layers) ? 1 : 0;
	IE = (document.all) ? 1: 0;
	function heartBeat() {
		if(IE) { diffY = document.body.scrollTop; diffX = document.body.scrollLeft; }
	    if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; }
		if(diffY != lastScrollY) {
	                percent = .1 * (diffY - lastScrollY);
	                if(percent > 0) percent = Math.ceil(percent);
	                else percent = Math.floor(percent);
					if(IE) document.all.floater.style.pixelTop += percent;
					if(NS) document.floater.top += percent;
	                lastScrollY = lastScrollY + percent;
	    }
		if(diffX != lastScrollX) {
			percent = .1 * (diffX - lastScrollX);
			if(percent > 0) percent = Math.ceil(percent);
			else percent = Math.floor(percent);
			if(IE) document.all.floater.style.pixelLeft += percent;
			if(NS) document.floater.left += percent;
			lastScrollX = lastScrollX + percent;
		}	
	}
	function checkFocus(x,y) {
	        stalkerx = document.floater.pageX;
	        stalkery = document.floater.pageY;
	        stalkerwidth = document.floater.clip.width;
	        stalkerheight = document.floater.clip.height;
	        if( (x > stalkerx && x < (stalkerx+stalkerwidth)) && (y > stalkery && y < (stalkery+stalkerheight))) return true;
	        else return false;
	}
	function grabIt(e) {
		if(IE) {
			whichIt = event.srcElement;
			while (whichIt.id.indexOf("floater") == -1) {
				whichIt = whichIt.parentElement;
				if (whichIt == null) { return true; }
		    }
			whichIt.style.pixelLeft = whichIt.offsetLeft;
		    whichIt.style.pixelTop = whichIt.offsetTop;
			currentX = (event.clientX + document.body.scrollLeft);
	   		currentY = (event.clientY + document.body.scrollTop); 	
		} else {
	        window.captureEvents(Event.MOUSEMOVE);
	        if(checkFocus (e.pageX,e.pageY)) {
	                whichIt = document.floater;
	                StalkerTouchedX = e.pageX-document.floater.pageX;
	                StalkerTouchedY = e.pageY-document.floater.pageY;
	        }
		}
	    return true;
	}
	function moveIt(e) {
		if (whichIt == null) { return false; }
		if(IE) {
		    newX = (event.clientX + document.body.scrollLeft);
		    newY = (event.clientY + document.body.scrollTop);
		    distanceX = (newX - currentX);    distanceY = (newY - currentY);
		    currentX = newX;    currentY = newY;
		    whichIt.style.pixelLeft += distanceX;
		    whichIt.style.pixelTop += distanceY;
			if(whichIt.style.pixelTop < document.body.scrollTop) whichIt.style.pixelTop = document.body.scrollTop;
			if(whichIt.style.pixelLeft < document.body.scrollLeft) whichIt.style.pixelLeft = document.body.scrollLeft;
			if(whichIt.style.pixelLeft > document.body.offsetWidth - document.body.scrollLeft - whichIt.style.pixelWidth - 20) whichIt.style.pixelLeft = document.body.offsetWidth - whichIt.style.pixelWidth - 20;
			if(whichIt.style.pixelTop > document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5) whichIt.style.pixelTop = document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5;
			event.returnValue = false;
		} else {
			whichIt.moveTo(e.pageX-StalkerTouchedX,e.pageY-StalkerTouchedY);
	        if(whichIt.left < 0+self.pageXOffset) whichIt.left = 0+self.pageXOffset;
	        if(whichIt.top < 0+self.pageYOffset) whichIt.top = 0+self.pageYOffset;
	        if( (whichIt.left + whichIt.clip.width) >= (window.innerWidth+self.pageXOffset-17)) whichIt.left = ((window.innerWidth+self.pageXOffset)-whichIt.clip.width)-17;
	        if( (whichIt.top + whichIt.clip.height) >= (window.innerHeight+self.pageYOffset-17)) whichIt.top = ((window.innerHeight+self.pageYOffset)-whichIt.clip.height)-17;
	        return false;
		}
	    return false;
	}
	function closeLoginForm() {
		floater.style.visibility = "hidden";
	}
	function dropIt() {
		whichIt = null;
	    if(NS) window.releaseEvents (Event.MOUSEMOVE);
	    return true;
	}
	if(NS) {
		window.captureEvents(Event.MOUSEUP|Event.MOUSEDOWN);
		window.onmousedown = grabIt;
	 	window.onmousemove = moveIt;
		window.onmouseup = dropIt;
	}
	if(IE) {
		document.onmousedown = grabIt;
	 	document.onmousemove = moveIt;
		document.onmouseup = dropIt;
	}
	if(NS || IE) action = window.setInterval("heartBeat()",1);
	</script>
<!--结束-->
<% end if %>

⌨️ 快捷键说明

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