<!--#include file="Include/conn.asp"-->
<!--#include file="Include/Fun_SqlIn.Asp"-->
<%
dim MesName,Content,Linkman,TelephoneEmail,mycode
dim rs,sql
	MesName=CHECKSTR(trim(request.form("MesName")))
	Content=CHECKSTR(request.form("Content"))
	Linkman=CHECKSTR(trim(request.form("Linkman")))
	Telephone=CHECKSTR(trim(request.form("Telephone")))
	Email=CHECKSTR(trim(request.form("Email")))
	mycode = CHECKSTR(trim(request.form("code")))
	
	if mycode<>Session("getcode") then
	Response.Write "<script language=javascript>alert('请输入正确验证码,谢谢!');javascript:history.back();</script>"
	end if
	
  	if Instr(MesName,"傻B")>0 or Instr(MesName,"操你妈")>0 or Instr(MesName,"胡锦")>0 or Instr(MesName,"江泽")>0 or Instr(MesName,"娘")>0 or Instr(MesName,"[url")>0 or Instr(MesName,"script")>0 then
	Response.Write "<script language=javascript>alert('请不要乱发信息,谢谢!');javascript:history.back();</script>"
	Response.End
	end if

  	if Instr(Content,"傻B")>0 or Instr(Content,"操你妈")>0 or Instr(Content,"胡锦")>0 or Instr(Content,"江泽")>0 or Instr(Content,"娘")>0 or Instr(Content,"[url")>0 or HasChinese(Content)=false then
	Response.Write "<script language=javascript>alert('请不要乱发信息,谢谢!');javascript:history.back();</script>"
	Response.End
	end if
	
	set rs = server.createobject("adodb.recordset")
	sql="select * from Web_rui_v_Message"
	rs.open sql,conn,1,3
	rs.addnew
	rs("MesName")=MesName
	rs("Content")=Content
	rs("Linkman")=Linkman
	rs("Telephone")=Telephone
	rs("Email")=Email
	rs("viewFlag")=bookoff
	rs("AddTime")=now()
	rs("LastLoginIP")=Request.ServerVariables("REMOTE_ADDR")
	rs.update
	rs.close
	set rs=nothing
	Call Alert ("恭喜你,留言成功,但需要管理员审核后才能显示出来!","Book_list.asp")
%>