<%
server_v1=cstr(request.servervariables("http_referer"))
response.write(server_v1)
server_v2=cstr(request.servervariables("server_name"))
if mid(server_v1,8,len(server_v2))<>server_v2 then
response.write "禁止外部提交數(shù)據(jù)"
response.end
end if
if len(request.form("frmcontent"))>1000 then
response.write "輸入內(nèi)容超過規(guī)定字符數(shù)目"
response.end
end if
if request.cookies("visitime")<>"" then
if datediff("s",request.cookies("visitime"),now())<60 then
response.write "請勿在1分鐘內(nèi)重復(fù)提交評論"
response.end
end if
end if
count="六合彩,免費電影,安利,http,www"
connts = split(connt,",")
for each glword in connts
if instr(request.form("frmcontent"),glword)<>0 then
response.write "該關(guān)鍵字已被過濾"
response.end
end if
next
dim usernam,comments
dim fieldlist,valuelist
username = request.form("username")
comments = request.form("comments")
newsid = request.form("newsid")
if username = "" or comments = "" then
response.write("姓名或者內(nèi)容沒有填寫")
response.end()
end if
fieldlist = array("username","comments","newsid")
valuelist = array(username,comments,newsid)
set objrs = server.createobject("adodb.recordset")
objrs.open "feedback",objconn,1,2
objrs.addnew fieldlist,valuelist
closei()
response.cookies("visitime")=now()
response.redirect(server_v1)
%>
該文章在 2010/7/3 14:09:30 編輯過