<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%
If session("agentusername")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
end if
if not ef then%>
<!--#include virtual="/inc-freehost-function/htmlwrite.asp"--><%=htmlwrite("html5")%>　报表功能<%=htmlwrite("html6")%>
<br>
<br>
<%Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")%>
<table width="98%" border="0" cellspacing="1" cellpadding="2" align="center" bgcolor="#333333">
   <tr bgcolor="#C1BFBF" align="center">
     <td height="21" bgcolor="#C1BFBF">类型</td>
     <td width="120" bgcolor="#C1BFBF">总量/不含子目录/试用</td>
     <td width="100">正常</td>
     <td width="100">暂停</td>
     <td width="100">停止</td>
     <td width="100">未备案</td>
   </tr>

   <tr align="center" bgcolor="#FFFFFF">
     <td height="30" bgcolor="#FFFFFF">
         　 虚拟主机
</td>
     <td bgcolor="#FFFFFF"><%
		  	Set dsph = Server.CreateObject("ADODB.Recordset")
SQL="Select count(*) from FreeHost.FreeHost_Product_Host where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"')"
		        dsph.Open Sql,conn,1,1  
		  %>
         <%=dsph(0)%>
         <%dsph.close%>
         /
         <%
		  	Set dsph = Server.CreateObject("ADODB.Recordset")
SQL="Select count(*) from FreeHost.FreeHost_Product_Host where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and  Hosttype<>'子目录绑定'"
		        dsph.Open Sql,conn,1,1  
		  %>
         <%=dsph(0)%>
         <%dsph.close%>
         /
         <%
		  	Set dsph = Server.CreateObject("ADODB.Recordset")
SQL="Select count(*) from FreeHost.FreeHost_Product_Host where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and istest='y'"
		        dsph.Open Sql,conn,1,1  
		  %>
         <%=dsph(0)%>
         <%dsph.close%>
     </td>
     <td><%
		  	Set dsph = Server.CreateObject("ADODB.Recordset")
SQL="Select count(*) from FreeHost.FreeHost_Product_Host where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and status='正常'"
		        dsph.Open Sql,conn,1,1  
		  %>
         <%=dsph(0)%>
         <%dsph.close%></td>
     <td><%
		  	Set dsph = Server.CreateObject("ADODB.Recordset")
SQL="Select count(*) from FreeHost.FreeHost_Product_Host where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and status='暂停'"
		        dsph.Open Sql,conn,1,1  
		  %>
         <%=dsph(0)%>
         <%dsph.close%></td>
     <td><%
		  	Set dsph = Server.CreateObject("ADODB.Recordset")
SQL="Select count(*) from FreeHost.FreeHost_Product_Host where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and status='停止'"
		        dsph.Open Sql,conn,1,1  
		  %>
         <%=dsph(0)%>
         <%dsph.close%></td>
     <td><%
		  	Set dsph = Server.CreateObject("ADODB.Recordset")
SQL="Select count(*) from FreeHost.FreeHost_Product_Host where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and beianstatus is null"
		        dsph.Open Sql,conn,1,1  
		  %>
         <%=dsph(0)%>
         <%dsph.close%></td>
   </tr>
 </table>
 <br>
 <table width="98%" border="0" cellspacing="1" cellpadding="2" align="center" bgcolor="#333333">
   <tr bgcolor="#C1BFBF" align="center">
     <td height="21" bgcolor="#C1BFBF">邮箱类型</td>
     <td width="120" bgcolor="#C1BFBF">开通数量</td>
     <td width="100">正常</td>
     <td width="100">暂停</td>
     <td width="100">停止</td>
     <td width="100">&nbsp;</td>
   </tr>
   <tr align="center" bgcolor="#FFFFFF">
     <td height="30" bgcolor="#FFFFFF">邮箱</td>
     <td width="120" bgcolor="#FFFFFF"><%
		  	Set dsph = Server.CreateObject("ADODB.Recordset")
SQL="Select count(*) from FreeHost.FreeHost_Product_Email where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"')"
		        dsph.Open Sql,conn,1,1  
		  %>
         <%=dsph(0)%>
         <%dsph.close%></td>
     <td width="100"><%
		  	Set dsph = Server.CreateObject("ADODB.Recordset")
SQL="Select count(*) from FreeHost.FreeHost_Product_Email where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and status='正常'"
		        dsph.Open Sql,conn,1,1  
		  %>
         <%=dsph(0)%>
         <%dsph.close%></td>
     <td width="100"><%
		  	Set dsph = Server.CreateObject("ADODB.Recordset")
SQL="Select count(*) from FreeHost.FreeHost_Product_Email where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and status='暂停'"
		        dsph.Open Sql,conn,1,1  
		  %>
         <%=dsph(0)%>
         <%dsph.close%></td>
     <td width="100"><%
		  	Set dsph = Server.CreateObject("ADODB.Recordset")
SQL="Select count(*) from FreeHost.FreeHost_Product_Email where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and status='停止'"
		        dsph.Open Sql,conn,1,1  
		  %>
         <%=dsph(0)%>
         <%dsph.close%></td>
     <td width="100">&nbsp;</td>
   </tr>

 </table>
 <br>
 <table width="98%" border="0" cellspacing="1" cellpadding="2" align="center" bgcolor="#333333">
   <tr bgcolor="#C1BFBF" align="center">
     <td height="21" bgcolor="#C1BFBF">类型</td>
     <td width="120" bgcolor="#C1BFBF">数据库数量</td>
     <td width="100">正常</td>
     <td width="100">暂停</td>
     <td width="100">停止</td>
     <td width="100">&nbsp;</td>
   </tr>
   <tr align="center" bgcolor="#FFFFFF">
     <td height="30" bgcolor="#FFFFFF">数据库</td>
     <td width="120" bgcolor="#FFFFFF"><%
		  	Set dsph = Server.CreateObject("ADODB.Recordset")
SQL="Select count(*) from FreeHost.FreeHost_Product_SQL where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"')"
		        dsph.Open Sql,conn,1,1  
		  %>
         <%=dsph(0)%>
         <%dsph.close%></td>
     <td width="100"><%
		  	Set dsph = Server.CreateObject("ADODB.Recordset")
SQL="Select count(*) from FreeHost.FreeHost_Product_SQL where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and status='正常'"
		        dsph.Open Sql,conn,1,1  
		  %>
         <%=dsph(0)%>
         <%dsph.close%></td>
     <td width="100"><%
		  	Set dsph = Server.CreateObject("ADODB.Recordset")
SQL="Select count(*) from FreeHost.FreeHost_Product_SQL where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and status='暂停'"
		        dsph.Open Sql,conn,1,1  
		  %>
         <%=dsph(0)%>
         <%dsph.close%></td>
     <td width="100"><%
		  	Set dsph = Server.CreateObject("ADODB.Recordset")
SQL="Select count(*) from FreeHost.FreeHost_Product_SQL where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and status='停止'"
		        dsph.Open Sql,conn,1,1  
		  %>
         <%=dsph(0)%>
         <%dsph.close%></td>
     <td width="100">&nbsp;</td>
   </tr>
 </table>
 <br>
 <table width="98%" border="0" cellspacing="1" cellpadding="2" align="center" bgcolor="#333333">
   <tr bgcolor="#C1BFBF" align="center">
     <td height="21" bgcolor="#C1BFBF">域名统计</td>
     <td width="120" bgcolor="#C1BFBF">(全部)域名数量</td>
     <td width="100">正常</td>
     <td width="100">过期</td>
     <td width="100">预注册</td>
     <td width="100">&nbsp;</td>
   </tr>
   <tr align="center" bgcolor="#FFFFFF">
     <td height="30" bgcolor="#FFFFFF">域名</td>
     <td width="120" bgcolor="#FFFFFF"><%
		  	Set dsph = Server.CreateObject("ADODB.Recordset")
SQL="Select count(*) from FreeHost.FreeHost_Product_domain where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"')"
		        dsph.Open Sql,conn,1,1  
		  %>
         <%=dsph(0)%>
         <%dsph.close%></td>
     <td width="100"><%
		  	Set dsph = Server.CreateObject("ADODB.Recordset")
SQL="Select count(*) from FreeHost.FreeHost_Product_domain where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and status='正常' and endtime is not null and endtime > '"&now&"'"
		        dsph.Open Sql,conn,1,1  
		  %>
         <%=dsph(0)%>
         <%dsph.close%></td>
     <td width="100"><%
		  	Set dsph = Server.CreateObject("ADODB.Recordset")
SQL="Select count(*) from FreeHost.FreeHost_Product_domain where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and endtime is not null and endtime < '"&now&"'"
		        dsph.Open Sql,conn,1,1  
		  %>
         <%=dsph(0)%>
         <%dsph.close%></td>
     <td width="100"><%
		  	Set dsph = Server.CreateObject("ADODB.Recordset")
SQL="Select count(*) from FreeHost.FreeHost_Product_domain where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and status='预注册成功'"
		        dsph.Open Sql,conn,1,1  
		  %>
         <%=dsph(0)%>
         <%dsph.close%></td>
     <td width="100">&nbsp;</td>
   </tr>
 </table>
 <form action="admhostreport2.asp" method="get" name="form1"><p>&nbsp;</p>
</form>
            <%=htmlwrite("html7")%>
<%end if
if ef then
Response.Redirect "e.asp?e="&ec
end if%>
