<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunction.asp"-->
<%server.ScriptTimeout =20
If session("admau")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
elseIf session("cansetserver")="" Then
	ef=True
	ec="您没有此操作的权限。"
ElseIf not IsNumeric(Request("id"))  Then
	ef=True
	ec="产品ID应该是数字！"
end if

if not ef then
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
Set dnsserver = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_ServerDNSlist where id="&Request("id")
	dnsserver.Open Sql,conn,1,1
if dnsserver.eof then
	ef=True
	ec="服务器不存在！"
end if
end if


if not ef then
on error resume next
Response.Write "尝试添加域：test.com ...."&DNSOP(dnsserver("site"),"/zoneadd test.com /Primary",dnsserver("FreeHostsharekey"))
Response.Write "尝试删除域：test.com ...."&DNSOP(dnsserver("site"),"/zonedelete test.com",dnsserver("FreeHostsharekey"))
if err.number<>0 then Response.Write "出现错误："&err.description
if instr(err.description,"could not be resolved")>0 then%>
在主控服务器上，无法解析受控域名：<a href="<%=dsHostserver("site")%>"><%=dsHostserver("site")%></a>
<%end if%>
<br><br>
如果发生错误，请参考：<br>
<br>
<a href="http://sys.7i24.com/support/freehost/error/" target="_blank">http://sys.7i24.com/support/freehost/error/</a><br>
<br>
<a href="http://sys.7i24.com/support/freehost/dns/" target="_blank">http://sys.7i24.com/support/freehost/dns/</a><br>
<br>
<%
end if
if ef then
Response.Redirect "e.asp?e="&ec
end if%>