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

📄 topicshow.asp

📁 程序网络论坛HigroupBBS v4.00 默认管理员帐号密码都是Marcos
💻 ASP
字号:
<!--#include file="MarcosCB.asp"-->
<%
	dim i,content,topicId,boardId,userPic,PageShow,otherLink,topicTitle,img,alt,str_sys,pageList
	dim str,url,page,theAct,editLink,quotaLink,newTopic,boardName,pageCode,pageTitle,pageOther,pageCountList,rights

	getConn()
	str=getMainCode(mySkinId)
	page=getPost("page")
	theAct=getPost("theAct")
	topicId=getPost("topicId")
	boardId=getPost("boardId")
	boardName=getPost("boardName")
	if not isNumeric(page) then
		page=1
	end if

	if not isNumeric(boardId) or not isNumeric(topicId) then
		echo "错误的数据参数!"
		closeConn()
		response.End()
	end if

	if boardName="" then
		sql="select boardName from Marcos_Board where topBoardId<>0 and boardId="&boardId
		set rs_sys=conn.execute(sql)
		if rs_sys.eof then
			echo "错误的数据参数(版块已经被删除或者不可进入)!"
			closeConn()
			response.end
		end if
		queryTimes=queryTimes+1
		boardName=rs_sys(0)
	end if

	if canSetTrue(boardId) then
		rights=true
	 else
		rights=false
	end if

	if rights then
		sql="select Marcos_Topic.*,Marcos_User.* from Marcos_Topic,Marcos_User where Marcos_Topic.userName=Marcos_User.userName and boardId="&boardId&" and topicId=" & topicId
	 else
		sql="select Marcos_Topic.*,Marcos_User.* from Marcos_Topic,Marcos_User where Marcos_Topic.userName=Marcos_User.userName and isRecycled=false and boardId="&boardId&" and topicId=" & topicId
	end if
	rs.open sql,conn,1,1
	if rs.eof then
		echo "错误的帖子参数!(可能帖子已被删除)"
		rs.close
		closeConn()
		response.end
	 else
		url="topicList.asp?boardId=" & boardId & "&boardName=" & boardName
		pageTitle=encodeStr(rs("topicTitle"))
		if len(pageTitle)>20 then pageTitle=left(pageTitle,20) & "..."
		pageOther="<script>document.title+=' - 查看帖子:" & pageTitle & "';</script>访问量:"&(rs("Marcos_Topic.visitCount")+1)&""
		pageTitle="<a href=""" & url & """>" & boardName & "</a> &raquo; <a href=""javascript:;"" onclick=location.reload();>" & pageTitle & "</a>"
		conn.execute("update Marcos_Topic set visitCount=visitCount+1 where topicId=" & topicId)
		nowWhere "查看:"&encodeStr(rs("topicTitle")),"topicShow.asp?"&request.serverVariables("Query_String")
	end if
	
	showHead str,pageTitle,pageOther
	
	select case theAct
		case ""
			showBody()
	end select
	
	showFoot(str)
	
	sub showBody()
	
		dim str,body,theBody,tTop,tEnd
		
		pageCode=getPageCode(mySkinId,"PageShow")
		PageShow=split(pageCode,"$$$")
		tTop=PageShow(0)
		body=PageShow(1)
		tEnd=PageShow(2)
		
		tTop=replace(tTop,"{$pageList}",getPageTwo(rs("replyCount"),topicId,boardId))
		tTop=replace(tTop,"{$topicTitle}",encodeStr(rs("topicTitle")))
		if page=1 then
			theBody=body
			theBody=replace(theBody,"{$userName}",rs("Marcos_Topic.userName"))
			theBody=replace(theBody,"{$content}","<img src=""" & rs("topicMood") & """><b>" & encodeStr(rs("topicTitle")) & "</b><br>" & mUbb(rs("topicContent")) &"<div align=right>"& rs("lastModify")) & "</div>"
			theBody=replace(theBody,"{$addTime}",mid(rs("addTime"),3))
			theBody=replace(theBody,"{$userArticle}",rs("userArticle"))
			theBody=replace(theBody,"{$userWealth}",rs("userWealth"))
			theBody=replace(theBody,"{$userLevelTxt}",getUserLevel(rs("userWealth"),rs("userLevel")))
			theBody=replace(theBody,"{$userGroup}",rs("userGroup"))
			theBody=replace(theBody,"{$regTime}",rs("regDate"))
			theBody=replace(theBody,"{$userSign}",enCodeStr(fixNull(rs("userSign"))))
			userPic=fixNull(rs("userPic"))
			theBody=replace(theBody,"{$userPic}",getUserPic(userPic))
			if rights then
				if rs("isRecycled")=true then
					otherLink="<a href=""topicAct.asp?theAct=recover&boardName="&boardName&"&boardId="&boardId&"&topicId="&topicId&""">还原|</a>"
				 else
					otherLink="<a href=""topicAct.asp?theAct=recycled&boardName="&boardName&"&boardId="&boardId&"&topicId="&topicId&""">回收|</a>"
				end if
				if rs("isBest")=true then
					otherLink=otherLink&"<a href=""topicAct.asp?theAct=unBest&boardName="&boardName&"&boardId="&boardId&"&topicId="&topicId&""">解除精华|</a>"
				 else
					otherLink=otherLink&"<a href=""topicAct.asp?theAct=setBest&boardName="&boardName&"&boardId="&boardId&"&topicId="&topicId&""">精华|</a>"
				end if
				if rs("isTop")=true then
					otherLink=otherLink&"<a href=""topicAct.asp?theAct=unTop&boardName="&boardName&"&boardId="&boardId&"&topicId="&topicId&""">解除置顶|</a>"
				 else
					otherLink=otherLink&"<a href=""topicAct.asp?theAct=setTop&boardName="&boardName&"&boardId="&boardId&"&topicId="&topicId&""">置顶|</a>"
				end if
				if rs("Marcos_Topic.isLocked")=true then
					otherLink=otherLink&"<a href=""topicAct.asp?theAct=unLock&boardName="&boardName&"&boardId="&boardId&"&topicId="&topicId&""">解除锁定|</a>"
				 else
					otherLink=otherLink&"<a href=""topicAct.asp?theAct=setLock&boardName="&boardName&"&boardId="&boardId&"&topicId="&topicId&""">锁定|</a>"
				end if
			 else
				otherLink=""
			end if
			if getValue("userName")=rs("Marcos_Topic.userName") or rights then
				editLink="topicEdit.asp?boardName="&boardName&"&boardId="&boardId&"&topicId="&topicId&"&theAct=edit"
			 else
				editLink="javascript:;"
			end if
			quotaLink="newReply.asp?theAct=quota&boardName="&boardName&"&boardId="&boardId&"&topicId="&topicId
			theBody=replace(theBody,"{$editLink}",editLink)
			theBody=replace(theBody,"{$otherLink}",otherLink)
			theBody=replace(theBody,"{$quotaLink}",quotaLink)
		end if
		
		rs.close
		
		queryTimes=queryTimes+1
		
		if rights then
			sql="select Marcos_Reply.*,Marcos_User.* from Marcos_Reply,Marcos_User where Marcos_Reply.userName=Marcos_User.userName and topicId=" & topicId & " order by replyTime"
		 else
			sql="select Marcos_Reply.*,Marcos_User.* from Marcos_Reply,Marcos_User where Marcos_Reply.userName=Marcos_User.userName and topicId=" & topicId & " and isRecycled=false order by replyTime"
		end if
		rs.open sql,conn,1,1
		rs.pageSize=showNum
		if not rs.eof then
			rs.absolutePage=page
		end if
		
		if rs.pageCount>=1 then
			pageCountList="跳转到<select name=page onChange=""this.form.submit();"">"
			for i=1 to rs.pageCount
				pageCountList=pageCountList & "<option value=""" & i & """ {$selected" & i & "}>第" & i & "页</option>"
			next
			pageCountList=pageCountList & "</select>"
			pageCountList=pageCountList & "<input type=""hidden"" name=boardId value=""" & boardId & """>"
			pageCountList=pageCountList & "<input type=""hidden"" name=boardName value=""" & boardName & """>"
			pageCountList=replace(pageCountList,"{$selected" & page & "}","selected")
		end if
		tEnd=replace(tEnd,"{$pageList}",getPageTwo(rs.recordCount,topicId,boardId) & pageCountList)
		
		for i=1 to rs.pageSize
			if rs.eof then
				exit for
			end if
			body=PageShow(1)
			body=replace(body,"{$userName}",rs("Marcos_Reply.userName"))
			otherLink=""
			if rs("isRecycled")=true then
				if rights then
					otherLink="<a href=""topicAct.asp?theAct=recover&boardName="&boardName&"&boardId="&boardId&"&topicId="&topicId&"&replyId="&rs("replyId")&"&page="&page&""">还原|</a>"
				end if
				content="<font class=warningColor>该回复已经被删除</font>"
			 else
			 	if rights then
					otherLink="<a href=""topicAct.asp?theAct=recycled&boardName="&boardName&"&boardId="&boardId&"&topicId="&topicId&"&replyId="&rs("replyId")&"&page="&page&""">回收|</a>"
				end if
				content="<img src=""" & rs("replyMood") & """>" & enCodeStr(rs("replyTitle")) & "<br>" &mUbb(rs("replyContent"))&"<div align=right>"&rs("lastModify")&"</div>"
			end if
			body=replace(body,"{$content}",content)
			body=replace(body,"{$addTime}",mid(rs("replyTime"),3))
			body=replace(body,"{$userArticle}",rs("userArticle"))
			body=replace(body,"{$userWealth}",rs("userWealth"))
			body=replace(body,"{$userLevelTxt}",getUserLevel(rs("userWealth"),rs("userLevel")))
			body=replace(body,"{$userGroup}",fixNull(rs("userGroup")))
			body=replace(body,"{$regTime}",rs("regDate"))
			body=replace(body,"{$userSign}",enCodeStr(fixNull(rs("userSign"))))
			userPic=fixNull(rs("userPic"))
			body=replace(body,"{$userPic}",getUserPic(userPic))
			theBody=theBody & body
			if getValue("userName")=rs("Marcos_Reply.userName") or rights then
				editLink="topicEdit.asp?boardName="&boardName&"&boardId="&boardId&"&topicId="&topicId&"&replyId="&rs("replyId")&"&theAct=edit"
			 else
				editLink="javascript:;"
			end if
			quotaLink="newReply.asp?theAct=quota&boardName="&boardName&"&boardId="&boardId&"&replyId="&rs("replyId")&"&topicId="&topicId
			theBody=replace(theBody,"{$editLink}",editLink)
			theBody=replace(theBody,"{$otherLink}",otherLink)
			theBody=replace(theBody,"{$quotaLink}",quotaLink)
			rs.movenext
		next
		rs.close
		queryTimes=queryTimes+1
		
		tEnd=replace(tEnd,"{$newReply}","<img src=""Images/{$styleRoot}/newReply.gif""><a href=""newReply.asp?boardId="&boardId&"&boardName="&boardName&"&topicId="&topicId&""">我要回复</a>")
		
		echo tTop
		echo theBody
		echo tEnd
		
	end sub
	
	closeConn()
%>

⌨️ 快捷键说明

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