<%@ Language=VBScript %>
<!--#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") ="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
	dsph.PageSize = 25
	dsph.Open Sql,conn,1,3
if dsph.Eof then
	ef=True
	ec="此类虚拟主机不存在！"
end if
end if

if not ef then
%>
<!--#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 align="left"><table height="59"  border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="7" background="img/midtop.gif">&nbsp;</td>
          <td width="90" align="center" valign="middle" background="img/r3.jpg" id="tableTop1" style="Cursor:hand"><a href="admicp.asp"><font color="#FFFFFF"><strong>备案管理</strong></font></a><a href="admsql.asp"><font color="#FFFFFF"></font></a></td>
          <td width="5" background="img/midtop2.gif">&nbsp;</td>
        </tr>
      </table></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">
	 <table width="98%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>
	<br>
<%
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
%>
<%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%>
		<form name="form1" method="post" action="admicplist4-sub.asp">
        <table width="100%" border="0" cellspacing="1" cellpadding="2" align="center" bgcolor="#333333">
          <tr bgcolor="#C1BFBF" align="center">
            <td height="21">主办单位名称</td>
            <td>域　名</td>
            <td height="21">用户名<br>
              FTP名</td>
            <td>IP 地址</td>
            <td>开通日期</td>
            <td>状态</td>
            <td>操作</td>
            <td>备案</td>
            <td>备案状态</td>
          </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><%=replace(replace(dsph("hostname"),":80:",""),",","<br>")%></td>
            <td><a href="searchuser.asp?username=<%=dsph("username")%>"><font color="#000000"><%=dsph("username")%></font></a><br>
                <%=dsph("ftpname")%></td>
            <td><%
	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%></td>
            <td><%=formatdatetime(dsph("starttime"),1)%></td>
            <td><%if dsph("endtime")>NOW then%>
                <%if dsph("istest")="y" then%>
                <font color="#FF0000">试用</font>
                <%else%>
                <%=dsph("status")%>
                <%end if%>
                <%else%>
                <font color="#FF0000">过期</font>
                <%if dsph("status")="暂停" then%>
                <br>
                <font color="#FF0000">暂停</font>
                <%end if%>
                <%end if%></td>
            <td bgcolor="#FFFFFF"><a href="handhost1.asp?id=<%=dsph("id")%>"><font color="#000000">管理</font></a></td>
            <td bgcolor="#FFFFFF"><a href="beian.asp?id=<%=dsph("id")%>">
                    <FONT color=black>修改</FONT>
            </FONT></a></td>
            <td bgcolor="#FFFFFF">
			<input name="beianid" type="hidden" value="<%=dsph("id")%>" >
              <select name="beianstatus<%=dsph("id")%>">
                <option value="管理员录入数据" <%if dsph("beianstatus")="管理员录入数据" then%>selected<%end if%>>管理员录入数据</option>
                <option value="管理员录入数据" <%if dsph("beianstatus")="管理员录入数据" then%>selected<%end if%>>用户已录入数据</option>
                <option value="管理员已审核" <%if dsph("beianstatus")="管理员已审核" then%>selected<%end if%>>管理员已审核</option>
                <option value="用户需补充数据" <%if dsph("beianstatus")="用户需补充数据" then%>selected<%end if%>>用户需补充数据</option>
                <option value="已提交工信部" <%if dsph("beianstatus")="已提交工信部" then%>selected<%end if%>>已提交工信部</option>
                <option value="备案审核未通过" <%if dsph("beianstatus")="备案审核未通过" then%>selected<%end if%>>备案审核未通过</option>
                <option value="备案成功" <%if dsph("beianstatus")="备案成功" then%>selected<%end if%>>备案成功</option>
              </select>
            <br>
            备案　编号：
              <INPUT size=20 value="<%=dsph("ICP_SN")%>" name=ICP_SN<%=dsph("id")%>>
              <br>
              备案用户名：
              <INPUT size=20 value="<%=dsph("ICP_logname")%>" name=ICP_logname<%=dsph("id")%>>
              <br>
              备案　密码：
            <INPUT size=20 value="<%=dsph("ICP_logpass")%>" name=ICP_logpass<%=dsph("id")%>></td>
          </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>
        <input type="submit" name="Submit" value="提交">
		</form>
        <%dsph.close
set dsph=nothing
%>
	
	</td>
  </tr>
</table> 

      </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%>
