www.gusucode.com > 超文本多用户论坛程序 1.1 > bbs/htzcl.asp

    <!--#include file="conn.asp"-->
<!--#include file="gyhs.asp"-->
<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>					
function CleanHtmlBr(str)									
	CleanHtmlBr =  Replace(Replace(Replace(Replace(Replace(str,"<","&lt;"),">","&gt;"),vbCrlf, "<br>"), chr(32)&chr(32),"&nbsp;&nbsp;"),"'","''")		
End Function		
</SCRIPT>
<%
id=request("id")
bkid=request("bkid")'论坛板块id
bt=request("bt")'取得标题
sub hfcg
%>
<script language=vbscript>
<!--
window.alert"回复成功"
window.location="ShowPost.asp?ltbh=<%=ltbh%>&ids=<%=id%>&id=<%=bkid%>&bt=<%=bt%>"
-->
</script>
<%
end sub
%>

<%
sub tzhf'修改回复数目

sqlhfs="select cnhfzs from zwtizi where id="&id&""
set rs=conn.execute(sqlhfs)
cnhfzs=rs("cnhfzs")
cnhfzs=cnhfzs+1
rs.close
set rs=nothing

sqlhf="update zwtizi set cnhfzs="&cnhfzs&" where id="&id&""
conn.execute(sqlhf)

end sub
%>

<%
wbfz
act=request("act")
id=request("id")'原板块id
cnuser=request.cookies("username")

if act="D" then
Dim sContent1, i
For i = 1 To Request.Form("47").Count 
	sContent1 = sContent1 & Request.Form("47")(i) 
Next 
sContent1=Replace(sContent1,"'","''")
elseif act="X" then
sContent1=CleanHtmlBr(request("htcount"))
end if

sql="insert into zwhtz(tzid,cnuser,htcount,ltbh)values('"&id&"','"&cnuser&"','"&sContent1&"','"&ltbh&"')"
conn.execute(sql)
'修改用户发帖子数目
sqlyhzt="select htzzs from zwuser where cnuser='"&cnuser&"'"
set rsyh=conn.execute(sqlyhzt)
htzzs=rsyh("htzzs")
htzzs=htzzs+1
rsyh.close
set rsyh=nothing

yhzt="update zwuser set htzzs="&htzzs&" where cnuser='"&cnuser&"'"
conn.execute(yhzt)
'修改大板块帖子数目
sqlbkhfs="select tzzs from zwbk where id="&bkid&""
set rs1=conn.execute(sqlbkhfs)
tzzs=rs1("tzzs")
tzzs=tzzs+1
rs1.close
set rs1=nothing

sqlhfs="update zwbk set tzzs="&tzzs&" where id="&bkid&""
conn.execute(sqlhfs)

tzhf
hfcg
dbclose
%>