<%If Application("api6select")=1 Then%>
<%End if%>
<%
sub RepayDomainNow()

if dsdom("Domain_API")=1 then'新网互联
	set oDomain= server.createobject("DevKit.Core.APIDomain")
	oDomain.setAgent Application("Domain_Agent_username_1"),Application("Domain_Agent_password_1_API")
	oDomain.setDomainName(dsdom("Domain"))
enc="ENG"
domtemp2=replace(replace(dsdom("Domain"),".",""),"-","")
if RegExpTest("[^A-Za-z0-9]",domtemp2) then
enc="CHI"
end if
oDomain.setEncode(enc)
oDomain.setPeriod(yearstr)
	If Not oDomain.domainRenew() Then 

		ef=True
	    ec= oDomain.getCode()&oDomain.getMessage()
		'FreeHost_oplog ds("username"),"失败","域名续费时由于网络连接等原因操作失败:"&dsdom("Domain")
		sub_FreeHost_oplog ds("username"),"失败","域名续费时由于网络连接等原因操作失败:"&dsdom("Domain")
	dsdom("retdns")=ec
	dsdom("status")="续费失败"
	dsdom.update
	Else
	dsdom("status")="正常"
	End If
	set oDomain=nothing
end if


if dsdom("Domain_API")=2 then'新网
dn=dsdom("Domain")
checksum=MD5("GetProductKey"+Application("Domain_Agent_username_2")+Application("Domain_Agent_password_2_API")+dn+enc)
body="keyname=ExpireDate&client="&Application("Domain_Agent_username_2")&"&name="+server.URLEncode (dn)+"&checksum="&checksum+"&enc="+enc
retdns=ONLY_POST(Application("API2GetProductKey"),Application("API2GetProductKey"),body)
'response.write retdns
'response.end
If Instr(retdns, "err")>0 then
	ef=True
	ec="查询失败，可能是网络不正常，也可以重试一次！出错代码是："&server.URLEncode (retdns)
else
tmep=split(retdns,"&key=")
ExpireDate=tmep(1)
ExpireDate=Replace(ExpireDate," 00:00:00.0","")

'response.write ExpireDate
'response.end

dn=dsdom("Domain")
checksum=MD5("DomainRenew"+Application("Domain_Agent_username_2")+Application("Domain_Agent_password_2_API")+dn+enc+ExpireDate)
body="client="&Application("Domain_Agent_username_2")&"&dn="+server.URLEncode (dn)+"&checksum="&checksum&"&begindate="&ExpireDate&"&period="&yearstr+"&enc="+enc
'checksum=b47746405dd4e41303e2ee1307155452&client=agent4978&dn=ceshiceshi1.com.cn&enc=E&begindate=2005-10-07&period=1
'checksum=MD5("DomainRenew"+client+password+dn+enc+begindate)
'response.write body
'response.end
'checksum=b47746405dd4e41303e2ee1307155452&client=agent4978&dn=ceshiceshi1.com.cn&enc=E&begindate=2005-10-07&period=1
retdns=ONLY_POST(Application("API2Renew"),Application("API2Renew"),body)
If Instr(retdns, "err")>0 Or Instr(1, retdns, "Error", 1)>0 Or retdns="" Or Not InStr(retdns,"renew-success")>0 then
dsdom("status")="续费失败"
	ef=True
	ec="续费失败，可能是网络不正常，也可以重试一次！出错代码是："&server.URLEncode (retdns)&"向注册商提交的信息是:"&server.URLEncode (body)
	FreeHost_oplog ds("username"),"失败","域名注册时由于"&retdns&"等原因操作失败:"&dsdom("Domain")
Else
dsdom("status")="正常"
	FreeHost_oplog ds("username"),"信息","域名续费返回信息 "&retdns&" 操作域名:"&dsdom("Domain")
end if

end if
end if'完成新网


if dsdom("Domain_API")=3 then'商务中国

Dim RenewOrderID
RenewOrderID = RenewDomain(dsdom("Domain"),yearstr)
if CBool(RenewOrderID)<>false then
'	Response.write "续费成功,订单号为:" & RenewOrderID
dsdom("retdns")="续费成功,订单号为:" & RenewOrderID
Else
	ef=True
	ec="续费失败，但款项已扣，请您联系管理员处理！"&ECapi3
	dsdom("status")="续费状态不确定"
dsdom("retdns")="续费失败，但款项已扣，出错信息："&ECapi3
'	Response.write "续费失败"
end if

dsdom.update
FreeHost_oplog ds("username"),"执行","域名续费:"&dsdom("Domain")&" 商中订单:"&RenewOrderID&ECapi3

end If

if dsdom("Domain_API")=4 then'中国频道
If TOLOGINZP()=true then
	ef=True
	ec="登陆API4域名接口失败，可能是网络忙的原因造成的，请再试一次，或请联系管理员。相关出错信息为:"&server.URLEncode(ZPEC)
end If

if not ef Then

retdns=ZP_renew_domain(dsdom("Domain"),yearstr)

If ZPEF Then
dsdom("status")="续费失败"
	ef=True
	ec="续费不成功！但款项已扣，原始接口上余额不足，请与管理员联系，请不要重试！相关出错信息为:"&server.URLEncode(ZPEC)
end If

dsdom("retdns")=retdns
dsdom.update
ZP_logout()
end If

end if'api4



if dsdom("Domain_API")=5 then'万网
'		on error resume next
			tmpStrDomain=server.URLEncode(dsdom("Domain")):tmpDataEndTime=CDate(temptime)

			'参数
			userid			=Application("Domain_Agent_username_5")			'万网数字ID
			password		=Application("Domain_Agent_password_5")		'万网数字ID密码
			email			=Application("Domain_Agent_username_5_emamil")	'万网注册email
			vtime			= FormatDate(now())
			userstr			=md5(userid&password&email&vtime)
			category		="domain"
			action			=trim("renew")
			
			domain			=tmpStrDomain
			vyear			=Request.Form("years")
			deaddate		=tmpDataEndTime
			
			vsendStr		="userid="&userid&"&userstr="&userstr&"&vtime="&vtime
			vsendStr		=vsendStr&"&category="&category
			vsendStr		=vsendStr&"&action="&action
			
			vsendStr		=vsendStr&"&domain="&domain
			vsendStr		=vsendStr&"&vyear="&yearstr
			vsendStr		=vsendStr&"&deaddate="&deaddate
			
			
						retdns=LIT_RetrunStr("http://api.hichina.com/wwwnetcn.aspx",vsendStr)

If retdns="" Then
dsdom("status")="续费失败"
	ef=True
	ec="操作失败，但款项已扣。请联系管理员！可能的原因是原始注册商的网络不正常,请不要重复尝试，请您联系管理员解决"
	FreeHost_oplog ds("username"),"失败","款项已扣，域名注册时由于原始注册商的网络不正常等原因操作失败:"&dsdom("Domain")
end If

xmlvalue(retdns)

			If Instr(retdns,"200")<=0 Then
			dsdom("status")="续费失败"
				retdns= "返回状态码:"&returncodevalue&" 原因:"&failreason&" 注意！相关的款项已被扣除！请不要重复尝试，请您联系管理员解决。"
				ef=True
				ec=retdns
				FreeHost_oplog ds("username"),"失败","域名续费:"&dsdom("Domain")&"<br>"&retdns
			Else
				dsdom("status")="正常"
				FreeHost_oplog ds("username"),"信息","域名续费时返回："&retdns&":"&dsdom("Domain")
			End If	

				dsdom("retdns")=retdns
				dsdom.update
			
		end If
		
if dsdom("Domain_API")=6 then'api6

If Application("api6select")=1 Then
shijian=UTC()

HTTPMethod="POST"&chr(10)
CanonicalURI="/v1/domain/renew"&chr(10)
CanonicalQueryString=""&chr(10)
CanonicalHeaders="host:bcd.baidubce.com"
CanonicalRequest=HTTPMethod&CanonicalURI&CanonicalQueryString&CanonicalHeaders
authStringPrefix = Bce_auth_version&"/"&AccessKeyID&"/"&shijian&"/"&Default_expiration_in_seconds
SigningKey = HMAC_SHA256_MAC(SecretAccessKey, authStringPrefix)
Signature = HMAC_SHA256_MAC(SigningKey, CanonicalRequest)
authorization=authStringPrefix&"/host/"&Signature

postcon="{"&chr(34)&"domain"&chr(34)&" : "&chr(34)&dsdom("Domain")&chr(34)&","
postcon=postcon&chr(34)&"years"&chr(34)&" : "&dsdom("years")&"}"

' response.write postcon&"<br>"&"<br>"&"<br>"
' response.end

Set objXML = Server.CreateObject("Msxml2.ServerXMLHTTP.3.0")
objXML.open "POST","http://bcd.baidubce.com/v1/domain/renew",false  
objXML.setRequestHeader "authorization", authorization
objXML.setRequestHeader "host", "bcd.baidubce.com"
objXML.setRequestHeader "x-bce-date", shijian
objXML.send (postcon)

retdns = objXML.responseText
' response.write retdns

If Instr(retdns, "renewResult")>0 and Instr(retdns, "true")>0 then
	dsdom("status")="正常"
	FreeHost_oplog ds("username"),"信息","域名续费返回信息 "&retdns&" 操作域名:"&dsdom("Domain")
else
dsdom("status")="续费失败"
	ef=True
	ec="续费失败，可能是网络不正常，也可以重试一次！出错代码是："&server.URLEncode (retdns)&"向注册商提交的信息是:"&server.URLEncode (body)
	FreeHost_oplog ds("username"),"失败","域名续费时由于"&retdns&"等原因操作失败:"&dsdom("Domain")
end If
Exit sub
End if''If Application("api6select")=1 Then'当用百度云时

api6GetProductKey=Application("Domain_Agent_url_6")&"/api/freehost.asp?method=GetProductKey"
dn=dsdom("Domain")
checksum=MD5("GetProductKey"+Application("Domain_Agent_username_6")+Application("Domain_Agent_password_6")+dn+enc)
body="keyname=ExpireDate&client="&Application("Domain_Agent_username_6")&"&name="+server.URLEncode (dn)+"&checksum="&checksum+"&enc="+enc
retdns=ONLY_POST(api6GetProductKey,api6GetProductKey,body)
'response.write retdns
'response.end
If Instr(retdns, "err")>0 then
	ef=True
	ec="ret=0&err=name-noexist&freehostinfo=查询原域名出错！出错代码是："&server.URLEncode (retdns)
else
tmep=split(retdns,"&key=")
ExpireDate=tmep(1)
ExpireDate=Replace(ExpireDate," 00:00:00.0","")

'response.write ExpireDate
'response.end
API6Renewurl=Application("Domain_Agent_url_6")&"/api/freehost.asp?method=DomainRenew"
dn=dsdom("Domain")
checksum=MD5("DomainRenew"+Application("Domain_Agent_username_6")+Application("Domain_Agent_password_6")+dn+enc+ExpireDate)
body="client="&Application("Domain_Agent_username_6")&"&dn="+server.URLEncode (dn)+"&checksum="&checksum&"&begindate="&ExpireDate&"&period="&yearstr+"&enc="+enc
retdns=ONLY_POST(API6Renewurl,API6Renewurl,body)
If Instr(retdns, "err")>0 Or Instr(1, retdns, "Error", 1)>0 Then
dsdom("status")="续费失败"
	ef=True
	ec="续费失败，可能是网络不正常，也可以重试一次！出错代码是："&server.URLEncode (retdns)&"向注册商提交的信息是:"&server.URLEncode (body)
	FreeHost_oplog ds("username"),"失败","域名续费时由于"&retdns&"等原因操作失败:"&dsdom("Domain")
Else
	dsdom("status")="正常"
	FreeHost_oplog ds("username"),"信息","域名续费返回信息 "&retdns&" 操作域名:"&dsdom("Domain")
end if

end if

end If'完成API6

If dsdom("Domain_API")=7 Then
 
domainname=ComX.idntoac_7i24_com(Cstr(dsdom("Domain")))
If Application("api7select")=1 Then'is aisa
'http://ote.asiaregister.com/Interface.php?MRP_ID=1&MRP_PW=e10adc3949ba59abbe56e057f20f883e&
'Command=Domain&Action=Renew&Domain=reddns.com&Period=1
vsendStr = "Command=Domain&Action=Renew"
vsendStr = vsendStr &"&MRP_ID="&Application("Domain_Agent_username_7")
vsendStr = vsendStr &"&MRP_PW="&Application("Domain_Agent_password_7")
vsendStr = vsendStr &"&Domain="&domainname
vsendStr = vsendStr &"&Period="&yearstr
	retdns=AsiaAPI(vsendStr)		
			If Instr(retdns,"ErrCount=0")<=0 Then
			dsdom("status")="续费失败"
				ef=True
				ec="操作失败，但款项已扣。请联系管理员！代码为(API7-asia)："&server.URLEncode (retdns)
				FreeHost_oplog ds("username"),"失败","域名续费:"&dsdom("Domain")&"<br>"&retdns
			Else
				dsdom("status")="正常"
				FreeHost_oplog ds("username"),"信息","域名续费时返回："&retdns&":"&dsdom("Domain")
			End If	
				dsdom("postcon")=Replace(vsendStr,Application("Domain_Agent_password_7"),"******")
				dsdom("retdns")=retdns
				dsdom.update

elseIf Application("api7select")=2 Then'is 1api

vsendStr = "command=RenewDomain"
vsendStr = vsendStr &"&s_login="&Application("Domain_Agent_username_7")
vsendStr = vsendStr &"&s_pw="&Application("Domain_Agent_password_7")
vsendStr = vsendStr &"&domain="&domainname
vsendStr = vsendStr &"&period="&yearstr
	retdns=HexonetAPI(vsendStr)	

if instr(UCase(Replace(retdns," ","")),"CODE=200") then
				FreeHost_oplog dsdom("username"),"信息","管理员操作注册时返回(关闭自动续费)："&retdns&":"&dsdom("Domain")
Else
				ef=True
				ec="操作失败，但款项已扣。请联系管理员！代码为(API7-1api-续费失败)："&server.URLEncode (retdns)
				dsdom("status")="失败"
				FreeHost_oplog dsdom("username"),"失败","域名续费时返回："&dsdom("Domain")&"<br>"&(retdns)
end If
				dsdom("postcon")=Replace(vsendStr,Application("Domain_Agent_password_7"),"******")
				dsdom("retdns")=retdns
				dsdom.update
				Exit sub


else
'is enom
vsendStr = "command=Extend"
vsendStr = vsendStr &"&uid="&Application("Domain_Agent_username_7")
vsendStr = vsendStr &"&pw="&Application("Domain_Agent_password_7")
vsendStr = vsendStr &"&sld="&mid(domainname,1,instr(domainname,".")-1)
vsendStr = vsendStr &"&tld="&mid(domainname,instr(domainname,".")+1)
vsendStr = vsendStr &"&NumYears="&yearstr
vsendStr = vsendStr &"&ResponseType=XML"
retdns=EnomAPI(vsendStr)		

			If Instr(retdns,"<RRPCode>200</RRPCode>")<=0 and Instr(retdns,"successful")<=0 Then
			dsdom("status")="续费失败"
				ef=True
				ec="操作失败，但款项已扣。请联系管理员！代码为(API7-enom)："&server.URLEncode (retdns)
				FreeHost_oplog ds("username"),"失败","域名续费:"&dsdom("Domain")&"<br>"&retdns
			Else
				dsdom("status")="正常"
				FreeHost_oplog ds("username"),"信息","域名续费时返回："&retdns&":"&dsdom("Domain")
			End If	
				dsdom("postcon")=Replace(vsendStr,Application("Domain_Agent_password_7"),"******")
				dsdom("retdns")=retdns
				dsdom.update
End if' isenom
End If'api7


End Sub'续费子程序完成






















sub ChangeDomainPD()

if dsdom("Domain_API")=1 then
	Set oDomain = server.CreateObject("DevKit.Core.APIDomain")
	oDomain.setAgent Application("Domain_Agent_username_1"),Application("Domain_Agent_password_1_API")
	oDomain.setPostDebug(true)
	oDomain.setDomainName(dsdom("Domain"))
	enc="ENG"
	domtemp2=replace(replace(dsdom("Domain"),".",""),"-","")
	if RegExpTest("[^A-Za-z0-9]",domtemp2) then
	enc="CHI"
	end if
    oDomain.setEncode(enc)

	If oDomain.domainGetStatus() Then 
		dsdom("inipass")=oDomain.getCipher()
	Else 
		ef=True
	    ec= oDomain.getCode()&oDomain.getMessage()
	End If 

if not ef then
if dsdom("DNS_API")=1 And Application("showdomainpass")=False then
domainpass=Left(Md5(time),8)
	If Newdomainpass<>"" Then domainpass=Newdomainpass'新密码
dsdom("inipass")=domainpass
end if
domainpass=dsdom("inipass")
dsdom.update
	'生成Mydns管理对象

	Set oMyDns = server.CreateObject("DevKit.Core.APIMydns")
	oMyDns.setAgent Application("Domain_Agent_username_1"),Application("Domain_Agent_password_1_API")
	oMyDns.setPostDebug(true)
	oMyDns.setDomainName(dsdom("Domain"))
	If Newdomainpass<>"" Then

	If Not oMyDns.setCipher(Newdomainpass) Then 
		ef=true
		ec=oMyDns.getMessage()
	End If

	else'没有新的mydns密码

If oMyDns.mydnsGetCipher() Then 
	if Application("showdomainpass") Or session("canadmdomain")="y" Then
		domainpass="管理密码："&domainpass&" Mydns密码："&oMyDns.getCipher()
	Else
	    domainpass="<br>Mydns密码："&oMyDns.getCipher()
		dsdom("inipass")=oMyDns.getCipher()
		dsdom.update
	end If
Else
	ef=true
	ec=oMyDns.getMessage()
End if

	End If
	
		Set oMyDns = nothing

End If
	Set oDomain = nothing
End If

if dsdom("Domain_API")=2 Then
dn=dsdom("Domain")
checksum=MD5("GetProductKey"+Application("Domain_Agent_username_2")+Application("Domain_Agent_password_2_API")+dn+enc)
body="client="&Application("Domain_Agent_username_2")&"&keyname=Password&name="+server.URLEncode (dn)+"&checksum="&checksum+"&enc="+enc
retdns=ONLY_POST(Application("API2GetProductKey"),Application("API2GetProductKey"),body)

'response.write retdns&"<br>"
'response.End

If Instr(retdns, "err=")>0 Or Instr(retdns, "auth=-1")>0 then
	ef=True
	ec="修改失败，可能是网络不正常，也可以重试一次！出错代码是："&server.URLEncode (retdns)
else
tmep=split(retdns,"&key=")
domainpass=tmep(1)
dsdom("inipass")=domainpass

'response.write domainpass&"<br>"
'response.End

body="client="&Application("Domain_Agent_username_2")&"&keyname=MyDnsPass&name="+server.URLEncode (dn)+"&checksum="&checksum+"&enc="+enc
'retdns=ONLY_POST(Application("API2GetProductKey"),Application("API2GetProductKey"),body)
tmep=split(retdns,"&key=")

'response.write tmep(1)&"<br>"
'response.End

'修改旧密码
'Randomize
'domainpass=Left(Md5(time),8)
	If Newdomainpass<>"" Then domainpass=Newdomainpass'新密码
checksum=MD5("ChangeProductKey"+Application("Domain_Agent_username_2")+Application("Domain_Agent_password_2_API")+dn+enc)
if Application("showdomainpass")=true then'改管理密码
body="dn="+server.URLEncode (dn)+"&client="&Application("Domain_Agent_username_2")&"&keyname=Password&checksum="&checksum+"&enc="+enc+"&oldkey="+dsdom("inipass")+"&newkey="+domainpass
else'改mydns
body="dn="+server.URLEncode (dn)+"&client="&Application("Domain_Agent_username_2")&"&keyname=MyDnsPass&checksum="&checksum+"&enc="+enc+"&oldkey="+tmep(1)+"&newkey="+domainpass
End if
'retdns=ONLY_POST(Application("API2ChangeProductKey"),Application("API2GetProductKey"),body)
If Instr(retdns, "err=")>0 then
	ef=True
	ec="修改失败，可能是网络不正常，也可以重试一次！出错代码是："&server.URLEncode (retdns)
End if
dsdom("inipass")=domainpass

if Application("showdomainpass") Or session("canadmdomain")="y" Then
domainpass="<br>管理密码："&domainpass'&"<br> Mydns密码："&tmep(1)
Else
'    domainpass="<br>Mydns密码："&domainpass
	domainpass="<br>Mydns密码："&tmep(1)
	dsdom("inipass")=tmep(1)
end if

'if Application("showdomainpass")=false then dsdom("inipass")=tmep(1)
dsdom.update

if dsdom("DNS_API")=1 And Application("showdomainpass")=False then
Randomize
domainpass=Left(Md5(time),8)
	If Newdomainpass<>"" Then domainpass=Newdomainpass'新密码
dsdom("inipass")=domainpass
dsdom.update
end if
end If
End If

if dsdom("Domain_API")=3 Then


Randomize
ftpRkey=CLng((100000000 - 20 + 7850) * Rnd + 100)
domainpass=Ucase(Left(md5(now&ftpRkey),6))&right(md5(now&ftpRkey),3)&"Aa8"'2010-8-5
dsdom("inipass")=domainpass

if ModDomainPassword(dsdom("Domain"), domainpass)=True then '域名密码域名格式为:至少六位的大小写字母加数字,可有特殊字符
dsdom("retdns")="修改成功"
'	Response.write "修改成功,新密码为:" & NewPassword
Else
	ef=True
	ec="修改失败，可能是网络不稳定，也可以重试一次！"&ECapi3
dsdom("retdns")=EC
'	Response.write "修改域名密码失败"
end if

dsdom.update
End If


if dsdom("Domain_API")=4 Then

domainpass=Left(Md5(time),8)&"I@i0"
	If Newdomainpass<>"" Then domainpass=Newdomainpass'新密码
dsdom("inipass")=domainpass
retdns=ZP_password(dsdom("Domain"),dsdom("inipass"))
If ZPEF then
	ef=True
	ec="修改失败，可能是网络不正常，也可以重试一次！或请联系管理员。相关出错信息为:"&server.URLEncode(ZPEC)
dsdom("retdns")=retdns
end If
ZP_logout()'退出中频并结束socket

End If


if dsdom("Domain_API")=5 Then
			userid			=Application("Domain_Agent_username_5")			'万网数字ID
			password		=Application("Domain_Agent_password_5")		'万网数字ID密码
			email			=Application("Domain_Agent_username_5_emamil")	'万网注册email
	vtime			= FormatDate(now())
	userstr			=md5(userid&password&email&vtime)
	category		="domain"
	action			=trim("chgpwd")
	
	domain			=dsdom("Domain")
	domainpwd		=Left(Md5(time),8)
		If Newdomainpass<>"" Then domainpwd=Newdomainpass'新密码
	
	vsendStr		="userid="&userid&"&userstr="&userstr&"&vtime="&vtime
	vsendStr		=vsendStr&"&category="&category
	vsendStr		=vsendStr&"&action="&action
	
	vsendStr		=vsendStr&"&domain="&server.URLEncode(domain)
	vsendStr		=vsendStr&"&domainpwd="&domainpwd
	
	
	LIT_RetrunStr_T=LIT_RetrunStr("http://api.hichina.com/wwwnetcn.aspx",vsendStr)
	
	If Instr(LIT_RetrunStr_T,"200")<=0 Then
		retdns=LIT_RetrunStr_T
		response.write retdns
		dsdom("retdns")=retdns
		dsdom.update
		response.end		
	End If
	dsdom("inipass")=domainpwd
	domainpass=dsdom("inipass")
	dsdom.update
if dsdom("DNS_API")=1 And Application("showdomainpass")=False then
Randomize
domainpass=Left(Md5(time),8)
	If Newdomainpass<>"" Then domainpass=Newdomainpass'新密码
dsdom("inipass")=domainpass
dsdom.update
end if
End if


if dsdom("Domain_API")=6 Then

If Application("api6select")=1 Then
ef=True
ec="您无需重置密码。直接点[管理]即可"
Response.Redirect "e.asp?e="&ec
Exit sub
End If 'If Application("api6select")=1 Then

dn=dsdom("Domain")
api6GetProductKey=Application("Domain_Agent_url_6")&"/api/freehost.asp?method=GetProductKey"
api6ChangeProductKey=Application("Domain_Agent_url_6")&"/api/freehost.asp?method=ChangeProductKey"
checksum=MD5("GetProductKey"+Application("Domain_Agent_username_6")+Application("Domain_Agent_password_6")+dn+enc)
body="client="&Application("Domain_Agent_username_6")&"&keyname=Password&name="+server.URLEncode (dn)+"&checksum="&checksum+"&enc="+enc
retdns=ONLY_POST(api6GetProductKey,api6GetProductKey,body)

If Instr(retdns, "err=")>0 Or Instr(retdns, "auth=-1")>0 Or Instr(retdns, "&key=")<1 then
	ef=True
	ec="修改失败，可能是网络不正常，也可以重试一次！出错代码是api6-："&server.URLEncode (retdns)
	Response.Redirect "e.asp?e="&ec
else
tmep=split(retdns,"&key=")
domainpass=tmep(1)
dsdom("inipass")=domainpass

body="client="&Application("Domain_Agent_username_6")&"&keyname=MyDnsPass&name="+server.URLEncode (dn)+"&checksum="&checksum+"&enc="+enc
retdns=ONLY_POST(api6GetProductKey,api6GetProductKey,body)
tmep=split(retdns,"&key=")

'修改旧密码
ftpRkey=CLng((100000000 - 20 + 7850) * Rnd + 100)
domainpass=Ucase(Left(md5(now&ftpRkey),6))&right(md5(now&ftpRkey),5)&"Aa8"'2011-7-13
	If Newdomainpass<>"" Then domainpass=Newdomainpass'新密码
dsdom("inipass")=domainpass
dsdom.update

checksum=MD5("ChangeProductKey"+Application("Domain_Agent_username_6")+Application("Domain_Agent_password_6")+dn+enc)
body="dn="+server.URLEncode (dn)+"&client="&Application("Domain_Agent_username_6")&"&keyname=Password&checksum="&checksum+"&enc="+enc+"&oldkey="+dsdom("inipass")+"&newkey="+domainpass
retdns=ONLY_POST(api6ChangeProductKey,api6ChangeProductKey,body)
If Instr(retdns, "err=")>0 then
	ef=True
	ec="修改失败，可能是网络不正常，也可以重试一次！出错代码是："&server.URLEncode (retdns)
End If


'response.write retdns
'response.End

dsdom("inipass")=domainpass

if Application("showdomainpass") Or session("canadmdomain")="y" Then
'domainpass="<br>管理密码："&domainpass&"<br> Mydns密码："&tmep(1)
domainpass="<br>管理密码："&domainpass
else
	domainpass="<br>Mydns密码："&tmep(1)
	dsdom("inipass")=tmep(1)
end if

if Application("showdomainpass")=false then dsdom("inipass")=tmep(1)
dsdom.update

if dsdom("DNS_API")=1 And Application("showdomainpass")=False then
'domainpass=Left(Md5(time),8)
'	If Newdomainpass<>"" Then domainpass=Newdomainpass'新密码
'dsdom("inipass")=domainpass'2015-9-8
dsdom.update
end if
end If
End If

If dsdom("Domain_API")=7 Then
domainpass=Left(md5(now),12)
dsdom("inipass")=domainpass
 
domainname=ComX.idntoac_7i24_com(Cstr(dsdom("Domain")))

domainpass=Left(Md5(time),12)
	If Newdomainpass<>"" Then domainpass=Newdomainpass'新密码
dsdom("inipass")=domainpass
dsdom.update

If Application("api7select")=1 Then'is aisa
'http://ote.asiaregister.com/Interface.php?MRP_ID=1&MRP_PW=e10adc3949ba59abbe56e057f20f883e&
'Command=Domain&Action=Passwd&Domain=reddns.com&Passwd=49ba57c39abbe56f20f883e654ade059
vsendStr = "Command=Domain&Action=Passwd"
vsendStr = vsendStr &"&MRP_ID="&Application("Domain_Agent_username_7")
vsendStr = vsendStr &"&MRP_PW="&Application("Domain_Agent_password_7")
vsendStr = vsendStr &"&Domain="&domainname
vsendStr = vsendStr &"&Passwd="&md5(dsdom("inipass"))
	retdns=AsiaAPI(vsendStr)		
			If Instr(retdns,"ErrCount=0")<=0 and Instr(retdns,"RRPCode=200")<=0 Then
				ef=True
				ec="密码设置失败，代码为(API7-Asia)："&server.URLEncode (retdns)
			End If		
dsdom("postcon")=Replace(vsendStr,Application("Domain_Agent_password_7"),"******")
dsdom("retdns")=retdns

elseIf Application("api7select")=2 Then'is 1api


'if dsdom("DNS_API")=1 then
'Else
'				ef=True
'				ec="密码设置失败,本接口必须使用自己的DNS才能设置密码."
'end if

else
'is enom
vsendStr = "command=setpassword"
vsendStr = vsendStr &"&uid="&Application("Domain_Agent_username_7")
vsendStr = vsendStr &"&pw="&Application("Domain_Agent_password_7")
vsendStr = vsendStr &"&sld="&mid(domainname,1,instr(domainname,".")-1)
vsendStr = vsendStr &"&tld="&mid(domainname,instr(domainname,".")+1)
vsendStr = vsendStr &"&domainpassword="&domainpass
vsendStr = vsendStr &"&ResponseType=XML"
retdns=EnomAPI(vsendStr)		

			If Instr(retdns,"<ErrCount>0</ErrCount>")<=0 And Instr(retdns,"<ErrCount><![CDATA[0]]></ErrCount>")<=0 Then
				ef=True
				ec=retdns
			End If	
				dsdom("postcon")=Replace(vsendStr,Application("Domain_Agent_password_7"),"******")
				dsdom("retdns")=retdns
				dsdom.update
End If ' isenom
End If'api7


End sub


'上面是pass












sub RegisterDomainNow()

dns1=dsdom("dns1")
dns2=dsdom("dns2")
dsdom("DNScount")=Application("DNScount")

If dsdom("Domain_API")=1 Then
If IsNull(dsdom("dns1")) then
dns1="ns1.dns.com.cn"
dns2="ns2.dns.com.cn"
If dsdom("DNS_API")=1 And Right(dsdom("Domain"),3)<>".cn" then
dns1=Application("DNS1")
dns2=Application("DNS2")
else
dsdom("DNS_API")=0
End if
End If

uprov=dsdom("uprov")
uprov=Replace(uprov,"Beijing","BJ")
uprov=Replace(uprov,"Hongkong","HK")
uprov=Replace(uprov,"Aomen","MO")
uprov=Replace(uprov,"Taiwan","TW")
uprov=Replace(uprov,"Shanghai","SH")
'uprov=Replace(uprov,"深圳","SZ")
uprov=Replace(uprov,"Guangdong","GD")
uprov=Replace(uprov,"Shandong","SD")
uprov=Replace(uprov,"Sichuan","SC")
uprov=Replace(uprov,"Fujian","FJ")
uprov=Replace(uprov,"Jiangsu","JS")
uprov=Replace(uprov,"Zhejiang","ZJ")
uprov=Replace(uprov,"Tianjin","TJ")
uprov=Replace(uprov,"Chongqing","CQ")
uprov=Replace(uprov,"Hebei","HE")
uprov=Replace(uprov,"Henan","HA")
uprov=Replace(uprov,"Heilongjiang","HL")
uprov=Replace(uprov,"Jinlin","JL")
uprov=Replace(uprov,"Liaoning","LN")
uprov=Replace(uprov,"Neimenggu","NM")
uprov=Replace(uprov,"Hainan","HI")
uprov=Replace(uprov,"Shanxi3","SN")'注意
uprov=Replace(uprov,"Shanxi","SX")'注意
uprov=Replace(uprov,"Anhui","AH")
uprov=Replace(uprov,"Jiangxi","JX")
uprov=Replace(uprov,"Gansu","GS")
uprov=Replace(uprov,"Xinjiang","XJ")
uprov=Replace(uprov,"Hubei","HB")
uprov=Replace(uprov,"Hunan","HN")
uprov=Replace(uprov,"Yunnan","YN")
uprov=Replace(uprov,"Guangxi","GX")
uprov=Replace(uprov,"Ningxia","NX")
uprov=Replace(uprov,"Guizhou","GZ")
uprov=Replace(uprov,"Qinghai","QH")
uprov=Replace(uprov,"Xizang","XZ")
'uprov=Replace(uprov,"外国","WG")

	set oDomain= server.createobject("DevKit.Core.APIDomain")
	'设置联结码
	oDomain.setAgent Application("Domain_Agent_username_1"),Application("Domain_Agent_password_1_API")
'	sSaveDebug = server.MapPath(".") + "\\log\\"
	oDomain.setSaveDebug(sSaveDebug)
	'是否开启debug
	oDomain.setPostDebug(true)
'	oDomain.setPostDebug(false)
	'填充注册人信息
	oDomain.oDTODomain.setOrganizationZH(dsdom("uname1"))
	oDomain.oDTODomain.setOrganizationEN(dsdom("uname2"))
	oDomain.oDTODomain.setStreetZH(dsdom("uaddr1"))
	oDomain.oDTODomain.setStreetEN(dsdom("uaddr2"))
	oDomain.oDTODomain.setCityZH(dsdom("ucity1"))
	oDomain.oDTODomain.setCityEN(dsdom("ucity2"))
	oDomain.oDTODomain.setProvince(uprov)
	oDomain.oDTODomain.setCountry("CN")
	oDomain.oDTODomain.setPostcode(dsdom("uzip"))
	oDomain.oDTODomain.setNameZH(dsdom("rname1"))
	oDomain.oDTODomain.setNameEN(dsdom("rname2"))
	oDomain.oDTODomain.setPhoneRegionCode("86")
	oDomain.oDTODomain.setPhoneAreaCode(dsdom("utela"))
	oDomain.oDTODomain.setPhoneNumber(dsdom("uteln"))
	oDomain.oDTODomain.setPhoneExt("")
	oDomain.oDTODomain.setFaxRegionCode("86")
	oDomain.oDTODomain.setFaxAreaCode(dsdom("ufaxa"))
	oDomain.oDTODomain.setFaxNumber(dsdom("ufaxn"))
	oDomain.oDTODomain.setFaxExt("")
	oDomain.oDTODomain.setEmail(dsdom("uemail"))
	oDomain.oDTODomain.setManager(dsdom("rname1"))
	oDomain.oDTODomain.setTrade("S12")
	oDomain.oDTODomain.setAdditional("only test")
	oDomain.setContactAsp("ORG")
	'填充管理人信息
	oDomain.oDTODomain.setOrganizationZH(dsdom("uname1"))
	oDomain.oDTODomain.setOrganizationEN(dsdom("uname2"))
	oDomain.oDTODomain.setStreetZH(dsdom("uaddr1"))
	oDomain.oDTODomain.setStreetEN(dsdom("uaddr2"))
	oDomain.oDTODomain.setCityZH(dsdom("ucity1"))
	oDomain.oDTODomain.setCityEN(dsdom("ucity2"))
	oDomain.oDTODomain.setProvince(uprov)
	oDomain.oDTODomain.setCountry("CN")
	oDomain.oDTODomain.setPostcode(dsdom("uzip"))
	oDomain.oDTODomain.setNameZH(dsdom("rname1"))
	oDomain.oDTODomain.setNameEN(dsdom("rname2"))
	oDomain.oDTODomain.setPhoneRegionCode("86")
	oDomain.oDTODomain.setPhoneAreaCode(dsdom("utela"))
	oDomain.oDTODomain.setPhoneNumber(dsdom("uteln"))
	oDomain.oDTODomain.setPhoneExt("")
	oDomain.oDTODomain.setFaxRegionCode("86")
	oDomain.oDTODomain.setFaxAreaCode(dsdom("ufaxa"))
	oDomain.oDTODomain.setFaxNumber(dsdom("ufaxn"))
	oDomain.oDTODomain.setFaxExt("")
	oDomain.oDTODomain.setEmail(dsdom("uemail"))
	oDomain.oDTODomain.setManager(dsdom("rname1"))
	oDomain.oDTODomain.setTrade("S12")
	oDomain.oDTODomain.setAdditional("only test")
	oDomain.setContactAsp("ADM")
	'设置域名属性
	oDomain.setDomainName(dsdom("Domain"))'domain

domtemp2=replace(replace(dsdom("Domain"),".",""),"-","")
if RegExpTest("[^A-Za-z0-9]",domtemp2) then
    oDomain.setEncode("CHI")
 
Fdomain=ComX.StoF_7i24_com(CStr(dsdom("Domain")))
Fdomain=Replace(Fdomain,".中國",".中国")
Fdomain=Replace(Fdomain,".公司",".公司")
Fdomain=Replace(Fdomain,".網絡",".网络")
	oDomain.setDomainComplex(CStr(Fdomain))
Else
	oDomain.setEncode("ENG")
end if

	oDomain.setPeriod(Clng(dsdom("years")))'year
	oDomain.setNameServer_7i24_com(Trim(cstr(dns1)))
	oDomain.setNameServer_7i24_com(trim(cstr(dns2)))
	'执行发送操作
	if not oDomain.domainNew() Then
		retdns= oDomain.getPostDebug()
		retdns= retdns&"Error"
		retdns= retdns&"<br>错误号："&oDomain.getCode()
		retdns= retdns&"<br>错误信息："&oDomain.getMessage()
		retdns= retdns&"<br>注意！相关的款项已被扣除！下次请点确认不扣费!"
		FreeHost_oplog dsdom("username"),"失败","域名注册:"&dsdom("Domain")&"<br>"&retdns
		response.write retdns
		Application.lock
		Application("domainoplock")=false
		Application.unlock
		dsdom("retdns")=retdns
		dsdom("status")="失败"
		dsdom.update
		Set oDomain = nothing
		response.end
	else

		retdns= retdns&"<br>域名："&oDomain.getDomainName()
		retdns= retdns&"<br>密码："&oDomain.getCipher()
		retdns= retdns&"<br>注册日期："&oDomain.getCreationDate()
		retdns= retdns&"<br>过期日期："&oDomain.getExpirationDate()
        if Application("showdomainpass") Then dsdom("inipass")=oDomain.getCipher()

	end If

	'执行发送操作
	if oDomain.getCode()>0 Then
		retdns= oDomain.getPostDebug()
		retdns= retdns&"Error"
		retdns= retdns&"<br>错误号："&oDomain.getCode()
		retdns= retdns&"<br>错误信息："&oDomain.getMessage()
		retdns= retdns&"<br>注意！相关的款项已被扣除！下次请点确认不扣费!"
		FreeHost_oplog dsdom("username"),"失败","域名注册:"&dsdom("Domain")&"<br>"&retdns
		response.write retdns
		Application.lock
		Application("domainoplock")=false
		Application.unlock
		dsdom("retdns")=retdns
		dsdom("status")="失败"
		dsdom.update
		Set oDomain = nothing
		response.end
	else

		retdns= retdns&"<br>域名："&oDomain.getDomainName()
		retdns= retdns&"<br>密码："&oDomain.getCipher()
		retdns= retdns&"<br>注册日期："&oDomain.getCreationDate()
		retdns= retdns&"<br>过期日期："&oDomain.getExpirationDate()
        if Application("showdomainpass") Then dsdom("inipass")=oDomain.getCipher()

	end If
dsdom("retdns")=retdns
		Set oDomain = nothing
End If'api1

If dsdom("Domain_API")=2 Then
If IsNull(dsdom("dns1")) then
if enc="G" Then
dns1="dns-ch.xinnet.com"
dns2="dns-ch2.xinnet.com"
Else
dns1=""'"ns.xinnetdns.com"
dns2=""'"ns.xinnet.cn"
end If
If dsdom("DNS_API")=1  And Right(dsdom("Domain"),3)<>".cn" then
dns1=Application("DNS1")
dns2=Application("DNS2")
else
dsdom("DNS_API")=0
End if
End if
checksum=MD5("Register"+Application("Domain_Agent_username_2")+Application("Domain_Agent_password_2_API")+dsdom("Domain")+dsdom("uemail")+dsdom("uname2"))
postcon="dn="&server.URLEncode(dsdom("Domain"))&"&enc="&enc&"&period="&dsdom("years")&"&client="&Application("Domain_Agent_username_2")&"&uname1="&server.URLEncode(dsdom("uname1"))&"&uname2="&server.URLEncode(dsdom("uname2"))&"&uname3="&server.URLEncode(dsdom("uname2"))&"&uname4="&server.URLEncode(dsdom("uname2"))&"&rname1="&server.URLEncode(dsdom("rname1"))&"&rname2="&server.URLEncode(dsdom("rname2"))&"&ust=CN"&"&uprov="&server.URLEncode(dsdom("uprov"))&"&ucity1="&server.URLEncode(dsdom("ucity1"))&"&ucity2="&server.URLEncode(dsdom("ucity2"))&"&uaddr1="&server.URLEncode(dsdom("uaddr1"))&"&uaddr2="&server.URLEncode(dsdom("uaddr2"))&"&location="&server.URLEncode(dsdom("uaddr1"))&"&uzip="&server.URLEncode(dsdom("uzip"))&"&utelc="&server.URLEncode(dsdom("utelc"))&"&utela="&server.URLEncode(dsdom("utela"))&"&uteln="&server.URLEncode(dsdom("uteln"))&"&ufaxc="&server.URLEncode(dsdom("ufaxc"))&"&ufaxa="&server.URLEncode(dsdom("ufaxa"))&"&ufaxn="&server.URLEncode(dsdom("ufaxn"))&"&ufaxe=&uemail="&server.URLEncode(dsdom("uemail"))&"&aname1="&server.URLEncode(dsdom("uname1"))&"&aname2="&server.URLEncode(dsdom("uname2"))&"&atelc="&server.URLEncode(dsdom("utelc"))&"&atela="&server.URLEncode(dsdom("utela"))&"&ateln="&server.URLEncode(dsdom("uteln"))&"&atele=&afaxc="&server.URLEncode(dsdom("ufaxc"))&"&afaxa="&server.URLEncode(dsdom("ufaxa"))&"&afaxn="&server.URLEncode(dsdom("ufaxn"))&"&afaxe=&aemail="&server.URLEncode(dsdom("uemail"))&"&dns1="&server.URLEncode(dns1)&"&dns2="&server.URLEncode(dns2)&"&checksum="&checksum
retdns=ONLY_POST(Application("API2Register"),Application("API2Register"),postcon)
If Instr(1, retdns, "err=", 1)>0 or Instr(1, retdns, "reg-failure", 1)>0 Or Instr(1, retdns, "Error", 1)>0 Or Not InStr(retdns,"reg-success")>0 then
	ef=True
	ec="操作失败，请联系管理员！代码为："&server.URLEncode (retdns)
	FreeHost_oplog dsdom("username"),"失败","款项已扣，域名注册时由于"&retdns&"等原因操作失败:"&dsdom("Domain")
	dsdom("status")="失败"
end if
If retdns="" then
	ef=True
	ec="操作失败，但款项已扣。请联系管理员！代码为：可能的原因是原始注册商的网络不正常"
	FreeHost_oplog dsdom("username"),"失败","域名注册时由于原始注册商的网络不正常等原因操作失败:"&dsdom("Domain")
	dsdom("status")="失败"
end If
dsdom("retdns")=retdns
dsdom("postcon")=postcon
End If'api2





If dsdom("Domain_API")=3 Then
If IsNull(dsdom("dns1")) then
dns1="ns7.cnmsn.net"
'dns1="dns.bizcn.com"
dns1ip="218.85.136.43"
dns2="ns8.cnmsn.net"
'dns2="dns.cnmsn.net"
dns2ip="222.76.210.41"
If dsdom("DNS_API")=1  And Right(dsdom("Domain"),3)<>".cn" then
dns1=Application("DNS1")
dns1ip=Application("DNS1_IP")
dns2=Application("DNS2")
dns2ip=Application("DNS2_IP")
else
dsdom("DNS_API")=0
End if
End If

firstname=(LCase(Split(dsdom("rname2")," ")(0)))
lastname=(LCase(Split(dsdom("rname2")," ")(1)))
utela=dsdom("utela")
If Left(utela,1)="0" Then utela=Right(utela,Len(utela)-1)
r_telephone=("+86."&utela&dsdom("uteln"))
ufaxa=dsdom("ufaxa")
If Left(ufaxa,1)="0" Then ufaxa=Right(ufaxa,Len(ufaxa)-1)
r_fax=("+86."&ufaxa&dsdom("ufaxn"))

Randomize
domainpass=Cstr(Int((99999999 - 100000 + 1) * Rnd + 100000))
ftpRkey=CLng((100000000 - 20 + 7850) * Rnd + 100)
domainpass=Ucase(Left(md5(now&ftpRkey),6))&right(md5(now&ftpRkey),3)&"aA0"
	s_dns_host = Array(dns1,dns2)
	s_dns_ip = Array(dns1ip,dns2ip)
s_dom_fn=lastname
s_dom_ln=firstname
s_dom_org=dsdom("uname2")
s_dom_adr1=(dsdom("uaddr2"))
s_dom_ct=(dsdom("ucity2"))
s_dom_st=dsdom("uprov")
s_dom_co="cn"
s_dom_pc=(dsdom("uzip"))
s_dom_ph=r_telephone
s_dom_fax=r_fax
s_dom_em=(dsdom("uemail"))

s_tech_fn=s_dom_fn
s_tech_ln=s_dom_ln
s_tech_org=s_dom_org
s_tech_adr1=s_dom_adr1
s_tech_ct=s_dom_ct
s_tech_st=s_dom_st
s_tech_co=s_dom_co
s_tech_pc=s_dom_pc
s_tech_ph=s_dom_ph
s_tech_fax=s_dom_fax
s_tech_em=s_dom_em

s_bill_fn=s_dom_fn
s_bill_ln=s_dom_ln
s_bill_org=s_dom_org
s_bill_adr1=s_dom_adr1
s_bill_ct=s_dom_ct
s_bill_st=s_dom_st
s_bill_co=s_dom_co
s_bill_pc=s_dom_pc
s_bill_ph=s_dom_ph
s_bill_fax=s_dom_fax
s_bill_em=s_dom_em

s_admi_fn=s_dom_fn
s_admi_ln=s_dom_ln
s_admi_org=s_dom_org
s_admi_adr1=s_dom_adr1
s_admi_ct=s_dom_ct
s_admi_st=s_dom_st
s_admi_co=s_dom_co
s_admi_pc=s_dom_pc
s_admi_ph=s_dom_ph
s_admi_fax=s_dom_fax
s_admi_em=s_dom_em

s_dom_org_m=dsdom("uname1")
s_dom_fn_m=(right(dsdom("rname1"),Len(dsdom("rname1"))-1))
s_dom_ln_m=(Left(dsdom("rname1"),1))
s_dom_adr_m=(dsdom("uaddr1"))
s_dom_ct_m=(dsdom("ucity1"))
s_dom_st_m=dsdom("uprov")'---

s_admi_org_m=s_dom_org_m
s_admi_fn_m=s_dom_fn_m
s_admi_ln_m=s_dom_ln_m
s_admi_adr_m=s_dom_adr_m
s_admi_ct_m=s_dom_ct_m
s_admi_st_m=s_dom_st_m



Dim RegOrderID
RegOrderID = RegisterDomain(dsdom("Domain"),_
dsdom("years"), domainpass, s_dns_host, s_dns_ip, _
s_dom_fn, s_dom_ln, s_dom_org, s_dom_adr1, s_dom_ct, s_dom_st, s_dom_co, s_dom_pc, s_dom_ph, s_dom_fax, s_dom_em, _
s_tech_fn, s_tech_ln, s_tech_org, s_tech_adr1, s_tech_ct, s_tech_st, s_tech_co, s_tech_pc, s_tech_ph, s_tech_fax, s_tech_em, _
s_bill_fn, s_bill_ln, s_bill_org, s_bill_adr1, s_bill_ct, s_bill_st, s_bill_co, s_bill_pc, s_bill_ph, s_bill_fax, s_bill_em, _
s_admi_fn, s_admi_ln, s_admi_org, s_admi_adr1, s_admi_ct, s_admi_st, s_admi_co, s_admi_pc, s_admi_ph, s_admi_fax, s_admi_em, _
s_dom_org_m, s_dom_fn_m, s_dom_ln_m, s_dom_adr_m, s_dom_ct_m, s_dom_st_m, _
s_admi_org_m, s_admi_fn_m, s_admi_ln_m, s_admi_adr_m, s_admi_ct_m, s_admi_st_m)
'
if lcase(cstr(RegOrderID))<>"false" then '域名密码域名格式为:至少六位的大小写字母加数字,可有特殊字符
dsdom("retdns")="注册成功,商中订单号为:" & RegOrderID
dsdom("status")="正常"
dsdom("inipass")=domainpass
Else
ef=true
ec=ECapi3
dsdom("status")="失败"
end If

FreeHost_oplog ds("username"),"执行","域名注册:"&dsdom("Domain")&"商中订单号为:" & RegOrderID&ec
dsdom.update



End If'api3





If dsdom("Domain_API")=4 Then

If IsNull(dsdom("dns1")) then
dns1="ns3.dns-diy.com"
dns2="ns4.dns-diy.com"
If dsdom("DNS_API")=1  And Right(dsdom("Domain"),3)<>".cn" then
dns1=Application("DNS1")
dns2=Application("DNS2")
else
dsdom("DNS_API")=0
End if
End if

Randomize
dsdom("inipass")=Left(Md5(time),8)&"I@i0"
'uprov="广东"
utela=dsdom("utela")
If Left(utela,1)="0" Then utela=Right(utela,Len(utela)-1)
r_telephone="+86."&utela&dsdom("uteln")
ufaxa=dsdom("ufaxa")
If Left(ufaxa,1)="0" Then ufaxa=Right(ufaxa,Len(ufaxa)-1)
r_fax="+86."&ufaxa&dsdom("ufaxn")

dn=dsdom("Domain")


'建立联系人
ZPret=ZP_create_contactor(dn,1,dsdom("rname2"),dsdom("rname1"),dsdom("uname2"),dsdom("uname1"),dsdom("uprov"),dsdom("ucity2"),dsdom("uaddr2"),dsdom("ucity1"),dsdom("uaddr1"),dsdom("uzip"),r_telephone,r_fax,dsdom("uemail"),"P3","C31/CN",dsdom("inipass"))
contactidinfo=" 发送:"&ZPsend&" 接收:"&ZPret&" 返回ID:"&contactid
If contactid<>"" Then
'dsdom("contactid")=contactid
'dsdom.update
	FreeHost_oplog dsdom("username"),"信息","域名注册:"&dsdom("Domain")&"建立联系人:"&ZPsend&ZPret&contactid
Else
	ef=True
	ec="由于网络连接原因操作并不成功。但款项已扣。请与系统管理员联系。相关出错信息为:"&server.URLEncode(ZPEC)
End If

If ef=False Then 
ZPret=ZP_create_domain(dn,0,dsdom("years"),dns1,dns2,contactid,contactid,contactid,contactid,dsdom("inipass"))
End if

'response.write contactid
'response.write ZPsend
'response.write ZPret
'response.end
retdns=ZPret
ef=ZPEF

FreeHost_oplog dsdom("username"),"执行","域名注册:"&dsdom("Domain")&ZPret
'dsdom("retdns")=retdns
'dsdom.update
if ZPret="" Then
	ef=True
	ec="由于网络连接原因操作并不成功。但款项已扣。请与系统管理员联系。"
	dsdom("status")="失败"
	FreeHost_oplog dsdom("username"),"失败","域名注册:"&dsdom("Domain")&ec
End If
'if not ef then
'if instr(retdns, "尚无资金帐户")>1 or instr(retdns, "帐户上只能支付")>1 or instr(retdns, "资金不足")>1 Then
'	ef=True
'	ec="由于网络连接原因操作并不成功。但款项已扣。请与系统管理员联系。原因：域名接口上帐户金额不足。"
'	dsdom("status")="失败"
'	FreeHost_oplog dsdom("username"),"失败","域名注册:"&dsdom("Domain")&ec
'End If
'if instr(retdns, "对不起")>1 or instr(retdns, "域名已被人注册")>1 Then
'	ef=True
'	ec="操作并不成功。但款项已扣。请与系统管理员联系。原因：域名已被人注册。"
'	dsdom("status")="失败"
'	FreeHost_oplog dsdom("username"),"失败","域名注册:"&dsdom("Domain")&ec
'End If
'End If
'response.write retdns
'response.end
if ef then
	ef=True
	ec="由于接口原因操作并不成功。但款项已扣。请与系统管理员联系。相关出错信息为:"&server.URLEncode(ZPEC)
End If
dsdom("postcon")=ZPsend
dsdom("retdns")=ZPEC&" 建立联系人:"&contactidinfo
ZP_logout()'退出中频并结束socket
End If'api4


If dsdom("Domain_API")=5 Then

If IsNull(dsdom("dns1")) then
dns1="dns7.hichina.com"
dns2="dns8.hichina.com"
If dsdom("DNS_API")=1  And Right(dsdom("Domain"),3)<>".cn" then
dns1=Application("DNS1")
dns2=Application("DNS2")
else
dsdom("DNS_API")=0
End if
End If
uprov=dsdom("uprov")
uprov=Replace(uprov,"Beijing","BJ")
uprov=Replace(uprov,"Hongkong","HK")
uprov=Replace(uprov,"Aomen","MO")
uprov=Replace(uprov,"Taiwan","TW")
uprov=Replace(uprov,"Shanghai","SH")
'uprov=Replace(uprov,"深圳","SZ")
uprov=Replace(uprov,"Guangdong","GD")
uprov=Replace(uprov,"Shandong","SD")
uprov=Replace(uprov,"Sichuan","SC")
uprov=Replace(uprov,"Fujian","FJ")
uprov=Replace(uprov,"Jiangsu","JS")
uprov=Replace(uprov,"Zhejiang","ZJ")
uprov=Replace(uprov,"Tianjin","TJ")
uprov=Replace(uprov,"Chongqing","CQ")
uprov=Replace(uprov,"Hebei","HE")
uprov=Replace(uprov,"Henan","HA")
uprov=Replace(uprov,"Heilongjiang","HL")
uprov=Replace(uprov,"Jinlin","JL")
uprov=Replace(uprov,"Liaoning","LN")
uprov=Replace(uprov,"Neimenggu","NM")
uprov=Replace(uprov,"Hainan","HI")
uprov=Replace(uprov,"Shanxi3","SN")'注意
uprov=Replace(uprov,"Shanxi","SX")'注意
uprov=Replace(uprov,"Anhui","AH")
uprov=Replace(uprov,"Jiangxi","JX")
uprov=Replace(uprov,"Gansu","GS")
uprov=Replace(uprov,"Xinjiang","XJ")
uprov=Replace(uprov,"Hubei","HB")
uprov=Replace(uprov,"Hunan","HN")
uprov=Replace(uprov,"Yunnan","YN")
uprov=Replace(uprov,"Guangxi","GX")
uprov=Replace(uprov,"Ningxia","NX")
uprov=Replace(uprov,"Guizhou","GZ")
uprov=Replace(uprov,"Qinghai","QH")
uprov=Replace(uprov,"Xizang","XZ")
'uprov=Replace(uprov,"外国","WG")

utela=dsdom("utela")
If Left(utela,1)="0" Then utela=Right(utela,Len(utela)-1)
r_telephone="+86."&utela&dsdom("uteln")
ufaxa=dsdom("ufaxa")
If Left(ufaxa,1)="0" Then ufaxa=Right(ufaxa,Len(ufaxa)-1)
			userid			=Application("Domain_Agent_username_5")			'万网数字ID
			password		=Application("Domain_Agent_password_5")		'万网数字ID密码
			email			=Application("Domain_Agent_username_5_emamil")	'万网注册email
			vtime			= FormatDate(now())
			userstr			=md5(userid&password&email&vtime)

			category		="domain"
			Select Case Enddomaintypeid
			Case 1 :tep_DomainTypes_net_cn="com"
			Case 30 :tep_DomainTypes_net_cn="com"
			Case 2 :tep_DomainTypes_net_cn="cn"
			Case 3 :tep_DomainTypes_net_cn="cnch"
			Case 4 :tep_DomainTypes_net_cn="biz"
			Case 5 :tep_DomainTypes_net_cn="info"
'			Case 6 :tep_DomainTypes_net_cn=""'----万网不支持通用网址
			Case 7 :tep_DomainTypes_net_cn="comch"
			Case 8 :tep_DomainTypes_net_cn="cc"
			Case 9 :tep_DomainTypes_net_cn="mobi"
			Case 10 :tep_DomainTypes_net_cn="tv"
'			Case 11 :tep_DomainTypes_net_cn="hk"
'			Case 12 :tep_DomainTypes_net_cn="tw"
			Case 13 :tep_DomainTypes_net_cn="bizch"
'			Case 14 :tep_DomainTypes_net_cn="infoch"----万网不支持
			Case 15 :tep_DomainTypes_net_cn="ccch"
'			Case 16 :tep_DomainTypes_net_cn="mobich"----万网不支持
			Case 17 :tep_DomainTypes_net_cn="tvch"
'			Case 18 :tep_DomainTypes_net_cn="hkch"----万网不支持
'			Case 19 :tep_DomainTypes_net_cn="twch"----万网不支持
			Case 20 :tep_DomainTypes_net_cn="name"
			Case 21 :tep_DomainTypes_net_cn="asia"
			Case 31 :tep_DomainTypes_net_cn="me"
			Case 32 :tep_DomainTypes_net_cn="tel"
			Case 71 :tep_DomainTypes_net_cn="co"
			Case 75 :tep_DomainTypes_net_cn="top"
			End Select
			productid		=trim(tep_DomainTypes_net_cn)	'万网域名类型临时变量
			action			=trim("activate")
			
			vsendStr		="userid="&userid&"&userstr="&userstr&"&vtime="&vtime
			
			vsendStr		=vsendStr&"&category="&category
			vsendStr		=vsendStr&"&productid="&productid
			vsendStr		=vsendStr&"&action="&action
			
			vsendStr		=vsendStr&"&domain="&server.URLEncode(dsdom("Domain"))
			vsendStr		=vsendStr&"&domainpwd="&vtime'密码
			vsendStr		=vsendStr&"&vyear="&dsdom("years")
			vsendStr		=vsendStr&"&dns1="&dns1
			vsendStr		=vsendStr&"&dns2="&dns2
			vsendStr		=vsendStr&"&address_zh="&server.URLEncode(dsdom("uaddr1"))
			vsendStr		=vsendStr&"&name="&server.URLEncode(dsdom("rname1"))
			vsendStr		=vsendStr&"&organization_zh="&server.URLEncode(dsdom("uname1"))
			vsendStr		=vsendStr&"&manager="&server.URLEncode(dsdom("rname1"))
			vsendStr		=vsendStr&"&organization_type=S8"
			vsendStr		=vsendStr&"&ccity="&server.URLEncode(dsdom("ucity1"))
			vsendStr		=vsendStr&"&cstate="&server.URLEncode(uprov)
			vsendStr		=vsendStr&"&address_en="&server.URLEncode(dsdom("uaddr2"))
			vsendStr		=vsendStr&"&lastname="&server.URLEncode(LCase(Split(dsdom("rname2")," ")(1)))
			vsendStr		=vsendStr&"&firstname="&server.URLEncode(LCase(Split(dsdom("rname2")," ")(0)))
			vsendStr		=vsendStr&"&organization_en="&server.URLEncode(LCase(dsdom("uname2")))
			vsendStr		=vsendStr&"&city="&server.URLEncode(LCase(dsdom("ucity2")))
			vsendStr		=vsendStr&"&state="&server.URLEncode(uprov)
			vsendStr		=vsendStr&"&postcode="&server.URLEncode(dsdom("uzip"))
			vsendStr		=vsendStr&"&country=CN"
			vsendStr		=vsendStr&"&phone=86-0"&utela&dsdom("uteln")
			vsendStr		=vsendStr&"&fax=86-"&"0"&ufaxa&dsdom("ufaxn")
			vsendStr		=vsendStr&"&email="&server.URLEncode(dsdom("uemail"))
			vsendStr		=vsendStr&"&admin_same_as=2"
If Enddomaintypeid=21 Then
			vsendStr		=vsendStr&"&tech_same_as=1"
else
			vsendStr		=vsendStr&"&tech_same_as=2"
End if
			vsendStr		=vsendStr&"&bill_same_as=2"

'						Response.Write vsendStr
'						Response.End

			retdns=LIT_RetrunStr("http://api.hichina.com/wwwnetcn.aspx",vsendStr)

					

If retdns="" then
	ef=True
	ec="操作失败，但款项已扣。请联系管理员！可能的原因是原始注册商的网络不正常"
	dsdom("status")="失败"
	FreeHost_oplog dsdom("username"),"失败","管理员操作，款项已扣，域名注册时由于原始注册商的网络不正常等原因操作失败:"&dsdom("Domain")
end If

			xmlvalue(retdns)

			If Instr(retdns,"200")<=0 Then
				retdns= "返回状态码:"&returncodevalue&" 原因:"&failreason&" 注意！相关的款项已被扣除！下次请点确认不扣费！"
				ef=True
				ec=retdns
				dsdom("status")="失败"
				FreeHost_oplog dsdom("username"),"失败","域名注册:"&dsdom("Domain")&"<br>"&retdns
			else
				FreeHost_oplog dsdom("username"),"信息","管理员操作注册时返回："&retdns&":"&dsdom("Domain")
				dsdom("inipass")=vtime
			End If		
dsdom("postcon")=vsendStr
dsdom("retdns")=retdns
End If'api5






If dsdom("Domain_API")=6 Then


If Application("api6select")=1 Then'百度

shijian=UTC()

HTTPMethod="POST"&chr(10)
CanonicalURI="/v1/domain/register"&chr(10)
CanonicalQueryString=""&chr(10)
CanonicalHeaders="host:bcd.baidubce.com"
CanonicalRequest=HTTPMethod&CanonicalURI&CanonicalQueryString&CanonicalHeaders
authStringPrefix = Bce_auth_version&"/"&AccessKeyID&"/"&shijian&"/"&Default_expiration_in_seconds
SigningKey = HMAC_SHA256_MAC(SecretAccessKey, authStringPrefix)
Signature = HMAC_SHA256_MAC(SigningKey, CanonicalRequest)
authorization=authStringPrefix&"/host/"&Signature


userType="INDIVIDUAL"	'用户类型可选值为“INDIVIDUAL”,“ENTERPRISE”，分别表示个人用户和企业用户。默认个人用户。
sheng="110000"	'省份代码
shi="110000"	'市代码

if dsdom("uprov")="Beijing" then
sheng="110000"
shi="110000"
elseif dsdom("uprov")="Hongkong" then
sheng="810000"
shi="810000"
elseif dsdom("uprov")="Aomen" then
sheng="820000"
shi="820000"
elseif dsdom("uprov")="Taiwan" then
sheng="710000"
shi="710000"
elseif dsdom("uprov")="Shanghai" then
sheng="310000"
shi="310000"
elseif dsdom("uprov")="Guangdong" then
sheng="440000"
shi="440100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"广州")>1 then
	shi="440100"
	elseif instr(dsdom("ucity1"),"韶关")>1 then
	shi="440200"
	elseif instr(dsdom("ucity1"),"深圳")>1 then
	shi="440300"
	elseif instr(dsdom("ucity1"),"珠海")>1 then
	shi="440400"
	elseif instr(dsdom("ucity1"),"汕头")>1 then
	shi="440500"
	elseif instr(dsdom("ucity1"),"佛山")>1 then
	shi="440600"
	elseif instr(dsdom("ucity1"),"江门")>1 then
	shi="440700"
	elseif instr(dsdom("ucity1"),"湛江")>1 then
	shi="440800"
	elseif instr(dsdom("ucity1"),"茂名")>1 then
	shi="440900"
	elseif instr(dsdom("ucity1"),"肇庆")>1 then
	shi="441200"
	elseif instr(dsdom("ucity1"),"惠州")>1 then
	shi="441300"
	elseif instr(dsdom("ucity1"),"梅州")>1 then
	shi="441400"
	elseif instr(dsdom("ucity1"),"汕尾")>1 then
	shi="441500"
	elseif instr(dsdom("ucity1"),"河源")>1 then
	shi="441600"
	elseif instr(dsdom("ucity1"),"阳江")>1 then
	shi="441700"
	elseif instr(dsdom("ucity1"),"清远")>1 then
	shi="441800"
	elseif instr(dsdom("ucity1"),"东莞")>1 then
	shi="441900"
	elseif instr(dsdom("ucity1"),"中山")>1 then
	shi="442000"
	elseif instr(dsdom("ucity1"),"潮州")>1 then
	shi="445100"
	elseif instr(dsdom("ucity1"),"揭阳")>1 then
	shi="445200"
	elseif instr(dsdom("ucity1"),"云浮")>1 then
	shi="445300"
	end if
elseif dsdom("uprov")="Shandong" then
sheng="370000"
shi="370100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"济南")>1 then
	shi="370100"
	elseif instr(dsdom("ucity1"),"青岛")>1 then
	shi="370200"
	elseif instr(dsdom("ucity1"),"淄博")>1 then
	shi="370300"
	elseif instr(dsdom("ucity1"),"枣庄")>1 then
	shi="370400"
	elseif instr(dsdom("ucity1"),"东营")>1 then
	shi="370500"
	elseif instr(dsdom("ucity1"),"烟台")>1 then
	shi="370600"
	elseif instr(dsdom("ucity1"),"潍坊")>1 then
	shi="370700"
	elseif instr(dsdom("ucity1"),"济宁")>1 then
	shi="370800"
	elseif instr(dsdom("ucity1"),"泰安")>1 then
	shi="370900"
	elseif instr(dsdom("ucity1"),"威海")>1 then
	shi="371000"
	elseif instr(dsdom("ucity1"),"日照")>1 then
	shi="371100"
	elseif instr(dsdom("ucity1"),"莱芜")>1 then
	shi="371200"
	elseif instr(dsdom("ucity1"),"临沂")>1 then
	shi="371300"
	elseif instr(dsdom("ucity1"),"德州")>1 then
	shi="371400"
	elseif instr(dsdom("ucity1"),"聊城")>1 then
	shi="371500"
	elseif instr(dsdom("ucity1"),"滨州")>1 then
	shi="371600"
	elseif instr(dsdom("ucity1"),"菏泽")>1 then
	shi="371700"
	end if
elseif dsdom("uprov")="Sichuan" then
sheng="510000"
shi="510100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"成都")>1 then
	shi="510100"
	elseif instr(dsdom("ucity1"),"自贡")>1 then
	shi="510300"
	elseif instr(dsdom("ucity1"),"攀枝花")>1 then
	shi="510400"
	elseif instr(dsdom("ucity1"),"泸州")>1 then
	shi="510500"
	elseif instr(dsdom("ucity1"),"德阳")>1 then
	shi="510600"
	elseif instr(dsdom("ucity1"),"绵阳")>1 then
	shi="510700"
	elseif instr(dsdom("ucity1"),"广元")>1 then
	shi="510800"
	elseif instr(dsdom("ucity1"),"遂宁")>1 then
	shi="510900"
	elseif instr(dsdom("ucity1"),"内江")>1 then
	shi="511000"
	elseif instr(dsdom("ucity1"),"乐山")>1 then
	shi="511100"
	elseif instr(dsdom("ucity1"),"南充")>1 then
	shi="511300"
	elseif instr(dsdom("ucity1"),"眉山")>1 then
	shi="511400"
	elseif instr(dsdom("ucity1"),"宜宾")>1 then
	shi="511500"
	elseif instr(dsdom("ucity1"),"广安")>1 then
	shi="511600"
	elseif instr(dsdom("ucity1"),"达州")>1 then
	shi="511700"
	elseif instr(dsdom("ucity1"),"雅安")>1 then
	shi="511800"
	elseif instr(dsdom("ucity1"),"巴中")>1 then
	shi="511900"
	elseif instr(dsdom("ucity1"),"资阳")>1 then
	shi="512000"
	elseif instr(dsdom("ucity1"),"阿坝藏族")>1 then
	shi="513200"
	elseif instr(dsdom("ucity1"),"甘孜藏族")>1 then
	shi="513300"
	elseif instr(dsdom("ucity1"),"凉山彝族")>1 then
	shi="513400"
	end if
elseif dsdom("uprov")="Fujian" then
sheng="350000"
shi="350100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"福州")>1 then
	shi="350100"
	elseif instr(dsdom("ucity1"),"厦门")>1 then
	shi="350200"
	elseif instr(dsdom("ucity1"),"莆田")>1 then
	shi="350300"
	elseif instr(dsdom("ucity1"),"三明")>1 then
	shi="350400"
	elseif instr(dsdom("ucity1"),"泉州")>1 then
	shi="350500"
	elseif instr(dsdom("ucity1"),"漳州")>1 then
	shi="350600"
	elseif instr(dsdom("ucity1"),"南平")>1 then
	shi="350700"
	elseif instr(dsdom("ucity1"),"龙岩")>1 then
	shi="350800"
	elseif instr(dsdom("ucity1"),"宁德")>1 then
	shi="350900"
	end if
elseif dsdom("uprov")="Jiangsu" then
sheng="320000"
shi="320100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"南京")>1 then
	shi="320100"
	elseif instr(dsdom("ucity1"),"无锡")>1 then
	shi="320200"
	elseif instr(dsdom("ucity1"),"徐州")>1 then
	shi="320300"
	elseif instr(dsdom("ucity1"),"常州")>1 then
	shi="320400"
	elseif instr(dsdom("ucity1"),"苏州")>1 then
	shi="320500"
	elseif instr(dsdom("ucity1"),"南通")>1 then
	shi="320600"
	elseif instr(dsdom("ucity1"),"连云港")>1 then
	shi="320700"
	elseif instr(dsdom("ucity1"),"淮安")>1 then
	shi="320800"
	elseif instr(dsdom("ucity1"),"盐城")>1 then
	shi="320900"
	elseif instr(dsdom("ucity1"),"扬州")>1 then
	shi="321000"
	elseif instr(dsdom("ucity1"),"镇江")>1 then
	shi="321100"
	elseif instr(dsdom("ucity1"),"泰州")>1 then
	shi="321200"
	elseif instr(dsdom("ucity1"),"宿迁")>1 then
	shi="321300"
	end if
elseif dsdom("uprov")="Zhejiang" then
sheng="330000"
shi="330100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"杭州")>1 then
	shi="330100"
	elseif instr(dsdom("ucity1"),"宁波")>1 then
	shi="330200"
	elseif instr(dsdom("ucity1"),"温州")>1 then
	shi="330300"
	elseif instr(dsdom("ucity1"),"嘉兴")>1 then
	shi="330400"
	elseif instr(dsdom("ucity1"),"湖州")>1 then
	shi="330500"
	elseif instr(dsdom("ucity1"),"绍兴")>1 then
	shi="330600"
	elseif instr(dsdom("ucity1"),"金华")>1 then
	shi="330700"
	elseif instr(dsdom("ucity1"),"衢州")>1 then
	shi="330800"
	elseif instr(dsdom("ucity1"),"舟山")>1 then
	shi="330900"
	elseif instr(dsdom("ucity1"),"台州")>1 then
	shi="331000"
	elseif instr(dsdom("ucity1"),"丽水")>1 then
	shi="331100"
	end if
elseif dsdom("uprov")="Tianjin" then
sheng="120000"
shi="120000"
elseif dsdom("uprov")="Chongqing" then
sheng="500000"
shi="500000"
elseif dsdom("uprov")="Hebei" then
sheng="130000"
shi="130100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"石家庄")>1 then
	shi="130100"
	elseif instr(dsdom("ucity1"),"唐山")>1 then
	shi="130200"
	elseif instr(dsdom("ucity1"),"秦皇岛")>1 then
	shi="130300"
	elseif instr(dsdom("ucity1"),"邯郸")>1 then
	shi="130400"
	elseif instr(dsdom("ucity1"),"邢台")>1 then
	shi="130500"
	elseif instr(dsdom("ucity1"),"保定")>1 then
	shi="130600"
	elseif instr(dsdom("ucity1"),"张家口")>1 then
	shi="130700"
	elseif instr(dsdom("ucity1"),"承德")>1 then
	shi="130800"
	elseif instr(dsdom("ucity1"),"沧州")>1 then
	shi="130900"
	elseif instr(dsdom("ucity1"),"廊坊")>1 then
	shi="131000"
	elseif instr(dsdom("ucity1"),"衡水")>1 then
	shi="131100"
	end if
elseif dsdom("uprov")="Henan" then
sheng="410000"
shi="410100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"郑州")>1 then
	shi="410100"
	elseif instr(dsdom("ucity1"),"开封")>1 then
	shi="410200"
	elseif instr(dsdom("ucity1"),"洛阳")>1 then
	shi="410300"
	elseif instr(dsdom("ucity1"),"平顶山")>1 then
	shi="410400"
	elseif instr(dsdom("ucity1"),"安阳")>1 then
	shi="410500"
	elseif instr(dsdom("ucity1"),"鹤壁")>1 then
	shi="410600"
	elseif instr(dsdom("ucity1"),"新乡")>1 then
	shi="410700"
	elseif instr(dsdom("ucity1"),"焦作")>1 then
	shi="410800"
	elseif instr(dsdom("ucity1"),"濮阳")>1 then
	shi="410900"
	elseif instr(dsdom("ucity1"),"许昌")>1 then
	shi="411000"
	elseif instr(dsdom("ucity1"),"漯河")>1 then
	shi="411100"
	elseif instr(dsdom("ucity1"),"三门峡")>1 then
	shi="411200"
	elseif instr(dsdom("ucity1"),"南阳")>1 then
	shi="411300"
	elseif instr(dsdom("ucity1"),"商丘")>1 then
	shi="411400"
	elseif instr(dsdom("ucity1"),"信阳")>1 then
	shi="411500"
	elseif instr(dsdom("ucity1"),"周口")>1 then
	shi="411600"
	elseif instr(dsdom("ucity1"),"驻马店")>1 then
	shi="411700"
	end if
elseif dsdom("uprov")="Heilongjiang" then
sheng="230000"
shi="230100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"哈尔滨")>1 then
	shi="230100"
	elseif instr(dsdom("ucity1"),"齐齐哈尔")>1 then
	shi="230200"
	elseif instr(dsdom("ucity1"),"鸡西")>1 then
	shi="230300"
	elseif instr(dsdom("ucity1"),"鹤岗")>1 then
	shi="230400"
	elseif instr(dsdom("ucity1"),"双鸭山")>1 then
	shi="230500"
	elseif instr(dsdom("ucity1"),"大庆")>1 then
	shi="230600"
	elseif instr(dsdom("ucity1"),"伊春")>1 then
	shi="230700"
	elseif instr(dsdom("ucity1"),"佳木斯")>1 then
	shi="230800"
	elseif instr(dsdom("ucity1"),"七台河")>1 then
	shi="230900"
	elseif instr(dsdom("ucity1"),"牡丹江")>1 then
	shi="231000"
	elseif instr(dsdom("ucity1"),"黑河")>1 then
	shi="231100"
	elseif instr(dsdom("ucity1"),"绥化")>1 then
	shi="231200"
	elseif instr(dsdom("ucity1"),"大兴安岭")>1 then
	shi="232700"
	end if
elseif dsdom("uprov")="Jinlin" then
sheng="220000"
shi="220100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"长春")>1 then
	shi="220100"
	elseif instr(dsdom("ucity1"),"吉林")>1 then
	shi="220200"
	elseif instr(dsdom("ucity1"),"四平")>1 then
	shi="220300"
	elseif instr(dsdom("ucity1"),"辽源")>1 then
	shi="220400"
	elseif instr(dsdom("ucity1"),"通化")>1 then
	shi="220500"
	elseif instr(dsdom("ucity1"),"白山")>1 then
	shi="220600"
	elseif instr(dsdom("ucity1"),"松原")>1 then
	shi="220700"
	elseif instr(dsdom("ucity1"),"白城")>1 then
	shi="220800"
	elseif instr(dsdom("ucity1"),"朝鲜族")>1 then
	shi="222400"
	end if
elseif dsdom("uprov")="Liaoning" then
sheng="210000"
shi="210100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"沈阳")>1 then
	shi="210100"
	elseif instr(dsdom("ucity1"),"大连")>1 then
	shi="210200"
	elseif instr(dsdom("ucity1"),"鞍山")>1 then
	shi="210300"
	elseif instr(dsdom("ucity1"),"抚顺")>1 then
	shi="210400"
	elseif instr(dsdom("ucity1"),"本溪")>1 then
	shi="210500"
	elseif instr(dsdom("ucity1"),"丹东")>1 then
	shi="210600"
	elseif instr(dsdom("ucity1"),"锦州")>1 then
	shi="210700"
	elseif instr(dsdom("ucity1"),"营口")>1 then
	shi="210800"
	elseif instr(dsdom("ucity1"),"阜新")>1 then
	shi="210900"
	elseif instr(dsdom("ucity1"),"辽阳")>1 then
	shi="211000"
	elseif instr(dsdom("ucity1"),"盘锦")>1 then
	shi="211100"
	elseif instr(dsdom("ucity1"),"铁岭")>1 then
	shi="211200"
	elseif instr(dsdom("ucity1"),"朝阳")>1 then
	shi="211300"
	elseif instr(dsdom("ucity1"),"葫芦岛")>1 then
	shi="211400"
	end if
elseif dsdom("uprov")="Neimenggu" then
sheng="150000"
shi="150100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"呼和浩特")>1 then
	shi="150100"
	elseif instr(dsdom("ucity1"),"包头")>1 then
	shi="150200"
	elseif instr(dsdom("ucity1"),"乌海")>1 then
	shi="150300"
	elseif instr(dsdom("ucity1"),"赤峰")>1 then
	shi="150400"
	elseif instr(dsdom("ucity1"),"通辽")>1 then
	shi="150500"
	elseif instr(dsdom("ucity1"),"鄂尔多斯")>1 then
	shi="150600"
	elseif instr(dsdom("ucity1"),"呼伦贝尔")>1 then
	shi="150700"
	elseif instr(dsdom("ucity1"),"巴彦淖尔")>1 then
	shi="150800"
	elseif instr(dsdom("ucity1"),"乌兰察布")>1 then
	shi="150900"
	elseif instr(dsdom("ucity1"),"兴安")>1 then
	shi="152200"
	elseif instr(dsdom("ucity1"),"锡林郭勒")>1 then
	shi="152500"
	elseif instr(dsdom("ucity1"),"阿拉善")>1 then
	shi="152900"
	end if
elseif dsdom("uprov")="Hainan" then
sheng="460000"
shi="460100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"海口")>1 then
	shi="460100"
	elseif instr(dsdom("ucity1"),"三亚")>1 then
	shi="460200"
	end if
elseif dsdom("uprov")="Shanxi" then
sheng="140000"
shi="140100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"太原")>1 then
	shi="140100"
	elseif instr(dsdom("ucity1"),"大同")>1 then
	shi="140200"
	elseif instr(dsdom("ucity1"),"阳泉")>1 then
	shi="140300"
	elseif instr(dsdom("ucity1"),"长治")>1 then
	shi="140400"
	elseif instr(dsdom("ucity1"),"晋城")>1 then
	shi="140500"
	elseif instr(dsdom("ucity1"),"朔州")>1 then
	shi="140600"
	elseif instr(dsdom("ucity1"),"晋中")>1 then
	shi="140700"
	elseif instr(dsdom("ucity1"),"运城")>1 then
	shi="140800"
	elseif instr(dsdom("ucity1"),"忻州")>1 then
	shi="140900"
	elseif instr(dsdom("ucity1"),"临汾")>1 then
	shi="141000"
	elseif instr(dsdom("ucity1"),"吕梁")>1 then
	shi="141100"
	end if
elseif dsdom("uprov")="Shanxi3" then
sheng="610000"
shi="610100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"西安")>1 then
	shi="610100"
	elseif instr(dsdom("ucity1"),"铜川")>1 then
	shi="610200"
	elseif instr(dsdom("ucity1"),"宝鸡")>1 then
	shi="610300"
	elseif instr(dsdom("ucity1"),"咸阳")>1 then
	shi="610400"
	elseif instr(dsdom("ucity1"),"渭南")>1 then
	shi="610500"
	elseif instr(dsdom("ucity1"),"延安")>1 then
	shi="610600"
	elseif instr(dsdom("ucity1"),"汉中")>1 then
	shi="610700"
	elseif instr(dsdom("ucity1"),"榆林")>1 then
	shi="610800"
	elseif instr(dsdom("ucity1"),"安康")>1 then
	shi="610900"
	elseif instr(dsdom("ucity1"),"商洛")>1 then
	shi="611000"
	end if
elseif dsdom("uprov")="Anhui" then
sheng="340000"
shi="340100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"合肥")>1 then
	shi="340100"
	elseif instr(dsdom("ucity1"),"芜湖")>1 then
	shi="340200"
	elseif instr(dsdom("ucity1"),"蚌埠")>1 then
	shi="340300"
	elseif instr(dsdom("ucity1"),"淮南")>1 then
	shi="340400"
	elseif instr(dsdom("ucity1"),"马鞍山")>1 then
	shi="340500"
	elseif instr(dsdom("ucity1"),"淮北")>1 then
	shi="340600"
	elseif instr(dsdom("ucity1"),"铜陵")>1 then
	shi="340700"
	elseif instr(dsdom("ucity1"),"安庆")>1 then
	shi="340800"
	elseif instr(dsdom("ucity1"),"黄山")>1 then
	shi="341000"
	elseif instr(dsdom("ucity1"),"滁州")>1 then
	shi="341100"
	elseif instr(dsdom("ucity1"),"阜阳")>1 then
	shi="341200"
	elseif instr(dsdom("ucity1"),"宿州")>1 then
	shi="341300"
	elseif instr(dsdom("ucity1"),"巢湖")>1 then
	shi="341400"
	elseif instr(dsdom("ucity1"),"六安")>1 then
	shi="341500"
	elseif instr(dsdom("ucity1"),"亳州")>1 then
	shi="341600"
	elseif instr(dsdom("ucity1"),"池州")>1 then
	shi="341700"
	elseif instr(dsdom("ucity1"),"宣城")>1 then
	shi="341800"
	end if
elseif dsdom("uprov")="Jiangxi" then
sheng="360000"
shi="360100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"南昌")>1 then
	shi="360100"
	elseif instr(dsdom("ucity1"),"景德镇")>1 then
	shi="360200"
	elseif instr(dsdom("ucity1"),"萍乡")>1 then
	shi="360300"
	elseif instr(dsdom("ucity1"),"九江")>1 then
	shi="360400"
	elseif instr(dsdom("ucity1"),"新余")>1 then
	shi="360500"
	elseif instr(dsdom("ucity1"),"鹰潭")>1 then
	shi="360600"
	elseif instr(dsdom("ucity1"),"赣州")>1 then
	shi="360700"
	elseif instr(dsdom("ucity1"),"吉安")>1 then
	shi="360800"
	elseif instr(dsdom("ucity1"),"宜春")>1 then
	shi="360900"
	elseif instr(dsdom("ucity1"),"抚州")>1 then
	shi="361000"
	elseif instr(dsdom("ucity1"),"上饶")>1 then
	shi="361100"
	end if
elseif dsdom("uprov")="Gansu" then
sheng="620000"
shi="620100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"兰州")>1 then
	shi="620100"
	elseif instr(dsdom("ucity1"),"嘉峪关")>1 then
	shi="620200"
	elseif instr(dsdom("ucity1"),"金昌")>1 then
	shi="620300"
	elseif instr(dsdom("ucity1"),"白银")>1 then
	shi="620400"
	elseif instr(dsdom("ucity1"),"天水")>1 then
	shi="620500"
	elseif instr(dsdom("ucity1"),"武威")>1 then
	shi="620600"
	elseif instr(dsdom("ucity1"),"张掖")>1 then
	shi="620700"
	elseif instr(dsdom("ucity1"),"平凉")>1 then
	shi="620800"
	elseif instr(dsdom("ucity1"),"酒泉")>1 then
	shi="620900"
	elseif instr(dsdom("ucity1"),"庆阳")>1 then
	shi="621000"
	elseif instr(dsdom("ucity1"),"定西")>1 then
	shi="621100"
	elseif instr(dsdom("ucity1"),"陇南")>1 then
	shi="621200"
	elseif instr(dsdom("ucity1"),"临夏回族")>1 then
	shi="622900"
	elseif instr(dsdom("ucity1"),"甘南藏族")>1 then
	shi="623000"
	end if
elseif dsdom("uprov")="Xinjiang" then
sheng="650000"
shi="650100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"乌鲁木齐")>1 then
	shi="650100"
	elseif instr(dsdom("ucity1"),"克拉玛依")>1 then
	shi="650200"
	elseif instr(dsdom("ucity1"),"石河子")>1 then
	shi="650300"
	elseif instr(dsdom("ucity1"),"吐鲁番")>1 then
	shi="652100"
	elseif instr(dsdom("ucity1"),"哈密")>1 then
	shi="652200"
	elseif instr(dsdom("ucity1"),"昌吉回族")>1 then
	shi="652300"
	elseif instr(dsdom("ucity1"),"博尔塔拉蒙古")>1 then
	shi="652700"
	elseif instr(dsdom("ucity1"),"巴音郭楞蒙古")>1 then
	shi="652800"
	elseif instr(dsdom("ucity1"),"阿克苏")>1 then
	shi="652900"
	elseif instr(dsdom("ucity1"),"克孜勒苏柯尔克孜")>1 then
	shi="653000"
	elseif instr(dsdom("ucity1"),"喀什")>1 then
	shi="653100"
	elseif instr(dsdom("ucity1"),"和田")>1 then
	shi="653200"
	elseif instr(dsdom("ucity1"),"伊犁哈萨克")>1 then
	shi="654000"
	elseif instr(dsdom("ucity1"),"塔城")>1 then
	shi="654200"
	elseif instr(dsdom("ucity1"),"阿勒泰")>1 then
	shi="654300"
	end if
elseif dsdom("uprov")="Hubei" then
sheng="420000"
shi="420100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"武汉")>1 then
	shi="420100"
	elseif instr(dsdom("ucity1"),"黄石")>1 then
	shi="420200"
	elseif instr(dsdom("ucity1"),"十堰")>1 then
	shi="420300"
	elseif instr(dsdom("ucity1"),"宜昌")>1 then
	shi="420500"
	elseif instr(dsdom("ucity1"),"襄樊")>1 then
	shi="420600"
	elseif instr(dsdom("ucity1"),"鄂州")>1 then
	shi="420700"
	elseif instr(dsdom("ucity1"),"荆门")>1 then
	shi="420800"
	elseif instr(dsdom("ucity1"),"孝感")>1 then
	shi="420900"
	elseif instr(dsdom("ucity1"),"荆州")>1 then
	shi="421000"
	elseif instr(dsdom("ucity1"),"黄冈")>1 then
	shi="421100"
	elseif instr(dsdom("ucity1"),"咸宁")>1 then
	shi="421200"
	elseif instr(dsdom("ucity1"),"随州")>1 then
	shi="421300"
	elseif instr(dsdom("ucity1"),"苗族")>1 then
	shi="422800"
	end if
elseif dsdom("uprov")="Hunan" then
sheng="430000"
shi="430100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"长沙")>1 then
	shi="430100"
	elseif instr(dsdom("ucity1"),"株洲")>1 then
	shi="430200"
	elseif instr(dsdom("ucity1"),"湘潭")>1 then
	shi="430300"
	elseif instr(dsdom("ucity1"),"衡阳")>1 then
	shi="430400"
	elseif instr(dsdom("ucity1"),"邵阳")>1 then
	shi="430500"
	elseif instr(dsdom("ucity1"),"岳阳")>1 then
	shi="430600"
	elseif instr(dsdom("ucity1"),"常德")>1 then
	shi="430700"
	elseif instr(dsdom("ucity1"),"张家界")>1 then
	shi="430800"
	elseif instr(dsdom("ucity1"),"益阳")>1 then
	shi="430900"
	elseif instr(dsdom("ucity1"),"郴州")>1 then
	shi="431000"
	elseif instr(dsdom("ucity1"),"永州")>1 then
	shi="431100"
	elseif instr(dsdom("ucity1"),"怀化")>1 then
	shi="431200"
	elseif instr(dsdom("ucity1"),"娄底")>1 then
	shi="431300"
	elseif instr(dsdom("ucity1"),"苗族")>1 then
	shi="433100"
	end if
elseif dsdom("uprov")="Yunnan" then
sheng="530000"
shi="530100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"昆明")>1 then
	shi="530100"
	elseif instr(dsdom("ucity1"),"曲靖")>1 then
	shi="530300"
	elseif instr(dsdom("ucity1"),"玉溪")>1 then
	shi="530400"
	elseif instr(dsdom("ucity1"),"保山")>1 then
	shi="530500"
	elseif instr(dsdom("ucity1"),"昭通")>1 then
	shi="530600"
	elseif instr(dsdom("ucity1"),"丽江")>1 then
	shi="530700"
	elseif instr(dsdom("ucity1"),"普洱")>1 then
	shi="530800"
	elseif instr(dsdom("ucity1"),"临沧")>1 then
	shi="530900"
	elseif instr(dsdom("ucity1"),"楚雄彝族")>1 then
	shi="532300"
	elseif instr(dsdom("ucity1"),"红河哈尼族彝")>1 then
	shi="532500"
	elseif instr(dsdom("ucity1"),"文山壮族苗族")>1 then
	shi="532600"
	elseif instr(dsdom("ucity1"),"西双版纳傣族")>1 then
	shi="532800"
	elseif instr(dsdom("ucity1"),"大理白族")>1 then
	shi="532900"
	elseif instr(dsdom("ucity1"),"德宏傣族景颇族")>1 then
	shi="533100"
	elseif instr(dsdom("ucity1"),"怒江傈僳族")>1 then
	shi="533300"
	elseif instr(dsdom("ucity1"),"迪庆藏族")>1 then
	shi="533400"
	end if
elseif dsdom("uprov")="Guangxi" then
sheng="450000"
shi="450100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"南宁")>1 then
	shi="450100"
	elseif instr(dsdom("ucity1"),"柳州")>1 then
	shi="450200"
	elseif instr(dsdom("ucity1"),"桂林")>1 then
	shi="450300"
	elseif instr(dsdom("ucity1"),"梧州")>1 then
	shi="450400"
	elseif instr(dsdom("ucity1"),"北海")>1 then
	shi="450500"
	elseif instr(dsdom("ucity1"),"防城港")>1 then
	shi="450600"
	elseif instr(dsdom("ucity1"),"钦州")>1 then
	shi="450700"
	elseif instr(dsdom("ucity1"),"贵港")>1 then
	shi="450800"
	elseif instr(dsdom("ucity1"),"玉林")>1 then
	shi="450900"
	elseif instr(dsdom("ucity1"),"百色")>1 then
	shi="451000"
	elseif instr(dsdom("ucity1"),"贺州")>1 then
	shi="451100"
	elseif instr(dsdom("ucity1"),"河池")>1 then
	shi="451200"
	elseif instr(dsdom("ucity1"),"来宾")>1 then
	shi="451300"
	elseif instr(dsdom("ucity1"),"崇左")>1 then
	shi="451400"
	end if
elseif dsdom("uprov")="Ningxia" then
sheng="640000"
shi="640100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"银川")>1 then
	shi="640100"
	elseif instr(dsdom("ucity1"),"石嘴山")>1 then
	shi="640200"
	elseif instr(dsdom("ucity1"),"吴忠")>1 then
	shi="640300"
	elseif instr(dsdom("ucity1"),"固原")>1 then
	shi="640400"
	elseif instr(dsdom("ucity1"),"中卫")>1 then
	shi="640500"
	end if
elseif dsdom("uprov")="Guizhou" then
sheng="520000"
shi="520100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"贵阳")>1 then
	shi="520100"
	elseif instr(dsdom("ucity1"),"六盘水")>1 then
	shi="520200"
	elseif instr(dsdom("ucity1"),"遵义")>1 then
	shi="520300"
	elseif instr(dsdom("ucity1"),"安顺")>1 then
	shi="520400"
	elseif instr(dsdom("ucity1"),"铜仁")>1 then
	shi="522200"
	elseif instr(dsdom("ucity1"),"黔西南布依族苗族")>1 then
	shi="522300"
	elseif instr(dsdom("ucity1"),"毕节")>1 then
	shi="522400"
	elseif instr(dsdom("ucity1"),"黔东南苗族")>1 then
	shi="522600"
	elseif instr(dsdom("ucity1"),"黔南布依族苗族")>1 then
	shi="522700"
	end if
elseif dsdom("uprov")="Qinghai" then
sheng="630000"
shi="630100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"西宁")>1 then
	shi="630100"
	elseif instr(dsdom("ucity1"),"海东")>1 then
	shi="632100"
	elseif instr(dsdom("ucity1"),"海北藏族")>1 then
	shi="632200"
	elseif instr(dsdom("ucity1"),"黄南藏族")>1 then
	shi="632300"
	elseif instr(dsdom("ucity1"),"海南藏族")>1 then
	shi="632500"
	elseif instr(dsdom("ucity1"),"果洛藏族")>1 then
	shi="632600"
	elseif instr(dsdom("ucity1"),"玉树藏族")>1 then
	shi="632700"
	elseif instr(dsdom("ucity1"),"海西蒙古族")>1 then
	shi="632800"
	end if
elseif dsdom("uprov")="Xizang" then
sheng="540000"
shi="540100"	'防止用户没填城市,先加上默认
	if instr(dsdom("ucity1"),"拉萨")>1 then
	shi="540100"
	elseif instr(dsdom("ucity1"),"昌都")>1 then
	shi="542100"
	elseif instr(dsdom("ucity1"),"山南")>1 then
	shi="542200"
	elseif instr(dsdom("ucity1"),"日喀则")>1 then
	shi="542300"
	elseif instr(dsdom("ucity1"),"那曲")>1 then
	shi="542400"
	elseif instr(dsdom("ucity1"),"阿里")>1 then
	shi="542500"
	elseif instr(dsdom("ucity1"),"林芝")>1 then
	shi="542600"
	end if
end if

postcon="{"&chr(34)&"domain"&chr(34)&" : "&chr(34)&dsdom("Domain")&chr(34)&","
postcon=postcon&chr(34)&"years"&chr(34)&" : "&dsdom("years")&","
postcon=postcon&chr(34)&"privacy"&chr(34)&" : "&"false"&","
postcon=postcon&chr(34)&"userType"&chr(34)&" : "&chr(34)&userType&chr(34)&","
postcon=postcon&chr(34)&"ownerChinese"&chr(34)&" : "&chr(34)&tounicode(dsdom("uname1"))&chr(34)&","
postcon=postcon&chr(34)&"ownerEnglish"&chr(34)&" : "&chr(34)&dsdom("uname2")&chr(34)&","
postcon=postcon&chr(34)&"contactChinese"&chr(34)&" : "&chr(34)&tounicode(dsdom("rname1"))&chr(34)&","
postcon=postcon&chr(34)&"contactEnglish"&chr(34)&" : "&chr(34)&dsdom("rname2")&chr(34)&","
postcon=postcon&chr(34)&"email"&chr(34)&" : "&chr(34)&dsdom("uemail")&chr(34)&","
postcon=postcon&chr(34)&"region"&chr(34)&" : "&"{"&chr(34)&"province"&chr(34)&" : "&chr(34)&sheng&chr(34)&","&chr(34)&"city"&chr(34)&" : "&chr(34)&shi&chr(34)&"},"
postcon=postcon&chr(34)&"addressChinese"&chr(34)&" : "&chr(34)&tounicode(dsdom("uaddr1"))&chr(34)&","
postcon=postcon&chr(34)&"addressEnglish"&chr(34)&" : "&chr(34)&dsdom("uaddr2")&chr(34)&","
postcon=postcon&chr(34)&"postalCode"&chr(34)&" : "&chr(34)&dsdom("uzip")&chr(34)&","

postcon=postcon&chr(34)&"mobilePhone"&chr(34)&" : "&chr(34)&dsdom("ufaxn")&chr(34)&","	'为不影响星外数据库结构，没有添加表。将ufaxn当成用户手机号用

postcon=postcon&chr(34)&"areaCode"&chr(34)&" : "&chr(34)&dsdom("utela")&chr(34)&","
postcon=postcon&chr(34)&"phoneNumber"&chr(34)&" : "&chr(34)&dsdom("uteln")&chr(34)&"}"

' response.write postcon&"<br>"&"<br>"&"<br>"
' ' response.end

Set objXML = Server.CreateObject("Msxml2.ServerXMLHTTP.3.0")
objXML.open "POST","http://bcd.baidubce.com/v1/domain/register",false  
objXML.setRequestHeader "authorization", authorization
objXML.setRequestHeader "host", "bcd.baidubce.com"
objXML.setRequestHeader "x-bce-date", shijian
objXML.send (postcon)


retdns = objXML.responseText
' response.write retdns

dsdom("retdns")=retdns
dsdom("postcon")=postcon

Randomize Timer 
inipass=Int(899999 * Rnd + 100000)
dsdom("inipass")=inipass
'在注册的时候生成一个随机密码，原因是：百度云没有获取域名密码的API。在此处密码的作用仅为下级代理客户和自己的独立平台提供登陆

if InStr(retdns,"message")>0 then
set obj1 = ToObject(retdns)
message=obj1.message
	ef=True
	ec="操作失败，请联系管理员！代码为："&message
	FreeHost_oplog dsdom("username"),"失败","款项已扣，域名注册时由于"&retdns&"等原因操作失败:"&dsdom("Domain")
	dsdom("status")="失败"
end if
If retdns="" then
	ef=True
	ec="操作失败，但款项已扣。请联系管理员！代码为：可能的原因是原始注册商的网络不正常"
	FreeHost_oplog dsdom("username"),"失败","域名注册时由于原始注册商的网络不正常等原因操作失败:"&dsdom("Domain")
	dsdom("status")="失败"
end If

Exit sub
End If 'If Application("api6select")=1 Then


If IsNull(dsdom("dns1")) then
if enc="G" Then
dns1="dns-ch.xinnet.com"
dns2="dns-ch2.xinnet.com"
Else
dns1="ns.xinnetdns.com"
dns2="ns.xinnet.cn"
end If
dns1=""'2009-4-22
dns2=""
If dsdom("DNS_API")=1  And Right(dsdom("Domain"),3)<>".cn" then
dns1=Application("DNS1")
dns2=Application("DNS2")
else
dsdom("DNS_API")=0
End if
End if
api6checkurl=Application("Domain_Agent_url_6")&"/api/freehost.asp?method=Register"
checksum=MD5("Register"+Application("Domain_Agent_username_6")+Application("Domain_Agent_password_6")+dsdom("Domain")+dsdom("uemail")+dsdom("uname2"))
postcon="dn="&server.URLEncode(dsdom("Domain"))&"&enc="&enc&"&period="&dsdom("years")&"&client="&Application("Domain_Agent_username_6")&"&uname1="&server.URLEncode(dsdom("uname1"))&"&uname2="&server.URLEncode(dsdom("uname2"))&"&uname3="&server.URLEncode(dsdom("uname2"))&"&uname4="&server.URLEncode(dsdom("uname2"))&"&rname1="&server.URLEncode(dsdom("rname1"))&"&rname2="&server.URLEncode(dsdom("rname2"))&"&ust=CN"&"&uprov="&server.URLEncode(dsdom("uprov"))&"&ucity1="&server.URLEncode(dsdom("ucity1"))&"&ucity2="&server.URLEncode(dsdom("ucity2"))&"&uaddr1="&server.URLEncode(dsdom("uaddr1"))&"&uaddr2="&server.URLEncode(dsdom("uaddr2"))&"&location="&server.URLEncode(dsdom("uaddr1"))&"&uzip="&server.URLEncode(dsdom("uzip"))&"&utelc="&server.URLEncode(dsdom("utelc"))&"&utela="&server.URLEncode(dsdom("utela"))&"&uteln="&server.URLEncode(dsdom("uteln"))&"&ufaxc="&server.URLEncode(dsdom("ufaxc"))&"&ufaxa="&server.URLEncode(dsdom("ufaxa"))&"&ufaxn="&server.URLEncode(dsdom("ufaxn"))&"&ufaxe=&uemail="&server.URLEncode(dsdom("uemail"))&"&aname1="&server.URLEncode(dsdom("uname1"))&"&aname2="&server.URLEncode(dsdom("uname2"))&"&atelc="&server.URLEncode(dsdom("utelc"))&"&atela="&server.URLEncode(dsdom("utela"))&"&ateln="&server.URLEncode(dsdom("uteln"))&"&atele=&afaxc="&server.URLEncode(dsdom("ufaxc"))&"&afaxa="&server.URLEncode(dsdom("ufaxa"))&"&afaxn="&server.URLEncode(dsdom("ufaxn"))&"&afaxe=&aemail="&server.URLEncode(dsdom("uemail"))&"&dns1="&server.URLEncode(dns1)&"&dns2="&server.URLEncode(dns2)&"&checksum="&checksum
retdns=ONLY_POST(api6checkurl,api6checkurl,postcon)
If Instr(1, retdns, "err=", 1)>0 or Instr(1, retdns, "reg-failure", 1)>0 Or Instr(1, retdns, "Error", 1)>0 Or Not InStr(retdns,"reg-success")>0 then
	ef=True
	ec="操作失败，请联系管理员！代码为："&server.URLEncode (retdns)
	FreeHost_oplog dsdom("username"),"失败","款项已扣，域名注册时由于"&retdns&"等原因操作失败:"&dsdom("Domain")
	dsdom("status")="失败"
end if
If retdns="" then
	ef=True
	ec="操作失败，但款项已扣。请联系管理员！代码为：可能的原因是原始注册商的网络不正常"
	FreeHost_oplog dsdom("username"),"失败","域名注册时由于原始注册商的网络不正常等原因操作失败:"&dsdom("Domain")
	dsdom("status")="失败"
end If
dsdom("retdns")=retdns
dsdom("postcon")=postcon

End If'api6


If dsdom("Domain_API")=7 Then

If dsdom("DNS_API")=1 then
dns1=Application("DNS1")
dns2=Application("DNS2")
End if

If Application("api7select")=1 Then'is aisa

dsdom("api7select")=1
dsdom.update

dsdom("inipass")=Left(Md5(time),10)'&"I@i0"
 
domainname=ComX.idntoac_7i24_com(Cstr(dsdom("Domain")))

utela=dsdom("utela")
If Left(utela,1)="0" Then utela=Right(utela,Len(utela)-1)
r_telephone="+86."&utela&dsdom("uteln")
ufaxa=dsdom("ufaxa")
If Left(ufaxa,1)="0" Then ufaxa=Right(ufaxa,Len(ufaxa)-1)
r_fax="+86."&ufaxa&dsdom("ufaxn")

vsendStr = "Command=Domain&Action=Register"
vsendStr = vsendStr &"&MRP_ID="&Application("Domain_Agent_username_7")
vsendStr = vsendStr &"&MRP_PW="&Application("Domain_Agent_password_7")
vsendStr = vsendStr &"&Domain="&domainname
vsendStr = vsendStr &"&Period="&dsdom("years")
vsendStr = vsendStr &"&RegistrantOrganizationName="&server.URLEncode(dsdom("uname2"))
vsendStr = vsendStr &"&RegistrantFirstName="&server.URLEncode(LCase(Split(dsdom("rname2")," ")(0)))
vsendStr = vsendStr &"&RegistrantLastName="&server.URLEncode(LCase(Split(dsdom("rname2")," ")(1)))
vsendStr = vsendStr &"&RegistrantAddress="&server.URLEncode(dsdom("uaddr2"))
vsendStr = vsendStr &"&RegistrantCity="&server.URLEncode(dsdom("ucity2"))
vsendStr = vsendStr &"&RegistrantStateProvince="&server.URLEncode(dsdom("uprov"))
vsendStr = vsendStr &"&RegistrantPostalCode="&server.URLEncode(dsdom("uzip"))
vsendStr = vsendStr &"&RegistrantCountry=CN"
vsendStr = vsendStr &"&RegistrantEmailAddress="&server.URLEncode(dsdom("uemail"))
vsendStr = vsendStr &"&RegistrantPhone="&server.URLEncode(r_telephone)
vsendStr = vsendStr &"&RegistrantFax="&server.URLEncode(r_fax)
vsendStr = vsendStr &"&Passwd="&server.URLEncode(dsdom("inipass"))
If dns1<>"" then
vsendStr = vsendStr &"&NS1="&server.URLEncode(dns1)
vsendStr = vsendStr &"&NS2="&server.URLEncode(dns2)
End If
	retdns=AsiaAPI(vsendStr)		
If retdns="" then
	ef=True
	ec="操作失败，但款项已扣。请联系管理员！可能的原因是原始注册商的网络不正常"
	dsdom("status")="失败"
	FreeHost_oplog dsdom("username"),"失败","管理员操作，款项已扣，域名注册时由于原始注册商的网络不正常等原因操作失败:"&dsdom("Domain")
end If
			If Instr(retdns,"successfully")<=0 Then
'				retdns= "返回状态码:"&returncodevalue&" 原因:"&failreason&" 注意！相关的款项已被扣除！下次请点确认不扣费！"
				ef=True
				ec="操作失败，但款项已扣。请联系管理员！代码为(API7-Asia)："&server.URLEncode (retdns)
				dsdom("status")="失败"
				FreeHost_oplog dsdom("username"),"失败","域名注册:"&dsdom("Domain")&"<br>"&retdns
			else
				FreeHost_oplog dsdom("username"),"信息","管理员操作注册时返回："&retdns&":"&dsdom("Domain")
				dsdom("inipass")=vtime
			End If		
dsdom("postcon")=Replace(vsendStr,Application("Domain_Agent_password_7"),"******")
dsdom("retdns")=retdns



elseIf Application("api7select")=2 Then'is 1api

dsdom("api7select")=2
dsdom.update

dsdom("inipass")=Left(Md5(time),10)'&"I@i0"
 
domainname=ComX.idntoac_7i24_com(Cstr(dsdom("Domain")))

utela=dsdom("utela")
If Left(utela,1)="0" Then utela=Right(utela,Len(utela)-1)
r_telephone="+86."&utela&dsdom("uteln")
ufaxa=dsdom("ufaxa")
If Left(ufaxa,1)="0" Then ufaxa=Right(ufaxa,Len(ufaxa)-1)
r_fax="+86."&ufaxa&dsdom("ufaxn")

'先添加联系人
vsendStr = "command=AddContact"
vsendStr = vsendStr &"&s_login="&Application("Domain_Agent_username_7")
vsendStr = vsendStr &"&s_pw="&Application("Domain_Agent_password_7")
vsendStr = vsendStr &"&firstname="&server.URLEncode(LCase(Split(dsdom("rname2")," ")(0)))
vsendStr = vsendStr &"&lastname="&server.URLEncode(LCase(Split(dsdom("rname2")," ")(1)))
vsendStr = vsendStr &"&organization="&server.URLEncode(dsdom("uname2"))
vsendStr = vsendStr &"&street="&server.URLEncode(dsdom("uaddr2"))
vsendStr = vsendStr &"&city="&server.URLEncode(dsdom("ucity2"))
vsendStr = vsendStr &"&state="&server.URLEncode(dsdom("uprov"))
vsendStr = vsendStr &"&zip="&server.URLEncode(dsdom("uzip"))
If isnull(dsdom("Country")) then
vsendStr = vsendStr &"&country=CN"
Else
vsendStr = vsendStr &"&country="&server.URLEncode(dsdom("Country"))
End if
vsendStr = vsendStr &"&phone="&server.URLEncode(r_telephone)
vsendStr = vsendStr &"&fax="&server.URLEncode(r_fax)
vsendStr = vsendStr &"&email="&server.URLEncode(dsdom("uemail"))
'vsendStr = vsendStr &"&X-DE-ACCEPT-TRUSTEE-TAC=1"
retdns=HexonetAPI(vsendStr)		
retdnscontactid=retdns
contactid=""
	for each retary in split(retdns,vblf)
	if Left(LCase(retary),20)="property[contact][0]" then
		contactid =Trim(Replace(Replace(LCase(retary),"property[contact][0]",""),"=",""))
	end if
	Next
'		response.write contactid
'	response.end

			If contactid="" Then
				ef=True
				ec="操作失败，但款项已扣。请联系管理员！代码为(API7-1api-contactid)："&server.URLEncode (retdns)
				dsdom("status")="失败"
				FreeHost_oplog dsdom("username"),"失败","域名注册:"&dsdom("Domain")&"<br>"&retdns
			End IF

If Not ef Then
vsendStr = "command=AddDomain"
vsendStr = vsendStr &"&s_login="&Application("Domain_Agent_username_7")
vsendStr = vsendStr &"&s_pw="&Application("Domain_Agent_password_7")
vsendStr = vsendStr &"&domain="&domainname
vsendStr = vsendStr &"&period="&dsdom("years")
vsendStr = vsendStr &"&ownercontact0="&contactid
vsendStr = vsendStr &"&admincontact0="&contactid
vsendStr = vsendStr &"&techcontact0="&contactid
vsendStr = vsendStr &"&billingcontact0="&contactid
If dns1<>"" then
vsendStr = vsendStr &"&nameserver0="&server.URLEncode(dns1)
vsendStr = vsendStr &"&nameserver1="&server.URLEncode(dns2)
end If
If dsdom("DNS_API")=0 Or IsNull(dsdom("DNS_API"))  Then
vsendStr = vsendStr &"&nameserver0=ns1.ispapi.net"
vsendStr = vsendStr &"&nameserver1=ns2.ispapi.net"
vsendStr = vsendStr &"&nameserver2=ns3.ispapi.net"
dsdom("DNS_API")=0
dsdom.update
End If

vsendStr = vsendStr &"&RENEWALMODE="
if domaintypeid=50 then 
	vsendStr = vsendStr &"&x-de-accept-trustee-tac=1"
end if
if domaintypeid=60 then 
	vsendStr = vsendStr &"&X-PT-REGISTRANT-VATID=1111" 
	vsendStr = vsendStr &"&X-PT-LEGITIMACY=02"
	vsendStr = vsendStr &"&X-PT-REGISTRATION-BASIS=6A"
end if

	retdns=HexonetAPI(vsendStr)		
If retdns="" then
	ef=True
	ec="操作失败，但款项已扣。请联系管理员！可能的原因是原始注册商的网络不正常"
	dsdom("status")="失败"
	FreeHost_oplog dsdom("username"),"失败","管理员操作，款项已扣，域名注册时由于原始注册商的网络不正常等原因操作失败:"&dsdom("Domain")
end If
			If Instr(UCase(Replace(retdns," ","")),"EPPCODE=200")>0 Then
				ef=True
				ec="操作失败，但款项已扣。请联系管理员！代码为(API7-1api)："&server.URLEncode (retdns&"--contactid--"&retdnscontactid)
				dsdom("status")="失败"
				FreeHost_oplog dsdom("username"),"失败","域名注册:"&dsdom("Domain")&"<br>"&(retdns&"--contactid--"&retdnscontactid)
			Else
			
			If Instr(UCase(Replace(retdns," ","")),"CODE=200")>0 Then
				FreeHost_oplog dsdom("username"),"信息","管理员操作注册时返回："&retdns&":"&dsdom("Domain")
				dsdom("inipass")=vtime
'关闭自动续费
'vsendStr = "command=SetDomainRenewalMode"
'vsendStr = vsendStr &"&s_login="&Application("Domain_Agent_username_7")
'vsendStr = vsendStr &"&s_pw="&Application("Domain_Agent_password_7")
'vsendStr = vsendStr &"&domain="&domainname
'vsendStr = vsendStr &"&renewalmode=AUTOEXPIRE"
'	retdns=HexonetAPI(vsendStr)
'if instr(UCase(Replace(retdns," ","")),"CODE=200") then
'				FreeHost_oplog dsdom("username"),"信息","管理员操作注册时返回(关闭自动续费)："&retdns&":"&dsdom("Domain")
'else
'				ef=True
'				ec="操作失败，但款项已扣。请联系管理员！代码为(API7-1api-关闭自动续费失败)："&server.URLEncode (retdns)
'				dsdom("status")="失败"
'				FreeHost_oplog dsdom("username"),"失败","域名注册:"&dsdom("Domain")&"<br>"&(retdns)
'end if


				Else
				ef=True
				ec="操作失败，但款项已扣。请联系管理员！代码为(API7-1api)："&server.URLEncode (retdns&"--contactid--"&retdnscontactid)
				dsdom("status")="失败"
				FreeHost_oplog dsdom("username"),"失败","域名注册:"&dsdom("Domain")&"<br>"&(retdns&"--contactid--"&retdnscontactid)
				
				End if
			End If		
dsdom("postcon")=Replace(vsendStr,Application("Domain_Agent_password_7"),"******")
dsdom("retdns")=retdns
End if'contactid没出错

else
'is enom
dsdom("api7select")=3
dsdom.update

dsdom("inipass")=Left(Md5(time),10)'&"I@i0"
domainpwd=dsdom("inipass")
domainpass=domainpwd
if enc="G" then
	IDNCode="chi"
end If
 
domainname=ComX.idntoac_7i24_com(Cstr(dsdom("Domain")))

utela=dsdom("utela")
If Left(utela,1)="0" Then utela=Right(utela,Len(utela)-1)
r_telephone="+86."&utela&dsdom("uteln")
ufaxa=dsdom("ufaxa")
If Left(ufaxa,1)="0" Then ufaxa=Right(ufaxa,Len(ufaxa)-1)
r_fax="+86."&ufaxa&dsdom("ufaxn")

vsendStr = "command=Purchase"
vsendStr = vsendStr &"&uid="&Application("Domain_Agent_username_7")
vsendStr = vsendStr &"&pw="&Application("Domain_Agent_password_7")
vsendStr = vsendStr &"&sld="&mid(domainname,1,instr(domainname,".")-1)
vsendStr = vsendStr &"&tld="&mid(domainname,instr(domainname,".")+1)
if IDNCode<>"" then
vsendStr = vsendStr &"&IDNCode="&IDNCode
end If


vsendStr = vsendStr &"&RegistrantOrganizationName="&server.URLEncode(dsdom("uname2"))
vsendStr = vsendStr &"&RegistrantFirstName="&server.URLEncode(LCase(Split(dsdom("rname2")," ")(0)))
vsendStr = vsendStr &"&RegistrantLastName="&server.URLEncode(LCase(Split(dsdom("rname2")," ")(1)))
vsendStr = vsendStr &"&RegistrantAddress1="&server.URLEncode(dsdom("uaddr2"))
vsendStr = vsendStr &"&RegistrantCity="&server.URLEncode(dsdom("ucity2"))
vsendStr = vsendStr &"&RegistrantStateProvince="&server.URLEncode(dsdom("uprov"))
vsendStr = vsendStr &"&RegistrantStateProvinceChoice=S"
vsendStr = vsendStr &"&RegistrantPostalCode="&server.URLEncode(dsdom("uzip"))
vsendStr = vsendStr &"&RegistrantCountry=CN"
vsendStr = vsendStr &"&RegistrantEmailAddress="&server.URLEncode(dsdom("uemail"))
vsendStr = vsendStr &"&RegistrantPhone="&server.URLEncode(r_telephone)
vsendStr = vsendStr &"&RegistrantFax="&server.URLEncode(r_fax)

vsendStr = vsendStr &"&TechFirstName="&server.URLEncode(LCase(Split(dsdom("rname2")," ")(0)))
vsendStr = vsendStr &"&TechLastName="&server.URLEncode(LCase(Split(dsdom("rname2")," ")(1)))
vsendStr = vsendStr &"&TechAddress1="&server.URLEncode(dsdom("uaddr2"))
vsendStr = vsendStr &"&TechCity="&server.URLEncode(dsdom("ucity2"))
vsendStr = vsendStr &"&TechStateProvince="&server.URLEncode(dsdom("uprov"))
vsendStr = vsendStr &"&TechStateProvinceChoice=S"
vsendStr = vsendStr &"&TechPostalCode="&server.URLEncode(dsdom("uzip"))
vsendStr = vsendStr &"&TechCountry=CN"
vsendStr = vsendStr &"&TechEmailAddress="&server.URLEncode(dsdom("uemail"))
vsendStr = vsendStr &"&TechPhone="&server.URLEncode(r_telephone)
vsendStr = vsendStr &"&TechFax="&server.URLEncode(r_fax)

vsendStr = vsendStr &"&AdminFirstName="&server.URLEncode(LCase(Split(dsdom("rname2")," ")(0)))
vsendStr = vsendStr &"&AdminLastName="&server.URLEncode(LCase(Split(dsdom("rname2")," ")(1)))
vsendStr = vsendStr &"&AdminAddress1="&server.URLEncode(dsdom("uaddr2"))
vsendStr = vsendStr &"&AdminCity="&server.URLEncode(dsdom("ucity2"))
vsendStr = vsendStr &"&AdminStateProvince="&server.URLEncode(dsdom("uprov"))
vsendStr = vsendStr &"&AdminStateProvinceChoice=S"
vsendStr = vsendStr &"&AdminPostalCode="&server.URLEncode(dsdom("uzip"))
vsendStr = vsendStr &"&AdminCountry=CN"
vsendStr = vsendStr &"&AdminEmailAddress="&server.URLEncode(dsdom("uemail"))
vsendStr = vsendStr &"&AdminPhone="&server.URLEncode(r_telephone)
vsendStr = vsendStr &"&AdminFax="&server.URLEncode(r_fax)

vsendStr = vsendStr &"&AuxBillingFirstName="&server.URLEncode(LCase(Split(dsdom("rname2")," ")(0)))
vsendStr = vsendStr &"&AuxBillingLastName="&server.URLEncode(LCase(Split(dsdom("rname2")," ")(1)))
vsendStr = vsendStr &"&AuxBillingAddress1="&server.URLEncode(dsdom("uaddr2"))
vsendStr = vsendStr &"&AuxBillingCity="&server.URLEncode(dsdom("ucity2"))
vsendStr = vsendStr &"&AuxBillingStateProvince="&server.URLEncode(dsdom("uprov"))
vsendStr = vsendStr &"&AuxBillingStateProvinceChoice=S"
vsendStr = vsendStr &"&AuxBillingPostalCode="&server.URLEncode(dsdom("uzip"))
vsendStr = vsendStr &"&AuxBillingCountry=CN"
vsendStr = vsendStr &"&AuxBillingEmailAddress="&server.URLEncode(dsdom("uemail"))
vsendStr = vsendStr &"&AuxBillingPhone="&server.URLEncode(r_telephone)
vsendStr = vsendStr &"&AuxBillingFax="&server.URLEncode(r_fax)

if mid(domainname,instr(domainname,".")+1)="us" then
vsendStr = vsendStr &"&us_nexus=C11"
vsendStr = vsendStr &"&us_purpose=P2"
end If
If dns1<>"" then
vsendStr = vsendStr &"&NS1="&server.URLEncode(dns1)
vsendStr = vsendStr &"&NS2="&server.URLEncode(dns2)
else
vsendStr = vsendStr &"&UseDNS=default"
End if
vsendStr = vsendStr &"&DomainPassword="&domainpwd
vsendStr = vsendStr &"&NumYears="&dsdom("years")
if right(domainname,3)=".sh" then vsendStr = vsendStr &"&sh_agreedelete=YES"
if right(domainname,3)=".ac" then vsendStr = vsendStr &"&ac_agreedelete=YES"
if right(domainname,3)=".io" then vsendStr = vsendStr &"&io_agreedelete=YES"
if right(domainname,3)=".uk" then 
	vsendStr = vsendStr &"&uk_legal_type=IND"
	vsendStr = vsendStr &"&registered_for="&server.URLEncode(dsdom("uname2"))
	vsendStr = vsendStr &"&uk_reg_opt_out=n"
	vsendStr = vsendStr &"&uk_reg_co_no=11"
end if

if right(domainname,5)=".asia" then 
	vsendStr = vsendStr &"&asia_cclocality=cn"
	vsendStr = vsendStr &"&asia_localitycity=beijing"
	vsendStr = vsendStr &"&asia_localitysp=beijing"
	vsendStr = vsendStr &"&asia_legalentitytype=corporation"
	vsendStr = vsendStr &"&asia_identform=other"
	vsendStr = vsendStr &"&asia_ident:number=350624891002354"
	vsendStr = vsendStr &"&asia_otherletype=0"
	vsendStr = vsendStr &"&asia_otheridentform=0"
end if

	vsendStr = vsendStr &"&ResponseType=XML"

	retdns=EnomAPI(vsendStr)		

If retdns="" then
	ef=True
	ec="操作失败，但款项已扣。请联系管理员！可能的原因是原始注册商的网络不正常"
	dsdom("status")="失败"
	FreeHost_oplog dsdom("username"),"失败","管理员操作，款项已扣，域名注册时由于原始注册商的网络不正常等原因操作失败:"&dsdom("Domain")
end If

			If Instr(retdns,"<RRPCode>200</RRPCode>")<=0 Then
'				retdns= "返回状态码:"&returncodevalue&" 原因:"&failreason&" 注意！相关的款项已被扣除！下次请点确认不扣费！"
				ef=True
				ec="操作失败，但款项已扣。请联系管理员！代码为(API7-0-enom)："&server.URLEncode (Left(retdns,1024))
				dsdom("status")="失败"
				FreeHost_oplog dsdom("username"),"失败","域名注册:"&dsdom("Domain")&"<br>"&retdns
			else
				FreeHost_oplog dsdom("username"),"信息","管理员操作注册时返回："&retdns&":"&dsdom("Domain")
				dsdom("inipass")=vtime
			End If		
dsdom("postcon")=Replace(vsendStr,Application("Domain_Agent_password_7"),"******")
dsdom("retdns")=retdns
End If'api7
End if'isenom

end sub
%>
