站长之家- 语言 2008-04-18T15:00:54 +08:00

净化网络环境 ASP程序实现过滤脏话

净化网络环境 ASP程序实现过滤脏话

以下为引用的内容:


","]")
newsid=Replace_Text(request.Form("newsid"))
ip=request.Form("ip")
rname=Replace_Text(request.Form("rname"))
rname=replace(rname,"","]")
'username=Replace_Text(request.Form("username"))
'username=replace(username,"","]")
'处理发表内容是脏话
set rs=server.CreateObject("adodb.recordset")
sql="select * from badword"
rs.open sql,conn,3,3
if rs.eof then
response.Write("mei ziliao!")
else
on error resume next
do while  not rs.bof and not rs.eof
content=replace(content,rs.fields("word").value,"**")
rname=replace(rname,rs.fields("word").value,"**")
rs.movenext
loop
end if
rs.close
set rs=nothing
''''''''''''''''''''''''''''''
set rs=server.CreateObject("ADODB.RecordSet")
sql="select * from pl"
rs.open sql,conn,3,3
rs.addnew
rs("content")=content
rs("newsid")=newsid
rs("ip")=ip
rs("rname")=rname
rs("username")=username
rs.update
rs.close
%>


alert("成功发布!")
parent.location.href="shownews.asp?newsid="

相关话题

推荐关键词

24小时热搜

查看更多内容

大家正在看