www.gusucode.com > 运动用品商城网站系统源代码程序 > feyok/ad_zong.asp
<!--#include file="conn.asp"--> <!--#include file="ad_chk.asp"--> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <link href=inc/css.css rel=STYLESHEET type=text/css> <body topmargin="5" leftmargin="5" rightmargin="5" bottommargin="5"> <% if Request.Cookies("venshop")("admin_class")<>0 and Request.Cookies("venshop")("admin_class")<>2 then response.write "你没有这个权限!" response.end end if %> <table border="0" cellpadding="2" cellspacing="0" id="table1"><form method="POST" action="ad_zong.asp"> <tr><td rowspan="2"><font color="#FF0000"><b>查询统计:</b></font></td> <td> 订单号:</td> <td>用户名:</td> <td> 开始日期:</td> <td> 结束日期:</td> <td>订单状态:</td><td rowspan="2"><input type="submit" value="确定" name="B1"></td></tr> <tr><td> <input type="text" name="sub_number" size="12" class=input value="<%=request("sub_number")%>"> </td> <td><input type="text" name="user_name" size="12" class=input value="<%=request("user_name")%>"></td> <td> <input type="text" name="dataa" size="12" class=input value="<%if request("dataa")<>"" then%><%=request("dataa")%><%else%><%=year(now())%>-<%=month(now())-1%>-<%=day(now())%><%end if%>"></td> <td> <input type="text" name="datab" size="12" class=input value="<%if request("datab")<>"" then%><%=request("datab")%><%else%><%=year(now())%>-<%=month(now())%>-<%=day(now())+1%><%end if%>"></td> <td><select size="1" name="zt"> <option value="">全部订单</option> <option value="1">未处理订单</option> <option value="-1">等待客户付款</option> <option value="2">已付款订单</option> <option value="3">已收款订单</option> <option value="4">已发货订单</option> <option value="5">已收货订单</option> <option value="0">无效订单</option> </select></td></tr></form></table> <table border="0" cellpadding="5" cellspacing="0" class="st"> <tr><td height="20" class="sa"> 销售统计:</td></tr><tr><td height="20" bgcolor="#FFFFFF"> <table border="0" cellpadding="5" cellspacing="0" width="100%" > <tr><td class="s0">产品名称</td> <td class="s0">商品单价</td> <td class="s0">销售数量</td> <td class="s0">价格合计</td></tr> <% zt=request("zt") sub_number=request("sub_number") user_name=request("user_name") dataa=request("dataa") datab=request("datab") if dataa="" then dataa="2000-1-1" if datab="" then datab="2050-12-12" if zt<>"" then sera=" and sub_zt=" & zt & "" if user_name<>"" then serb=" and sub_name like '%" & user_name & "%'" if sub_number<>"" then serc=" and sub_number like '%" & sub_number & "%'" if dataa<>"" then serd=" and sub_date>=#" & dataa & "#" if datab<>"" then sere=" and sub_date<=#" & datab & "#" set rso=server.createobject("adodb.recordset") sql="select * from venshop_sub where 1=1 " &sera&serb&serc&serd&sere&" order by sub_id DESC" rso.open sql,conn,1,1 do while not rso.eof set rs=server.createobject("adodb.recordset") sql="select * from venshop_basket where sub_number='"&rso("sub_number")&"' order by basket_id DESC" rs.open sql,conn,1,1 do while not rs.eof hw_id=trim(rs("hw_id")) hw_price=trim(rs("hw_price")) hw_count=rs("basket_count") hw_name=replace(rs("hw_name"),"/","") if trim(lbb)="" then lbb=hw_id lbbprice=hw_price lbbcount=hw_count lbbname=hw_name else lbb_check=0 comid=split(lbb,"/") for i=0 to ubound(comid) if hw_id=trim(comid(i)) then comcount=split(lbbcount,"/") for ii=0 to int(ubound(comcount)) if ii=0 then if ii=i then lbbcountb=int(comcount(ii))+int(hw_count) else lbbcountb=int(comcount(ii)) end if else if ii=i then lbbcountb=lbbcountb&"/"&trim(int(comcount(ii))+int(hw_count)) else lbbcountb=lbbcountb&"/"&int(comcount(ii)) end if end if next lbbcount=lbbcountb lbb_check=1 end if next if lbb_check<>1 then lbb=lbb&"/"&hw_id lbbprice=lbbprice&"/"&hw_price lbbcount=lbbcount&"/"&hw_count lbbname=lbbname&"/"&hw_name end if end if rs.movenext loop rs.close set rs=nothing rso.movenext loop rso.close set rso=nothing comid=split(lbb,"/") comprice=split(lbbprice,"/") comcount=split(lbbcount,"/") comname=split(lbbname,"/") for i=0 to ubound(comid) %> <tr> <td class="s<%=(i+1) mod 2%>"><a href=../views.asp?hw_id=<%=comid(i)%> target=_blank><%=comname(i)%></a></td> <td class="s<%=(i+1) mod 2%>"><%=fuhao%> <%=comprice(i)%> <%=danwei%></td> <td class="s<%=(i+1) mod 2%>"><%=comcount(i)%></td> <td class="s<%=(i+1) mod 2%>"><%=fuhao%> <%=trim(comcount(i))*trim(comprice(i))%> <%=danwei%></td> </tr> <%next%></table> </td></tr></table><!--#include file="ad_bottom.asp"-->