<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<!--#include virtual="/inc-freehost-function/FreeHostFunction.asp"-->
<%
If session("admau")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
elseIf session("cansysteminfo")="" Then
	ef=True
	ec="您没有此操作的权限。"
elseIf request.Form("PAY_Month")=999 Then
	ef=True
	ec="月付费率不能是999。"
elseIf lenb(request.Form("FreeHost"))>198 Then
	ef=True
	ec="主域名超长了。"
elseIf not IsNumeric(request.Form("DNScount")) Then
	ef=True
	ec="dns解析数应该是数字。"
elseIf not IsNumeric(request.Form("Mail_emailport")) Then
	ef=True
	ec="邮箱端口应该是数字。"
elseIf not IsNumeric(request.Form("testtime")) Then
	ef=True
	ec="试用天数应该是数字。"
elseIf IsNumeric(request.Form("testtime")) and request.Form("testtime")<1 Then
	ef=True
	ec="试用天数要大于0。"
elseIf IsNumeric(request.Form("smstimeout")) and request.Form("smstimeout")<1 Then
	ef=True
	ec="短信到期通知天数要大于0。"
elseIf not IsNumeric(request.Form("todelday")) Then
	ef=True
	ec="过期删除天数应该是数字。"
elseIf IsNumeric(request.Form("todelday")) and request.Form("todelday")<1 Then
	ef=True
	ec="过期删除天数要大于0。"
elseIf IsNumeric(request.Form("DNScount")) and request.Form("DNScount")<1 Then
	ef=True
	ec="dns解析数要大于1。"
elseIf IsNumeric(request.Form("FapiaoPaypercent")) and request.Form("FapiaoPaypercent")<0 Then
	ef=True
	ec="发票点数要大于0。"
elseIf IsNumeric(request.Form("MinFapiaomoney")) and request.Form("MinFapiaomoney")<0 Then
	ef=True
	ec="最小发票要大于0。"
elseIf request.Form("MailfromName")="" Then
	ef=True
	ec="请设置下面的发件人等所有必需信息。"
elseIf RegExpTest("[^A-Za-z0-9]",Request.Form ("MailfromPass")) Then
	ef=True
	ec="邮箱密码不能有特殊字符！"
elseIf trim(lcase(request.Form("admmailname")))="admin" or trim(lcase(request.Form("admmailname")))="root" Then
	ef=True
	ec="默认的邮箱域管理员不能设置为："&request.Form("admmailname")
elseIf RegExpTest("[^A-Za-z0-9]",Request.Form ("SMSKey")) Then
	ef=True
	ec="短信接口密码不能有特殊字符！"
end if

if not ef then
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
if request.Form("MailfromName")<>"" then
Set dsreg = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Admuser where superuser='freehost'"
		if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
		dsreg.Open Sql,conn,1,3
If dsreg.Eof Then
		ef=True
		ec="用户名不存在！"
		response.write ec
		response.end 
else
dsreg("Mailfrom")=Request.Form ("Mailfrom")
dsreg("MailfromName")=Request.Form ("MailfromName")
dsreg("MailfromPass")=Request.Form ("MailfromPass")
dsreg("MailfromServer")=Request.Form ("MailfromServer")
dsreg("emailport")=Request.Form ("Mail_emailport")
dsreg("EnableSsl")=Request.Form ("Mail_EnableSsl")

Application("Mail_from")=dsreg("Mailfrom")
Application("Mail_fromName")=dsreg("MailfromName")
Application("Mail_fromPass")=dsreg("MailfromPass")
Application("Mail_fromServer")=dsreg("MailfromServer")
Application("Mail_emailport")=dsreg("emailport")
Application("Mail_EnableSsl")=dsreg("EnableSsl")
session("Mail_from")=Application("Mail_from")
session("Mail_fromName")=Application("Mail_fromName")
session("Mail_fromPass")=Application("Mail_fromPass")
session("Mail_fromServer")=Application("Mail_fromServer")
session("Mail_emailport")=Application("Mail_emailport")
session("Mail_EnableSsl")=Application("Mail_EnableSsl")

dsreg.update
end if
end if

'reload
Set dsreg = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_System_Info where id=0"
		dsreg.Open Sql,conn,1,3
if not dsreg.Eof then



		dsreg("FreeHostsharekey")=request.Form("FreeHostsharekey")
		dsreg("FreeHost")=request.Form("FreeHost")
		dsreg("indexsame")=request.Form("indexsame")

		dsreg("NP_ShopID")=request.Form("NP_ShopID")

		dsreg("NP_NPS_ShopID")=request.Form("NP_NPS_ShopID")
		dsreg("NP_NPS_Key")=request.Form("NP_NPS_Key")
		dsreg("NP_NPS_IP")=request.Form("NP_NPS_IP")

		dsreg("NP_Payone_ShopID")=request.Form("NP_Payone_ShopID")

		dsreg("NP_Ipay_ShopID")=request.Form("NP_Ipay_ShopID")
		dsreg("NP_Ipay_Key")=request.Form("NP_Ipay_Key")

		dsreg("NP_ali_ShopID")=LCase(Trim(request.Form("NP_ali_ShopID")))
		dsreg("NP_ali_Key")=Trim(request.Form("NP_ali_Key"))

		dsreg("NP_ChinaBank_ShopID")=request.Form("NP_ChinaBank_ShopID")
		dsreg("NP_ChinaBank_Key")=request.Form("NP_ChinaBank_Key")
		dsreg("NP_ALLBUY_ShopID")=request.Form("NP_ALLBUY_ShopID")
		dsreg("NP_ALLBUY_Key")=request.Form("NP_ALLBUY_Key")
		
		dsreg("NP_IPS_ShopID")=request.Form("NP_IPS_ShopID")
		dsreg("NP_IPS_Key")=request.Form("NP_IPS_Key")

		dsreg("NP_Netcard_ShopID")=request.Form("NP_Netcard_ShopID")
		dsreg("NP_Netcard_Key")=request.Form("NP_Netcard_Key")

		dsreg("NP_BJ_ShopID")=request.Form("NP_BJ_ShopID")
		dsreg("NP_BJ_Key")=request.Form("NP_BJ_Key")


		dsreg("Domain_API")=request.Form("Domain_API")

		dsreg("testhostcandomain")=request.Form("testhostcandomain")

		dsreg("DNS_API")=request.Form("DNS_API")
		dsreg("DNS1")=request.Form("DNS1")
		dsreg("DNS2")=request.Form("DNS2")
		dsreg("DNS1_IP")=request.Form("DNS1_IP")
		dsreg("DNS2_IP")=request.Form("DNS2_IP")
		dsreg("URLRE_IP")=request.Form("URLRE_IP")
		dsreg("DNScount")=request.Form("DNScount")

		dsreg("Domain_Agent_username")=request.Form("Domain_Agent_username_"&request.Form("Domain_API"))
		dsreg("Domain_Agent_password")=request.Form("Domain_Agent_password_"&request.Form("Domain_API"))

		dsreg("Domain_Agent_username_1")=Trim(request.Form("Domain_Agent_username_1"))
		dsreg("Domain_Agent_password_1")=Trim(request.Form("Domain_Agent_password_1"))
		dsreg("Domain_Agent_password_1_API")=Trim(request.Form("Domain_Agent_password_1_API"))
		dsreg("Domain_Agent_username_2")=Trim(request.Form("Domain_Agent_username_2"))
		dsreg("Domain_Agent_password_2")=Trim(request.Form("Domain_Agent_password_2"))
		dsreg("Domain_Agent_password_2_API")=Trim(request.Form("Domain_Agent_password_2_API"))
		dsreg("Domain_Agent_username_3")=Trim(request.Form("Domain_Agent_username_3"))
		dsreg("Domain_Agent_password_3")=Trim(request.Form("Domain_Agent_password_3"))
		dsreg("Domain_Agent_username_4")=Trim(request.Form("Domain_Agent_username_4"))
		dsreg("Domain_Agent_password_4")=Trim(request.Form("Domain_Agent_password_4"))
		dsreg("Domain_Agent_username_5")=Trim(request.Form("Domain_Agent_username_5"))
		dsreg("Domain_Agent_password_5")=Trim(request.Form("Domain_Agent_password_5"))

				dsreg("Domain_Agent_username_5_emamil")=Trim(request.Form("Domain_Agent_username_5_emamil"))
		
		dsreg("Domain_HTTP")=request.Form("Domain_HTTP")

'		dsreg("PAY_Month")=request.Form("PAY_Month")
'		dsreg("PAY_Season")=request.Form("PAY_Season")
'		dsreg("PAY_halfyear")=request.Form("PAY_halfyear")

		If IsNumeric(Request.Form("NetPaypercent")) Then
		dsreg("NetPaypercent")=request.Form("NetPaypercent")/100
		Else
		dsreg("NetPaypercent")=0
		End if

dsreg("usercanselectapi")=request.Form("usercanselectapi")
dsreg("api1")=request.Form("api1")
dsreg("api2")=request.Form("api2")
dsreg("api3")=request.Form("api3")
dsreg("api4")=request.Form("api4")
dsreg("api5")=request.Form("api5")
dsreg("api6")=request.Form("api6")
dsreg("api7")=request.Form("api7")


dsreg("todelday")=request.Form("todelday")

dsreg("smsByUserid")=request.Form("smsByUserid")
dsreg("SMSUserName")=request.Form("SMSUserName")
dsreg("SMSKey")=request.Form("SMSKey")
dsreg("canuseorder")=request.Form("canuseorder")

dsreg("blockip")=Trim(request.Form("blockip"))
dsreg("blockdomain")=Replace(Trim(LCase(request.Form("blockdomain")))&"@","@@","@")
If dsreg("blockdomain")="@" Then dsreg("blockdomain")=""


		dsreg("nohost")=request.Form("nohost")
		dsreg("notusedomain")=request.Form("notusedomain")
'		dsreg("EmailSendAPI")=request.Form("EmailSendAPI")

		dsreg("EmailSendAPI")=1'2007-8-24

		dsreg("icpbyhost")=request.Form("icpbyhost")
		dsreg("emailau")=request.Form("emailau")
		dsreg("smsau")=request.Form("smsau")

		dsreg("agnimgpath")=request.Form("agnimgpath")
		dsreg("canagnimg")=request.Form("canagnimg")
		dsreg("openmustre")=request.Form("openmustre")
		dsreg("ctldomain")=Replace(replace(lcase(trim(Request.Form ("ctldomain"))),"http://",""),"/hostadm/","")
		dsreg("agnpubdomain")=replace(lcase(trim(Request.Form ("agnpubdomain"))),"http://","")
		dsreg("apipubdomain")=replace(lcase(trim(Request.Form ("apipubdomain"))),"http://","")

		dsreg("autobackup")=request.Form("autobackup")
		dsreg("autobackupdir")=trim(request.Form("autobackupdir"))
		dsreg("alipayid")=trim(request.Form("alipayid"))
		dsreg("netpayselect")=trim(request.Form("netpayselect"))
		dsreg("testtime")=trim(request.Form("testtime"))

		dsreg("MaxConnections")=trim(request.Form("MaxConnections"))
		dsreg("spacelimit")=trim(request.Form("spacelimit"))
		dsreg("MaxBandwidth")=trim(request.Form("MaxBandwidth"))


		dsreg("Agentcantest")=request.Form("Agentcantest")
		dsreg("Agentcanunlimit")=request.Form("Agentcanunlimit")
		dsreg("admmailname")=lcase(trim(request.Form("admmailname")))
				dsreg("testsame")=request.Form("testsame")

				dsreg("NP_99bill_ShopID")=request.Form("NP_99bill_ShopID")
		dsreg("NP_99bill_Key")=request.Form("NP_99bill_Key")
		dsreg("urlcheck")=request.Form("urlcheck")
		dsreg("superdns")=request.Form("superdns")
		dsreg("onlyone")=request.Form("onlyone")
		dsreg("showdomainpass")=request.Form("showdomainpass")

		dsreg("alipayuser7i24")=request.Form("alipayuser7i24")


		dsreg("smstimeout")=request.Form("smstimeout")
		dsreg("agncangetsms")=request.Form("agncangetsms")

				dsreg("agentcannetpay")=request.Form("agentcannetpay")

		dsreg("canagnrar")=request.Form("canagnrar")

		dsreg("emailmustone")=request.Form("emailmustone")
		dsreg("mobimustone")=request.Form("mobimustone")


'		If dsreg("alipayuser7i24")=true Or dsreg("agentcannetpay")=True Then
		If dsreg("alipayuser7i24")=True or trim(request.Form("alipayid"))="" Then
		dsreg("alipayid")="2088001779970004"
		dsreg("NP_ali_Key")="94pdr97sr32lds4hrmfdlypqz8l2ote5"
		End If
		
		dsreg("tenpayid")=trim(request.Form("tenpayid"))
		dsreg("tenpaykey")=trim(request.Form("tenpaykey"))

				dsreg("FapiaoPaypercent")=request.Form("FapiaoPaypercent")
				dsreg("MinFapiaomoney")=request.Form("MinFapiaomoney")
				dsreg("Fapiaokuai")=request.Form("Fapiaokuai")
				dsreg("agnchangelogin")=request.Form("agnchangelogin")

				dsreg("fastlogin_usealipay")=request.Form("fastlogin_usealipay")
				dsreg("fastlogin_useqq")=request.Form("fastlogin_useqq")
				dsreg("fastlogin_useqq_appid")=request.Form("fastlogin_useqq_appid")
				dsreg("fastlogin_useqq_appkey")=request.Form("fastlogin_useqq_appkey")



dsreg("QQ_CALLBACK_URL")=replace(lcase(trim(Request.Form ("QQ_CALLBACK_URL"))),"http://","")
dsreg("vpscantest")=request.Form("vpscantest")
dsreg("vpscantestST")=0
dsreg("vpscantestEN")=23
If IsNumeric(request.Form("vpscantestST")) Then dsreg("vpscantestST")=request.Form("vpscantestST")
If IsNumeric(request.Form("vpscantestEN")) Then dsreg("vpscantestEN")=request.Form("vpscantestEN")


'Response.write request.Form("ZM_use7i24")
'Response.end


dsreg("ZM_Use")=request.Form("ZM_Use")
dsreg("ZM_LoginInmustpass")=request.Form("ZM_LoginInmustpass")
dsreg("ZM_LoginInRedirect")=request.Form("ZM_LoginInRedirect")

dsreg("ZM_use7i24")=request.Form("ZM_use7i24")
If dsreg("ZM_use7i24")=True Then
dsreg("ZM_appId")=""
dsreg("ZM_zhimaPublicKey")=""
dsreg("ZM_privateKey")=""
Else
dsreg("ZM_appId")=Trim(request.Form("ZM_appId"))
ZM_zhimaPublicKey=Replace(Replace(Replace(Trim(request.Form("ZM_zhimaPublicKey")),"-----BEGIN PUBLIC KEY-----",""),"-----END PUBLIC KEY-----",""),vbcrlf,"")
dsreg("ZM_zhimaPublicKey")=ZM_zhimaPublicKey
ZM_privateKey=Replace(Replace(Replace(Trim(request.Form("ZM_privateKey")),"-----BEGIN PRIVATE KEY-----",""),"-----END PRIVATE KEY-----",""),vbcrlf,"")
dsreg("ZM_privateKey")=ZM_privateKey
End if
dsreg("ZM_ReturnUrl")=replace(Replace(LCase(Trim(request.Form("ZM_ReturnUrl"))),"http://",""),"/","")

'dsreg("openispsystem")=request.Form("openispsystem")
'dsreg("ispID")=request.Form("ispID")
'dsreg("userName")=request.Form("userName")
'dsreg("isppass")=request.Form("isppass")
'dsreg("AESIV")=request.Form("AESIV")
'dsreg("AESKey")=request.Form("AESKey")
'dsreg("SOAP_Url_QS")=request.Form("SOAP_Url_QS")
'dsreg("SOAP_Url_UP")=request.Form("SOAP_Url_UP")

dsreg("opencheckmobi")=request.Form("opencheckmobi")
dsreg("api7select")=request.Form("api7select")
dsreg("api6select")=request.Form("api6select")
dsreg("smsBy")=request.Form("smsBy")


If dsreg("smsBy")=1 Or dsreg("smsBy")=true Then
dsreg("smsBy")=true
body="cdkey="&dsreg("SMSUserName")&"&password="&dsreg("SMSKey")
smsbyregsuc=false
Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")
xml.setTimeouts FreeHost_t1, FreeHost_t2, FreeHost_t3, FreeHost_t4
xml.Open "GET", "http://sdk999ws.eucp.b2m.cn:8080/sdkproxy/regist.action?"&body, False
xml.send
returnstr = bytes2BSTR(xml.responsebody)
returnstrsms =returnstr 
If InStr(returnstr,"<error>0</error>") Then smsbyregsuc=true
End if



dsreg("autodelvps")=request.Form("autodelvps")
If request.Form("todeldayvps")<>"" Then dsreg("todeldayvps")=request.Form("todeldayvps")
dsreg("autodeltestvpsnow")=request.Form("autodeltestvpsnow")

dsreg("autodelhost")=request.Form("autodelhost")
dsreg("autodelsql")=request.Form("autodelsql")
dsreg("autodeltesthostnow")=request.Form("autodeltesthostnow")
dsreg("netpaylessmoney")=request.Form("netpaylessmoney")

dsreg("cnrepay")=request.Form("cnrepay")

dsreg("autodelicp")=request.Form("autodelicp")
dsreg("hostoneip")=request.Form("hostoneip")
dsreg("domaincansetM")=request.Form("domaincansetM")
dsreg("iphead")=request.Form("iphead")
dsreg("beianupsaok")=request.Form("beianupsaok")
dsreg("beianusecode")=request.Form("beianusecode")
'If dsreg("beianusecode")=0 Then dsreg("beianusecode")=1
dsreg("mustcheckid")=request.Form("mustcheckid")

dsreg("fastlogin_autoreg")=request.Form("fastlogin_autoreg")
dsreg("VPScpdomain")=Replace(replace(lcase(trim(Request.Form ("VPScpdomain"))),"http://",""),"/hostadm/","")

dsreg("Domain_Agent_username_6")=LCase(request.Form("Domain_Agent_username_6"))
dsreg("Domain_Agent_password_6")=request.Form("Domain_Agent_password_6")
Domain_Agent_url_6="http://"&Replace(LCase(request.Form("Domain_Agent_url_6")),"http://","")
If Right(Domain_Agent_url_6,1)="/" Then Domain_Agent_url_6=Left(Domain_Agent_url_6,Len(Domain_Agent_url_6)-1)
dsreg("Domain_Agent_url_6")=Domain_Agent_url_6

dsreg("Domain_Agent_md5_6")=md5(dsreg("Domain_Agent_username_6")&"7i24.com"&md5(dsreg("Domain_Agent_password_6")))


dsreg("Domain_Agent_username_7")=LCase(request.Form("Domain_Agent_username_7"))
dsreg("Domain_Agent_password_7")=request.Form("Domain_Agent_password_7")

If Trim(request.Form("admemail"))="" Then
dsreg("admemail")=null
else
dsreg("admemail")=request.Form("admemail")
End if

		dsreg("autopausebytesite")=trim(request.Form("autopausebytesite"))
		dsreg("sendtonodefineagn")=trim(request.Form("sendtonodefineagn"))

If IsNumeric(request.Form("beianrecheck")) Then
dsreg("beianrecheck")=request.Form("beianrecheck")
Else
dsreg("beianrecheck")=0
End If

If IsNumeric(request.Form("VPStestHour")) Then
dsreg("VPStestHour")=request.Form("VPStestHour")
Else
dsreg("VPStestHour")=0
End if


If request.Form("showapi1")="1" Then
dsreg("showapi1")=True
Else
dsreg("showapi1")=False
End If
If request.Form("showapi2")="1" Then
dsreg("showapi2")=True
Else
dsreg("showapi2")=False
End If
If request.Form("showapi3")="1" Then
dsreg("showapi3")=True
Else
dsreg("showapi3")=False
End If
If request.Form("showapi4")="1" Then
dsreg("showapi4")=True
Else
dsreg("showapi4")=False
End If
If request.Form("showapi5")="1" Then
dsreg("showapi5")=True
Else
dsreg("showapi5")=False
End If
If request.Form("showapi6")="1" Then
dsreg("showapi6")=True
Else
dsreg("showapi6")=False
End If
If request.Form("showapi7")="1" Then
dsreg("showapi7")=True
Else
dsreg("showapi7")=False
End If
If request.Form("usenetcnhost")="1" Then
dsreg("usenetcnhost")=True


Else
dsreg("usenetcnhost")=False
End if


Application("FreeHostsharekey")=dsreg("FreeHostsharekey")
Application("FreeHost")=dsreg("FreeHost")
Application("indexsame")=dsreg("indexsame")
Application("NP_ShopID")=dsreg("NP_ShopID")
Application("NP_NPS_ShopID")=dsreg("NP_NPS_ShopID")
Application("NP_NPS_Key")=dsreg("NP_NPS_Key")
Application("NP_NPS_IP")=dsreg("NP_NPS_IP")
Application("NP_Payone_ShopID")=dsreg("NP_Payone_ShopID")
Application("NP_Ipay_ShopID")=dsreg("NP_Ipay_ShopID")
Application("NP_Ipay_Key")=dsreg("NP_Ipay_Key")
Application("NP_ali_ShopID")=dsreg("NP_ali_ShopID")
Application("NP_ali_Key")=dsreg("NP_ali_Key")
Application("NP_ChinaBank_ShopID")=dsreg("NP_ChinaBank_ShopID")
Application("NP_ChinaBank_Key")=dsreg("NP_ChinaBank_Key")

Application("NP_IPS_ShopID")=dsreg("NP_IPS_ShopID")
Application("NP_IPS_Key")=dsreg("NP_IPS_Key")

Application("NP_Netcard_ShopID")=dsreg("NP_Netcard_ShopID")
Application("NP_Netcard_Key")=dsreg("NP_Netcard_Key")

Application("NP_ALLBUY_ShopID")=dsreg("NP_ALLBUY_ShopID")
Application("NP_ALLBUY_Key")=dsreg("NP_ALLBUY_Key")
Application("Domain_API")=dsreg("Domain_API")
Application("Domain_Agent_username")=dsreg("Domain_Agent_username")
Application("Domain_Agent_password")=dsreg("Domain_Agent_password")
Application("Domain_Agent_username_1")=dsreg("Domain_Agent_username_1")
Application("Domain_Agent_password_1")=dsreg("Domain_Agent_password_1")
Application("Domain_Agent_username_2")=dsreg("Domain_Agent_username_2")
Application("Domain_Agent_password_2")=dsreg("Domain_Agent_password_2")
Application("Domain_Agent_password_1_API")=dsreg("Domain_Agent_password_1_API")
Application("Domain_Agent_password_2_API")=dsreg("Domain_Agent_password_2_API")

Application("Domain_Agent_username_3")=dsreg("Domain_Agent_username_3")
Application("Domain_Agent_password_3")=dsreg("Domain_Agent_password_3")
Application("Domain_Agent_username_4")=dsreg("Domain_Agent_username_4")
Application("Domain_Agent_password_4")=dsreg("Domain_Agent_password_4")
Application("Domain_Agent_username_5")=dsreg("Domain_Agent_username_5")
Application("Domain_Agent_password_5")=dsreg("Domain_Agent_password_5")
Application("Domain_Agent_username_5_emamil")=dsreg("Domain_Agent_username_5_emamil")
Application("Domain_HTTP")=dsreg("Domain_HTTP")
Application("PAY_Month")=dsreg("PAY_Month")
Application("PAY_Season")=dsreg("PAY_Season")
Application("PAY_halfyear")=dsreg("PAY_halfyear")
Application("nohost")=dsreg("nohost")
Application("notusedomain")=dsreg("notusedomain")
Application("EmailSendAPI")=dsreg("EmailSendAPI")
Application("alipayid")=dsreg("alipayid")
Application("netpayselect")=dsreg("netpayselect")

Application("DNS_API")=dsreg("DNS_API")
Application("DNS1")=dsreg("DNS1")
Application("DNS2")=dsreg("DNS2")
Application("DNS1_IP")=dsreg("DNS1_IP")
Application("DNS2_IP")=dsreg("DNS2_IP")
Application("URLRE_IP")=dsreg("URLRE_IP")
Application("DNScount")=dsreg("DNScount")
Application("icpbyhost")=dsreg("icpbyhost")
Application("emailau")=dsreg("emailau")
Application("hpsystem")=dsreg("hpsystem")
if isnull(Application("hpsystem")) then Application("hpsystem")=false
Application("agnimgpath")=dsreg("agnimgpath")
Application("canagnimg")=dsreg("canagnimg")
Application("openmustre")=dsreg("openmustre")
Application("ctldomain")=dsreg("ctldomain")
Application("testtime")=dsreg("testtime")

Application("MaxConnections")=dsreg("MaxConnections")
Application("spacelimit")=dsreg("spacelimit")
Application("MaxBandwidth")=dsreg("MaxBandwidth")

Application("Agentcantest")=dsreg("Agentcantest")
Application("Agentcanunlimit")=dsreg("Agentcanunlimit")
Application("admmailname")=dsreg("admmailname")
Application("testsame")=dsreg("testsame")
Application("NP_99bill_ShopID")=dsreg("NP_99bill_ShopID")
Application("NP_99bill_Key")=dsreg("NP_99bill_Key")
Application("urlcheck")=dsreg("urlcheck")
Application("superdns")=dsreg("superdns")
Application("onlyone")=dsreg("onlyone")
Application("showdomainpass")=dsreg("showdomainpass")
Application("NetPaypercent")=dsreg("NetPaypercent")

Application("NP_BJ_ShopID")=dsreg("NP_BJ_ShopID")
Application("NP_BJ_Key")=dsreg("NP_BJ_Key")

Application("usercanselectapi")=dsreg("usercanselectapi")

Application("api1")=dsreg("api1")
Application("api2")=dsreg("api2")
Application("api3")=dsreg("api3")
Application("api4")=dsreg("api4")
Application("api5")=dsreg("api5")
Application("api6")=dsreg("api6")
Application("api7")=dsreg("api7")
Application("alipayuser7i24")=dsreg("alipayuser7i24")
Application("todelday")=dsreg("todelday")
Application("testhostcandomain")=dsreg("testhostcandomain")
Application("SMSUserName")=dsreg("SMSUserName")
Application("SMSKey")=dsreg("SMSKey")
Application("canuseorder")=dsreg("canuseorder")

Application("smstimeout")=dsreg("smstimeout")
Application("agncangetsms")=dsreg("agncangetsms")
Application("agentcannetpay")=dsreg("agentcannetpay")
Application("canagnrar")=dsreg("canagnrar")
Application("FapiaoPaypercent")=dsreg("FapiaoPaypercent")
Application("MinFapiaomoney")=dsreg("MinFapiaomoney")
Application("Fapiaokuai")=dsreg("Fapiaokuai")

Application("autodelhost")=dsreg("autodelhost")
Application("autodeltesthostnow")=dsreg("autodeltesthostnow")
Application("netpaylessmoney")=dsreg("netpaylessmoney")

Application("cnrepay")=dsreg("cnrepay")
Application("admemail")=dsreg("admemail")
Application("autopausebytesite")=dsreg("autopausebytesite")
Application("sendtonodefineagn")=dsreg("sendtonodefineagn")
Application("hostoneip")=dsreg("hostoneip")
Application("domaincansetM")=dsreg("domaincansetM")
Application("iphead")=dsreg("iphead")
Application("agnchangelogin")=dsreg("agnchangelogin")

Application("Domain_Agent_url_6")=dsreg("Domain_Agent_url_6")
Application("Domain_Agent_md5_6")=dsreg("Domain_Agent_md5_6")
Application("Domain_Agent_username_6")=dsreg("Domain_Agent_username_6")
Application("Domain_Agent_password_6")=dsreg("Domain_Agent_password_6")

Application("Domain_Agent_username_7")=dsreg("Domain_Agent_username_7")
Application("Domain_Agent_password_7")=dsreg("Domain_Agent_password_7")

Application("showapi1")=dsreg("showapi1")
Application("showapi2")=dsreg("showapi2")
Application("showapi3")=dsreg("showapi3")
Application("showapi4")=dsreg("showapi4")
Application("showapi5")=dsreg("showapi5")
Application("showapi6")=dsreg("showapi6")
Application("showapi7")=dsreg("showapi7")
Application("autodelsql")=dsreg("autodelsql")
Application("beianupsaok")=dsreg("beianupsaok")
Application("beianusecode")=dsreg("beianusecode")
Application("agnpubdomain")=dsreg("agnpubdomain")
Application("apipubdomain")=dsreg("apipubdomain")
Application("mustcheckid")=dsreg("mustcheckid")
Application("beianrecheck")=dsreg("beianrecheck")
Application("usenetcnhost")=dsreg("usenetcnhost")

Application("openispsystem")=dsreg("openispsystem")
Application("Beian_ver")=dsreg("Beian_ver")
Application("Beian_vertime")=dsreg("Beian_vertime")
Application("ispID")=dsreg("ispID")
Application("userName")=dsreg("userName")
Application("isppass")=dsreg("isppass")
Application("AESIV")=dsreg("AESIV")
Application("AESKey")=dsreg("AESKey")
Application("SOAP_Url_QS")=dsreg("SOAP_Url_QS")
Application("SOAP_Url_UP")=dsreg("SOAP_Url_UP")
Application("opencheckmobi")=dsreg("opencheckmobi")
Application("api7select")=dsreg("api7select")
Application("api6select")=dsreg("api6select")


Application("fastlogin_usealipay")=dsreg("fastlogin_usealipay")
Application("fastlogin_useqq")=dsreg("fastlogin_useqq")
Application("fastlogin_useqq_appid")=dsreg("fastlogin_useqq_appid")
Application("fastlogin_useqq_appkey")=dsreg("fastlogin_useqq_appkey")

Application("QQ_CALLBACK_URL")=dsreg("QQ_CALLBACK_URL")
Application("vpscantest")=dsreg("vpscantest")
Application("vpscantestST")=dsreg("vpscantestST")
Application("vpscantestEN")=dsreg("vpscantestEN")

Application("smsau")=dsreg("smsau")

Application("emailmustone")=dsreg("emailmustone")
Application("mobimustone")=dsreg("mobimustone")

Application("smsBy")=dsreg("smsBy")
Application("smsByUserid")=dsreg("smsByUserid")
Application("fastlogin_autoreg")=dsreg("fastlogin_autoreg")
Application("VPScpdomain")=Trim(LCase(dsreg("VPScpdomain")))

Application("autodelvps")=dsreg("autodelvps")
Application("todeldayvps")=dsreg("todeldayvps")
Application("autodeltestvpsnow")=dsreg("autodeltestvpsnow")

Application("VPStestHour")=dsreg("VPStestHour")

Application("ZM_use7i24")=dsreg("ZM_use7i24")
Application("ZM_appId")=dsreg("ZM_appId")
Application("ZM_zhimaPublicKey")=dsreg("ZM_zhimaPublicKey")
Application("ZM_privateKey")=dsreg("ZM_privateKey")
Application("ZM_ReturnUrl")=dsreg("ZM_ReturnUrl")

Application("ZM_Use")=dsreg("ZM_Use")
Application("ZM_LoginInmustpass")=dsreg("ZM_LoginInmustpass")
Application("ZM_LoginInRedirect")=dsreg("ZM_LoginInRedirect")


if Application("autodelicp")=false and dsreg("autodelicp")=true then
 changetoautodelicp=true
else
  changetoautodelicp=false
end if

Application("autodelicp")=dsreg("autodelicp")

Application("blockip")=dsreg("blockip")
if isnull(Application("blockip")) then Application("blockip")=""
Application("blockdomain")=dsreg("blockdomain")
if isnull(Application("blockdomain")) then Application("blockdomain")=""

Application("blockiparry")=split(Replace(Application("blockip"),".*",""),"@")
Application("blockdomainarry")=split(Application("blockdomain"),"@")

dsreg.update
end if
dsreg.close
set dsreg=nothing
Application("sitearry")=split(Application("FreeHost"),",")

on error resume next
%>
<!--#include virtual="/inc-freehost-function/htmlwrite.asp"--><%=htmlwrite("html8")%>
<%=htmlwrite("html9")%>
<TABLE width="100%" border=0 cellPadding=0 cellSpacing=0 background="img/midtop4.gif">
  <TBODY>
    <TR>
      <TD width=53 align="left" background="img/midtop1.gif"><strong> 　 </strong><font color="#FFFFFF">─<strong>&gt;</strong></font> </TD>
      <TD width="83"><table height="59"  border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="7" background="img/midtop.gif">&nbsp;</td>
            <td width="60" align="center" valign="middle" background="img/r3.jpg" id="tableTop1" style="Cursor:hand"><a href="systeminfo.asp"><font color="#FFFFFF">系统参数</font></a><a href="logininfo.asp"></a></td>
            <td width="5" background="img/midtop2.gif">&nbsp;</td>
          </tr>
      </table></TD>
      <TD width="83">&nbsp;</TD>
      <TD width="83">&nbsp;</TD>
      <TD width="83" align="left">&nbsp;</TD>
      <TD align="left">&nbsp;</TD>
      <TD width=23 align="right"><IMG height=59 
                  src="img/rtop4.jpg" 
                  width=19></TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE width="100%" border=0 cellPadding=0 cellSpacing=0>
  <TBODY>
    <TR>
      <TD width=19 background="img/midlef.gif" id=rightid>&nbsp;</TD>
      <TD height="300" align="center" vAlign=top bgcolor="#FFFFFF"><br>


<%if len(request.Form("Domain_Agent_password_1_API"))>2 And len(request.Form("Domain_Agent_username_1"))>2 And 1=2 then

	'初始化对象
	Set oAPISystem = server.CreateObject("DevKit.Core.APISystem")

	'设置联结码
	oAPISystem.setAgent Application("Domain_Agent_username_1"),Application("Domain_Agent_password_1_API")

	If oAPISystem.systemIPAdd(request.Form("Domain_Agent_IP_1_API"),Application("sitearry")(0)) Then
		'显示debug信息
		response.write oAPISystem.getPostDebug()

		response.write  "新网互联API接口授权IP添加成功："&request.Form("Domain_Agent_IP_1_API")&"<br>"
	Else 

	if not instr(oAPISystem.getMessage(),"已经存")>1 then
		'显示debug信息
		response.write oAPISystem.getPostDebug()

		response.write  "Error"
		response.write  "<br>错误号："+oAPISystem.getCode()
		response.write  "<br>错误信息："+oAPISystem.getMessage()
	end if
	End If 

Set oAPISystem = server.CreateObject("DevKit.Core.APISystem")

	'设置联结码
	oAPISystem.setAgent Application("Domain_Agent_username_1"),Application("Domain_Agent_password_1_API")
	'设置调试信息
'	oAPISystem.setSaveDebug(sSaveDebug)

	'是否开启debug
'	oAPISystem.setPostDebug(bPostDegug)
	
	'获得所有认证IP列表<ArrayList>
	Set aIP = oAPISystem.systemIPList()

	If aIP.Count Then
		'显示debug信息
'		response.write oAPISystem.getPostDebug()

		response.write "<br>新网互联API接口授权IP，已有的"&aIP.Count&"个认证IP:<br><br>" 
		For i=0 To (aIP.Count - 1)
			'认证IP对象<Hashtable>
			Set aIPOne = aIP(i)
			response.write  "<BR>" & aIPOne("value")&"　　<a href='systemdelip.asp?ip="& trim(replace(aIPOne("value"),vbcrlf,""))&"'>删除此IP</a>"
	'		response.write  " URL：" & aIPOne("url")
	'		response.write  " 时间：" & aIPOne("time")
		Next
	Else 
		'显示debug信息
		response.write oAPISystem.getPostDebug()

		response.write  "NO"
		response.write  "<br>错误号："+oAPISystem.getCode()
		response.write  "<br>错误信息："+oAPISystem.getMessage()
	End If
	Set aIP = nothing

Set oAPISystem = nothing

end if%>
<br>
<br>
设置成功
<br>
<br>
<br>
<%if changetoautodelicp=true then%>
<strong><a href="autodelicpupdate.asp" target="_blank"><font color="#FF0000">您启动了过期自动清理未备案域名的功能，请点这儿同步以前的历史数据&gt;&gt;&gt;</font></a></strong>
<%end if%>

<%If Application("smsBy")=True Then
if smsbyregsuc=true then%>
<strong>短信接口注册成功</strong>
<%else%>
<strong>短信接口注册失败！</strong><%=returnstr%>
<%end If
end if%>


<br>
<br>
<br>
<%if isnull(Application("emailreg")) then %>
<strong><a href="emailcon.asp"><font color="#FF0000">请您继续提交邮件模板&gt;&gt;&gt;</font></a></strong>
<%end if%>
</TD>
      <TD width=18 background="img/midri.gif">&nbsp;</TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
    <TR>
      <TD width=30><IMG height=19 
                  src="img/rb1.jpg" 
                  width=30></TD>
      <TD 
                background=img/rb2.jpg>&nbsp;</TD>
      <TD width=30><IMG height=19 
                  src="img/rb3.jpg" 
                  width=30></TD>
    </TR>
  </TBODY>
</TABLE>
<%=htmlwrite("html10")%>
<%end if
if ef then
Response.Redirect "e.asp?e="&ec
end if%>
