<!--#include file="CONN.ASP"-->
<!--#include file="config.asp"-->
<!--#include file="foxx.asp"-->
<!--#include file="usercookies.asp"-->
<%
dim rs,sql,reg1,ses,toname
toname=trim(request("toname"))
reg1=request.cookies("fox")("reg1")
ses=DateDiff("s",reg1,now())
if ses<60 then
response.write "<li>你的留言间隔是60秒，请等会再次发布！"
response.end
end if
if len(request("memo"))>100 then
response.write "<li>留言内容太多，请简单填写！"
response.end
end if
if len(request("memo"))<1 then
response.write "<li>你没有填写留言内容！"
response.end
end if
set rs=server.createobject("adodb.recordset")
sql = "select * from FOX_dianbook order by fbsj desc"
rs.open sql,conn,1,3
rs.addnew
rs("username")=trim(request("username"))
rs("toname")=toname
rs("lx")=trim(request("gbook"))
rs("gbook1")=trim(request("memo"))
rs("fbsj")=now()
rs.update
Response.cookies("fox")("reg1")=now()
rs.close
set rs=nothing
closedb
	Response.Write"<script>alert('留言成功，请等待店长回复！');this.location.href='liuyan.asp?fox="&toname&"';</SCRIPT>"
response.write "<meta http-equiv=refresh content=""3;URL=liuyan.asp?fox="&toname&""">"
%></body></html>