站长之家- 语言 2007-04-06T14:18:26 +08:00

净化网络环境: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="

  请作者联系本站,及时附注您的姓名。联系邮箱:edu#chinaz.com(把#改为@)。

推荐关键词

24小时热搜

查看更多内容

大家正在看

PHP 是最糟糕编程语言?

APP们攻克「附近」

呆萝卜App停运

邮储生活APP停止服务

阿里上线阿里拍卖App