<!--#include file="Inc/Conn.asp"-->
<!--#include file="Head.asp"-->
<!--#include file="Inc/Code.asp"-->
<!--#include file="Inc/eshopcode.asp"-->
<%
If Request.QueryString("action")="save" Then
If Session("MyUserName")="" then 
na=checkstr(Trim(Request.Form("name")))
Else
na=Session("MyUserName")
End if
title=checkstr(Trim(Request.Form("Title")))
Content=checkstr(Trim(Request.Form("Content")))
Set rs=Server.CreateObject("Adodb.Recordset")
Sql="Select * From [Book] Where (ID IS Null) "
rs.Open Sql,Conn,1,3
rs.AddNew
rs("name")=na
rs("Title")=title
rs("Content")=Content
rs.Update
rs.Close
Set rs=Nothing
        Response.write "<script language='javascript'>" & chr(13)
		Response.write "alert('你的留言提交成功!');" & Chr(13)
		Response.write "window.document.location.href='BookList.asp';"&Chr(13)
		Response.write "</script>" & Chr(13)
        Response.End
End if

Dim Uname
if Session("MyUserName")="" then 
Uname = Uname & "<input type='text' name='name' value='未注册用户' size='22' maxlength='15'>"
Else
Uname = Uname & Session("MyUserName")
end if

Dim BooHtml
BooHtml = application("JaBook")
BooHtml = Replace(BooHtml,"{用户登陆}",UserLogin())
BooHtml = Replace(BooHtml,"{用户搜索}",FindProd())
BooHtml = Replace(BooHtml,"{用户投票}",ShowVote())
BooHtml = Replace(BooHtml,"{用户名称}",Uname)
Response.Write BooHtml
%>
<!--#Include File="bottom.Asp"-->