% '################################################################# '# 程序名称:逍遥留言本 V1.0 '# 授权方式:免费软件 '# 作者:逍遥浪子 '# 演示及技术支持:http://www.xybook.com '# 发布时间:2005-4-8 '# 声明:本程序由逍遥浪子独立自主开发,保留所有版权。 '# 各种用途均可免费使用、自由传播,但必须保留程序代码中的版权信息。 '################################################################# %> <% 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 %>
![]() ![]() |