<!--#include file="inc.asp"-->
<!--#include file="inc/ubb_Cls.asp"-->
<%
Dim Rs,SQL,TopicCaption,UserName
Dim BBS94KK_ubb,ID
Dim rootid,topic,postbuyuser,bgcolor,EmotPath
	ID=BBS94KK.CheckNum(request.querystring("ID"))
	IF BBS94KK.BoardID=0 or Id=0 or BBS94KK.TB=0 or not BBS94KK.Fun.isInteger(BBS94KK.BoardID) then BBS94KK.GoToErr(1)
	Set BBS94KK_ubb=New BBS94KKubb_Cls
Dim Tempwrite,Templist
	Tempwrite="<div class=pagebody><div id=navbar><a href={$forumurl}>{$forumname}</a>&nbsp;>>&nbsp;<a href={$forumurl}list.asp?boardid={$boardid}>{$boardname}</a></div><p class=largefont>查看完全版本: <a href={$forumurl}Show.asp?boardid={$boardid}&amp;id={$announceid}&amp;TB={$TB}>{$topic}</a></p>{$bbslist}<div id=copyright>文档 <a href=http://ybq.32o.cn/bbs>猪婷家园</a></div></div>"
	Tempwrite=Replace(Tempwrite,"{$forumname}",BBS94KK.Info(0))
	Tempwrite=Replace(Tempwrite,"{$forumurl}","")
	Tempwrite=Replace(Tempwrite,"{$boardid}",BBS94KK.BoardID)
	Tempwrite=Replace(Tempwrite,"{$boardname}",server.htmlencode(Request("BoardName")))
	Tempwrite=Replace(Tempwrite,"{$announceid}",Id)
	Tempwrite=Replace(Tempwrite,"{$TB}",BBS94KK.TB)
	
	Sql="Select Name,Caption,Content,Addtime,UbbString From [KK_Bbs"&BBS94KK.TB&"] where (TopicID="&ID&" Or ReplyTopicID="&ID&") And BoardID="&BBS94KK.BoardID&" and IsDel=False and boardid not in(0) Order by BBSid"

	Set Rs=BBS94KK.Execute(Sql)
	If Rs.Eof And Rs.Bof Then
		BBS94KK.GoToErr(11)
	Else
		topic=Rs("Caption")
		Tempwrite=Replace(Tempwrite,"{$topic}",BBS94KK.Fun.HtmlCode(Rs("Caption")))
		Do While Not Rs.Eof 
		BBS94KK_ubb.UbbString=Rs("UbbString")
		Templist=Templist&"<div class=post><div class=username id=u1><b> 作者： "&Rs("Name")&"</b></div><div class=posttext id=p1><i>"&Rs("Addtime")&"</i><br>"&BBS94KK_ubb.UBB(Rs("Content"),1)&"</div></div>"
		Rs.movenext
		loop
		Tempwrite=Replace(Tempwrite,"{$bbslist}",Templist)
%>
<html>
<head>
<title><%=BBS94KK.Info(0)&" - "&server.HtmlEncode(Topic)%></title>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" >
<link rel="stylesheet" href="archive.css">
</head>
<body>
<%Response.write Tempwrite
	End if
Set BBS94KK=Nothing
	%>
<br><br>
</body></html><%
Function SimJsReplace(str)
	If IsNull(str) Or str="" Then Exit Function
	str=Replace(str,"\","\\")
	str=Replace(str,"'","\'")
	SimJsReplace=str
End Function
%>