%
if request("send")="ok" then
username=trim(request.form("username"))
usermail=trim(request.form("usermail"))
if username="" or request.form("Comments")="" then
response.write ""
response.end
end if
if checktxt(request.form("username"))<>request.form("username") then
response.write ""
response.end
end if
if mailyes=0 then '邮箱为必填时检查邮箱是否合法
if checktxt(request.form("usermail"))<>request.form("usermail") then
response.write ""
response.end
end if
if Instr(usermail,".")<=0 or Instr(usermail,"@")<=0 or len(usermail)<10 or len(usermail)>50 then
response.write ""
response.end
end if
end if
if len(request.form("Comments"))>maxlength then
response.write ""
response.end
end if
Comments1=request.form("Comments")
bad1=split(bad,"/") '过滤脏话
for t=0 to ubound(bad1)
Comments1=replace(Comments1,bad1(t),"***")
next
if request.form("Comments")<>Comments1 then
response.write ""
response.end
end if
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from Feedback where online='1' order by Postdate desc"
rs.open sql,conn,1,3
rs.Addnew
rs("username")=Request("username")
rs("comments")=Request("comments")
rs("usermail")=Request("usermail")
rs("face")=Request("face")
rs("pic")=Request("pic")
rs("url")=Request("url")
rs("qq")=Request("qq")
view=cstr(view)
if view<>"0" then view="1"
rs("online")=view
rs("IP")=Request.serverVariables("REMOTE_ADDR")
rs.Update
rs.close
set rs=nothing
response.write ""
response.end
end if
%>