<!--#INCLUDE FILE="conn.asp" -->
<!--#include file="Class_checkuser.asp" -->
<!--#INCLUDE FILE="Class_Top.asp" -->
<!--#include file="inc/char.asp" -->
<!--#include file="inc/HTMLEncode.asp" -->
<!--#include file="inc/ubbcode.asp" -->
<%
locat="学校论坛"
act="浏览帖子"
'if membername="" Then
'  	ErrMsg=ErrMsg+"<br>"+"<li>您还没有<a href=Class_Login.asp><font color=red>登录或注册校友录</font></a>。"
'	Call top(1,1)
'	Call Error("Information",ErrMsg)
'	
'Else
'	Dim ClsID,Degree,ClassName
'	ClsID=Request("ClassID")
'	joinstatus=chkjoinclass(ClsID)
'	if joinstatus<>"" Then
'		Call top(1,1)
'		Call Error("Exclamation",joinstatus)
'	Else
'Call top(2,1)
'call main()
'end if
'end if

	Dim ClsID,Degree,ClassName,bbsrs
	ClsID=Request("ClassID")

Set bbsRs=Conn.Execute("select classname,passed,bbsopen from class where classid="&Clng(ClsID))

if bbsrs.bof and bbsrs.eof then
ErrMsg=ErrMsg+"<br>"+"<li>操作失败！您要访问的学校不存在或已被删除。"
    Call top(1,1)
Call Error("Information",ErrMsg)

elseif bbsrs(1)=0 and not sysadmin then
ErrMsg=ErrMsg+"<br>"+"<li>操作失败！您要访问的学校还没有通过管理员的审核,暂时不能访问!"
Call top(1,1)
	Call Error("Information",ErrMsg)

elseif bbsrs(2)=0 then
if membername="" Then
  	ErrMsg=ErrMsg+"<br>"+"<li>您还没有<a href=Class_Login.asp><font color=red>登录或注册校友录</font></a>。"
	Call top(1,1)
	Call Error("Information",ErrMsg)
	
Else
	joinstatus=chkjoinclass(ClsID)
	if joinstatus<>"" Then
		Call top(1,1)
		Call Error("Exclamation",joinstatus)
	else
		Call top(2,1)
		call main()
end if
end if
else
classname=bbsrs(0)
Call top(2,1)
call main()
end if
set bbsrs=nothing

sub main()
Dim topic
Dim TopicID
Dim hits
Dim topicuserid
Dim currentpage,totalpages
Dim pagesize
Dim rs
Dim abgcolor
Dim LinkID

pagesize=Cint(IntVar(8))
TopicID=trim(Request("TopicID"))
if TopicID="" then
	ErrMsg=ErrMsg+"<br><li>请指定您要查看的主题！"
	Call Error("Exclamation",ErrMsg)
	exit sub
end if

TopicID=Clng(TopicID)
sql="Select title,hits,linkid,locked,userid from Classtopic where Classid="&Clsid&" and postid="&TopicID
Set rs=conn.execute(sql)
if rs.bof and rs.eof Then
	ErrMsg=ErrMsg+"<br><li>您要查看的主题不存在或已被删除！"
	Call Error("Exclamation",ErrMsg)
	Exit Sub
End if

topic=rs(0)
hits=rs(1)
linkid=rs(2)
locked=rs(3)
topicuserid=rs(4)
Set rs=Nothing
response.flush
''''''''''''''''''''''''''''''''''''Call topictop()
Dim nrs
	Set nrs=conn.execute("Select min(postid) from Classtopic where Classid="&Clsid&" and postid<"&TopicID)
	if not (nrs.eof and nrs.bof) Then
	pretopic=nrs(0)
	End if
	Set nrs=conn.execute("Select max(postid) from Classtopic where Classid="&Clsid&" and postid>"&TopicID)
	if not (nrs.eof and nrs.bof) Then
	nxttopic=nrs(0)
	End if

	Response.Write "<BR><BR><table cellpadding=0 cellspacing=0 border=0 width=""100%"" align=center>"&_
				"<tr><td align=left width=""30%"" valign=middle><a href=Class_bbs_NewTopic.asp?Classid="&Clsid&">"&_ 
				"<img src=images/newthread.gif alt=发表一个新主题 border=0></a>&nbsp; <a href=Class_bbs_NewReply.asp?Classid="&Clsid&"&TopicID="&TopicID&">"&_ 
				"<img src=images/newreply.gif alt=回复主题 border=0></a></td>"&_
				"<td align=right width=""70%"" valign=middle>您是本帖的第 <B>"&hits&"</B> 个阅读者"

	if pretopic<>"" Then 
	Response.Write "<a href=""Class_bbs_ShowTopic.asp?Classid="&Clsid&"&TopicID="&pretopic&"""><img src=images/pretopic.gif border=0 alt=浏览上一篇主题 width=52 height=12></a>"
	End if
	if nxttopic<>"" Then 
	Response.Write "&nbsp;<a href=""Class_bbs_ShowTopic.asp?Classid="&Clsid&"&TopicID="&nxttopic&""">"&_
					"<img src=images/nxttopic.gif border=0 alt=浏览下一篇主题 width=52 height=12></a>"
	End if
	Response.Write "</font></td></tr></table>"&_
					"<table cellpadding=0 cellspacing=0 border=0 width=100% Class=TableBorder align=center><tr><td height=1> </td></tr></table>"

	Response.Write "<table cellpadding=0 cellspacing=0 border=0 width=100% align=center><tr> "&_
				"<td Class=TableBorder valign=middle width=1 height=24> </td>"&_
				"<td align=left valign=middle width=*>"&_ 
				"<table cellpadding=0 cellspacing=0 border=0 width=""100%"" height=""100%"">"&_
				"<tr><th align=left valign=middle width=""65%"">"&_
				"&nbsp;<b>* 贴子主题</B>："&htmlencode(cutstr(topic,30))				
	Response.Write "</th><th width=""35%"" align=right>"
	'Response.Write "<a href=# onclick=""javascript:WebBrowser.ExecWB(4,1)"">"&_
	'	"<img src=images/saveas.gif border=0 width=16 height=16 alt=保存该页为文件 align=absmiddle></a>&nbsp;"&_
	'	"<object id=""WebBrowser"" width=0 height=0 classid=""CLSID:8856F961-340A-11D0-A96B-00C04FD705A2""></object>"
	'Response.Write 	"<a href=# onclick=""javascript:document.all.WebBrowser.ExecWB(6,1)""><img src=images/print.gif alt=打印此页 border=0></a>&nbsp;"
	Response.Write 	"&nbsp;</th></tr>"&_
				"</table></td><td Class=TableBorder valign=middle width=1 height=24> </td>"&_
				"</tr></table>"

''''''''''''''''''''''''''''''''''''Call showreplys()
response.flush%>

<!--#INCLUDE FILE="inc/popup.inc" -->
<SCRIPT LANGUAGE="JavaScript">
<!--
function copyText(obj) {var rng = document.body.createTextRange();rng.moveToElementText(obj);rng.select();rng.execCommand('Copy');}

//-->
</SCRIPT>

<table cellpadding=0 cellspacing=1 border=0 width="100%" align=center Class=TableBorder>
<%
Dim name,userclass,namestyle
Set rs = Server.CreateObject("ADODB.Recordset")

sql="Select B.*,S.sex,S.regdate,S.point,S.maxim,S.imageid,S.birthday,"&_
	"S.email,S.oicq,S.homepage,S.locked,S.realname,S.classcount,S.msn from ClassTopicReply B inner join student S on "&_
	"B.userid=S.userid where B.classid="&Clsid&" and B.topicid="&topicid&" order by B.postid"

rs.open sql,conn,1,1
if rs.eof and rs.bof then exit sub
totalrecords=rs.recordcount
rs.pagesize=PageSize
totalpages=rs.pagecount

currentPage=Request("page")
if currentpage="" or not isnumeric(currentpage) Then
	currentpage=1
ElseIf Cint(currentpage)>totalpages Then
	currentpage=totalpages
End if

currentpage=Cint(currentpage)
rs.absolutepage=CurrentPage
''''''''''''''''''''''''''''''''''''''''''
for i=1 to PageSize
if membername<>"" then
name=rs("realname")
else
name=rs("userid")
end if
tmpsql="Select degree from joinclass where classid="&ClsID&" and userid='"&rs("userid")&"'"
Set tmprs=Conn.Execute(tmpsql)

if tmprs.bof and tmprs.eof Then
	if BoolVar(9)=false and rs("locked")=1 then
		namestyle="color:white;filter:glow(color=#FF77ff,strength=2)"
		userclass=9
	else
		namestyle="color:white;filter:glow(color=#777777,strength=2)"
		userclass=0
	end if
Else
	userclass=tmprs(0)
	if userclass>6 Then
		namestyle="color:white;filter:glow(color=#FF7777,strength=2)"
	elseif userclass>1 Then
		namestyle="color:white;filter:glow(color=#33dd33,strength=2)"
	Else
		namestyle="color:white;filter:glow(color=#7777ff,strength=2)"
	End if
End if

Set tmprs=Nothing

'if BoolVar(9)=false and rs("locked")>1 then
'	namestyle="color:white;filter:glow(color=#FF33ff,strength=2)"
'elseif rs("sex")=1 Then
'	namestyle="color:white;filter:glow(color=#FF3333,strength=2)"
'else
'	namestyle="color:white;filter:glow(color=#3333ff,strength=2)"
'End if



if (i mod 2)=0 Then 
	bgcolor=LightTBColor
	abgcolor=DarkTBColor
Else
	bgcolor=DarkTBColor
	abgcolor=LightTBColor
End if

Response.Write "<a name=""PID"&rs("postid")&"""></a>"&_
	"<table cellpadding=0 cellspacing=1 border=0 width=""100%"" align=center Class=TableBorder>"&_
	"<tr bgcolor="&bgColor&">"
response.write "<td width=27% valign=top background=images/LeftBG.gif>"&_
	"<table cellspacing=8 border=0 align=center width=""90%""  style=""word-break:break-all"">"&_
	"<tr><td>"&_
	"<table cellspacing=0 cellpadding=0 width=100% border=0>"&_
		"<tr><td><table style="&namestyle&" border=0 height=30 valign=middle cellspacing=0 cellpadding=0><tr><td><B>"&htmlencode(name)&"</B></td></tr></table></td>"&_
		"<td align=right>"

if rs("sex")=1 Then 
	Response.Write "<img src=images/fem.gif width=20 hspace=2 alt=哇,美女耶!>"
Else
	Response.Write "<img src=images/mal.gif width=20 hspace=2 alt=哦,帅哥哟!>"
End if
if membername<>"" then
response.write constellation(rs("birthday"),true)
else
response.write constellation(rs("birthday"),false)
end if

Response.Write "</td></tr></table>"

if rs("imageid")<>"" Then
	Response.Write "<a href=""Class_Userinfo.asp?Action=showdetail&Name="&rs("userid")&""" target=_blank  title=""查看"&name&"的个人信息""><img src="""&rs("imageid")&""" border=0></a>"
Else
	Response.Write "<br><br>"
End if
Response.Write "<br><br>身份："
If userclass=0 Then
	Response.Write "已退出本校"
Elseif userclass=9 Then
	Response.Write "系统管理员"
Else
	Response.Write Grade(userclass,False)
End if
response.write "<BR>"
response.write "学校："
response.write "加入了"&rs("classcount")&"个学校"

Response.Write "<BR>积分："&rs("point")&"<br>注册："&rs("regdate")
if BoolVar(5)=True Then Response.Write "<br>鉴定："&ipsource(rs("ip"))
if rs("oicq")<>"" then
response.write "<br><a href=""http://home.qq.com/home/?friuin="&rs("oicq")&""" target=_blank title=""访问"&name&"的QQ家园""><img src=images/bbs/bbs_home.gif border=0 align=absmiddle >"
end if
response.write "</td></tr></table>"&_
	"</td>"
response.write "<td height=""100%"">"&_
	"<table width=100% height=100% border=0 cellspacing=1 cellpadding=0 align=center>"&_
	"<tr><td valign=top>"
response.write "<table width=100% cellspacing=1 cellpadding=0 border=0>"&_
	"<tr><td align=right valign=top nowrap>"&_
	"<a href=""UserSMS.asp?Action=new&touser="&rs("userid")&""" target=_blank title=""给"&name&"发短消息"">"&_
	"<img border=0 src=""images/message.gif"" align=absmiddle hspace=2>短信</a>&nbsp;&nbsp;"&_
	"<a href=""Friendlist.asp?Action=addF&myFriend="&rs("userid")&""" target=_blank title=""把"&name&"加入好友列表"">"&_
	"<img border=0 src=""images/friend.gif"" align=absmiddle hspace=2>好友</a>&nbsp;&nbsp;"&_
	"<a href=""Class_Userinfo.asp?Action=showdetail&Name="&rs("userid")&""" target=_blank  title=""查看"&name&"的个人信息"">"&_
	"<img border=0 src=""images/profile1.gif"" align=absmiddle hspace=1>信息</a>&nbsp;&nbsp;"
if rs("email")<>"" Then
	response.write "<a href=""mailto:"&rs("email")&""" title=""给"&name&"发电子邮件"">"&_
	"<img src=""images/email.gif"" border=0  hspace=2>邮件</a>&nbsp;&nbsp;"
End if
if rs("oicq")<>"" Then
	response.write "<a href=""http://search.tencent.com/cgi-bin/friend/user_show_info?ln="&rs("oicq")&""" title=""查看"&name&"的QQ["&rs("oicq")&"]资料""><img src=""images/oicq.gif"" border=0 width=15 height=15 hspace=2>QQ</a>&nbsp;&nbsp;"
End if
if rs("homepage")<>"" Then
	response.write "<a href="""&rs("homepage")&""" title=""访问"&name&"的主页"">"&_
	"<img src=""images/homepage.gif"" border=0 align=absmiddle>主页</a>&nbsp;&nbsp;"
End if
response.write "</td></tr></table>"&_
"<hr width=98% size=1 color=#777777>"&_
"</td></tr>"
response.write "<tr><td width=100% height=""100%"">"&_
"<table height=100% width=95% border=0 cellSpacing=0 cellPadding=0 style=""word-break:break-all"" align=center>"&_
	"<TR><TD width=14 height=8>"&_
"<IMG height=8 src=images/haha/top_l.gif width=14></TD>"&_
"<TD background=images/haha/top_c.gif></TD>"&_
"<TD width=16><IMG height=8 src=images/haha/top_r.gif width=16></TD></TR>"&_
"<TR><TD vAlign=top width=14 background=images/haha/center_l.gif></TD>"&_
"<TD bgColor=#fffff1>"
if rs("mood")<>0 Then
	Response.Write "<img src=""images/mood/"&rs("mood")&".gif"" border=0 alt=发贴心情>&nbsp;"
end if
Response.Write "<b>"&htmlencode(rs("title"))&"</b><br>"
if BoolVar(4)=True Then 
	Response.Write "<span id=yu"&rs("postid")&">"&ubbcode(rs("body"))&"</span>"
Else 
	Response.Write "<span id=yu"&rs("postid")&">"&htmlencode(rs("body"))&"</span>"
End if
response.write "<TD vAlign=top width=16 background=images/haha/center_r.gif>"&_
"<IMG height=8 src=images/haha/top_r2.gif width=16></TD></TR><tr><td valign=top width=14>"&_
"<Img height=42 src=images/haha/foot_l1.gif width=14></td>"&_
"<td background=images/haha/foot_c.gif><img height=42 src=images/haha/foot_l3.gif width=36></td>"&_
"<TD align=right width=16 height=42><IMG height=42 src=images/haha/foot_r.gif width=16></TD>"&_
"</TR></table>"&_
	"</td></tr>"
response.write "<tr><td height=100% valign=bottom>"
if rs("maxim")<>"" then
	Response.Write "<table align=center valign=bottom border=0 cellspacing=8 cellpadding=0  width=""95%"">"&_
	"<tr><td align=right vlign=bottom><p><img src=images/bbs/banquan.gif><font color=red>郑重声明：</font>本文版权归<font color=bule>"&name&"</font>和<font color=red>"&StrVar(1)&"</font>所有，未经同意，请勿转载。&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><br><img src=images/bbs/qianming.gif alt="&name&"个性签名！请勿挪用！><br><br>"& UBBCode(rs("maxim"))&"</td></tr></table>"
End if
response.write "</td></tr>"
response.write "</table>"
response.write "</td></tr>"&_
	"<tr bgcolor="&bgcolor&" height=30>"
Response.Write "<td background=images/LeftBG.gif>&nbsp;"&OnlineStatus(rs("userid"))
if membername<>"" then
if cdate(Request.cookies("fenglingtxl_520")("logintime"))<rs("posttime") Then
		Response.Write "<img src=images/postnew.gif hspace=2 alt=新贴>"
	Else
		Response.Write "<img src=images/postold.gif hspace=2 alt=旧贴>"
	End if
end if
response.write rs("posttime")&"</td>"&_
	"<td><table width=""100%"">"&_
	"<tr><td><img src=""images/ip.gif"" hspace=2 alt=发贴IP>"
if sysadmin Then
	Response.Write rs("ip")
Else
	Response.Write getip(rs("ip"))
End if
response.write "</td><td align=right>&nbsp;"

if rs("userid")=membername or sysadmin or degree>1 Then
	Response.Write "<a href=Class_bbs_Admin.asp?Classid="&Clsid&"&Action=Edit&TopicID="&TopicID&"&PostID="&_
	rs("postid")&"&Page="&CurrentPage&"><img src=images/edit1.gif border=0>编辑</a>&nbsp;&nbsp;"
	if linkid<>rs("postid") then
		response.write "<a onclick=""javascript:return confirm('您确认要删除这个回复帖子吗?')"" href=""Class_bbs_Admin.asp?Classid="&Clsid&"&Action=DeleteReply&TopicID="&TopicID&"&PostID="&rs("postid")&"&Page="&CurrentPage&""">"&_
		"<img src=""images/recycle1.gif"" border=0>删除</a>&nbsp;&nbsp;"
	end if
End if
response.write "<a href=""javascript:copyText(document.all.yu"&rs("postid")&")"">"&_
	"<img border=0 src=""images/copy.gif"" align=absmiddle hspace=1>复制</a>&nbsp;&nbsp;"&_
	"<a href=""Class_bbs_NewReply.asp?Classid="&Clsid&"&TopicID="&TopicID&"&QuotePost="&rs("postid")&""" title=""引用"&name&"的留言"">"&_
	"<img border=0 src=""images/replynow.gif"" align=absmiddle hspace=1>引用</a>&nbsp;&nbsp;"&_
	"</td></table>"&_
	"</td></tr></table>"
response.flush

rs.movenext
if currentpage=totalpages then
	if rs.eof then exit for
end if

next
''''''''''''''''''''''''''''

Dim p,ii

Response.Write "<table border=0 cellpadding=0 cellspacing=3 width=100% align=center >"&_
	"<tr><td valign=middle nowrap><a href=#top><img src=images/gotop.gif border=0>顶端</a>"
	
if totalpages<>1 then
	response.write "&nbsp;&nbsp;页次：<strong>"& currentPage &"</strong>/<strong>"& totalpages &"</strong></td>"&_
	"<td valign=middle align=right nowrap><p>分页："

if currentpage=4 then
	response.write "<a href=""?Classid="&Clsid&"&TopicID="&TopicID&"&Page=1""><b>1</b></a> "
elseif currentpage>3 then
	response.write "<a href=""?Classid="&Clsid&"&TopicID="&TopicID&"&Page=1""><B>1</B></a> …"
end if
if totalpages>currentpage+2 then
	endpage=currentpage+2
else
	endpage=totalpages
end if
for ii=currentpage-2 to endpage
	if not ii<1 then
		if ii = currentpage then
        response.write " <font color=brown><B>"&ii&"</B></font>"
		else
        response.write " <a href=""?Classid="&Clsid&"&TopicID="&TopicID&"&Page="&ii&"""><B>"&ii&"</B></a>"
		end if
	end if
next
if currentpage+3 = totalpages then
	response.write " <a href=""?Classid="&Clsid&"&TopicID="&TopicID&"&Page="&totalpages&"""><B>"&totalpages&"</B></a>"
elseif currentpage+2 < totalpages then 
	response.write " … <a href=""?Classid="&Clsid&"&TopicID="&TopicID&"&Page="&totalpages&"""><B>"&totalpages&"</B></a>"
end if

Response.Write "&nbsp;&nbsp;转到第 <select name=""page"" style=""width:35px"" onChange=""location.href='?Classid="&Clsid&"&TopicID="&TopicID&"&page='+this.options[selectedIndex].value"">"

ii=1
do while ii<=totalpages
             if ii=currentPage then
             response.write("<option selected value="&ii&">"&ii&"</option>")
             else
             response.write("<option value="&ii&">"&ii&"</option>")
             end if
             ii=ii+1
             loop
	Response.Write "</select> 页"

else

response.write "</td><td align=right>本主题仅一页"


end if

response.write "</td></tr></table>"
''''''''''''''''''''''''''''''''''''''''''''''''''''''''

if membername<>"" Then

	if locked=0 then
		Response.Write "<form action=Class_bbs_NewReply.asp?Classid="&Clsid&" method=POST onsubmit=submitonce(this) name=frmgbk>"&_
	"<input type=hidden name=Action value=Reply>"&_
	"<input type=hidden name=TopicID value="&topicID&">"&_
	"<table width=""100%"" cellspacing=1 cellpadding=2 Class=TableBorder><tr>"&_
		"<th height=23>≡≡ 快速回复主题 ≡≡"&_
		"<tr Class=LightTableBody><td>"&_
		"<table border=0 width=""100%""><tr><td><li>发贴心情：</td><td>"
	%><%for i=1 to 36%>
	<input type="radio" value="<%=i%>" name="mood" <%if i=1 Then Response.Write "checked"%>><img src="images/mood/<%=i%>.gif" WIDTH="20" HEIGHT="20">
<%if i=12 or i=24 Then Response.Write "<br>"
next%>
<%Response.Write "</td></tr>"
if BoolVar(3)=True and BoolVar(4)=True Then
Response.Write "<TR><TD rowspan=3></TD><TD></TD></TR>"
%>
<!--#INCLUDE FILE="inc/ubbtools.asp" -->
                  <%End if%>
<%Response.Write "<tr>"&_
		"<td width=""23%""><br><li>HTML标签：<font color=brown>OFF</font><BR><li>UBB标签："
		if BoolVar(4)=True Then 
			Response.Write "<font color=#003399>ON" 
		Else 
			Response.Write "<font color=brown>OFF"
		End if
	Response.Write "</font><BR><li>最大长度：<font color=brown>"&IntVar(1)&"KB</font>"
	Response.Write "<br><br>&nbsp;&nbsp;<a href=""javascript:openScript('Class_Help.asp?about=ubb',670,500)""  style=""cursor:help""><IMG SRC=""images/help.gif"" WIDTH=""42"" HEIGHT=""17"" BORDER=0 ALT=""查看UBB代码使用说明""></a>"
	Response.Write "</td><td><div align=""center""><textarea onkeydown=ctlent() name=content rows=8 cols=100 title=Ctrl+Enter直接提交回复帖子></textarea></div></td></tr><TR><TD>&nbsp;</TD><TD><div align=center>"
	%><script language="JavaScript">
				function insertsmilie(smilieface){

	document.frmgbk.content.value+=smilieface;
}
				</script>
	<%dim i
for i=1 to 36
	response.write "<img src="""&"images/mood/"&i&".gif"&""" border=0 onclick=""insertsmilie('[em"&i&"]')"" style=""CURSOR: hand"">&nbsp;"
if i=18 or i=36 Then Response.Write "<br>"
next%>
    <%                  
	Response.Write "</div></TD></TR></table></td></tr>"&_
		"<tr Class=DarkTableBody><td align=center><input type=Submit value="" 发 表 "" name=Sbmt class=button>&nbsp;&nbsp;&nbsp;&nbsp;<input type=reset name=reset value="" 清 除 "" class=button></td></tr></table></form>"
	end if
	if sysadmin or degree>1 or topicuserid=membername then '管理员或学校管理员或主题作者有权限操作此项	
	Response.Write "<table width=""100%"" cellpadding=0 celspacing=0 border=0>"&_
		"<tr><td align=right valign=top><b>主题管理选项</b>：<a href=Class_bbs_Admin.asp?Classid="&Clsid&"&Action=Lock&TopicID="&TopicID&">锁定/解锁</a>"&_
		"&nbsp;|&nbsp;<a href=Class_bbs_Admin.asp?Classid="&Clsid&"&Action=Top&TopicID="&TopicID&">固顶/解固</a>"&_
		"&nbsp;|&nbsp;<a href=Class_bbs_Admin.asp?Classid="&Clsid&"&Action=DeleteTopic&TopicID="&TopicID&" onclick=""javascript:return confirm('确定要删除这个主题及其所有回复吗?')"">删除主题</a></td></tr></table>"

	end if
End if

if not sysadmin then
conn.execute("update Classtopic Set hits=hits+1 where Classid="&Clsid&" and postid="&TopicID)
end if

end sub


'Sub topicTop()

	

'End Sub


'Sub showreplys()


'End Sub

Function OnlineStatus(UserName)
	Dim ors
	Set ors=Conn.Execute("Select userid from online where userid='"&username&"'")
	if ors.eof and ors.bof Then
		OnlineStatus="<img src=images/isoff.gif alt=离线! height=17 hspace=4>"
	Else
		OnlineStatus="<img src=images/ison.gif alt=在线！快来找我吧! height=17 hspace=4>"
	End if
	ors.close
	Set ors=Nothing
End Function


%>
<!--#INCLUDE FILE="inc/grade.asp" -->
<!--#INCLUDE FILE="inc/constellation.asp" -->
<!--#INCLUDE FILE="inc/checkupip.asp" -->
<%Call footer()%>