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

📄 showpost.asp

📁 闻名一时的bbsxp超快论坛系统现在放出最新版2008版本给希望装论坛的朋友借鉴安装调试
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<!-- #include file="Setup.asp" --><%
ForumID=RequestInt("ForumID")
ThreadID=RequestInt("ThreadID")
PostID=RequestInt("PostID")
PostAuthor=HTMLEncode(Request("PostAuthor"))

if Request("ViewMode")<>"" then  ResponseCookies "ViewMode",RequestInt("ViewMode"),"9999"
if RequestCookies("ViewMode")="" then ResponseCookies "ViewMode",SiteConfig("ViewMode"),"9999"
ViewMode=RequestCookies("ViewMode")


if PostID>0 then
	Set Rs=Execute("Select top 1 ThreadID,Visible from ["&TablePrefix&"Posts] where PostID="&PostID&"")
		if Rs.eof or Rs.bof then error"<li>系统不存在该帖子的资料"
		if Rs("Visible")<>1 and BestRole<>1 then error"<li>该帖子在回收站中!"
		ThreadID=Rs("ThreadID")
	Rs.Close
	PostSql=" and PostID="&PostID&""
elseif PostAuthor>"" then
	PostSql=" and PostAuthor='"&PostAuthor&"'"
end if

if Request("menu")="Next" then
	sql="Select top 1 * from ["&TablePrefix&"Threads] where ThreadID > "&ThreadID&" and ForumID="&ForumID&" and Visible=1 order by ThreadID"
elseif Request("menu")="Previous" then
	sql="Select top 1 * from ["&TablePrefix&"Threads] where ThreadID < "&ThreadID&" and ForumID="&ForumID&" and Visible=1 order by ThreadID Desc"
else
	sql="Select top 1 * from ["&TablePrefix&"Threads] where ThreadID="&ThreadID&""
end if

Set Rs=Execute(sql)
	if Rs.eof or Rs.bof then error"<li>系统不存在该帖子的资料"
	Topic=ReplaceText(Rs("Topic"),"<[^>]*>","")
	ThreadDescription=Rs("Description")
	TotalReplies=Rs("TotalReplies")
	TotalViews=Rs("TotalViews")
	IsVote=Rs("IsVote")
	IsGood=Rs("IsGood")
	IsLocked=Rs("IsLocked")
	Visible=Rs("Visible")
	Category=Rs("Category")
	ThreadID=Rs("ThreadID")
	ForumID=Rs("ForumID")
	ThreadStatus=Rs("ThreadStatus")
	UserName=Rs("PostAuthor")
	lastname=Rs("lastname")
	lasttime=Rs("lasttime")
	RatingSum=Rs("RatingSum")
	TotalRatings=Rs("TotalRatings")
	HiddenCount=Rs("HiddenCount")
	DeletedCount=Rs("DeletedCount")
	ThreadTop=Rs("ThreadTop")
	if DateDiff("d", Rs("StickyDate"), now())=0 then ThreadTop=0
Rs.close

if TotalRatings>0 then
	VoteRatings=RatingSum/TotalRatings
else
	VoteRatings=0
end if

%><!-- #include file="Utility/ForumPermissions.asp" --><%
HtmlHeadTitle=Topic
HtmlHeadDescription=ThreadDescription
HtmlTop

if Visible=2 and PermissionManage=0 then error"<li>该主题在回收站中!"
if Visible=0 and PermissionManage=0 then error"<li>该主题正在审核中!"

Execute("update ["&TablePrefix&"Threads] Set TotalViews=TotalViews+1,LastViewedDate="&SqlNowString&",ThreadTop="&ThreadTop&" where ThreadID="&ThreadID&"")


AdvertisementGetRow=RequestApplication("Advertisements")		'直接读取Application缓存

if IsArray(AdvertisementGetRow) then
	Randomize
	AdvertisementNum=Ubound(AdvertisementGetRow,2)+1
End if

%>
<script type="text/javascript" src="Utility/PopupMenu.js"></script>


<div class="CommonBreadCrumbArea">
	<div style="float:left"><%=ClubTree%> → <%=ForumTree(ParentID)%><a href="ShowForum.asp?ForumID=<%=ForumID%>"><%=ForumName%></a> → <a href="?ThreadID=<%=ThreadID%>"><%=Topic%></a></div>
	<div style="float:right">
		<a href="javascript:window.external.AddFavorite(location.href,document.title)" onmouseover="MouseOverOpen('FavoriteAllItem',this.id);" id="FavoriteAll"><img title="添加到收藏夹" src="images/favs.gif" border="0" /></a> <script language="JavaScript" type="text/javascript">
		document.write("<a target=_blank href='Mailto:?subject="+document.title+"&body="+encodeURIComponent(location.href)+"'>");</script><img title="通过电子邮件发送本页面" src="images/mail.gif" border="0" /></a> <a href="javascript:window.print();"><img title="打印本页" src="images/Print.gif" border="0" /></a> <a href="?menu=Previous&ForumID=<%=ForumID%>&ThreadID=<%=ThreadID%>"><img title="浏览上一篇主题" src="images/previous.gif" border="0" /></a> <a href="?menu=Next&ForumID=<%=ForumID%>&ThreadID=<%=ThreadID%>"><img title="浏览下一篇主题" src="images/next.gif" border="0" /></a>
	</div>  
</div>


<div class="PopupMenu" id="FavoriteAllItem" style="display: none;">
	<table cellspacing="0" cellpadding="1">
		<tr>
			<td><a style="background-image:url(images/favorite.gif)" href="javascript:window.external.AddFavorite(location.href,document.title)">本地收藏</a></td>
		</tr>
		<tr>
			<td><a style="background-image:url(images/qq_favorite.gif)" href="javascript:window.open('http://shuqian.qq.com/post?title='+encodeURIComponent(document.title)+'&uri='+encodeURIComponent(document.location.href)+'&jumpback=2&noui=1','favit','width=960,height=600,left=50,top=50,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes');void(0);">QQ书签</a></td>
		</tr>
		<tr>
			<td><a style="background-image:url(images/baidu_favorite.jpg)" href="javascript:window.open('http://cang.baidu.com/do/add?it='+encodeURIComponent(document.title.substring(0,76))+'&iu='+encodeURIComponent(location.href)+'&fr=ien#nw=1','_blank','scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes');void(0);">百度搜藏</a></td>
		</tr>
		<tr>
			<td><a style="background-image:url(images/yahoo_favorite.gif)" href="javascript:window.open('http://myweb.cn.yahoo.com/popadd.html?url='+encodeURIComponent(document.location.href)+'&title='+encodeURIComponent(document.title), 'Yahoo','scrollbars=yes,width=780,height=550,left=80,top=80,status=yes,resizable=yes');void(0);">雅虎收藏</a></td>
		</tr>
	</table>
</div>

<table cellspacing="1" cellpadding="5" width="100%" class="CommonListArea">
	<tr class="CommonListTitle">
		<td colspan="2"><%=Topic%></td>
	</tr>
	<tr class="CommonListCell">
		<td align="center" width="5%"><img src="images/totel.gif" /></td>
		<td>发起人:<a href="Profile.asp?UserName=<%=UserName%>"><%=UserName%></a>  回复数:<b><%=TotalReplies%></b>  浏览数:<b><%=TotalViews%></b>  最后更新:<%=lasttime%> 
		by <a href="Profile.asp?UserName=<%=lastname%>"><%=lastname%></a></td>
	</tr>
</table>
<br />

<div class="PopupMenu" id="View" style="DISPLAY: none">
	<table cellspacing="0" cellpadding="1">
		<tr>
			<td><a href="?ThreadID=<%=ThreadID%>&ViewMode=0">简洁模式</a></td>
		</tr>
		<tr>
			<td><a href="?ThreadID=<%=ThreadID%>&ViewMode=1">完整模式</a></td>
		</tr>
	</table>
</div>

<table cellspacing="0" cellpadding="0" border="0" width="100%">
		<tr>
			<td>
			<%if CookieUserName<>"" then%>
			<a class="CommonTextButton"><script type="text/javascript" src="Utility/vote.js"></script><script language="JavaScript" type="text/javascript">ThreadID=<%=ThreadID%>;showData("<%=VoteRatings%>");</script></a>
			<%
				if SiteConfig("SelectMailMode")<>"" then
					if Execute("Select UserName from ["&TablePrefix&"Subscriptions] where UserName='"&CookieUserName&"' and ThreadID="&ThreadID&"").eof then
						BgImage="tracktopic.gif"
						ButtonText="订阅主题"
					else
						BgImage="tracktopic-on.gif"
						ButtonText="取消订阅"
					end if
					%>
					<span id="ThreadSubscription"><a class="CommonImageTextButton" style="BACKGROUND-IMAGE: url(images/<%=BgImage%>)" href="javascript:Ajax_CallBack(false,'ThreadSubscription','Loading.asp?menu=Subscription&ThreadID=<%=ThreadID%>')"><%=ButtonText%></a></span>
					<%
				end if
				
			end if
			%>
			<a class="CommonImageTextButton" style="BACKGROUND-IMAGE: url(images/view.gif)" onmouseover="MouseOverOpen('View',this.id);" id="View1">选择查看</a>
			<%if PermissionPost=1 then%><a class="CommonImageTextButton" style="BACKGROUND-IMAGE: url(images/NewPost.gif)" href="AddTopic.asp?ForumID=<%=ForumID%>">发表新帖</a> <%end if%>
			</td>
			<td align="right" valign="bottom"><a href="http://www.duoci.com/Search/?Charset=<%=BBSxpCharset%>&word=<%=Topic%>" target="_blank" title="在更多网站中搜索此类问题">搜索更多相关主题</a>
			<%if SiteConfig("DisplayThreadStatus")=1 and (PermissionManage=1 or UserName=CookieUserName) then%> 
			 主题状态:<select onchange="javascript:if(this.options[this.selectedIndex].value)Ajax_CallBack(false,false,'loading.asp?menu=ThreadStatus&amp;ThreadID=<%=ThreadID%>&amp;ThreadStatus='+this.options[this.selectedIndex].value)">
			<option value="0" <%if threadstatus=0 then%>selected<%end if%>>--
			</option>
			<option value="1" <%if threadstatus=1 then%>selected<%end if%>>已解决
			</option>
			<option value="2" <%if threadstatus=2 then%>selected<%end if%>>未解决
			</option>
			</select> <%end if%>  帖子排序:<select onchange="javascript:if(this.options[this.selectedIndex].value)window.location.href='ShowPost.asp?<%=ReplaceText(Request.QueryString,"&SortOrder=([0-9]*)","")%>&amp;SortOrder='+this.options[this.selectedIndex].value">
			<option value="0" <%if Request("sortorder")="0" then%>selected<%end if%>>
			从旧到新</option>
			<option value="1" <%if Request("sortorder")="1" then%>selected<%end if%>>
			从新到旧</option>
			</select> </td>
		</tr>

</table>


<%

'''''''投票''''''''
if IsVote=1 then
%>
<table cellspacing="1" cellpadding="5" width="100%" class="CommonListArea">
	<tr class="CommonListTitle">
		<td width="40%" align="center">选项</td>
		<td width="10%" align="center">票数</td>
		<td width="50%" align="center" colspan="2">百分比</td>
	</tr>
	<form action="PostVote.asp?ThreadID=<%=ThreadID%>" method="Post">
		<%
sql="Select top 1 * from ["&TablePrefix&"Votes] where ThreadID="&ThreadID&""
Set Rs=Execute(sql)
	if Rs("IsMultiplePoll")=1 then
		multiplicity="checkbox"
	else
		multiplicity="radio"
	end if
	allticket=0
	Result=split(Rs("Result"),"|")
	for i = 0 to ubound(Result)
		if not Result(i)="" then allticket=Result(i)+allticket
	next
	Vote=split(Rs("Items"),"|")
	for i = 0 to ubound(Vote)
		if not Vote(i)="" then
			if allticket=0 then
				Votepercent=0
			else
				Votepercent=Formatpercent(result(i)/allticket)
			end if
%>
		<tr class="CommonListCell">
			<td width="40%">
			<input type="<%=multiplicity%>" value="<%=i%>" name="PostVote" id="PostVote<%=i%>" /><label for="PostVote<%=i%>"><%=Vote(i)%></label></td>
			<td width="10%" align="center"><%=Result(i)%></td>
			<td width="40%">
			<div class="percent">
				<div style="width:<%=Votepercent%>">
				</div>
			</div>
			</td>
			<td width="10%" align="center"><%=Votepercent%></td>
		</tr>
    <%
		end if
next
%>
		<tr class="CommonListCell">
			<td align="center"><%
	if  PermissionVote=0 then
		response.write "您没有权限投票"
	elseif CookieUserName=empty then
		response.write "请登录后再投票"

⌨️ 快捷键说明

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