<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%
If session("HOSTAUID")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
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_Host where id='"&session("HOSTAUID")&"'"
			if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
	dsph.Open Sql,conn,1,1
if dsph.Eof then
	ef=True
	ec="不存在的虚拟主机ID！"
end if
end if

if not ef then
	Set dsHostpdlist = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_HostProductlist where Hosttype='"&dsph("Hosttype")&"'"
	if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
	dsHostpdlist.Open Sql,conn,1,1
if dsHostpdlist.Eof then
	ef=True
	ec="产品不存在！"
end if
end if

if not ef then
	Set dsserver = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Serverlist where id='"&dsph ("ServerlistID")&"'"
	dsserver.Open Sql,conn,1,1
if dsserver.Eof then
	ef=True
	ec="服务器不存在！"
else
ftpdomain=dsserver("ftpdomain")	
isuseCDN=dsserver("isuseCDN")
end if
end if

if not ef Then
session("isuseCDN")=isuseCDN
session("canseelog")=dsph("canseelog")
session("canrar")=dsph("canrar")
session("canback")=dsph("canback")
session("allowsub")=dsph("allowsub")
session("canpool")="n"
session("canrecypool")=dsph("canrecypool")
session("useisp")=dsserver("useisp")

if dsHostpdlist("AppPoolnum")=1 then session("canpool")="y"
if not isnull(dsph("AppPoolnum")) then
if dsph("AppPoolnum")=1 then session("canpool")="y"
end If

'If dsph("canchnetver")="y" Then session("canpool")="y"

session("canchnetver")=dsph("canchnetver")
If session("canchnetver")="y" then
'if dsHostpdlist("aspx")="y" then session("canchnetver")="y"
netver=dsserver("netver")
If Not IsNull(dsHostpdlist("netver")) Then netver=dsHostpdlist("netver")
If Not IsNull(dsph("netver")) Then netver=dsph("netver")
session("netver")=netver
end If

'phpver=dsserver("phpver")
If Not IsNull(dsHostpdlist("phpver")) Then phpver=dsHostpdlist("phpver")
If Not IsNull(dsph("phpver")) Then phpver=dsph("phpver")
session("phpver")=phpver


if Request.QueryString ("to")<>"" then Response.Redirect Request.QueryString ("to")&"?id="&Request.QueryString ("id")
%>
<!--#include virtual="/inc-freehost-function/template-hostadm-top.asp"-->
　<img src="hostimages/m1.gif" width="503" height="86"><br>
<br>
<TABLE 
            width="100%" border=1 align=center cellPadding=0 cellSpacing=0 borderColorLight=#cccccc borderColorDark=#fbfbfb>
  <TBODY>
    <TR>
      <TD width="20%" height="40" align="center" vAlign=middle bgColor=#F3F3F3>&nbsp;<font color="#000000">产品类型：</font></TD>
      <TD width="80%" height="40" bgColor=#ffffff>　　
        <%

	Hosttype=dsph("Hosttype")
	Set ori_host_name = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_HostProductlist where Hosttype='"&dsph("Hosttype")&"'"
		ori_host_name.Open Sql,conn,1,1
		if not ori_host_name.eof then
Set newname_host = Server.CreateObject("ADODB.Recordset")	
Sql="Select * from FreeHost.FreeHost_HostProductlist_AGN where agent1='"&dsph("agent1")&"' and id='"&ori_host_name("id")&"'"
		newname_host.Open Sql,conn,1,1
if not newname_host.eof then
Hosttype=newname_host("Hosttype")
end if
		end if

	%>
      <%=Hosttype%> </TD>
      </TR>
    <TR>
      <TD height="40" align="center" vAlign=middle bgColor=#F3F3F3>虚拟主机状态：</TD>
      <TD height="40" bgColor=#ffffff>　　
          <%if dsph("endtime")>NOW then%>
          <%if dsph("istest")="y" then%>
          <font color="#FF0000">试用</font>
          <%else%>
          <%=dsph("status")%>
		  
		  <%if dsph("status")="暂停" then%>
          　原因：<font color="#FF0000"><%=dsph("pauseinfo")%></font>
          <%end if%>	  
          <%end if%>
          <%else%>
          <font color="#FF0000">过期</font>
          <%if dsph("status")="暂停" then%>
          <font color="#FF0000">暂停</font><%end if%>
          <%end if%></TD>
    </TR>
<%if session("HOSTOSTYPE")="windows" then%>
    <TR>
      <TD height="40" align="center" vAlign=middle bgColor=#F3F3F3>变更状态：</TD>
      <TD height="40" bgColor=#ffffff>　　        <a href="selfhostmodifyrun.asp?id=<%=session("HOSTAUID")%>"><font color="#000000">[启动|停止]</font></a></TD>
    </TR>
<%end if%>	
<%if isuseCDN=false then%>
    <TR>
      <TD width="20%" height="40" align="center" vAlign=middle bgColor=#F3F3F3>服务器IP：</TD>
      <TD height="40" bgColor=#ffffff>　　
        <%
	Set dsX = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Product_Host_IP where HostID="&dsph("id")
		dsX.Open Sql,conn,1,1
If dsX.Eof Then
%>
        <%
	Set dsserver = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Serverlist where id='"&dsph ("ServerlistID")&"'"
	dsserver.Open Sql,conn,1,1
%>
        <%=dsserver("ip")%>
        <%dsserver.close%>
        <%else
while not dsX.eof
ftpdomain=dsserver("ftpdomain")
%>
        <%=dsX("IP")%>
        <%
dsX.movenext
wend
end if%></TD>
    </TR>
<%end if%>	
    <TR>
      <TD width="20%" height="40" align="center" vAlign=middle bgColor=#F3F3F3>开通时间：</TD>
      <TD height="40" bgColor=#ffffff>　　<%=formatdatetime(dsph("starttime"),1)%></TD>
      </TR>
    <TR>
      <TD width="20%" height="40" align="center" vAlign=middle bgColor=#F3F3F3>到期时间：</TD>
      <TD height="40" bgColor=#ffffff>　　<%=formatdatetime(dsph("endtime"),1)%></TD>
      </TR>
    <TR>
      <TD height="40" align="center" vAlign=middle bgColor=#F3F3F3>FTP用户名：</TD>
      <TD height="40" bgColor=#ffffff>　　<%=dsph("ftpname")%>　　FTP地址：<%=ftpdomain%></TD>
    </TR>
<%if isuseCDN=true then%>
    <TR>
      <TD height="40" align="center" vAlign=middle bgColor=#F3F3F3>CDN说明：</TD>
      <TD height="40" bgColor=#ffffff>　　您使用的是CDN转发的空间</TD>
    </TR>
<%end if%>
    <TR>
      <TD height="40" align="center" vAlign=middle bgColor=#F3F3F3>月流量上限：</TD>
      <TD height="40" bgColor=#ffffff>　　
        <%
if isnull(dsph("thismonbytes")) then
spaceused = 0
else
spaceused=round((CDbl(dsph("thismonbytes"))/1048576),1)
end if
'spaceused=round((CDbl(dsph("thismonbytes"))/1048576),1)
spacelimit=round((CDbl(dsph("Maxbytes"))/1048576),1)
if spacelimit=0 then
Response.Write "无限制"
else
Response.Write FormatNumber(spacelimit,2,-1)&" M"
end if
if spacelimit=0 then
 spacelimit=-1
 spaceused=0
end if
if spacelimit<1 then spacelimit=1
%></TD>
    </TR>
    <TR>
      <TD height="35" align="center" vAlign=middle bgColor=#F3F3F3>已绑定域名：</TD>
      <TD height="35" align="right" bgColor=#ffffff>
        <table width="435"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td align="left">&nbsp;</td>
        </tr>
        <tr>
          <td align="left"><%
		  hostname=dsph("hostname")
hostname=replace(hostname, ":80:","")
hostname_arry=Split(hostname, ",")
 
		  for idname=0 to ubound(hostname_arry)%>
      <a href="http://<%=hostname_arry(idname)%>" target="_blank">
      <%if ComX.actoidc_7i24_com(cstr(hostname_arry(idname)))<>hostname_arry(idname) then%>
      <%=ComX.actoidc_7i24_com(cstr(hostname_arry(idname)))%> (<%=hostname_arry(idname)%>)
      <%else%>
      <%=hostname_arry(idname)%>
      <%end if%>
      </a><br>
      <%next%></td>
        </tr>
        <tr>
          <td align="left">&nbsp;</td>
        </tr>
      </table>
        </TD>
      </TR>
  </TBODY>
</TABLE>
<%If session("username")<>"" Then%><br>
　<A href="<%If session("returl")<>"" Then%><%=session("returl")&"/user/hostadm.asp"%><%else%>/user/hostadm.asp<%End if%>""><FONT color=#000000>返回用户区</FONT></A>
<%end if%>

<!--#include virtual="/inc-freehost-function/template-hostadm-end.asp"-->
<%end if
if ef then
Response.Redirect "e.asp?e="&ec
end if%>
