<!--#Include FILE="WapConfig/WapHeader.asp"-->
<%
If Request("ToDo")="ToAdd" Then  
	Receive_A=Request("Send_A") '
	Receive_B=Request("Send_B")
	Receive_C=Wap.DelSpecialMark(Request("Send_C")) '内容
	Receive_D=Wap.DelSpecialMark(Request("Send_D"))
	If Receive_A="" Then
			ErrorMessage=Wap.Ascii("请输入姓名。")
		ElseIf Receive_B="" Then
			ErrorMessage=Wap.Ascii("请输入主题。") '如果没有错误，则错误信息为空
		ElseIf Receive_C="" Then
			ErrorMessage=Wap.Ascii("请输入内容。") '如果没有错误，则错误信息为空
		Else
			ErrorMessage="" '如果没有错误，则错误信息为空
	End If	
If ErrorMessage="" Then
	Wap.StrSql="Insert Into GuestBook (Name,Title,Content,Email) Values ('" & Receive_A & "','" & Receive_B & "','" & Receive_C & "','" & Receive_D & "')"	
	Wap.RedirectPath=Wap.WapPath & "Success.asp?ToDo=AddMessageOk"	
	Wap.MdbInsert
End If
End If
'以下为文件正文。
If ErrorMessage<>"" Then Wap.WriteRow ErrorMessage
Wap.WriteRow Wap.TextIn("姓名:","text","Send_A","","")
Wap.WriteRow Wap.TextIn("主题:","text","Send_B","","")
Wap.WriteRow Wap.TextIn("内容:","text","Send_C","","")
Wap.WriteRow Wap.TextIn("Email:","text","Send_D","","")
Wap.WriteOut Wap.PostSet("options","提交",Wap.ThisFileName & "?ToDo=ToAdd","utf-8","post")
Wap.WriteRow Wap.TextMorePost("Send_A Send_B Send_C Send_D", "Send_A Send_B Send_C Send_D")
'以下为返回链接等
Wap.WriteRow Wap.ImgA("","MessageList.asp","查看留言")
Wap.WriteRow Wap.ImgA("","Index.asp","返回上级")
%>
<!--#Include FILE="WapConfig/WapFooter.asp"--> 
