<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostEmail.asp"-->
<!--#include virtual="/inc-freehost-function/FreeHostFunction.asp"-->
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMoney.asp"-->
<%
If session("admau")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
ElseIf Request ("id")="" Then
	ef=True
	ec="请输入产品ID！"
elseIf session("canadmhostset")="" Then

if Request.Form ("Submit")="马上转移" and session("canadmhostch")="" then
	ef=True
	ec="您没有此操作的权限。"
end If

If Request.Form ("Submit")="主机管理" and session("canadmhostset")="" Then
	ef=True
	ec="您没有此操作的权限。"
end If

if (Request.Form ("Submit")="单独设置续费价格" Or Request.Form ("Submit")="取消单独价格") and session("canadmhostmidrepay")="" then
	ef=True
	ec="您没有此操作的权限。"
end If

if (Request.Form ("Submit")="重设FTP密码" or Request.Form ("Submit")="回收池" or Request.Form ("Submit")="暂停"  or Request.Form ("Submit")="停止"  or Request.Form ("Submit")="恢复"  or Request.Form ("Submit")="临时恢复"  or Request.Form ("Submit")="提取日志"  or Request.Form ("Submit")="提取旧日志"  or Request.Form ("Submit")="启用详细出错信息"  or Request.Form ("Submit")="停止详细出错信息"  or Request.Form ("Submit")="设置拒绝IP"  or Request.Form ("Submit")="设置此目录只有htm权限"  or Request.Form ("Submit")="恢复此目录" or Request.Form ("Submit")="RAR还原" or Request.Form ("Submit")="RAR打包"  or Request.Form ("Submit")="关闭写入权限"  or Request.Form ("Submit")="恢复写入权限"  or Request.Form ("Submit")="马上重开此用户"  or Request.Form ("Submit")="停止这个主机的FTP读写权限"  or Request.Form ("Submit")="恢复这个主机的FTP读写权限"  or Request.Form ("Submit")="关闭此网站的FSO权限"  or Request.Form ("Submit")="打开此网站的FSO权限"  or Request.Form ("Submit")="允许查看日志/CPU"  or Request.Form ("Submit")="不允许查看日志/CPU"  or Request.Form ("Submit")="允许打包还原"  or Request.Form ("Submit")="不允许打包还原"  or Request.Form ("Submit")="允许备份还原"  or Request.Form ("Submit")="不允许备份还原"  or Request.Form ("Submit")="重新计算此用户的实际占用空间" or Request.Form ("Submit")="重新恢复此用户的权限结构" or Request.Form ("Submit")="更改主机的备注信息" or Request.Form ("Submit")="清空数据" or Request.Form ("Submit")="删除旧主机并更换服务器" )and session("canadmhostoth")="" then
	ef=True
	ec="您没有此操作的权限。"
end If


if Request.Form ("dodel")="删除" and session("canadmhostdel")="" then
	ef=True
	ec="您没有此操作的权限。"
end If

End If

if not ef then
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
	Set dsph = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Product_NetCN where id='"&Request ("id")&"'"
			if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
	dsph.Open Sql,conn,1,3
if dsph.Eof then
	ef=True
	ec="不存在的万网主机！"
end if
end if


If not ef then
	Set dsNetCNpdlist = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_NetCNProductlist where productid='"&dsph ("productid")&"'"
	dsNetCNpdlist.Open Sql,conn,1,1
if dsNetCNpdlist.Eof then
	ef=True
	ec="产品不存在！"
End If
End if

if not ef 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		="host"
			productid		=dsph("productid")
			action			="gethostinfo"
			
			vsendStr		="userid="&userid&"&userstr="&userstr&"&vtime="&vtime
			
			vsendStr		=vsendStr&"&category="&category
			vsendStr		=vsendStr&"&productid="&productid
			vsendStr		=vsendStr&"&action="&action
			
			vsendStr		=vsendStr&"&hostadminid="&dsph("ftpname")
			retdns=LIT_RetrunStr("http://api.hichina.com/wwwnetcn.aspx",vsendStr)
dsph("retdns")=retdns
dsph.update

End if

if not ef then
			dim returncodevalue,failreason,sucdate,deaddate,hostadminid,hostpassword,volume,ipaddress,dbname,dbpassword,relatedname,os,icpstatus,porflag,idc
			xmlvalue(retdns)
			If Instr(retdns,"CDATA[200]")<=0 Then
				retdns= "返回状态码:"&returncodevalue&" 原因:"&failreason
			End If	
End if

if not ef Then
dsph("Ftppassword")=hostpassword
'dsph("endtime")=deaddate
dsph("volume")=volume
dsph("ipaddress")=ipaddress
dsph("domain")=relatedname
dsph("os")=os
'dsph("dbname")=dbname
'dsph("dbpassword")=dbpassword
dsph.Update
%>
<!--#include virtual="/inc-freehost-function/htmlwrite.asp"--><%=htmlwrite("html8")%>
<%=htmlwrite("html9")%>
API返回：<%=retdns%><br>
<br><br><br>
万网中的开通时间：<%=sucdate%><br>
万网中的到期时间：<%=deaddate%><br>
万网中的域名：<%=relatedname%><br>
万网中的IP：<%=ipaddress%><br>
万网中的机房：<%=idc%><br>
万网中的操作系统类型：<%=os%><br>
万网中的FTP名：<%=hostadminid%><br>
万网中的密码：<%=hostpassword%><br>
万网中的空间大小：<%=volume%>M<br>
万网中的备案状态：<%=icpstatus%><br>

<%=htmlwrite("html10")%>
<%end if
if ef then
Response.Redirect "e.asp?e="&ec
end if%>
