<!--#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="http://" & XML.DelSpecialMark(Request("Send_C")) '网址输入的为http://后面的部分
	If Receive_A="" Then
			ErrorMessage=XML.Ascii("请输入添加人。")
		ElseIf Receive_B="" Then
			ErrorMessage=XML.Ascii("请输入站名。") '如果没有错误，则错误信息为空
		ElseIf Receive_C="" Then
			ErrorMessage=XML.Ascii("请输入链接地址。") '如果没有错误，则错误信息为空
		Else
			ErrorMessage="" '如果没有错误，则错误信息为空
	End If	
If ErrorMessage="" Then      
	XML.StrSql="Insert Into SelfLink(PersonName,Title,WapUrl) Values ('" & Receive_A & "','" & Receive_B & "','" & Receive_C & "')"	
	XML.RedirectPath=XML.WapPath & "Success.asp?ToDo=AddSiteLinkOk"
	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>站点名称:</h3>"
XML.WriteOut "<input type='text' name='Send_B' value=''/>"
XML.WriteOut "<h3>站点地址(http://后的内容):</h3>"
XML.WriteOut "<input type='text' name='Send_C' 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.A("确定","SelfLinkList.asp","查看链接")
%>
<!--#Include FILE="WapConfig/WapFooter.asp"--> 
