<!--#include file="ESCMS_conn.asp" -->
<!--#include file="ESCMS_config.asp" -->


<%
call DBConnBegin()
Dim book_face,book_name,book_qq,book_web,book_mail,book_title,book_bz
book_face=Get_SafeStr(Request.Form("book_face"))
book_name=Get_SafeStr(Request.Form("book_name"))
book_qq=Get_SafeStr(Request.Form("book_qq"))
book_web=Get_SafeStr(Request.Form("book_web"))
book_mail=Get_SafeStr(Request.Form("book_mail"))
book_title=Get_SafeStr(Request.Form("book_title")) 
book_bz=Request.Form("book_bz")
%> 
<%
if cstr(Session("GetCode"))<>cstr(Trim(Request("book_code"))) then
Go_Error("输入正确的验证码!")
elseif book_name="" then 
Go_Error("填写你的名字！")
elseif book_bz="" then
Go_Error("填写你的留言！")
elseif IsValidEmail(book_mail) = False then
Go_Error("正确填写你的邮箱！")
elseif qq(book_qq)=false then
Go_Error("正确填写你的QQ(非必填)！")
else 

Set rs = Server.CreateObject("ADODB.Recordset")
rs.open"[book]",oconn,1,3
rs.addnew
rs("book_face")=book_face
rs("book_name")=book_name
rs("book_qq")=book_qq
rs("book_web")=book_web
rs("book_mail")=book_mail
rs("book_title")=book_title
rs("book_bz")=book_bz
rs("book_date")=now()
rs.update
rs.close 
%>
<SCRIPT LANGUAGE="JScript">
window.alert ("发表成功,单击确定继续!");
window.location = ("../book.asp");
</SCRIPT>
<%end if 
set rs=nothing 
DBConnend()
%> 
