<%@ Language=VBScript %>
<%
If Request("Submit") ="以标准EXCEL格式导出(可以复制到Excel中向工信部提交)>>>" Then Response.ContentType   =   "application/vnd.ms-excel"  

%> 
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%
If session("admau")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
ElseIf RegExpTest("[^A-Za-z0-9]",Request("username")) Then
	ef=True
	ec="用户名中有非法字符！"
ElseIf Instr(Request("hostname"), "'")>0 then
	ef=True
	ec="产品类型有非法字符！"
ElseIf Instr(Request("ftpname"), "'")>0 then
	ef=True
	ec="产品类型有非法字符！"
elseIf session("canmoneyK")="" 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 username='"&Request("username")&"'"
'if Request("id") <>"" then 	Sql="Select * from FreeHost.FreeHost_Product_Host where id='"&Request("id")&"'"
'if Request("hostname") <>"" then 	Sql="Select * from FreeHost.FreeHost_Product_Host where hostname like '%"&replace(Request.QueryString ("hostname"),"http://","")&"%' order by starttime desc"
'if Request("ftpname") <>"" then 	Sql="Select * from FreeHost.FreeHost_Product_Host where ftpname = '"&trim(Request.QueryString ("ftpname"))&"'"
if Request("op") ="all" then Sql="Select * from FreeHost.FreeHost_Product_Host where beianstatus is null or beianstatus<>'备案成功' order by starttime desc"
if Request("op") ="0" then Sql="Select * from FreeHost.FreeHost_Product_Host where beianstatus is null order by starttime desc"
if Request("op") ="1" then Sql="Select * from FreeHost.FreeHost_Product_Host where beianstatus='用户已录入数据' order by starttime desc"
if Request("op") ="2" then Sql="Select * from FreeHost.FreeHost_Product_Host where beianstatus='管理员录入数据' order by starttime desc"
if Request("op") ="3" then Sql="Select * from FreeHost.FreeHost_Product_Host where beianstatus='管理员已审核' order by starttime desc"
if Request("op") ="3server" then Sql="Select * from FreeHost.FreeHost_Product_Host where beianstatus='"&Request("beianstatus")&"' and serverlistid='"&Request("serverlistid")&"' order by starttime desc"
if Request("op") ="3server" And Request("serverlistid") ="0" then Sql="Select * from FreeHost.FreeHost_Product_Host where beianstatus='"&Request("beianstatus")&"' order by starttime desc"
if Request("op") ="4" then Sql="Select * from FreeHost.FreeHost_Product_Host where beianstatus='用户需补充数据' order by starttime desc"
if Request("op") ="5" then Sql="Select * from FreeHost.FreeHost_Product_Host where beianstatus='已提交工信部' order by starttime desc"
if Request("op") ="6" then Sql="Select * from FreeHost.FreeHost_Product_Host where beianstatus='备案审核未通过' order by starttime desc"
if Request("op") ="7" then Sql="Select * from FreeHost.FreeHost_Product_Host where beianstatus='备案成功' order by starttime desc"
if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
sql=replace(sql,"beianstatus=''","beianstatus is null")
'response.write sql
'Response.End
	dsph.PageSize = 10000
	dsph.Open Sql,conn,1,1
if dsph.Eof then
	ef=True
	ec="此类虚拟主机不存在！"
end if
end if

if not ef then
%>
<%
if Request.ServerVariables("QUERY_STRING")<>"" then
ask=Split(Request.ServerVariables("QUERY_STRING"), chr(38)&"pn")
else
ask=Split("freehost=1", "")
ask(0)="freehost=lsoft"
end if
	pn=1
if Request.QueryString ("pn")<>"" then pn=Request.QueryString ("pn")
If dsph.RecordCount <> 0 Then dsph.AbsolutePage = CLng(pn)  
    if clng(pn)<=10 then
    begini=1
      if dsph.PageCount<=10 then
       endini=dsph.PageCount 
       else
       endini=10
      end if
    end if
%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%if Request("beianstatus")="管理员已审核" then%><a href="admicplist3.asp?<%=Request.ServerVariables("QUERY_STRING")%>" target="_blank"><font color="red">将下面的列表状态更新为已提交工信部</font></a><%end if%>
<%if clng(pn)<=10 then%>最新 <%for i=begini to endini
    if clng(pn)=i then%><font color=red>[<%=i%>]</font><%else%><a href="?<%=ask(0)%>&pn=<%=i%>"><font color="#000000">[<%=i%>]</font></a><%end if%>　<%next%> 
        <%else%>　<a href="?<%=ask(0)%>&pn=1"><font color="#000000">最新[1]--[10]</font></a>　　现在是第<font color=red>[<%=pn%>]</font>页 
        　共<%=dsph.PageCount%>页　<%end if%><%If Clng(pn)>1 Then%><a href="?<%=ask(0)%>&pn=<%=pn-1%>">上一页</a><%End If%>|<%If Clng(pn)<dsph.PageCount Then%><a href="?<%=ask(0)%>&pn=<%=pn+1%>"><font color="#000000">下一页</font></a>
        <%End If%>
<table width="100%" border="0" cellspacing="1" cellpadding="2" align="center" bgcolor="#333333">
  <tr bgcolor="#C1BFBF" align="center">
    <td style="vnd.ms-excel.numberformat:@">主办单位名称</td>
    <td style="vnd.ms-excel.numberformat:@">主办单位性质ID</td>
    <td style="vnd.ms-excel.numberformat:@">主办单位有效证件类型ID</td>
    <td style="vnd.ms-excel.numberformat:@">主办单位有效证件号码</td>
    <td style="vnd.ms-excel.numberformat:@">投资者或上级主管单位</td>
    <td style="vnd.ms-excel.numberformat:@">主办单位所在省/自治区/直辖市ID</td>
    <td style="vnd.ms-excel.numberformat:@">主办单位所在市ID</td>
    <td style="vnd.ms-excel.numberformat:@">主办单位所在县ID</td>
    <td style="vnd.ms-excel.numberformat:@">主办单位通信地址</td>

    <td style="vnd.ms-excel.numberformat:@">主办单位分管网站负责人姓名</td>
    <td style="vnd.ms-excel.numberformat:@">主办单位分管网站的负责人有效证件类型ID</td>
    <td style="vnd.ms-excel.numberformat:@">主办单位分管网站负责人有效证件号</td>
    <td style="vnd.ms-excel.numberformat:@">主办单位分管网站负责人办公电话</td>
    <td style="vnd.ms-excel.numberformat:@">主办单位分管网站负责人中国移动手机号码</td>
    <td style="vnd.ms-excel.numberformat:@">主办单位分管网站负责人中国联通手机号码</td>
    <td style="vnd.ms-excel.numberformat:@">主办单位分管网站负责人小灵通号码</td>
    <td style="vnd.ms-excel.numberformat:@">主办单位分管网站负责人电子邮件</td>
    <td style="vnd.ms-excel.numberformat:@">网站名称</td>
    <td style="vnd.ms-excel.numberformat:@">网站首页网址</td>
    <td style="vnd.ms-excel.numberformat:@">网站域名列表</td>
    <td style="vnd.ms-excel.numberformat:@">网站涉及需前置审批或专项审批的内容ID</td>
    <td style="vnd.ms-excel.numberformat:@">网站内容ID</td>


    <td style="vnd.ms-excel.numberformat:@">网站负责人姓名</td>
    <td style="vnd.ms-excel.numberformat:@">网站负责人有效证件类型ID</td>
    <td style="vnd.ms-excel.numberformat:@">网站负责人有效证件号</td>
    <td style="vnd.ms-excel.numberformat:@">网站负责人办公电话</td>
    <td style="vnd.ms-excel.numberformat:@">网站负责人中国移动手机号码</td>
    <td style="vnd.ms-excel.numberformat:@">网站负责人中国联通手机号码</td>
    <td style="vnd.ms-excel.numberformat:@">网站负责人小灵通号码</td>
    <td style="vnd.ms-excel.numberformat:@">网站负责人电子邮件</td>
    <td style="vnd.ms-excel.numberformat:@">IP地址列表</td>
    <td style="vnd.ms-excel.numberformat:@">网站接入方式ID</td>
    <td style="vnd.ms-excel.numberformat:@">服务器放置地点ID</td>



<%If Request("beianstatus")="备案成功" then%>
<td>备案编号</td>
<%End if%>
  </tr>
<%
For N=1 To dsph.PageSize 
					If dsph.RecordCount=0 Then Exit For
%>
  <tr align="center" bgcolor="#FFFFFF">
    <td height="30"><%=dsph("unit")%></td>
    <td><%=dsph("unit_code")%></td>
	    <td><%=dsph("zbdwzjtype")%></td>
    <td style="vnd.ms-excel.numberformat:@"><%=dsph("unit_id")%></td>
    <td><%=dsph("investor")%></td>
    <td><%=dsph("province_code")%></td>
    <td><%=dsph("city_code")%></td>
    <td><%=dsph("county_code")%></td>
    <td bgcolor="#FFFFFF"><%=dsph("address")%></td>
     <td bgcolor="#FFFFFF"><%=dsph("principal")%></td>
	      <td bgcolor="#FFFFFF"><%If dsph("principal_id_type")="工商营业执照号码" then%>1<%End if%><%If dsph("principal_id_type")="身份证" then%>2<%End if%><%If dsph("principal_id_type")="组织机构代码证书" then%>3<%End if%><%If dsph("principal_id_type")="事业法人证书" then%>4<%End if%><%If dsph("principal_id_type")="军队代号" then%>5<%End if%><%If dsph("principal_id_type")="社团法人证书" then%>6<%End if%><%If dsph("principal_id_type")="台胞证" then%>11<%End if%><%If dsph("principal_id_type")="军官证" then%>8<%End if%><%If dsph("principal_id_type")="组织机构代码证书" then%>9<%End if%></td>
     <td style="vnd.ms-excel.numberformat:@"><%=dsph("principal_id_num")%></td>
     <td bgcolor="#FFFFFF"><%=dsph("work_phone")%></td>
     <td bgcolor="#FFFFFF"><%=dsph("mobile")%></td>
     <td bgcolor="#FFFFFF"><%=dsph("mobileuni")%></td>
     <td bgcolor="#FFFFFF"><%=dsph("mobileton")%></td>
     <td bgcolor="#FFFFFF"><%=dsph("email")%></td>
     <td bgcolor="#FFFFFF"><%=dsph("web_name")%></td>
     <td bgcolor="#FFFFFF"><%=dsph("web_index")%></td>

     <td bgcolor="#FFFFFF"><%if not isnull(dsph("web_domain")) then%><%=dsph("web_domain")%><%else%><%
hostname=dsph("hostname")
hostname=replace(replace(hostname, ":80:",""),"www.","")'删除www.
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%><%end if%></td>

     <td bgcolor="#FFFFFF"><%=dsph("working_type")%></td>

	      <td bgcolor="#FFFFFF"></td>

     <td bgcolor="#FFFFFF"><%=dsph("principal")%></td>
	      <td bgcolor="#FFFFFF"><%If dsph("principal_id_type")="工商营业执照号码" then%>1<%End if%><%If dsph("principal_id_type")="身份证" then%>2<%End if%><%If dsph("principal_id_type")="组织机构代码证书" then%>3<%End if%><%If dsph("principal_id_type")="事业法人证书" then%>4<%End if%><%If dsph("principal_id_type")="军队代号" then%>5<%End if%><%If dsph("principal_id_type")="社团法人证书" then%>6<%End if%><%If dsph("principal_id_type")="台胞证" then%>11<%End if%><%If dsph("principal_id_type")="军官证" then%>8<%End if%><%If dsph("principal_id_type")="组织机构代码证书" then%>9<%End if%></td>
          <td style="vnd.ms-excel.numberformat:@"><%=dsph("principal_id_num")%></td>
     <td style="vnd.ms-excel.numberformat:@"><%=dsph("work_phone")%></td>
     <td bgcolor="#FFFFFF"><%=dsph("mobile")%></td>
     <td bgcolor="#FFFFFF"><%=dsph("mobileuni")%></td>
     <td style="vnd.ms-excel.numberformat:@"><%=dsph("mobileton")%></td>
     <td bgcolor="#FFFFFF"><%=dsph("email")%></td>


     <td bgcolor="#FFFFFF"><%=dsph("web_ip")%></td>

     <td bgcolor="#FFFFFF"><%=dsph("entertype_ID")%></td>
     <td bgcolor="#FFFFFF"><%=dsph("Serverplace_ID")%></td>




<%If Request("beianstatus")="备案成功" then%>
	 <td bgcolor="#FFFFFF"><%=dsph("ICP_SN")%></td>
<%End if%>
  </tr>
<%
If clng(pn)=dsph.PageCount Then
I = dsph.RecordCount - (dsph.PageCount-1) * dsph.PageSize
If N=I Then Exit For
End If
dsph.movenext
Next%>
</table>
<%dsph.close
set dsph=nothing
%>
<%end if
if ef then
Response.Redirect "e.asp?e="&ec
end if%>
