<% ForumID=RequestInt("ForumID") ThreadID=RequestInt("ThreadID") if Request("ViewMode")<>"" then ResponseCookies "ViewMode",Request("ViewMode"),"9999" if RequestCookies("ViewMode")="" then ResponseCookies "ViewMode",SiteConfig("ViewMode"),"9999" ViewMode=RequestCookies("ViewMode") HtmlTop if Request("menu")="Next" then sql="select top 1 * from [BBSXP_Threads] where ThreadID > "&ThreadID&" and ForumID="&ForumID&" and IsApproved=1 and IsDel=0 order by ThreadID" elseif Request("menu")="Previous" then sql="select top 1 * from [BBSXP_Threads] where ThreadID < "&ThreadID&" and ForumID="&ForumID&" and IsApproved=1 and IsDel=0 order by ThreadID Desc" else sql="select * from [BBSXP_Threads] where ThreadID="&ThreadID&"" end if Rs.Open SQL,Conn,1 if Rs.eof or Rs.bof then error"
  • 系统不存在该帖子的资料" Topic=ReplaceText(Rs("Topic"),"<[^>]*>","") Tags=Rs("Tags") TotalReplies=Rs("TotalReplies") TotalViews=Rs("TotalViews") IsVote=Rs("IsVote") IsGood=Rs("IsGood") ThreadTop=Rs("ThreadTop") IsLocked=Rs("IsLocked") IsApproved=Rs("IsApproved") IsDel=Rs("IsDel") PostsTableName=Rs("PostsTableName") Category=Rs("Category") ThreadID=Rs("ThreadID") ForumID=Rs("ForumID") ThreadStatus=Rs("ThreadStatus") UserName=Rs("PostAuthor") lastname=Rs("lastname") lasttime=Rs("lasttime") Rs.close if Conn.Execute("select UserAccountStatus from [BBSXP_Users] where UserName='"&UserName&"'")(0)=3 then error("该用户所发帖子已被系统屏蔽!") sql="select * from [BBSXP_Forums] where ForumID="&ForumID&"" Set Rs=Conn.Execute(sql) ForumName=Rs("ForumName") Moderated=Rs("Moderated") ParentID=Rs("ParentID") GroupID=Rs("GroupID") ForumUrl=Rs("ForumUrl") IsActive=Rs("IsActive") Rs.Close %> <% if ForumUrl<>"" then response.redirect ForumUrl if IsActive=0 and PermissionManage=0 then error"
  • 该版块已经关闭!" if PermissionRead=0 then error"
  • 您没有权限阅读帖子" if IsDel=1 and PermissionManage=0 then error"
  • 该主题在回收站中!" if IsApproved=0 and PermissionManage=0 then error"
  • 该主题正在审核中!" Conn.execute("update [BBSXP_Threads] set TotalViews=TotalViews+1,LastViewedDate="&SqlNowString&" where ThreadID="&ThreadID&"") %> <%=Topic%> - <%=SiteConfig("SiteName")%> - Powered By BBSXP
    <%ClubTree%> → <%ForumTree(ParentID)%><%=ForumTreeList%><%=ForumName%><%=Topic%>
      <%if CookieUserName<>empty then%> <%end if%>  
     
    <%=Topic%>
    <%if Tags<>"" then%>
    <%end if%>
    发起人:<%=UserName%>  回复数:<%=TotalReplies%>  浏览数:<%=TotalViews%>  最后更新:<%=lasttime%> by <%=lastname%>

    <%if CookieUserName<>"" then%> <% if SiteConfig("SelectMailMode")<>"" then if Conn.Execute("select UserName from [BBSXP_Subscriptions] where UserName='"&CookieUserName&"' and ThreadID="&ThreadID&"").eof then BgImage="tracktopic.gif" ButtonText="订阅主题" else BgImage="tracktopic-on.gif" ButtonText="取消订阅" end if %> <%=ButtonText%> <% end if end if %> 选择查看 搜索更多相关主题 <%if SiteConfig("DisplayThreadStatus")=1 and (PermissionManage=1 or UserName=CookieUserName) then%>  主题状态: <%end if%>  帖子排序:
    <% '''''''投票'''''''' if IsVote=1 then %> <% sql="select * from [BBSXP_Votes] where ThreadID="&ThreadID&"" Set Rs=Conn.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 Voteresult=0 Votepercent=0 else Voteresult=result(i)/allticket*100 Votepercent=formatnumber(result(i)/allticket*100) if Votepercent=0 then Votepercent="0.00" end if %> <% end if next %>
    选项 票数 百分比
    <%=Result(i)%>
    <%=Votepercent%>%
    <% if PermissionVote=0 then response.write "您没有权限投票" elseif instr("|"&Rs("BallotUserList")&"|","|"&CookieUserName&"|")>0 then response.write "您已经投过票了" elseif instr("|"&Rs("BallotIPList")&"|","|"&Request.ServerVariables("REMOTE_ADDR")&"|")>0 then response.write "此IP已经投过票了" elseif Rs("Expiry")< now() then response.write "投票已过期" else response.write "" end if %> 总票数:<%=allticket%> 截止投票时间:<%=Rs("Expiry")%>
    <% Rs.Close end if '''''''投票 END'''''''' TotalCount=TotalReplies+1 PageSetup=SiteConfig("PostsPerPage") '设定每页的显示数量 TotalPage=Abs(Int(TotalCount/PageSetup*(-1))) '总页数 PageCount = RequestInt("PageIndex") '获取当前页 if PageCount <1 then PageCount = 1 if PageCount > TotalPage then PageCount = TotalPage if Request("SortOrder")="1" then SqlSortOrder="Desc" else SqlSortOrder="" end if sql="select * from [BBSXP_Posts"&PostsTableName&"] where ThreadID="&ThreadID&" order by PostID "&SqlSortOrder&"" if PageCount<11 then Set Rs=Conn.Execute(sql) else rs.Open sql,Conn,1 end if If Rs.Eof then Conn.execute("Delete from [BBSXP_Threads] where ThreadID="&ThreadID&"") if TotalPage>1 then RS.Move (PageCount-1) * pagesetup i=0 Do While Not Rs.EOF and i
    <%ShowPage()%> 返回页首↑
    <%if IsLocked=0 and PermissionReply=1 then%>
    快速回复

    文章内容
    查看内容长度

      
    <% end if if PermissionManage=1 then response.write "
    管理选项:" if ThreadTop=2 then response.write "取消公告 | " else response.write "设为公告 | " end if if ThreadTop=1 then response.write "取消置顶 | " else response.write "置顶主题 | " end if response.write "拉前主题 | " if IsLocked=1 then response.write "解锁主题 | " else response.write "锁定主题 | " end if if IsGood=1 then response.write "取消精华主题" else response.write "加为精华主题" end if response.write " | 移动主题 | 修复主题
    " end if %><% HtmlBottom Sub ShowPostSimple() %>
    "><%=Rs("PostAuthor")%> 发表于 <%=Rs("PostDate")%>
    <% if Rs("Subject")<>"" then response.write "
    "&Rs("Subject")&"
    " response.write "
    "&Rs("Body")&"
    " %>
    <%if PermissionManage=1 then response.write "IP:"&Rs("IPAddress")&" "%> <%if IsLocked=0 and PermissionReply=1 then response.write "快速回复"%>
    <% End Sub Sub ShowPost() Set User=Conn.Execute("select top 1 * from [BBSXP_Users] where UserName='"&Rs("PostAuthor")&"'") if User.EOF then Exit Sub ShowRank(User("experience")) %>
    " style="DISPLAY: none">
    ">
    <%=Rs("PostDate")%>
    <%if DateDiff("n",User("UserActivityTime"),Now()) < SiteConfig("UserOnlineTime") then%> 在线. 最后活动时间:<%=User("UserActivityTime")%>" src="Images/user_IsOnline.gif" border="0" /> <%end if%> <%=User("UserName")%>
    <%if SiteConfig("AllowGender")=1 and (User("UserSex")=1 or User("UserSex")=2) then%> .gif" />  <%end if%> <%=constellation(User("birthday"))%>



    <%if SiteConfig("EnableAvatars")=1 and SiteConfig("AllowAvatars")=1 then%>
    px;"> " onload="javascript:if(this.width><%=SiteConfig("AvatarWidth")%>)this.width=<%=SiteConfig("AvatarWidth")%>;if(this.heigh><%=SiteConfig("AvatarHeight")%>)this.height=<%=SiteConfig("AvatarHeight")%>;" />
    <%end if%>


    角  色:<% if instr("|"&Moderated&"|","|"&User("UserName")&"|") > 0 then Response.Write("版主") else response.write ShowRole(User("UserRoleID")) end if %>
    等  级:<%=RankName%>
    发 帖 数:<%=User("TotalPosts")%>
    金  钱:<%=User("UserMoney")%>
    经 验 值:<%=User("experience")%>
    注册时间:<%=FormatDateTime(User("UserRegisterTime"),2)%>

    <% if User("UserAccountStatus")=2 then Response.Write "==============================
       该用户已被禁用   
    ==============================" else if Rs("Subject")<>"" then response.write "
    "&Rs("Subject")&"
    " response.write "
    "&Rs("Body")&"
    " if SiteConfig("EnableSignatures")=1 and SiteConfig("AllowSignatures")=1 then if User("UserSign")<>"" then response.write "
    "&YbbEncode(User("UserSign"))&"
    " end if end if %>
    <%if PermissionManage=1 then response.write "IP:"&Rs("IPAddress")&" "%> <%if IsLocked=0 and PermissionReply=1 then response.write "快速回复"%>
    <% Set User = Nothing End Sub %>