<!--#Include FILE="WapConfig/WapHeader.asp"-->
<%
'以下为正文
XML.WriteOut "<h2>发表留言</h2>"
XML.WriteOut "<ul><li>"
If Request("ToDo")="ToAdd" Then  
	Receive_A=XML.DelSpecialMark(Request("Send_A")) '姓名
	Receive_B=XML.DelSpecialMark(Request("Send_B")) '电话
	Receive_C=XML.DelSpecialMark(Request("Send_C")) '内容
	Receive_D=XML.DelSpecialMark(Request("Send_D")) '邮箱

	If Receive_A="" Then
			ErrorMessage=XML.Ascii("请输入姓名。")
		ElseIf Receive_B="" Then
			ErrorMessage=XML.Ascii("请输入电话。") '如果没有错误，则错误信息为空
		ElseIf Receive_C="" Then
			ErrorMessage=XML.Ascii("请输入内容。") '如果没有错误，则错误信息为空
		ElseIf Receive_D="" Then
			ErrorMessage=XML.Ascii("请留下您的邮箱。") '如果没有错误，则错误信息为空
		Else
			ErrorMessage="" '如果没有错误，则错误信息为空
	End If	
If ErrorMessage="" Then
	XML.StrSql="Insert Into nyeee_words (Name,QQ,words,Email,sex,[Date]) Values ('" & Receive_A & "','" & Receive_B & "','" & Receive_C & "','" & Receive_D & "',1,#" & now() & "#)"	
	XML.RedirectPath=XML.WapPath & "Success.asp?ToDo=AddMessageOk"	
	WAP.MailContent=Request("Send_A") & ",您好：" & vbcrlf & "　　很高兴您在我们的网站留言,您的留言内容:" & vbcrlf & "　　姓名:" & Request("Send_A") & vbcrlf & "　　电话:" & XML.DelSpecialMark(Request("Send_B")) & vbcrlf & "　　内容:" & XML.DelSpecialMark(Request("Send_C")) & vbcrlf & "　　邮箱:" & XML.DelSpecialMark(Request("Send_D")) & vbcrlf & "　　请及时查看网站给您的回复。" & "我们的网址是:" & XML.WapHomePage & vbcrlf & "　　希望您经常光临我们的网站。愿您的每次光临都能给您带来收获和快乐。"
	WAP.SendOneMail XML.DelSpecialMark(Request("Send_D")),"您在" & XML.SiteTitle & "留言了","此邮件来自" & XML.SiteTitle
	XML.MdbInsert
End If
End If
'以下为文件正文。
If ErrorMessage<>"" Then XML.WriteRow ErrorMessage
XML.WriteOut "<form method='post' action='" & XML.ThisFileName & "'>"
XML.WriteOut "<h3>姓名:</h3>"
XML.WriteOut "<input type='text' name='Send_A' value=''/>"
XML.WriteOut "<h3>电话/QQ:</h3>"
XML.WriteOut "<input type='text' name='Send_B' value=''/>"
XML.WriteOut "<h3>内容:</h3>"
XML.WriteOut "<input type='text' name='Send_C' value=''/>"
XML.WriteOut "<h3>邮箱:</h3>"
XML.WriteOut "<input type='text' name='Send_D' value=''/>"
XML.WriteRow "<input type='hidden' name='ToDo' value='ToAdd'/>"
XML.WriteOut "<input type='submit' value='提交'/>"
XML.WriteOut "</form>"
XML.WriteOut "</li></ul>"
'以下为返回链接等
XML.WriteOut XML.Div(,,"N")
XML.WriteRow XML.ImgA("Images/User.gif","GBookList.asp","查看留言")
XML.WriteRow XML.ImgA("Images/back.gif","index.asp","返回上级")
%>
<!--#Include FILE="WapConfig/WapFooter.asp"--> 
