<>
<>
<%
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
Response.Write(server_v1)
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
ifmid(server_v1,8,len(server_v2))<>server_v2then
response.write"禁止外部提交数据"
response.end
endif
iflen(request.form("frmContent"))>1000then
response.write"输入内容超过规定字符数目"
response.end
endif
ifrequest.cookies("visitime")<>""then
ifDateDiff("s",request.cookies("visitime"),now())<60then
response.write"请勿在1分钟内重复提交评论"
response.end
endif
endif
count="六合彩,免费电影,安利,http,www"
connts=split(connt,",")
Foreachglwordinconnts
ifinstr(request.form("frmcontent"),glword)<>0then
response.write"该关键字已被过滤"
response.end
endif
next
DimUserNam,Comments
Dimfieldlist,Valuelist
UserName=Request.Form("UserName")
Comments=Request.Form("Comments")
newsid=Request.Form("newsid")
IfUserName=""OrComments=""Then
Response.Write("姓名或者内容没有填写")
Response.End()
EndIf
fieldlist=array("UserName","Comments","newsid")
valuelist=array(UserName,Comments,newsid)
SetobjRs=Server.CreateObject("ADODB.recordset")
objRs.open"Feedback",objConn,1,2
objRs.addnewfieldlist,valuelist
closeI()
response.cookies("visitime")=now()
response.Redirect(server_v1)
%>