<!--#include file="conn.asp" -->
<% adm_power_page=4 '分配本页的用户访问权限 %>
<!--#include file="admin_dn.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>:::管理页面:::</title>
<link href="css.css" rel="stylesheet" type="text/css">
</head>
<% 
if Trim(Request.QueryString("w"))="del" then
 for i= 1 to request.form("del").count
 sql="delete  from shop where bh="&request("del")(i)
 conn.execute(sql)
 sql="delete  from paget_shop where bh="&request("del")(i)
 conn.execute(sql)
 sql="delete  from dns_shop where bh="&request("del")(i)
 conn.execute(sql)
 sql="delete  from mail_shop where bh="&request("del")(i)
 conn.execute(sql)
 sql="delete  from host_shop where bh="&request("del")(i)
 conn.execute(sql)
 sql="delete  from other_shop where bh="&request("del")(i)
 conn.execute(sql)
   next

%>
<script language="JavaScript" type="text/JavaScript">
alert("删除成功!");
</script>

<%
end if
%>

<body leftmargin="2" topmargin="0">
<p><font color="#990000"><strong>用户订单管理</strong></font></p>
<form name="form1" method="post" action="adm_7.asp">
  <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr> 
      <td width="16%"><strong>订单查询</strong></td>
      <td width="84%">&nbsp;</td>
    </tr>
    <tr> 
      <td>查询条件：</td>
      <td><input name="search" type="text" id="search"></td>
    </tr>
    <tr> 
      <td>查旬选项：</td>
      <td><select name="sel" id="sel">
          <option value="bh">订单号</option>
          <option value="userid" selected>用户名</option>
          <option value="ll">产品类别</option>
          <option value="jf">支付情况</option>
          <option value="dat">提交日期</option>
        </select>
        <input type="submit" name="Submit" value="确定查询"> </td>
    </tr>
    <tr> 
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</form>
<p align="center"> 　　　<a href="adm_7.asp?w=all">-显示所有订单-</a>　 <a href="adm_7.asp">-显示今天的订单-</a></p>
<form name="form2" method="post" action="adm_7.asp?w=del">
  <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#EFEFEF" bordercolorlight="" bordercolordark="ffffff"
>
    <tr> 
      <td width="8%" bgcolor="#000066"> 
        <div align="center"><font color="#FFFFFF">订单号</font></div></td>
      <td width="9%" bgcolor="#000066"> 
        <div align="center"><font color="#FFFFFF">用户</font></div></td>
      <td width="23%" bgcolor="#000066"> 
        <div align="center"><font color="#FFFFFF">产品名称</font></div></td>
      <td width="7%" bgcolor="#000066"> 
        <div align="center"><font color="#FFFFFF">金额</font></div></td>
      <td width="7%" bgcolor="#000066"> 
        <div align="center"><font color="#FFFFFF">数量</font></div></td>
      <td width="6%" bgcolor="#000066"> 
        <div align="center"><font color="#FFFFFF">开通</font></div></td>
      <td width="13%" bgcolor="#000066"> 
        <div align="center"><font color="#FFFFFF">注册时间 
          </font></div></td>
      <td width="7%" bgcolor="#000066"> 
        <div align="center"><font color="#FFFFFF">修改</font></div></td>
      <td width="7%" bgcolor="#000066"> 
        <div align="center"><font color="#FFFFFF">资料</font></div></td>
      <td width="6%" bgcolor="#000066"> 
        <div align="center"><font color="#FFFFFF">答复</font></div></td>
      <td width="7%" bgcolor="#000066"> 
        <div align="center"><font color="#FFFFFF">删除</font></div></td>
    </tr>
    <% 
 if request("search")<>"" then
  if Request("sel")="dat" then sear="#"&Trim(Request.Form("search"))&"#"
  if Request("sel")="bh" then sear=Request.Form("search")
  if Request("sel")="userid" then sear="'"&Request("search")&"'"
  if Request("sel")="ll" then sear="'"&Request.Form("search")&"'"
  if Request("sel")="jf" then sear=Request.Form("search")
 
 sql="select * from shop where "&Request("sel")&"="&sear&" order by id"
 else
  if session("sql_7")=empty then
 sql="select * from shop where dat=#"&date()&"# order by id desc"
 else
 sql=session("sql_7")
 end if
 end if
 if Trim(Request.QueryString("w"))="all" then sql="select * from shop order by id desc"
 
 session("sql_7")=sql
  pp=40
  
rs.open sql,conn,1,1 
if not rs.eof then
  count=rs.recordcount
    if count=empty then
      count=0
    end if
    if count/pp>(count\pp) then
        totalpage=(count\pp)+1
  else
   totalpage=(count\pp)
    end if
end if 
 pagecount=cint(request.querystring("topage"))                              
 if pagecount<=0 then pagecount=1
 if pagecount>totalpage then pagecount=totalpage
 
 
 
if not rs.eof then
  rs.movefirst
 rs.move (pagecount-1)*pp
 i=0
 while not rs.eof and i<pp
 i=I+1
  %>
    <tr onmouseover="this.style.backgroundColor='#FFF0F0';return true;" onmouseout="this.style.backgroundColor='';"> 
      <td> <div align="center"><font color="#FF0000"><%= rs("bh") %></font></div></td>
      <td> <div align="center"><a href="adm_10.asp?w=search&select=userid&search=<%=rs("userid")%>"><%= rs("userid") %></a></div></td>
      <td> <%= mid(rs("mc"),1,15) %></td>
      <td> <div align="center"><%= rs("je") %></div></td>
      <td> <div align="center"><%= rs("sl") %></div></td>
      <td> <div align="center"><font color="#FF0000"> 
          <% if rs("sx") then
	  Response.Write("是")
	  else
	  Response.Write("否")
	  end if%>
          </font></div></td>
      <td> <div align="center"><font color="#FF0000"> <%=rs("dat")%> </font></div></td>
      <td><div align="center"><a href="adm_7_bh.asp?bh=<%=rs("bh")%>">修改</a></div></td>
      <td><div align="center"><a href="adm_7_<%=rs("ll")%>.asp?bh=<%=rs("bh")%>" title="提交时间:<%=rs("dat")%>">详细</a></div></td>
      <td><div align="center"><a href="adm_msg.asp?id=<%= rs("bh") %>&title=<%= rs("mc") %>&ll=<%=rs("ll")%>"><img src="images/folder.gif" width="16" height="16" border="0"></a> 
        </div></td>
      <td><div align="center"> 
          <input name="del" type="checkbox" class="unnamed1" id="del" value="<%=rs("bh")%>">
        </div></td>
    </tr>
    <% rs.movenext 
  wend
  rs.close
  end if %>
    <tr> 
      <td colspan="10" bgcolor="#000066"> <font color="#FFFFFF">一共有:<%= count %> 条　一共:<%= totalpage %> 页 当前: <%= pagecount %> 页</font>　<font color="#FFFFFF"> 
        <% 
	  if totalpage>1 then
	     if totalpage-pagecount>0 then
	  %>
        <a href="adm_7.asp?topage=<%=pagecount+1%>"><font color=#FFFFFF>下一页</font></a> 
        <% 
	   
	  end if
	  if pagecount<>1 and totalpage-pagecount>0 then 
	   response.write "<font color=#FFFFFF>/</font>"
	   end if
	   
	   if pagecount<>"1" then %>
        <a href="adm_7.asp?topage=<%=pagecount-1%>"><font color=#FFFFFF>上一页</font></a>　 
        <% 
	  end if
	  end if
	  %>
        　</font></td>
      <td bgcolor="#000066"> <div align="center"> 
          <input type="submit" name="Submit2" value="删">
        </div></td>
    </tr>
  </table></form>
<p>&nbsp;</p>
<hr width="95%" size="1">
<p>注：在这里您可以查询所有用户订单的情况。 默认为显示今天的订单，在用搜索时，请输入查询的条件，如果：查询选项　为　按订单号　则　查询条件为用户订单号。其中请注意，当按，日期查询是。日期的条件为 
  如：2003-3-20 当按　支付情况　查询时，条件只能为 true 或 false;当用产品类别查询时，查询条件中必写，显示主机为&quot;host&quot; 
  显示所有域名为 &quot;dns&quot; 显示所有邮局为 &quot;mail&quot; </p>
<p><font color="#FF0000">这里删除的操作将无条件删除数据库中的记录，不管开通是否，交款是否</font></p>
</body>
</html>
