<!--#include virtual="/incs/config.asp" -->
<!--#include virtual="/incs/top.asp" -->
<%
chk_log()
''''''''''''''''''''''''''''''''
chk_newpwr 1,6,1
''''''''''''''''''''''''''''''''
dim dmttpe(4)
dmttpe(1)="普通通用网址"
dmttpe(2)="准通用词"
dmttpe(3)="普通通用词"
dmttpe(4)="白金通用词"
''''''''''''''''''''''''''''''''
querytype=SafeRequest("querytype")
if chk_int(querytype)=false then
   ErrMsg="<font color=#ff0000>对不起</font>，非法操作！..."
elseif querytype=1 then
   qunme=SafeRequest("qunme")
   perpage=SafeRequest("perpage")
   qftpusr=SafeRequest("qftpusr")
   qaddtme_f=SafeRequest("qaddtme_f")
   qaddtme_b=SafeRequest("qaddtme_b")
   qexptme_f=SafeRequest("qexptme_f")
   qexptme_b=SafeRequest("qexptme_b")
   qprd=SafeRequest("qprd")
   qyarcnt=SafeRequest("qyarcnt")
   qregtpe=SafeRequest("qregtpe")
   qregstt=SafeRequest("qregstt")
qstring=""
'####################查询-用户
if qunme<>"" then
qstring=qstring&" and d_unme='"&qunme&"'"
end if 
'####################查询-域名ftp  
if qftpusr<>"" then
qstring=qstring&" and ( d_dme like '%"&qftpusr&"%' )"
end if 
'####################查询-开始日期 下限
if qaddtme_f<>"" then
if isdate(qaddtme_f)=false then
     call errorpage(-2,"对不起，申请日期之下限输入不正确！...")
end if
	qstring=qstring&" and  d_addtme>='"&qaddtme_f&"' "
end if 
'####################查询-开始日期 上限
if qaddtme_b<>"" then
if isdate(qaddtme_b)=false then
     call errorpage(-2,"对不起，申请日期之上限输入不正确！...")
end if
	qstring=qstring&" and  d_addtme<='"&qaddtme_b&"' "
end if 
'####################查询-到期日期 下限
if qexptme_f<>"" then
if isdate(qexptme_f)=false then
     call errorpage(-2,"对不起，到期日期之下限输入不正确！...")
end if
	qstring=qstring&" and  d_exptme>='"&qexptme_f&"' "
end if 
'####################查询-到期日期 上限
if qexptme_b<>"" then
if isdate(qexptme_b)=false then
     call errorpage(-2,"对不起，到期日期之上限输入不正确！...")
end if
	qstring=qstring&" and  d_exptme<='"&qexptme_b&"' "
end if 
'####################查询-产品编号名称
if qprd<>"" then
qstring=qstring&" and ( g_nme ='"&qprd&"'  or g_prd ='"&qprd&"' )"
end if 
'####################查询-年限 
if chk_int(qyarcnt) then
qstring=qstring&" and d_yarcnt="&qyarcnt
end if 
'####################查询-类型  
if chk_int(qregtpe) then
qstring=qstring&" and d_regtpe="&qregtpe
end if 
'####################查询-状态  
if chk_int(qregstt) then
qstring=qstring&" and d_regstt="&qregstt
end if 
elseif querytype=7 then
	 qstring=qstring&" and (d_exptme-getdate()<30)"
elseif querytype=8 then
         datestring=date()
	 qstring=qstring&" and (d_addtme-'"&datestring&"')>=0 "
elseif querytype=9 then
     weekd=weekday(now())
     datestring=date()-weekd+1
	 qstring=qstring&" and (d_addtme-'"&datestring&"')>=0 "
elseif querytype=10 then
     weekd=weekday(now())
	 qstring=qstring&" and (d_exptme-getdate())>=-"&weekd&" and (d_exptme-getdate())<7-"&weekd&" "
elseif querytype=11 then
	 weekd=dateadd("m",1,now())-now()
	 weekd2=day(now())
	 qstring=qstring&" and (d_exptme-getdate())>=-"&weekd2&" and (d_exptme-getdate())<"&weekd&"-"&weekd2&" "
end if 
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
if chk_int(perpage)=false then
perpage=10
end if 
perpage=clng(perpage)
if perpage>50 and session("sysclass")<=3 then
perpage=50
end if
ThePage=0
page=0

'''''''''''''''''''''''''''''''''
ordernum=SafeRequest("ordernum")
if chk_int(ordernum)=true then
if ordernum=11 then
orderstring=" d_dme asc"
elseif ordernum=12 then
orderstring=" d_dme desc"
elseif ordernum=21 then
orderstring=" d_unme asc"
elseif ordernum=22 then
orderstring=" d_unme desc"
elseif ordernum=31 then
orderstring=" d_addtme asc"
elseif ordernum=32 then
orderstring=" d_addtme desc"
elseif ordernum=41 then
orderstring=" d_exptme asc"
elseif ordernum=42 then
orderstring=" d_exptme desc"
elseif ordernum=51 then
orderstring=" d_regstt asc,d_regtpe asc"
elseif ordernum=52 then
orderstring=" d_regstt desc,d_regtpe desc"
elseif ordernum=61 then
orderstring=" d_yarcnt asc"
elseif ordernum=62 then
orderstring=" d_yarcnt desc"
elseif ordernum=71 then
orderstring=" d_tpe asc"
elseif ordernum=72 then
orderstring=" d_tpe desc"
else
end if
else
ordernum=32
orderstring=" d_addtme desc"
end if


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

conn.open constr
rs.open query,conn,3
rcount=0
thepage=0
if rs.RecordCount<=0 then
          ErrMsg="<font color=#ff0000>对不起，没有搜索到符合条件的域名记录！..."
		
	   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(d_prd)
{
if (confirm("确认删除此通用网址吗？"))
{location.href="/master/pdtmng/dmt_mng/dmt_del.asp?did="+d_prd;
}
}
 //-->
 </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><b>通用网址列表</b><a href="index.asp" class=commonface><font color="#FF0000">（查询）</font></a> 
          </td>
          <td valign=bottom noWrap align=right 
                        width="75%"><a href="dmt_lst.asp?querytype=8" class=commonface>今日新注册</a> 
            | <a href="dmt_lst.asp?querytype=9" class=commonface>本周新注册</a> | <a href="dmt_lst.asp?querytype=10" class=commonface>本周到期</a> 
            | <a href="dmt_lst.asp?querytype=11" 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=dmt_lst.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=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 class=datalist align="center"  width="100%" >
        <tbody> 
        <form action="dmt_lst.asp" method=post>
          <tr > 
            <th class=datalistheader  width="8%" align=center><b>序号</b></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

			%>
            <th class=datalistheader  width="21%" align=center><a class=commonface href="javascript:toorder(<%=odr1%>);"><b>通用网址</b></a></th>
            <th class=datalistheader  width="10%" align=center><a class=commonface href="javascript:toorder(<%=odr7%>);">种类</a></th>
            <th class=datalistheader  width="5%" align=center><a class=commonface href="javascript:toorder(<%=odr6%>);">年限</a></th>
            <th class=datalistheader  width="10%" align=center ><a class=commonface href="javascript:toorder(<%=odr2%>);"><b>用户名</b></a></th>
            <th class=datalistheader  width="9%"  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="7%" align=center><a class=commonface href="javascript:toorder(<%=odr5%>);"><b>业务类</b></a></th>
            <th class=datalistheader  width="5%"align=center ><b>状态</b></th>
            <th class=datalistheader  align=center> <b>操作</b></th>
          </tr>
          <%
		  i=1
	Do While Not rs.eof 
if i mod 2=1 then
classstl="datalistgrida"
else
classstl="datalistgridb"
end if
	%>
          <tr > 
            <td class=<%=classstl%>  align=center><%=rs("d_id")%></td>
            <td class=<%=classstl%>  align=center><a href="javascript:showurl('dmt_idx.asp?dnme=<%=rs("d_dme")%>');" class=commonface><b><%=rs("d_dme")%></b></a></td>
            <td class=<%=classstl%>  align=center><%=dmttpe(rs("d_tpe"))%></td>
            <td class=<%=classstl%>  align=center><%=mynum(rs("d_yarcnt"))%></td>
            <td class=<%=classstl%>  align=center> 
              <% if session("sysclass")>=4 then %>
              <a href="javascript:showurl('/master/memmng/mem_dtl.asp?unme=<%=rs("d_unme")%>');" class=commonface><%=rs("d_unme")%></a>&nbsp;<img src="/icons/dollar.gif" border=0 style="cursor:hand;"  onclick="javascript:showurl('/master/fncmng/fnc_lst.asp?t_usr=<%=rs("d_unme")%>');"  title="查看用户所有财务记录..." width="7" height="13"> 
              <%else %>
              <%=rs("d_unme")%> 
              <%end if %>
            </td>
            <td class=<%=classstl%>  align=center> 
              <%
		Response.Write left(replace(rs("d_addtme")," ","   "),10)
		%>
            </td>
            <td class=<%=classstl%>  align=center> 
              <%
		If rs("d_exptme")<> "" Then
			Response.Write left(replace(rs("d_exptme")," ","   "),10)
		End If
		%>
            </td>
            <td class=<%=classstl%> align=center> 
              <%
								if rs("d_regtpe")=3 then
								Response.Write "转移"
								elseif rs("d_regtpe")=2 then
								Response.Write "转入"
								elseif rs("d_regtpe")=5 then
								Response.Write "赠送"
								
								else
									Response.Write "注册"
								End If
								%>
            </td>
            <td class=<%=classstl%>  align=center><%=showstatus(rs("d_regstt"),rs("d_regtpe"),rs("d_exptme"))%></td>
            <td class=<%=classstl%>>&nbsp;<img src="/icons/fnc.gif" onclick="javascript:showurl('/master/fncmng/fnc_lst.asp?unme=<%=trim(rs("d_unme"))%>&grd=<%=rs("d_prd")%>&gnme=<%=rs("d_dme")%>&gid=<%=rs("d_dme")%>');" style="cursor:hand;" title="财务操作"> 
              <img src="/icons/email.gif" onclick="javascript:showurl('/master/sysmng/snd_mng/snd_frm.asp?gnme=<%=rs("d_dme")%>&grd=<%=rs("d_prd")%>&gid=<%=rs("d_dme")%>');" style="cursor:hand;" title="邮件通知"> 
              <%
              response.write "<a href=""javascript:showurl('/master/pdtmng/dmt_mng/dmt_idx.asp?dnme="&rs("d_dme")&"');"" class=commonface><u>管理</u></a>&nbsp;"
			  if rs("d_regstt")=0   then
			response.write "<a href=""javascript:showurl('/master/pdtbuy/dme_buy/dmt_pay.asp?dnme="&rs("d_dme")&"');"" class=commonface><u>购买</u></a>&nbsp;"
			response.write "<a href=""javascript:deleteit('"&rs("d_dme")&"');"" class=commonface><u>删除</u></a>&nbsp;"
			end if 
			if rs("d_regstt")=1 and (rs("d_regtpe")=1 or rs("d_regtpe")=3) then 
			response.write "<a href=""javascript:showurl('/master/pdtmng/dmt_mng/dmt_rnw.asp?dnme="&rs("d_dme")&"');"" class=commonface><u>续费</u></a>&nbsp;"
			end if 
			%>
            </td>
          </tr>
          <%
  rs.movenext
i=i+1
if i>perpage then
exit do
end if

  loop 
  	rs.close
	conn.close
  %>
        </form>
        </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=dmt_lst.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=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 regstt=1 or regstt=2 then
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
end if
regtpe2=regtpe
 if regtpe=2 then
regtpe2=5
elseif regtpe=3 then
regtpe2=1
end if

regtpe_str=right("000"&cstr(regtpe),2)
regtpe_str2=right("000"&cstr(regtpe2),2)
regstt_str=right("000"&cstr(regstt),2)
regtitle=showtitle(regtpe_str,regstt_str)

gifstr=regtpe_str2&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  "02"
tpestr="购买方式为转入DNS"
case  "03"
tpestr="转移注册商（入）"
case  "04"
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>
  </tbody> 
</table>
<!--#include virtual="/incs/bottom.asp"-->

