<code><!--#include file="../conn/dbconn1.asp"--><br /><!--#include file="../inc/safe.asp"--><br /><%<br />content=Replace_Text(request.Form("content"))<br />content=replace(content,"<","[")<br />content=replace(content,">","]")<br />newsid=Replace_Text(request.Form("newsid"))<br />ip=request.Form("ip")<br />rname=Replace_Text(request.Form("rname"))<br />rname=replace(rname,"<","[")<br />rname=replace(rname,">","]")<br />'username=Replace_Text(request.Form("username"))<br />'username=replace(username,"<","[")<br />'username=replace(username,">","]")<br />'处理发表内容是脏话<br />set rs=server.CreateObject("adodb.recordset")<br />sql="select * from badword"<br />rs.open sql,conn,3,3<br />if rs.eof then<br />response.Write("mei ziliao!")<br />else<br />on error resume next<br />do while not rs.bof and not rs.eof<br />content=replace(content,rs.fields("word").value,"**")<br />rname=replace(rname,rs.fields("word").value,"**")<br />rs.movenext<br />loop<br />end if<br />rs.close<br />set rs=nothing<br />''''''''''''''''''''''''''''''<br />set rs=server.CreateObject("ADODB.RecordSet")<br />sql="select * from pl"<br />rs.open sql,conn,3,3<br />rs.addnew<br />rs("content")=content<br />rs("newsid")=newsid<br />rs("ip")=ip<br />rs("rname")=rname<br />rs("username")=username<br />rs.update<br />rs.close<br />%><br /><%<br />set rsn=server.CreateObject("adodb.recordset")<br />sqln="select newsid,plnum,plbz from news where newsid="&newsid&""<br />rsn.open sqln,conn,1,3<br />rsn("plnum")=rsn("plnum")+1<br />rsn("plbz")=1<br />rsn.update<br />rsn.close<br />%><br /><script><br />alert("成功发布!")<br />parent.location.href="shownews.asp?newsid=<%=newsid%>"<br /></script></code>