<!--#include file="conn.asp"-->
<!-- #include file="inc/char.asp" -->
<!-- #include file="inc/char_cfrom.asp" -->
<!-- #include file="inc/char_board.asp" -->
<!-- #include file="inc/const.asp" -->
<!-- #include file="chkuser.asp" -->
<!--#include file="inc/theme.asp"-->
<!--#include file="inc/birthday.asp"-->
<!-- #include file="inc/ubbcode.asp" -->
<LINK href="css/css.css" type=text/css rel=stylesheet>
<script >
function PageOnLoad(){
	if (bLoad==false){
		InitDocument("Body","GB2312");
	}
}
</script>
<body onLoad="PageOnLoad()">
<% dim checkreplyname
	Dim AnnounceID,rootid
  	Dim Star,nSkin,SkinPic,Skiname
	Dim Topic_1,IsTop,IsBest
	Dim UserName,view,times
	Dim onlineUserList
	Dim UserSign
	Dim Page_Count,TotalRec,abgcolor,bgcolor
	dim isvote
	i=1
	UserSign=false
	if boardmaster or master then
		guestlist=""
	else
		guestlist=" lockboard=0 and "
	end if

	stats="浏览帖子"
    	if foundErr then
		call nav()
		call headline(2)
		call error()
	else
    		call chkInput()
		if founderr then
			call nav()
			call headline(2)
			call error()
		else
    			call chktopic()
			if founderr then
				call nav()
				call headline(2)
				call error()
			else
				call nav()
				call headline(2)
				call subOnline()
				call TopicTop()
				call showTopic_1()
				call listpage()
				if cint(skin)=1 and cint(request("viewone"))<>1 then
				call treelist()
				end if
				if founderr then
				call error()
				else
				call fastreply()
				end if
			end if
		end if
	end if
	 call count()
	call endline()

	sub chktopic()
	if cint(boardskin)=6 then
		if membername="" then
		response.write "<script>location.href='login.asp'</script>"
		response.end
		end if
	elseif cint(boardskin)=5 then
		if membername="" then
			founderr=true
			Errmsg=Errmsg+"<br>"+"<li>本论坛为秘密论坛，请<a href=login.asp><font color="&TableContentColor&">登陆</font></a>并确认您的用户名已经得到管理员的认证后进入。"
			exit sub
		else
			if chkboardlogin(BoardID,membername)=false then
			founderr=true
			Errmsg=Errmsg+"<br>"+"<li>本论坛为秘密论坛，请确认您的用户名已经得到管理员的认证后进入。"
			exit sub
			end if
		end if
	elseif cint(boardskin)=7 then
		if membername="" then
			founderr=true
			Errmsg=Errmsg+"<br>"+"<li>本论坛为认证论坛，请<a href=login.asp><font color="&TableContentColor&">登陆</font></a>并确认您的用户名已经得到管理员的认证后进入。"
			exit sub
		else
			if chkboardlogin(BoardID,membername)=false then
			founderr=true
			Errmsg=Errmsg+"<br>"+"<li>本论坛为认证论坛，请确认您的用户名已经得到管理员的认证后进入。"
			exit sub
			end if
		end if
	
	
	end if
    	conn.execute("update bbs1 set hits=hits+1 where AnnounceID="&AnnounceID&"")
	sql="select topic,istop,isbest,UserName,hits,times,rootid,isvote from bbs1 where AnnounceID=(select rootid from bbs1 where Announceid="&Announceid&")"
	set rs=server.createobject("adodb.recordset")
	rs.open sql,conn,1,1
	if not(rs.bof and rs.eof) then
		topic_1=rs(0)
		istop=rs(1)
		isbest=rs(2)
		UserName=rs(3)
		if cint(request("viewone"))<>1 then
		view=rs(4)
		else
		dim rsone,sqlone
		set rsone=server.createobject("adodb.recordset")
		   sqlone="select hits from bbs1 where announceID="&request("id")
		   rsone.open sqlone,conn,1,1
		view=rsone("hits")
		rsone.close
		end if 
		times=rs(5)
		rootid=rs(6)
		isvote=rs(7)
		stats=""&boardtype&"浏览："&topic_1&""
		if UserName=membername and membername<>"" then call readRe()
	else
		foundErr = true
		ErrMsg=ErrMsg+"<br>"+"<li>您指定的贴子不存在</li>"
	end if
	rs.close
	set rs=nothing
	end sub

	sub topicTop()


	if IsVote=1 then
	Dim vrs,vote,vote_1,votenum,votenum_1,m
	set vrs=conn.execute("select vote,votenum,votetype,voteuser from vote where AnnounceID="&RootID&"")
	if not (vrs.eof and vrs.bof) then
	vote=split(vrs("vote"),"|")
	votenum=split(vrs("votenum"),"|")
	response.write "<table width="&TableWidth&" border=0 cellspacing=1 cellpadding=3 align=center bgcolor="&TableBackColor&" style=""table-layout:fixed;word-break:break-all""><tr bgcolor="&TableTitleColor&"><td colspan=2 height=25><font color="&TableFontColor&"><B>[投票]："&Topic_1&"</B></font></td></tr><form action=postvote.asp?BoardID="&BoardID&"&AnnounceID="&AnnounceID&"&action="&vrs("votetype")&" method=POST>"
	for i = 0 to ubound(votenum)
		votenum_1=cint(votenum_1)+votenum(i)
	next
	if votenum_1=0 then votenum_1=1
	for m = 0 to ubound(vote)
		if cint(vrs("votetype"))=0 then
		vote_1=vote_1&"<tr bgcolor="&TablebodyColor&"><td width=""60%"" height=25>"&m+1&".  <input type=radio name=postvote value="""&m&""">"&htmlencode(vote(m))&"</td><td width=""40%""><font color="&AlertFontColor&"><img src="&picurl&"bar"&m+1&".gif width="&Cint(replace(FormatPercent(votenum(m)/votenum_1),"%",""))*3.3&" height=8> <b>"&votenum(m)&"票</b></font></td></tr>"
		else
		vote_1=vote_1&"<tr bgcolor="&TablebodyColor&"><td width=""60%"" height=25>"&m+1&".  <input type=checkbox name=postvote_"&m&" value="""&m&""">"&ubbcode(vote(m))&"</td><td width=""40%""><font color="&AlertFontColor&"><img src="&picurl&"bar"&m+1&".gif width="&Cint(replace(FormatPercent(votenum(m)/votenum_1),"%",""))*3.3&" height=8> <b>"&votenum(m)&"票</b></font></td></tr>"
		end if
	next
	response.write vote_1
	vote_1=""

	if VoteFlag=1 then
	response.write "<tr bgcolor="&aTablebodyColor&"><td colspan=2 height=25><input type=submit name=Submit value='投 票'></td>"
	else
		if membername="" then
		response.write "<tr bgcolor="&aTablebodyColor&"><td colspan=2 height=25><font color="&AlertFontColor&">您还没有登陆，不能进行投票。</font></td>"
		else
			if instr(vrs("voteuser"),membername)>0 then
			response.write "<tr bgcolor="&aTablebodyColor&"><td colspan=2 height=25><font color="&AlertFontColor&">您已经投过票了，请看结果吧。</font></td>"
			else
			response.write "<tr bgcolor="&aTablebodyColor&"><td colspan=2 height=25><input type=submit name=Submit value='投 票'></td>"
			end if
		end if
	end if
	response.write "</tr></form></table><BR>"
	end if
	set vrs=nothing
end if
	response.write "<p></p><table cellpadding=0 cellspacing=0 border=0 width="""&TableWidth&""" align=center>"&_
			"<tr><td align=left width=""30%"" valign=middle>&nbsp; <a href=announce.asp?BoardID="&BoardID&">"&_ 
			"<img src="&picurl&P_post&" alt=发表一个新主题 border=0></a>&nbsp;<a href=vote.asp?BoardID="&BoardID&">"&_ 
			"<img src="&picurl&P_vote&" alt=发表一个新投票 border=0></a>&nbsp;<a href=reannounce.asp?BoardID="&BoardID&"&RootID="&RootID&"&id="&AnnounceID&">"&_ 
			"<img src="&picurl&P_reply&" alt=回复主题 border=0></a></td>"&_
			"<td align=right width=""70%"" valign=middle>您是本帖的第 <B>"&view&"</B> 个阅读者<a href=go.asp?BoardID="&BoardID&"&sid="&times&"><img src="&picurl&P_backTopic&" border=0 alt=浏览上一篇主题 width=52 height=12></a>&nbsp;</a> &nbsp;<a href=?BoardID="&BoardID&"&RootID="&RootID&"&id="&AnnounceID&"&star="&star&"&skin="&nskin&"><img src="&picurl&skinpic&" width=40 height=12 border=0 alt="&skiname&"显示贴子></a>　<a href=go.asp?BoardID="&BoardID&"&sid="&times&"&action=next><img src="&picurl&P_nexttopic&" border=0 alt=浏览下一篇主题 width=52 height=12></a></td>"&_
			"</tr></table>"
	response.write "<table cellpadding=0 cellspacing=0 border=0 width="""&TableWidth&""" bgcolor=#FFFFFF align=center>"&_
			"<tr> <td height=1> </td></tr></table><p></p>"

	response.write "<table cellpadding=0 cellspacing=0 border=0 width="""&TableWidth&""" bgcolor="&TableBackColor&" align=center>"&_
			"<tr><td height=1> </td></tr></table>"
	end sub

	sub ShowTopic_1()
	response.write "<table cellpadding=0 cellspacing=0 border=0 width="""&TableWidth&""" align=center><tr> "&_
			"<td bgcolor="&TableBackColor&" background="&picurl&P_reflash&" valign=middle width=1 height=24> </td>"&_
			"<td bgcolor="&TableTitleColor&" background="&picurl&P_reflash&" align=left valign=middle width=*>"&_ 
			"<table cellpadding=0 cellspacing=1 border=0 width=""100%"">"&_
			"<tr><td bgcolor="&TableTitleColor&" align=left valign=middle width=""65%"" background="&picurl&P_reflash&"><font color="&TableFontColor&">"&_
            "&nbsp;<b>* 贴子主题</B>： "&htmlencode(topic_1)&"</font> </td><td width=""35%"" align=right>"&_
			" <a href=dispbbs.asp?BoardID="&BoardID&"&RootID="&RootID&"&id="&AnnounceID&">全部跟贴</a>&nbsp;&nbsp;<a href=report.asp?BoardID="&BoardID&"&RootID="&RootID&"&id="&AnnounceID&">投诉</a>&nbsp;"&_ 
			" <a href=favadd.asp?BoardID="&BoardID&"&RootID="&RootID&"&id="&AnnounceID&">"&_
			"加入书签</a>&nbsp; "&_
			"&nbsp;</td></tr>"&_
			"</table></td><td bgcolor="&TableBackColor&" valign=middle width=1 height=24> </td>"&_
			"</tr></table>"&_
			"<table cellpadding=0 cellspacing=0 border=0 width="""&TableWidth&""" bgcolor="&TableBackColor&" align=center>"&_
			"<tr> <td height=1> </td></tr></table>"
	if boardskin=2 then
	if cint(skin)=1 then
	sql="Select AnnounceID,BoardID,UserName,Topic,dateandtime,body,Expression,ip,RootID,signflag,isbest,isvote from bbs1 where BoardID="&BoardID&" and AnnounceID="&AnnounceID&" and not locktopic=2"
	else
	sql="Select AnnounceID,BoardID,UserName,Topic,dateandtime,body,Expression,ip,RootID,signflag,isbest,isvote from bbs1 where BoardID="&BoardID&" and RootID="&RootID&" and not locktopic=2 order by AnnounceID"
	end if
	else
	if cint(skin)=1 then
	sql="Select B.AnnounceID,B.BoardID,B.UserName,B.Topic,B.dateandtime,B.body,B.Expression,B.ip,B.RootID,B.signflag,B.isbest,B.isvote,U.UserName,U.useremail,U.homepage,U.oicq,U.sign,U.userclass,U.title,U.width,U.height,U.article,U.face,U.addDate,U.userWealth,U.userEP,U.userCP,U.birthday,U.sex,U.UserGroup,U.LockUser,U.userPower,B.payfor from bbs1 B inner join [user] U on U.UserName=B.UserName where B.BoardID="&BoardID&" and B.AnnounceID="&AnnounceID&" and not B.locktopic=2"
	else
	sql="Select B.AnnounceID,B.BoardID,B.UserName,B.Topic,B.dateandtime,B.body,B.Expression,B.ip,B.RootID,B.signflag,B.isbest,B.isvote,U.UserName,U.useremail,U.homepage,U.oicq,U.sign,U.userclass,U.title,U.width,U.height,U.article,U.face,U.addDate,U.userWealth,U.userEP,U.userCP,U.birthday,U.sex,U.UserGroup,U.LockUser,U.userPower,B.payfor from bbs1 B inner join [user] U on U.UserName=B.UserName where B.BoardID="&BoardID&" and B.RootID="&RootID&" and not B.locktopic=2 order by B.AnnounceID"
	end if
	end if
	set rs=server.createobject("adodb.recordset")
	rs.open sql,conn,1,1
	if not(rs.eof and rs.bof) then
			rs.PageSize = Maxtitlelist
			rs.AbsolutePage=star
			page_count=0
			totalrec=rs.recordcount 
			call showannounce_1()
	else
		foundErr = true
		ErrMsg=ErrMsg+"<br>"+"<li>您指定的贴子不存在</li>"
		exit sub
	end if
	end sub

	sub showannounce_1()
	Dim Topic,DateAndTime,Body,Expression,ip,SignFlag,Isvote
	Dim useremail,homepage,oicq,sign,userclass,title,width,uheight,article,face
	Dim addtime,userWealth,userEP,userCP,userbirth,sex,UserGroup,usercolor,namestyle
	Dim Comefrom
	Dim vrs,vote,vote_1,votenum,votenum_1,m
	while (not rs.eof) and (not page_count = rs.PageSize)

	AnnounceID=rs(0)
	BoardID=rs(1)
	UserName=rs(2)
	topic=rs(3)
	dateandtime=rs(4)
	body=rs(5)
	Expression=rs(6)
	ip=rs(7)
	RootID=rs(8)
	signflag=rs(9)
	isbest=rs(10)
	isvote=rs(11)
	if boardskin=2 then
	useremail="yubo@x263.net"
	homepage="http://bbs.jmjh.net/"
	oicq="942365"
	sign=""
	userclass=1
	title=""
	width=32
	uheight=32
	article=1
	face="pic/image1.gif"
	addtime=now()
	userWealth=1
	userEP=1
	userCP=1
	userbirth="2002-1-1"
	sex=1
	UserGroup="学生之友"
	else
	useremail=rs(13)
	homepage=rs(14)
	oicq=rs(15)
	sign=rs(16)
	userclass=rs(17)
	title=rs(18)
	width=rs(19)
	uheight=rs(20)
	article=rs(21)
	face=rs(22)
	addtime=rs(23)
	userWealth=rs(24)
	userEP=rs(25)
	userCP=rs(26)
	userbirth=rs(27)
	sex=rs(28)
	UserGroup=rs(29)
	dim lockuser,userpower,payfor
	lockuser=rs(30)
	userPower=rs(31)
	payfor=rs(32)
	end if
	if isnumeric(userclass) then
	if userclass=18 then
	namestyle="filter:glow(color="&vip_mc&",strength=2)"
	usercolor=vip_fc
	elseif userclass=19 then
	namestyle="filter:glow(color="&bmaster_mc&",strength=2)"
	usercolor=bmaster_fc
	elseif userclass=20 then
	namestyle="filter:glow(color="&master_mc&",strength=2)"
	usercolor=master_fc
	else
	namestyle="filter:glow(color="&user_mc&",strength=2)"
	usercolor=user_fc
	end if
	end if
	if bgcolor=TableBodyColor then
		bgcolor=aTableBodyColor
		abgcolor=TableBodyColor
	else
		bgcolor=TableBodyColor
		abgcolor=aTableBodyColor
	end if
	if userbirth="" or isnull(userbirth) then
	userbirth=""
	else
	userbirth=astro(userbirth)
	end if
	response.write "<table cellpadding=0 cellspacing=0 border=0 width="""&TableWidth&""" align=center>"&_
		"<tr><td bgcolor="&TableBackColor&" valign=middle width=1 height=24> </td>"&_
		"<td bgcolor="&bgcolor&">"&_ 
		"<table width=""100%"" cellpadding=4 cellspacing=0><tr>"&_ 
        "<td bgcolor="&bgcolor&" valign=top width=""180"" rowspan=2><img src="""" width=0 height=4><BR><table width=""100%"" cellpadding=4 cellspacing=0><tr><td style="&namestyle&">"&_
        "  &nbsp;<a name="&AnnounceID&"><font color="&usercolor&"><B>"&htmlencode(UserName)&"</B></font></a></td><td>&nbsp;"&isOnline(UserName,sex)&"</td><td>&nbsp;"&userbirth&"</td></tr></table>"
	if TitleFlag and title<>"" then response.write "　头衔："&htmlencode(title)&"<br>"
	response.write "&nbsp;&nbsp;<img src="&htmlencode(face)&" width=97 height=110><br><p></p>"

	if isnumeric(userclass) then
	select case userclass
	case 1 response.write "&nbsp;&nbsp;<img src="&picurl&gradepic(1)&">"
	case 2 response.write "&nbsp;&nbsp;<img src="&picurl&gradepic(2)&">"
	case 3 response.write "&nbsp;&nbsp;<img src="&picurl&gradepic(3)&">"
	case 4 response.write "&nbsp;&nbsp;<img src="&picurl&gradepic(4)&">"
	case 5 response.write "&nbsp;&nbsp;<img src="&picurl&gradepic(5)&">"
	case 6 response.write "&nbsp;&nbsp;<img src="&picurl&gradepic(6)&">"
	case 7 response.write "&nbsp;&nbsp;<img src="&picurl&gradepic(7)&">"
	case 8 response.write "&nbsp;&nbsp;<img src="&picurl&gradepic(8)&">"
	case 9 response.write "&nbsp;&nbsp;<img src="&picurl&gradepic(9)&">"
	case 10 response.write "&nbsp;&nbsp;<img src="&picurl&gradepic(10)&">"
	case 11 response.write "&nbsp;&nbsp;<img src="&picurl&gradepic(11)&">"
	case 12 response.write "&nbsp;&nbsp;<img src="&picurl&gradepic(12)&">"
	case 13 response.write "&nbsp;&nbsp;<img src="&picurl&gradepic(13)&">"
	case 14 response.write "&nbsp;&nbsp;<img src="&picurl&gradepic(14)&">"
	case 15 response.write "&nbsp;&nbsp;<img src="&picurl&gradepic(15)&">"
	case 16 response.write "&nbsp;&nbsp;<img src="&picurl&gradepic(16)&">"
	case 17 response.write "&nbsp;&nbsp;<img src="&picurl&gradepic(17)&">"
	case 18 response.write "&nbsp;&nbsp;<img src="&picurl&gradepic(18)&">"
	case 19 response.write "&nbsp;&nbsp;<img src="&picurl&gradepic(19)&">"
	case 20 response.write "&nbsp;&nbsp;<img src="&picurl&gradepic(20)&">"
	end select
    response.write "<br>&nbsp;&nbsp;<font color=#808000>等级："& grade(userclass) &"</font><BR>"
	end if
	if FromFlag=0 then
		if boardmaster or master then
		comefrom=address(ip)
		else
        	comefrom="保密"
		end if
	else
		comefrom=address(ip)
    end if
	if not (BbsUserInfo=1 or BbsUserInfo=3) then
   if userpower>0 then
   response.write "　<font color=#0000FF>威望：</font><font color='#FF0000'><strong>+"&userPower&"</strong></font><br>" 
  else
   response.write "　威望：<font color='#FF0000'><strong>"&userPower&"</strong></font><br>" 
  end if
	if userWealth>25000 then
	response.write "　<font color=#33CC33>财产："&userwealth&"</font><br>"
	else
	response.write "　<font color=#33CC33>财产：</font><img src="&picurl&"bar1.gif width="""&(userWealth*0.005)+3&""" height=8 alt="&userWealth&"><br>"
	end if
	if userEP>25000 then
	response.write "  <font color=#FF9966>经验："&userEP&"</font><br>"
	else
	response.write "　<font color=#FF9966>经验：</font><img src="&picurl&"bar4.gif width="&(userEP*0.005)+3&" height=8 alt="&userEP&"><br>"
	end if
	if userCP>25000 then
	response.write "&nbsp;&nbsp;<font color=#CCCC00>魅力："&userCP&"</font><br>"
	else
	response.write "&nbsp;&nbsp;<font color=#CCCC00>魅力：</font><img src="&picurl&"bar5.gif width="&(userCP*0.005)+3&" height=8 alt="&userCP&"><br>"
	end if
	if UserGroup<>"" then
	response.write "&nbsp;&nbsp;<font color=#CC66FF>门派：" & UserGroup & "</font><br>"
	end if
	end if
	response.write "&nbsp;&nbsp;注册："& year(addtime) &"-"& month(addtime) &"-"& day(addtime)
	response.write "<BR> &nbsp;&nbsp;文章："&article&"  <br>&nbsp;&nbsp;鉴定："&comefrom&" <img src="""" width=0 height=4><BR>"&_
			"</td><td bgcolor="&bgcolor&" width=1 height=100% rowspan=2>"&_ 
            "<table width=1 height=""100%"" cellpadding=0 cellspacing=0 bgcolor="&TableTitleColor&">"&_
            "<tr><td width=1></td></tr></table></td>"&_
			"<td bgcolor="&bgcolor&" valign=top width=* height=""95%""><img src="""" width=0 height=4><BR>"
	if not (BbsUserInfo=2 or BbsUserInfo=3) then
    response.write "<b><font color=red>"&(star-1)*Maxtitlelist+page_count+1&"</font>&nbsp;巷</b>&nbsp;<a href=usersms.asp?action=new&touser="&HTMLEncode(UserName)&" target=_blank>"&_
			"&nbsp;短消息</a>&nbsp;&nbsp;"&_
            "<a href=friendlist.asp?action=addF&myFriend="&HTMLEncode(UserName)&" target=_blank>"&_
			"加入好友</a>&nbsp;&nbsp;"&_
            "<a href=dispuser.asp?name="&HTMLEncode(UserName)&" target=_blank>"&_
			"资料</a>&nbsp;&nbsp;"&_
            "<a href=queryResult.asp?stype=1&nSearch=3&keyword="&HTMLEncode(UserName)&"&BoardID="&cstr(BoardID)&"&SearchDate=ALL target=_blank>搜索</a>&nbsp; "
	if oicq<>"" then
	end if

	response.write "<a href=reannounce.asp?BoardID="&BoardID&"&RootID="&RootID&"&id="&AnnounceID&"&reply=true>"&_
			"引用</a>&nbsp; "&_
		"<a href=reannounce.asp?BoardID="&BoardID&"&RootID="&RootID&"&id="&AnnounceID&">"&_
			"回复</a><BR><hr width=""100%"" size=1 color=#777777>"
	end if
    response.write ""&_
            "<table cellpadding=0 cellspacing=0 width=""95%"" style=""table-layout:fixed; word-break:break-all"">"&_
            "<tr><td width=32 align=left valign=top>"
	if instr(Expression,"face")>0 then
		response.write "<img src="&Faceurl&Expression&" border=0 alt=发贴心情>&nbsp;</td>"
	end if
 if AnnounceID<>RootID then
	      if payfor=0  then
	           if hostpay<>0 and username<>membername then
     response.write "</td><td><font style=""font-size:"&FontSize&"pt;line-height: "&FontHeight&"pt""><b>"& htmlencode(topic) &"</b><br><a href=payfor.asp?BoardID="&BoardID&"&RootID="&RootID&"&AnnounceID="&AnnounceID&"><font color=red>支付分值给"&htmlencode(username)&"</font></a><br>"
		       else 
	 response.write "</td><td><font style=""font-size:"&FontSize&"pt;line-height:  "&FontHeight&"pt""><b>"& htmlencode(topic) &"</b><br>"
               end if

           else
response.write "</td><td><font style=""font-size:"&FontSize&"pt;line-height: "&FontHeight&"pt""><b>"& htmlencode(topic) &"</b><br><font color=blue>"&htmlencode(username)&"获得分值：</font><b><font color=red>"&payfor&"</font></b><br>"
         end if
else
dim hostpay
	if payfor=0 then
		response.write "</td><td><font style=""font-size:"&FontSize&"pt;line-height: "&FontHeight&"pt""><b>"& htmlencode(topic) &"</b><br>"
		hostpay=payfor
	  else
	  response.write "</td><td><font style=""font-size:"&FontSize&"pt;line-height: "&FontHeight&"pt""><b>"& htmlencode(topic) &"</b><br><font color=blue>此贴分值：</font><font color=red><u><b>"&payfor&"</b></u></font><br>"
	  hostpay=payfor
	end if
	end if
	if err.number<>0 then 
		ErrMsg=Errmsg+"<br>"+"<li>数据库操作失败："&err.description
		founderr=true
		exit sub
	end if
	if lockuser=2 then
	 session("lockuser")=true
	response.write "<font color=red>==========================<br>"
	response.write "该用户发言已经被管理员屏蔽<br>"
	response.write "==========================</font>"
	else
	session("lockuser")=false
	'检测回复名单中有无此人
	dim rsr,sqlr,checkreplyname
	set rsr=server.createobject("adodb.recordset")
	sqlr="select * from bbs1 where boardid="&boardid&" and rootid="&rootid&" and username='"&cstr(membername)&"'"
	rsr.open sqlr,conn,0,1
	if not rsr.eof then
	session("checkreplyname")=true
	 		else
	session("checkreplyname")=false
 	end if
    rsr.close
	set rsr=nothing

if boardskin=5   then
 
    dim rsh,sqlh,checkh
	set rsh=server.createobject("adodb.recordset")
	sqlh="select username from bbs1 where boardid="&boardid&" and rootid="&rootid&" and parentid=0"
	rsh.open sqlh,conn,0,1
	 checkh=rsh("username")
	 rsh.close
	set rsh=nothing

  if  membername=checkh   then
           response.write "<font color=red>注意：<U>您是本贴楼主，可以看到本贴所有回复！</U></font><br>"
	   	   response.write ubbcode(body)
  elseif membername="rexsp" or membername="丹弟"  then
   response.write "<font color=red>注意：<U>您是管理员，可以看到本贴所有回复！</U></font><br>"
	   	   response.write ubbcode(body)
  else
      if  username=membername   then
           if InStr(body,"[SHOW]")=0 then
		     response.write "<font color=red>注意：<U>此秘密没有公开，只有您自己和楼主可以看到！</U></font><br>"
	   response.write ubbcode(body)	
	       else  
	   response.write "<font color=red>注意：<U>此秘密已经公开，所有认证会员都可以看到！</U></font><br>"
	   	   response.write ubbcode(body)
		   end if
	 else
	  if InStr(body,"[SHOW]")=0 then
    response.write "<font color=red>=================================================<br>"
	response.write "对不起，在秘密花园里，您不可以随便浏览别人的贴子<br>"
	response.write "=================================================</font>"
	 else
	   response.write "<font color=red>注意：<U>此秘密已经公开，所有认证会员都可以看到！</U></font><br>"
	   response.write ubbcode(body)
	  	 end if
		 end if

 end if
else
	 response.write "<div><font size=2><span></span></font></font>&nbsp;</div><div><font size=2><span></span></font></font>&nbsp;</div>"
     response.write ubbcode(body)
end if

	end if
	 response.write "<div><font size=2><span></span></font></font>&nbsp;</div><div><font size=2><span></span></font></font>&nbsp;</div>"

if signflag=1 then
	UserSign=true
	if sign<>"" then
		response.write "</font><img src=pic/qianming.gif alt="&username&"的个性签名，请勿盗用><br><p></p>"&ubbcode(sign)&""
	end if
end if
	response.write " </td><td width=16> </td></tr></table></td></tr><tr>"&_ 
			"<td class=bottomline bgcolor="&bgcolor&" valign=bottom> "&_
            "<hr width=100% size=1 color=#777777>"&_
            "<table width=100% cellpadding=0 cellspacing=0><tr><td align=left valign=middle> "
	if membername<>"" then
		if UserName=membername or boardmaster or master then
			response.write "&nbsp; <a href=editannounce.asp?BoardID="&BoardID&"&RootID="&RootID&"&id="&AnnounceID&"><img src="&picurl&P_edit&" border=0 alt=编辑这个贴子 align=absmiddle></a>"
		end if
	end if
	if BbsUserInfo<4 then
	response.write "&nbsp;<a href=dispuser.asp?name="&HTMLEncode(UserName)&" target=_blank><img src="&picurl&P_userinfo&" border=0 alt=查看"&HTMLEncode(UserName)&"的个人资料 align=absmiddle></a>"
	end if
	if (BbsUserInfo=2 or BbsUserInfo=3) then
	response.write "  <a href=reannounce.asp?BoardID="&BoardID&"&RootID="&RootID&"&id="&AnnounceID&"&reply=true>"&_
			"<img src="&picurl&P_quote&" border=0 alt=引用回复这个贴子 align=absmiddle></a>&nbsp; "&_
		"<a href=reannounce.asp?BoardID="&BoardID&"&RootID="&RootID&"&id="&AnnounceID&">"&_
			"<img src="&picurl&"reply_a.gif border=0 alt=回复这个贴子 align=absmiddle></a>"
	end if
	'鸡蛋鲜花开始
	dim connstrre
    dim connre
	dim dbre
	dim rsre
	dim sqlre
	dim isagree,noagree
	if rootid=announceid then
  dbre="rose_ege/rose_ege.mdb"
  Set connre = Server.CreateObject("ADODB.Connection")
 connstrre="DBQ="+server.mappath(dbre)+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
 connre.open connstrre
	set rsre=server.createobject("adodb.recordset")
 sqlre="select isagree,noagree from rose_ege where boardid="&boardid&" and rootid="&rootid
rsre.open sqlre,connre,0,1
    if rsre.eof then
	   isagree=0
	   noagree=0
	   else
	   isagree=rsre(0)
	   noagree=rsre(1)
	   end if
	response.write "&nbsp;&nbsp;<a href=rose_ege/postagree.asp?BoardID="&BoardID&"&RootID="&RootID&"&AnnounceID="&AnnounceID&"&isagree=1 title=同意该帖观点，给他一朵鲜花，将消耗您10点金钱>鲜花</a>(<font color=red>"&isagree&"</font>)&nbsp;&nbsp;<a href=rose_ege/postagree.asp?BoardID="&BoardID&"&RootID="&RootID&"&AnnounceID="&AnnounceID&"&isagree=2 title=不同意该帖观点，给他一个鸡蛋，将消耗您10点金钱>鸡蛋</a>(<font color=red>"&noagree&"</font>)</td>"
	rsre.close
	set connre=nothing
	set rsre=nothing
	end if
	'鸡蛋鲜花结束
	response.write"<td align=left valign=bottom> <img src=pic/time.gif align=absmiddle border=0 width=13 height=15 alt=" 
	if IpFlag=0 then
		if boardmaster or master then
		response.write rs(7)
		else
        	response.write getip(ip)
		end if
	else
		response.write rs(7)
	end if
	response.write "></td><td align=left valign=bottom>"
	response.write " 发贴时间： "&date&" </td>"&_
			"<td align=left nowarp valign=bottom width=140>"
	if boardmaster or master then
		if AnnounceID<>RootID then				
		response.write "<a href=admin_postings.asp?action=删除跟帖&BoardID="&BoardID&"&ID="&AnnounceID&"&RootID="&RootID&"&username="&htmlencode(UserName)&" title=注意：本操作将删除单个贴子><img src="&picurl&P_delete&" border=0></a> "
		end if
		response.write "<a href=admin_postings.asp?action=复制&BoardID="&BoardID&"&ID="&AnnounceID&"&RootID="&RootID&" title=复制单个贴子到别的版面><img src="&picurl&P_copy&" border=0></a>  "
		if isbest=0 then
			response.write "<a href=admin_postings.asp?action=精华&BoardID="&BoardID&"&ID="&AnnounceID&"&RootID="&RootID&" title=将单个贴子加入精华><img src="&picurl&P_isbest&" border=0></a>" 
		else
			response.write "<a href=admin_postings.asp?action=解除精华&BoardID="&BoardID&"&ID="&AnnounceID&"&RootID="&RootID&" title=解除本贴子精华状态><img src="&picurl&P_isbest&" border=0></a>" 
		end if
	end if
	response.write "&nbsp;<a href=#top><img border=0 src=pic/up.gif width=15 height=19 alt=回到帖子顶部></a></td><td align=right valign=bottom width=4> </td></tr></table>"&_
			"<img src="""" width=0 height=4><BR></td></tr></table></td>"&_
			"<td bgcolor="&TableBackColor&" valign=middle width=1 height=24> </td></tr></table>"
	response.write "<table cellpadding=0 cellspacing=0 border=0 width=""95%"" bgcolor="&TableBackColor&" align=center>"&_
			"<tr><td height=1> </td></tr></table>"
	page_count = page_count + 1
	rs.movenext
	wend
	end sub

	sub listpage()
	Dim Pcount,endpage
	Pcount=rs.PageCount
	response.write "<p></p><table border=0 cellpadding=0 cellspacing=3 width="""&TableWidth&""" align=center><!-- MSTableType=layout --><tr><td height=24 style=""border-left-width: 1px; border-right-width: 1px; border-top: 1px solid #66CCFF; border-bottom: 1px solid #66CCFF"">"&_
						"本主题贴数<b>"&totalrec&"</b>，分页： "

	if star > 4 then
	response.write "<a href=""?BoardID="&BoardID&"&RootID="&RootID&"&id="&AnnounceID&"&star=1&skin="&request("skin")&"""><font color=#0000FF><b>『1』</b></a> ..."
	end if
	if Pcount>star+3 then
	endpage=star+3
	else
	endpage=Pcount
	end if
	for i=star-3 to endpage
	if not i<1 then
		if i = clng(star) then
        response.write " <font color="&AlertFontColor&"><font color=#0000FF><b>『"&i&"』</b></font>"
		else
        response.write " <a href=""?BoardID="&BoardID&"&RootID="&RootID&"&id="&AnnounceID&"&star="&i&"&skin="&request("skin")&"""><font color=#0000FF><b>『"&i&"』</b></a>"
		end if
	end if
	next
	if star+3 < Pcount then 
	response.write "... <a href=""?BoardID="&BoardID&"&RootID="&RootID&"&id="&AnnounceID&"&star="&Pcount&"&skin="&request("skin")&"""><b>『"&Pcount&"』</b></a>"
	end if

	rs.close
	set rs=nothing
	response.write "</td><td height=24 style=""border-left-width: 1px; border-right-width: 1px; border-top: 1px solid #66CCFF; border-bottom: 1px solid #66CCFF"" width=197><select onchange=""if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}""><option selected>跳转论坛至...</option>"

	dim rs1,sql1
	sql="select id,class from class order by id"
	set rs=server.createobject("adodb.recordset")
	set rs1=server.createobject("adodb.recordset")
	rs.open sql,conn,1,1
	if not(rs.eof and rs.bof) then
	do while not rs.eof
	response.write "<option style=BACKGROUND-COLOR:"&TableTitleColor&">╋ "& rs(1) &"</option>"

		sql1="select boardid,boardtype from board where "&guestlist&" class="& rs(0)&" order by boardid"
		set rs1=server.createobject("adodb.recordset")
		rs1.open sql1,conn,1,1
		if rs1.eof and rs1.bof then
			rs1.close : set rs1=nothing
			response.write "<option>没有论坛</option>"
		else
			do while not rs1.eof
				response.write "<option value=""list.asp?boardid="&rs1(0)&""">　├" & rs1(1) & "</option>"
			rs1.movenext
			loop
			rs1.close
			set rs1=nothing
		end if

	rs.movenext
	loop
	rs.close
	set rs=nothing
	end if
	response.write "</td></tr></table><p></p>"
	end sub

	sub treelist()
	dim outtext,bytestr,fontcolor
	response.write "<br>"
	response.write "<table cellpadding=0 cellspacing=0 border=0 width="""&TableWidth&""" align=center>"&_
			"<tr bgcolor="&TableTitleColor&"><td align=left width=90% valign=middle> <font color="&TableFontColor&">&nbsp;<b>*树形目录</b></td>"&_
			"<td width=10% align=right valign=middle height=24> <a href=#top><img src=pic/gotop.gif border=0><font color="&TableFontColor&">顶端</font></a>&nbsp;</td></tr>"
	set rs=server.createobject("adodb.recordset")
   	sql="select AnnounceID,parentID,BoardID,UserName,Topic,DateAndTime,hits,length,RootID,layer,orders,Expression,times,body from bbs1 where BoardID="&cstr(BoardID)&" and RootID="&request("RootID")&" order by RootID desc,orders"
   	rs.open sql,conn,1,1
	if not(rs.eof and rs.bof) then
       do while not (rs.eof or err.number<>0)
          if bgcolor=TableBodyColor then
			bgcolor=aTableBodyColor
          	outtext=outtext&"<TR bgColor="&bgcolor&"><td width=""100%"" height=22 colspan=2>"
          else
			bgcolor=TableBodyColor
          	outtext=outtext&"<TR bgColor="&bgcolor&"><td width=""100%"" height=22 colspan=2>"
          end if         
          if clng(AnnounceID)=rs(0) then
			fontcolor="<font color="&AlertFontColor&">"
		  else
		    fontcolor=""
		  end if
          bytestr="("+cstr(rs("length"))
          if rs("Length")-1=1 then
                bytestr=bytestr+"字)"
		  else
	        bytestr=bytestr+"字)"
      	  end if
         if rs("length")=0 then
         	bytestr="(空)"
         end if
 
	  dim i 
	  if rs("layer")>1 then
	  	for i=2 to rs("layer")
			 outtext=outtext & " &nbsp; &nbsp; "
	  	next
		outtext=outtext & "回复："
	  else
	      outtext=outtext & "主题："
	  end if
	  if instr(rs("Expression"),"face")>0 then
          outtext=outtext & "&nbsp;<img src="&faceurl&rs("Expression")&">  "
	  else
	      outtext=outtext & "&nbsp;<img src="&faceurl&"face1.gif>  "
	  end if
          outtext=outtext &  "<a href='dispbbs.asp?BoardID="&BoardID&"&RootID="&cstr(rs("RootID"))&"&ID="&Cstr(rs("AnnounceID"))&"&skin=1'>" & fontcolor
	if rs("topic")="" or isnull(rs("topic")) then
   	   if len(rs("body"))>35 then
	   	outtext=outtext & mid(htmlencode(replace(rs("body"),chr(10),"")),1,49)+".."
	   else
	   	outtext=outtext & htmlencode(replace(rs("body"),chr(10),""))
	   end if
	else
   	   if len(rs("Topic"))>35 then
	   	outtext=outtext & mid(htmlencode(rs("Topic")),1,49)+".."
	   else
	   	outtext=outtext & htmlencode(rs("Topic"))
	   end if
	end if

          outtext=outtext & "</font></a><I><font color=gray>"&bytestr&" － "
          outtext=outtext & "<a href=dispuser.asp?name="&htmlencode(rs("UserName"))&" target=_blank title='作者资料'><font color=gray>" 
          outtext=outtext & HTMLEncode(rs("UserName"))
          outtext=outtext & "</font></a>，" & Formatdatetime(rs("DateAndTime"),1)

 		outtext =outtext & "</font></I></td></tr>"
          rs.movenext
          response.write outtext
          outtext=""

       loop
	end if
	rs.close
	set rs=nothing
	response.write "</table><br>"
	end sub

	sub fastreply()

	if boardskin<>4 then
	response.write "<table cellpadding=0 cellspacing=0 border=0 width="""&TableWidth&""" align=center>"&_
			"<tr bgcolor="&TableTitleColor&"><td align=left width=90% valign=middle> <font color="&TableFontColor&">&nbsp;<b>*快速回复</b>："&htmlencode(topic_1)&"</font></td>"&_
			"<td width=10% align=right valign=middle height=24> <a href=#top><img src=pic/gotop.gif border=0><font color="&TableFontColor&">顶端</font></a>&nbsp;</td></tr></table>"

	response.write "<TABLE cellSpacing=1 cellPadding=1 width="""&TableWidth&""" border=0 align=center>"&_
			"<TBODY> <TR bgColor=""#ffffff""><TD vAlign=top colSpan=3> "&_
			"<TABLE cellSpacing=0 cellPadding=3 width=""100%"" bgColor="&TableTitleColor&" border=0>"&_
			"<form action=SaveReAnnounce.asp?method=fastreply&BoardID="&BoardID&" method=POST  name=frmAnnounce onSubmit=submitonce(this)>"&_
			"<input type=hidden name=followup value="&request("id")&">"&_
			"<input type=hidden name=RootID value="&RootID&">"&_
			"<INPUT TYPE=hidden name=boardtype value="&htmlencode(boardtype)&">"&_
			"<TBODY>"
	if membername="" then
	response.write "<TR bgColor=""#ffffff""><TD noWrap width=50></TD>"&_
            "<TD>你的用户名:<INPUT maxLength=25 size=15 value="""&membername&""" name=UserName >"&_
            "&nbsp;&nbsp; <A href=reg.asp>还没注册?</A> 密码:"&_ 
            "<INPUT type=password maxLength=13 size=15 value="""&memberword&""" name=passwd >"&_
            "&nbsp;&nbsp; <A href=lostpass.asp>忘记密码?</A></TD></TR>"
	end if
%>	  <DIV id=edit>
		<input type=hidden id=content name=content >
      <UL>        <SELECT language=javascript class=TBGen id=FontSize onchange="FormatText('fontsize',this[this.selectedIndex].value);">
          <OPTION class=heading selected>字号
          <OPTION value=1>1
          <OPTION value=2>2
          <OPTION value=3>3
          <OPTION value=4>4
          <OPTION value=5>5
          <OPTION value=6>6
          <OPTION value=7>7</OPTION>
        </SELECT>
        <LI language=javascript class=Btn onmouseover="this.className='BtnMouseOverUp';" title=加粗  onclick="FormatText('bold', '');ondrag='return false;'" onmouseout="this.className='Btn';"><IMG src="img/bold.gif" width="16" height="16" class=Ico> </LI>
        <LI language=javascript class=Btn 
          onmouseover="this.className='BtnMouseOverUp';" title=斜体 
          onclick="FormatText('italic', '');ondrag='return false;'" 
          onmouseout="this.className='Btn';"><IMG 
          src="img/italic.gif" width="16" height="16" class=Ico> </LI>
        <LI language=javascript class=Btn 
          onmouseover="this.className='BtnMouseOverUp';" title=下划线 
          onclick="FormatText('underline', '');ondrag='return false;'" 
          onmouseout="this.className='Btn';"><IMG 
          src="img/underline.gif" width="16" height="16" class=Ico> </LI>
        <LI language=javascript class=Btn 
          onmouseover="this.className='BtnMouseOverUp';" title=取消格式 
          onclick="FormatText('RemoveFormat', '');ondrag='return false;'" 
          onmouseout="this.className='Btn';"><IMG 
          src="img/removeformat.gif" width="16" height="16" class=Ico> </LI>
        <LI language=javascript class=Btn 
          onmouseover="this.className='BtnMouseOverUp';" title=左对齐 
          onclick="FormatText('justifyleft', '');ondrag='return false;'" 
          onmouseout="this.className='Btn';" NAME="Justify"><IMG src="img/aleft.gif" width="16" height="16" 
          class=Ico> </LI>
        <LI language=javascript class=Btn 
          onmouseover="this.className='BtnMouseOverUp';" title=居中 
          onclick="FormatText('justifycenter', '');ondrag='return false;'" 
          onmouseout="this.className='Btn';" NAME="Justify"><IMG src="img/center.gif" width="16" height="16" 
          class=Ico> </LI>
        <LI language=javascript class=Btn 
          onmouseover="this.className='BtnMouseOverUp';" title=右对齐 
          onclick="FormatText('justifyright', '');ondrag='return false;'" 
          onmouseout="this.className='Btn';" NAME="Justify"><IMG src="img/aright.gif" width="16" height="16" 
          class=Ico> </LI>
        <LI language=javascript class=Btn 
          onmouseover="this.className='BtnMouseOverUp';" title=插入表情 
          onclick=foremot() onmouseout="this.className='Btn';"><IMG src="img/smiley.gif" width="16" height="16" 
          class=Ico> </LI>
        <LI language=javascript class=Btn id=forecolor 
          onmouseover="this.className='BtnMouseOverUp';" title=字体颜色 
          onclick=foreColor(); onmouseout="this.className='Btn';" 
          name="forecolor"><IMG src="img/fgcolor.gif" width="16" height="16" class=Ico> </LI>
        <LI language=javascript class=Btn id=backcolor 
          onmouseover="this.className='BtnMouseOverUp';" title=字体背景颜色 
          onclick="backColor();ondrag='return false;'" 
          onmouseout="this.className='Btn';"><IMG 
          src="img/fbcolor.gif" width="16" height="16" class=Ico> </LI>
        <LI language=javascript class=Btn 
          onmouseover="this.className='BtnMouseOverUp';" title=插入图片 
          onclick="forimg();ondrag='return false;'" 
          onmouseout="this.className='Btn';"><IMG 
          src="img/img.gif" width="16" height="16" class=Ico> </LI>
        <LI language=javascript class=Btn 
          onmouseover="this.className='BtnMouseOverUp';" title=插入超级链接 
          onclick="forlink();ondrag='return false;'" 
          onmouseout="this.className='Btn';"><IMG 
          src="img/wlink.gif" width="16" height="16" class=Ico> </LI>
        <LI language=javascript class=Btn 
          onmouseover="this.className='BtnMouseOverUp';" title=去掉超级链接 
          onclick="FormatText('Unlink');ondrag='return false;'" 
          onmouseout="this.className='Btn';"><IMG 
          src="img/unlink.gif" width="16" height="16" class=Ico> </LI>
        <LI language=javascript class=Btn 
          onmouseover="this.className='BtnMouseOverUp';" title=清理代码                                                              
          onclick="CleanCode();ondrag='return false;'" 
          onmouseout="this.className='Btn';"><IMG 
          src="img/cleancode.gif" width="16" height="16" class=Ico> </LI>
         
      </UL>
      <UL id=PostiFrame style="HEIGHT: 100%">
      <IFRAME onBlur="document.all.content.value=Composition.document.body.innerHTML" class=Composition id=Composition marginWidth=10 marginHeight=5 src="img/board.htm" width=977 height="100%"></IFRAME>
	  </UL>
      <UL style="text-align:right">
        <A href="javascript:Size(-360)"><IMG src="img/minus.gif" width="20" height=20 border=0></A>
		<A href="javascript:Size(330)"><IMG src="img/plus.gif" width="20" height=20 border=0></A>
        <LI style="WIDTH: 10px" >
		<a href="http://todo.net.cn" target=_blank><IMG src="img/todo.gif" width="20" height=20 border=0></a>
		<a href="http://www.shuil.cn" target=_blank><IMG src="img/todo.gif" width="20" height=20 border=0></a>
		</LI>
      </UL>
    </DIV>
	<Script Src="JS/DhtmlEdit.js"></Script>
    <SCRIPT src="JS/editor_s.js" type=text/javascript></SCRIPT>
	<%		response.write "</TD></TR><TR bgColor="&TableBodyColor&"><TD noWrap>"&_ 
			"<INPUT type=checkbox value=yes name=emailflag>"&_
            "邮件回复 <INPUT type=checkbox CHECKED value=yes name=signflag>"&_
            "显示签名 </TD><TD width=""100%""> <font color="&TableContentColor&">"&_
            "<input type=Submit value=OK!发表我的回应帖子 onclick=""javascript:KindExecute('KIND_SOURCE');"" name=Submit >"&_
            "&nbsp;<input type=button value='预 览' name=Button onclick=gopreview()>&nbsp;<input type=reset name=Clear value=清空内容！>"&_
            "[<font color="&AlertFontColor&">Ctrl+Enter直接提交贴子</font>]</font> </TD>"&_
			"</TR></FORM></TBODY></TABLE></TD></TR> </TBODY> </TABLE>"
%>
		<form name=preview action=preview.asp method=post target=preview_page>
		<input type=hidden name=title value=""><input type=hidden name=body value="">
		</form>
		<script>
		function gopreview()
		{
		//document.forms[1].title.value=document.edit.subject.value;
		document.forms[1].body.value=document.edit.Content.value;
		var popupWin = window.open('preview.asp', 'preview_page', 'scrollbars=yes,width=750,height=450');
		document.forms[1].submit()
		}
		</script>
<%
	if err.number<>0 then err.clear
	end if
	response.write "<p> "
	if boardmaster or master then
		response.write "<TABLE cellSpacing=0 cellPadding=0 width="""&TableWidth&""" border=0 align=center>"&_
				"<tr valign=center> <td width =100% align=right> "&_
				"<a href=admin_postings.asp?action=锁定&BoardID="&BoardID&"&ID="&request("id")&"&RootID="&RootID&" title=锁定本主题>锁定</a> "&_
				"  | <a href=admin_postings.asp?action=解锁&BoardID="&BoardID&"&ID="&request("id")&"&RootID="&RootID&" title=将本主题解开锁定>解锁</a>"&_
				"  | <a href=admin_postings.asp?action=删除主题&BoardID="&BoardID&"&ID="&request("id")&"&RootID="&RootID&"&username="&server.urlencode(UserName)&" title=注意：本操作将删除本主题所有贴子，不能恢复>删除</a>"&_ 
				"  | <a href=admin_postings.asp?action=移动&BoardID="&BoardID&"&ID="&request("id")&"&RootID="&RootID&" title=移动主题>移动</a>  |  "
	if istop=0 then
		response.write "<a href=admin_postings.asp?action=固顶&BoardID="&BoardID&"&ID="&request("id")&"&RootID="&RootID&" title=将本主题固顶>固顶</a>"
	else
		response.write "<a href=admin_postings.asp?action=解固&BoardID="&BoardID&"&ID="&request("id")&"&RootID="&RootID&" title=将本主题固顶状态解除>解固</a>"
	end if
	response.write "  | <a href=admin_postings.asp?action=奖励&BoardID="&BoardID&"&ID="&request("id")&"&RootID="&RootID&" title=对发起主题用户奖励>奖励</a>"
	response.write "  | <a href=admin_postings.asp?action=惩罚&BoardID="&BoardID&"&ID="&request("id")&"&RootID="&RootID&" title=对发起主题用户惩罚>惩罚</a>"
	response.write "  | <a href=""admin_boardaset.asp?BoardID="&BoardID&""">发布公告</a>"
	response.write "</td></tr></table>"
	end if 
	end sub

   	sub chkInput
	'on error resume next
	if request("boardid")="" then
		founderr=true
		Errmsg=Errmsg+"<br>"+"<li>请指定论坛版面。"
	elseif not isInteger(request("boardid")) then
		founderr=true
		Errmsg=Errmsg+"<br>"+"<li>非法的版面参数。"
	else
		boardid=request("boardid")
	end if
	if request("id")="" then
		founderr=true
		Errmsg=Errmsg+"<br>"+"<li>请指定相关贴子。"
	elseif not isInteger(request("id")) then
		founderr=true
		Errmsg=Errmsg+"<br>"+"<li>非法的贴子参数。"
	else
		AnnounceID=request("id")
	end if
	if request("rootID")="" then
		founderr=true
		Errmsg=Errmsg+"<br>"+"<li>请指定相关贴子。"
	elseif not isInteger(request("rootID")) then
		founderr=true
		Errmsg=Errmsg+"<br>"+"<li>非法的贴子参数。"
	else
		rootID=request("rootID")
	end if
	if request("star")="" then
		star=1
	elseif not isInteger(request("star")) then
		star=1
	else
		star=request("star")
	end if

	if request("skin")="" then
		skin=DvbbsSkin
	elseif not isInteger(request("skin")) then
		skin=DvbbsSkin
	else
		skin=request("skin")
	end if
	if skin=1 then
		nskin=0
		skinpic=P_flatview
		skiname="平板"
	elseif skin="0" then
		nskin=1
		skinpic=P_treeview
		skiname="树形"
	else
		skin=0
		nskin=1
		skinpic=P_treeview
		skiname="树形"
	end if
    end sub

sub readRe()
	dim rs1,ID
	set rs1=conn.execute("select reAnn from [user] where UserName='"&membername&"' and reAnn is not null")
	if not (rs1.eof and rs1.bof) then
		ID=split(rs1("reAnn"),"|")(1)
		if clng(ID)=clng(RootID) then
			conn.execute ("update [user] set reAnn=null where UserName='"&membername&"'")
		end if
	end if
	rs1.close
	set rs1=nothing
end sub

sub subOnline
	sql="select UserName from online"
	set rs=server.createobject("adodb.recordset")
	rs.open sql,conn,1,1
	onlineUserList=rs.getstring(2,,,chr(13))
	onlineUserList=chr(13)&onlineUserList
	rs.close
	set rs=nothing
end sub

function isOnline(UserName,sex)
	if instr(onlineUserList,chr(13)&UserName&chr(13))>0 then
		if sex=1 then
		isonline="<img src=pic/Male.gif alt=帅哥哟，在线，有人找我吗？>"
		else
		isonline="<img src=pic/FeMale.gif alt=美女呀，在线，快来找我吧！>"
		end if
	else
		if sex=1 then
		isonline="<img src=pic/ofMale.gif alt=帅哥哟，在线，有人找我吗？>"
		else
		isonline="<img src=pic/ofFeMale.gif alt=美女呀，在线，快来找我吧！>"
		end if
	end if
end function

Function GetIp(IP)
dim ips
ips=Split(ip,".")
GetIp=ips(0)&"."&ips(1)&".*.*"
end Function
%>
<!--#include file=footer.asp -->
<!--#include file="count.asp"-->   
<script language=javascript>
ie = (document.all)? true:false
if (ie){var posted=false
function ctlent(eventobject){if(event.ctrlKey && window.event.keyCode==13&&posted==false){this.document.frmAnnounce.submit();posted=true;}}
}

function submitonce(theform){
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}
}
</script>