<!--#include virtual="/incs/config.asp" -->
<!--#include virtual="/incs/top.asp" -->
<link rel="stylesheet" type="text/css" media="all" href="/incs/calendar.css" title="win2k-cold-1"  >
<script type="text/javascript" src="/incs/calendar.js"></script>
<script type="text/javascript" src="/incs/calendar-zh.js"></script>
<script type="text/javascript" src="/incs/calendar-setup.js"></script>
<%
chk_log()
chk_newpwr 4,0,5
''''''''''''''''''''''''''''''''
 conn.open constr
querytype=SafeRequest("querytype")
if chk_int(querytype)=false then
   ErrMsg="<font color=#ff0000>对不起</font>，非法操作！..."
elseif querytype=1 then
   qunme=SafeRequest("qunme")
   perpage=SafeRequest("perpage")
   qsvrip=SafeRequest("qsvrip")
   qftpusr=SafeRequest("qftpusr")
   qaddtme_f=SafeRequest("qaddtme_f")
   qaddtme_b=SafeRequest("qaddtme_b")
   qprd=SafeRequest("qprd") '单位名
   qregstt=SafeRequest("qregstt")
qstring=""
'####################查询-用户
if qunme<>"" then
qstring=qstring&" and h_unme='"&qunme&"'"
end if 
'####################查询-IP  
if qsvrip<>"" then
qstring=qstring&" and s_ip like'%"&qsvrip&"%' "
end if 
'####################查询-域名ftp  
if qftpusr<>"" then
qstring=qstring&" and ( h_ftpusr like '%"&qftpusr&"%' )"
end if 
'####################查询-开始日期 下限
if qaddtme_f<>"" then
if isdate(qaddtme_f)=false then
     call errorpage(-2,"对不起，提交日期之下限输入不正确！...")
end if
	qstring=qstring&" and  addtme>='"&qaddtme_f&"' "
end if 
'####################查询-开始日期 上限
if qaddtme_b<>"" then
if isdate(qaddtme_b)=false then
     call errorpage(-2,"对不起，提交日期之上限输入不正确！...")
end if
	qstring=qstring&" and  addtme<='"&qaddtme_b&"' "
end if 
'####################查询-单位名
if qprd<>"" then
qstring=qstring&" and ( c_nme  like '%"&qprd&"%' )"
end if 
'####################查询-状态  
if chk_int(qregstt) then
qstring=qstring&" and h_icpstt="&qregstt
end if 
elseif querytype=8 then
         datestring=date()
	 qstring=qstring&" and (addtme-'"&datestring&"')>=0 "
elseif querytype=9 then
     weekd=weekday(now())
     datestring=date()-weekd+1
	 qstring=qstring&" and (addtme-'"&datestring&"')>=0 "
elseif querytype=10 then
     weekd=day(now())
     datestring=date()-weekd+1
	 qstring=qstring&" and (addtme-'"&datestring&"')>=0 "
end if 
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

if chk_int(perpage)=false then
perpage=10
end if 
perpage=clng(perpage)
if perpage>50 and session("sysclass")<=4 then
perpage=50
end if
ThePage=0
page=0
rcount=0
thepage=0
'''''''''''''''''''''''''''''''''
ordernum=SafeRequest("ordernum")
if chk_int(ordernum)=true then
if ordernum=11 then
orderstring=" h_ftpusr asc"
elseif ordernum=12 then
orderstring=" h_ftpusr desc"
elseif ordernum=21 then
orderstring=" s_nme asc"
elseif ordernum=22 then
orderstring=" s_nme desc"
elseif ordernum=31 then
orderstring=" c_nme asc"
elseif ordernum=32 then
orderstring=" c_nme desc"
elseif ordernum=41 then
orderstring=" addtme asc"
elseif ordernum=42 then
orderstring=" addtme desc"
elseif ordernum=51 then
orderstring=" s_url asc"
elseif ordernum=52 then
orderstring=" s_url desc"
elseif ordernum=61 then
orderstring=" h_icpstt asc"
elseif ordernum=62 then
orderstring=" h_icpstt desc"
else
end if
else
ordernum=42
orderstring=" addtme desc"
end if
'''''''''''''''''''''''''''''''''''''''''

if session("sysclass")>=5 then
query="select * from v_hsticp   where 1=1 "&qstring&"  order by "&orderstring
elseif session("sysclass")>=4 then
query="select * from v_hsticp  where ((("&session("sysarestr")&" or u_myare=0) and u_rotnme='') or u_rotnme='"&session("usrname")&"') "&qstring&"  order by "&orderstring
else
query="select * from v_hsticp  where h_unme='"&session("usrname")&"' "&qstring&"  order by "&orderstring
end if


rs.open query,conn,3
if rs.RecordCount<=0 then
          ErrMsg="<font color=#ff0000>对不起</font>，没有搜索到符合条件的记录！..."
	
	   else
	      rcount=rs.recordcount
	      rs.pagesize=perpage
		  ThePage=rs.pagecount
		  if Chk_Int(SafeRequest("page"))=false then
		  page=1
		  else
		   page=cint(SafeRequest("page"))
		    if page<=0  then
		       page=1
		    elseif page>ThePage then
		       page=ThePage
		    end if	  
		  end if
		    rs.absolutepage=page
       end if   

%>
<script language="javascript">
<!--

function tofirst()
{searchform.page.value=1;
searchform.submit();
 }
  function toprev()
{searchform.page.value-=1;
searchform.submit();
 }
  function tonext()
{
searchform.page.value=<%=page%>-1+2;
searchform.submit();
 }
  function tolast()
{searchform.page.value=<%=ThePage%>;
searchform.submit();
 }
 function toorder(ordn)
{searchform.ordernum.value=ordn;
searchform.page.value=1;
searchform.submit();
 }
function deleteit(proid)
{
if (confirm("确认删除此记录吗？"))
{location.href="/master/pdtmng/hst_mng/hst_mng.asp?module=hst_icpdel&hostname="+proid;
}
}
function deleteicp(proid)
{
if (confirm("确认删除备案信息导出文件吗？"))
{location.href="/master/pdtmng/hst_mng/hst_icp_getdata.asp?module=delicpdata"
}
}
 //-->
 </script>
<table cellspacing=2 cellpadding=0 width="100%" border=0>
  <tbody> 
  <tr> 
    <td  colspan=2 valign="middle"> 
      <table class=line cellspacing=0 cellpadding=0 width="100%" 
                  border=0 align="center">
        <tbody> 
        <tr> 
          <td valign=bottom width="25%" height=20><font color="#000000" class=ddropshadow><b><span class=enbold><strong>网站备案管理<font color="#000000"><a href="index_icp.asp"  class=commonface ><font color="#FF0000">（查询）</font></a></font></strong></span></b></font></td>
          <td valign=bottom noWrap align=right 
                        width="75%"><a href="hst_icp.asp?querytype=8" class=commonface >今天新备案</a> 
            <font color="#000000">|</font> <a href="hst_icp.asp?querytype=9" class=commonface >本周新备案</a> 
            <font color="#000000">|</font> <a href="hst_icp.asp?querytype=10" class=commonface >本月新备案</a></td>
        </tr>
        <tr> 
          <td align=middle width="100%" colspan=2 height=5></td>
        </tr>
        <tr> 
          <td align=middle width="100%" colspan=2 height=2 class=menuline></td>
        </tr>
        </tbody> 
      </table>
      <br>
    </td>
  </tr>
  <tr> 
    <td  colspan=2 valign="middle" height="28"> 
      <table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tbody> 
        <form action=hst_icp.asp method=post name=searchform2>
          <tr> 
            <td height=20 width="119">&nbsp;共计 <b> <%=rcount%> </b>条记录 </td>
            <td height=20> 
              <div align="center"> 
                <input type=hidden name=qunme value="<%=qunme%>">
                <input type=hidden name=qsvrip value="<%=qsvrip%>">
                <input type=hidden name=qftpusr value="<%=qftpusr%>">
                <input type=hidden name=qaddtme_f value="<%=qaddtme_f%>">
                <input type=hidden name=qaddtme_b value="<%=qaddtme_b%>">
                <input type=hidden name=qexptme_f value="<%=qexptme_f%>">
                <input type=hidden name=qexptme_b value="<%=qexptme_b%>">
                <input type=hidden name=qprd value="<%=qprd%>">
                <input type=hidden name=qregtpe value="<%=qregtpe%>">
                <input type=hidden name=qregstt value="<%=qregstt%>">
                <input type=hidden name=qyarcnt value="<%=qyarcnt%>">
                <input type=hidden name=querytype value="<%=querytype%>">
                <input type=hidden name=perpage value="<%=perpage%>">
                <input type=hidden name=ordernum value="<%=ordernum%>">
                <%=page_turn%></div>
            </td>
            <td height=20 width="120"> 
              <div align="right">转第 
                <select name="page" onChange="javascript:document.searchform2.submit();">
                  <option selected value=<%=page%>><%=page%></option>
                  <%
				   for i=1 to thepage
				   response.write "<option value="&i&">"&i&"</option>"
				   next
				   %>
                </select>
                页</div>
            </td>
          </tr>
        </form>
        </tbody> 
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" >
        <tr> 
          <td height=8></td>
        </tr>
      </table>
      <table border=0 cellpadding=0 
                        cellspacing=0 bordercolordark="#FFFFFF" align="center" width="100%" class=datalist>
        <tbody> 
        <tr > 
          <th  class=datalistheader  width="8%" align=center> 
            <div align="center"><b>序号</b></div>
          </th>
          <%
			if ordernum=11 then
			odr1=12
			else
			odr1=11
			end if
			if ordernum=21 then
			odr2=22
			else
			odr2=21
			end if
			if ordernum=31 then
			odr3=32
			else
			odr3=31
			end if
			if ordernum=41 then
			odr4=42
			else
			odr4=41
			end if
			if ordernum=51 then
			odr5=52
			else
			odr5=51
			end if
			if ordernum=61 then
			odr6=62
			else
			odr6=61
			end if
			if ordernum=71 then
			odr7=72
			else
			odr7=71
			end if
			if ordernum=81 then
			odr8=82
			else
			odr8=81
			end if
			if ordernum=91 then
			odr9=92
			else
			odr9=91
			end if
			%>
          <th  class=datalistheader  width="11%" align=center><a class=commonface  href="javascript:toorder(<%=odr1%>);"><b>主机名</b></a></th>
          <th  class=datalistheader  width="15%" align=center ><a  class=commonface href="javascript:toorder(<%=odr2%>);"><b>网站名称</b></a></th>
          <th  class=datalistheader  width="18%" align=center ><a class=commonface  href="javascript:toorder(<%=odr3%>);"><b>主办单位名</b></a></th>
          <th  class=datalistheader  width="9%"  align=center><a  class=commonface href="javascript:toorder(<%=odr4%>);"><b>备案日期</b></a></th>
          <th class=datalistheader   width="24%"align=center ><a  class=commonface href="javascript:toorder(<%=odr5%>);"><b>网站地址</b></a></th>
          <th class=datalistheader   width="7%"align=center ><a  class=commonface href="javascript:toorder(<%=odr6%>);"><b>状态</b></a></th>
          <th class=datalistheader  align=center><b>操作</b></th>
        </tr>
        <%
		  i=1
	Do While Not rs.eof 

if i mod 2=1 then
classstl="datalistgridb"
else
classstl="datalistgrida"
end if
	%>
        <tr > 
          <td  align=center class=<%=classstl%> height=20 ><%=rs("id")%></td>
          <td  align=center class=<%=classstl%> ><a href="javascript:showurl('/master/pdtmng/hst_mng/hst_idx.asp?hnme=<%=rs("h_ftpusr")%>');" class=commonface><u><b><%=rs("h_ftpusr")%></b></u></a></td>
          <td  align=center  class=<%=classstl%> ><font color=#000000><%=rs("s_nme")%></font></td>
          <td  align=center  class=<%=classstl%> ><font color=#000000><%=rs("c_nme")%></font></td>
          <td  align=center class=<%=classstl%> > 
            <% 
			if rs("addtme")<>""  and isnull(rs("addtme"))=false then
			Response.Write left(replace(rs("addtme")," ","   "),10)
			end if
			
 %>
            &nbsp; </td>
          <td  class=<%=classstl%> ><font color=#000000><%=rs("s_url")%></font></td>
          <td  align=center class=<%=classstl%> > 
            <%
		  if rs("h_icpstt")=1 then
		  response.write "已审核"
		  else
		  response.write "未审核"
		  end if
		  %>
          </td>
          <td  align=center class=<%=classstl%> ><a href="javascript:showurl('/control/hst_mng/hst_icp.asp?hnme=<%=rs("h_ftpusr")%>');" class=commonface><u>管理</u></a> <%response.write "<a href=""javascript:deleteit('"&rs("h_ftpusr")&"');"" class=commonface><u>删除</u></a>"%></td>
        </tr>
        <%
  rs.movenext
i=i+1
if i>perpage then
exit do
end if

  loop 
  	rs.close
	conn.close
  %>
        </tbody> 
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height=8></td>
        </tr>
      </table>
      <table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tbody> 
        <form action=hst_icp.asp method=post name=searchform>
          <tr> 
            <td height=20 width="120">&nbsp;共计 <b> <%=rcount%> </b>条记录 </td>
            <td height=20> 
              <div align="center"> 
                <input type=hidden name=qunme value="<%=qunme%>">
                <input type=hidden name=qsvrip value="<%=qsvrip%>">
                <input type=hidden name=qftpusr value="<%=qftpusr%>">
                <input type=hidden name=qaddtme_f value="<%=qaddtme_f%>">
                <input type=hidden name=qaddtme_b value="<%=qaddtme_b%>">
                <input type=hidden name=qexptme_f value="<%=qexptme_f%>">
                <input type=hidden name=qexptme_b value="<%=qexptme_b%>">
                <input type=hidden name=qprd value="<%=qprd%>">
                <input type=hidden name=qregtpe value="<%=qregtpe%>">
                <input type=hidden name=qregstt value="<%=qregstt%>">
                <input type=hidden name=qyarcnt value="<%=qyarcnt%>">
                <input type=hidden name=querytype value="<%=querytype%>">
                <input type=hidden name=perpage value="<%=perpage%>">
                <input type=hidden name=ordernum value="<%=ordernum%>">
                <%=page_turn%> </div>
            </td>
            <td height=20 width="120"> 
              <div align="right">转第 
                <select class=normalform name="page" onChange="javascript:document.searchform.submit();">
                  <option selected value=<%=page%>><%=page%></option>
                  <%
				   for i=1 to thepage
				   response.write "<option value="&i&">"&i&"</option>"
				   next
				   %>
                </select>
                页</div>
            </td>
          </tr>
        </form>
        </tbody> 
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height=8></td>
        </tr>
      </table>
      <%
Function showstatus(regstt,regtpe,exptme)
if cdate(exptme)-date()<0 then
regstt=20
elseif cdate(exptme)-date()<7 and regtpe<>0 then
regstt=19
elseif cdate(exptme)-date()<30 and regtpe<>0 then
regstt=18
end if
regtpe_str=right("000"&cstr(regtpe),2)
regstt_str=right("000"&cstr(regstt),2)
regtitle=showtitle(regtpe_str,regstt_str)
gifstr=regtpe_str&regstt_str&".gif"
showstatus="<img src=/icons/"&gifstr&" title="&regtitle&" style='cursor:hand;'>"   

End Function
function showtitle(regtpe_str,regstt_str)
tpestr=""
sttstr=""
select case  regtpe_str
case  "00"
tpestr="购买方式为试用"
case  "01"
tpestr="购买方式为正式购买"
case "05"
tpestr="购买方式为赠送"
case else
tpestr="购买方式为未知"
end select
select case  regstt_str
case  "00"
sttstr="运行状态为未开通"
case  "01"
sttstr="运行状态为运行中"
case  "02"
sttstr="运行状态为暂停中"
case  "03"
sttstr="运行状态为处理中"
case  "04"
sttstr="运行状态为已完全删除"
case  "05"
sttstr="运行状态为禁用中"
case  "06"
sttstr="运行状态为待开通"
case  "17"
sttstr="运行状态为WEB被删除/FTP保留"
case  "18"
sttstr="运行状态为30天后过期"
case  "19"
sttstr="运行状态为7天后过期"
case  "20"
sttstr="运行状态为已过期"
case  else
sttstr="运行状态为未知"
end select
showtitle=tpestr&","&sttstr
end function
%>
      <br>
    </td>
  </tr>
<tr>
 <td align=center>
      <table width="80%" border="0" cellspacing="0" cellpadding="10" align="center" class=datalist>
        <tr> 
          <td class=datagroup> 
            <table border=0 cellpadding=0 
                        cellspacing=0 class=datalist width="98%" >
              <tbody> 
			  <form action=hst_icp_getdata.asp method=post>
              <tr  > 
                <td height="22">导出数据</td>
                <td>：</td>
                <td width="34%"><b><font color="#FF0000">从</font></b> 
                    <input type="text" name="qaddtme_f"   value="" id="qaddtme_f2" size="12" maxlength="10"><input type="button" value="..."
onclick="return showCalendar('qaddtme_f2', 'y-m-d');"  style="border:#000000 1px double;background:#f6f6f6" >
                    <br>
                    <b><font color="#FF0000">到</font></b> 
                    <input type="text" name="qaddtme_b"   value="" id="qaddtme_b2" size="12" maxlength="10"><input type="button" value="..."
onclick="return showCalendar('qaddtme_b2', 'y-m-d');"  style="border:#000000 1px double;background:#f6f6f6" ></td>
                <td>
                  <input type="submit" name="Submit3" value="导 出" class=btxx onclick="javascript:return confirmit();" >
                  <input type="button" name="Submit22" value="删 除" class=btxx onclick="javascript:deleteicp();"  >
                  （删除数据文件）
                  <input type="hidden" name="module" value="geticpdata">
                </td>
              </tr>
			  </form>
              </tbody> 
            </table>
          </td>
        </tr>
        <tr> 
          <td  align="center"> <br>
          </td>
        </tr> 
      </table>
        </td></tr>
  </tbody> 
</table>
<!--#include virtual="/incs/bottom.asp"-->
