⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 statdd.asp

📁 BJXSHOP购物管理系统是一个功能完善、展示信息丰富的电子商店销售平台;针对企业与个人的网上销售系统;开放式远程商店管理;完善的订单管理、销售统计、结算系统;强力搜索引擎支持;提供网上多种在线支付方
💻 ASP
字号:
<!--#include file="connection.asp"-->
<!--#include file="Vchar.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆!');window.location.reload('login.asp')</script>"
response.End
else
if session("flag")=2 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限!</b></font></div>"
response.End
end if
end if
%>
<%dim zhuangtai,tianshu
if int(request.QueryString("tianshu"))=0 then tianshu=int(request("tianshu")) else tianshu=int(request.QueryString("tianshu")) end if
if request.QueryString("zhuangtai")="" then zhuangtai=request("zhuangtai") else zhuangtai=request.QueryString("zhuangtai") end if
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="admin.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
	background-color: #f1f1f1;
}
-->
</style></head>

<body>
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#5d5d5d">
  <tr> 
    <td height="18" background="images/admin_bg.gif"><div align="center"><font color="#FFFFFF"><strong>订 
        单 统 计</strong></font></div></td>
  </tr>
  <tr>
    <td height="121" valign="top" bgcolor="#dfdfdf"><table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr><form name="form1" method="post" action="statdd.asp">
          <td height="36"><div align="center">
              
                显视最新 
                <input name="tianshu" type="text" id="tianshu3" value="<%=tianshu%>" size="3" maxlength="3">
                天内 
                <select name="zhuangtai">
                  <option value=0  selected>-= 所有状态 =-</option>
                  <option value=1 <%if int(zhuangtai)=1 then response.write "selected"%>>未作任何处理</option>
                  <option value=2 <%if int(zhuangtai)=2 then response.write "selected"%>>用户已经划出款</option>
                  <option value=3 <%if int(zhuangtai)=3 then response.write "selected"%>>服务商已收到款</option>
                  <option value=4 <%if int(zhuangtai)=4 then response.write "selected"%>>服务商已经发货</option>
                  <option value=5 <%if int(zhuangtai)=5 then response.write "selected"%>>用户已经收到货</option>
				  <option value=7 <%if int(zhuangtai)=7 then response.write "selected"%>>已被取消的订单</option>
                </select>
                的订单销售统计 
                <input type="submit" name="Submit" value="查 讯">
             
            </div></td> </form>
        </tr>
      </table>
	    <%'开始分页
				Const MaxPerPage=20
   				dim totalPut   
   				dim CurrentPage
   				dim TotalPages
   				dim j
   				dim sql
    				if Not isempty(request("page")) then
      				currentPage=Cint(request("page"))
   				else
      				currentPage=1
   				end if 
	  set rs=server.CreateObject("adodb.recordset")
	  if zhuangtai="0" then
	  rs.open "select distinct(dingdan),zhuangtai,actiondate,userid from shop_action where zhuangtai<6 and actiondate between #"&date-tianshu&"# and #"&date()+1&"# order by actiondate desc",conn,1,1
	  else
	  rs.open "select distinct(dingdan),zhuangtai,actiondate,userid from shop_action where zhuangtai="&int(zhuangtai)&" and actiondate between #"&date-tianshu&"# and #"&date()+1&"# order by actiondate desc",conn,1,1
	   end if
		  
				if err.number<>0 then
				response.write "数据库中无数据"
				end if
				
  				if rs.eof And rs.bof then
       				Response.Write "<p align='center' class='contents'> 目前还没有订单!</p>"
   				else
	  				totalPut=rs.recordcount

      				if currentpage<1 then
          				currentpage=1
      				end if

      				if (currentpage-1)*MaxPerPage>totalput then
	   					if (totalPut mod MaxPerPage)=0 then
	     					currentpage= totalPut \ MaxPerPage
	   					else
	      					currentpage= totalPut \ MaxPerPage + 1
	   					end if
      				end if

       				if currentPage=1 then
            			showContent
            			showpage totalput,MaxPerPage,"statdd.asp"
       				else
          				if (currentPage-1)*MaxPerPage<totalPut then
            				rs.move  (currentPage-1)*MaxPerPage
            				dim bookmark
            				bookmark=rs.bookmark
            				showContent
             				showpage totalput,MaxPerPage,"statdd.asp"
        				else
	        				currentPage=1
           					showContent
           					showpage totalput,MaxPerPage,"statdd.asp"
	      				end if
	   				end if
   				   				end if

   				sub showContent
       			dim i
	   			i=0

			%>
	   
        <table width="90%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF">
        <tr> 
          <td rowspan="2" bgcolor="#cecece"><div align="center">订单号</div></td>
          <td colspan="3" bgcolor="#cecece"><div align="center">处理情况</div></td>
          <td rowspan="2" bgcolor="#cecece"><div align="center">下单时间</div></td>
          <td rowspan="2" bgcolor="#cecece"><div align="center">下单用户</div></td>
          <td rowspan="2" bgcolor="#cecece"><div align="center">货款合计(不含邮费)</div></td>
        </tr>
        <tr> 
          <td bgcolor="#cecece"><div align="center">收款</div></td>
          <td bgcolor="#cecece"><div align="center">送货</div></td>
          <td bgcolor="#cecece"><div align="center">确认</div></td>
        </tr>
        <%dim zonger
		zonger=0
		do while not rs.eof %>
        <tr> 
          <td bgcolor="#cecece"><div align="center"><%=rs("dingdan")%></div></td>
          <td bgcolor="#cecece"><div align="center"> 
              <%if int(rs("zhuangtai"))>=3 and int(rs("zhuangtai"))<7 then response.write "√" else response.write "×" end if%>
          </div></td>
          <td bgcolor="#cecece"><div align="center"> 
              <%if int(rs("zhuangtai"))>=4 and int(rs("zhuangtai"))<7 then response.write "√" else response.write "×" end if%>
          </div></td>
          <td bgcolor="#cecece"><div align="center"> 
              <%if int(rs("zhuangtai"))=5 then response.write "√" else response.write "×" end if%>
          </div></td>
          <td bgcolor="#cecece"><div align="center"><%=rs("actiondate")%></div></td>
          <td bgcolor="#cecece"><div align="center"><%dim rs1
		  set rs1=server.CreateObject("adodb.recordset")
		  rs1.open "select username,grtt from [shop_users] where userId="&int(rs("userid")),conn,1,1
		  response.write "<a href=listuser.asp?Id="&rs("userID")&"&grtt="&rs1("grtt")&" >"
		  response.write trim(rs1("username"))
		  if int(rs1("grtt"))=0 then
		  response.write "(个人)"
		  else
		  response.write "(团体)"
		  end if
		  response.write "</a>"
		  rs1.close
		  set rs1=nothing
		  
		  %></div></td>
          <td bgcolor="#cecece"><div align="center"><%set rs1=server.CreateObject("adodb.recordset")
		  rs1.open "select sum(zonger) as zonger from shop_action where dingdan='"&rs("dingdan")&"' ",conn,1,1
		  response.write ccur(rs1("zonger"))
		  zonger=zonger+ccur(rs1("zonger"))
		  rs1.close
		  set rs1=nothing%></div></td>
        </tr>
        <%
		i=i+1
		if i>MaxPerPage then exit do
		rs.movenext
		loop
		rs.close
		set rs=nothing
		conn.close
		set conn=nothing%>
        <tr> 
          <td bgcolor="#cecece"><div align="center">金额总计:</div></td>
          <td bgcolor="#cecece"><div align="center">-</div></td>
          <td bgcolor="#cecece"><div align="center">-</div></td>
          <td bgcolor="#cecece"><div align="center">-</div></td>
          <td colspan="2" bgcolor="#cecece"><div align="center">-</div></td>
          <td bgcolor="#cecece"><div align="center"><%=zonger%></div></td>
        </tr>
      </table>
    <%  
				End Sub   
  
				Function showpage(totalnumber,maxperpage,filename)  
  				Dim n
  				
				If totalnumber Mod maxperpage=0 Then  
					n= totalnumber \ maxperpage  
				Else
					n= totalnumber \ maxperpage+1  
				End If
				
				
				Response.Write "<p align='center' class='contents'> "  
				If CurrentPage<2 Then  
					Response.Write "<font class='contents'>首页 上一页</font> "  
				Else  
					Response.Write "<a href="&filename&"?page=1&zhuangtai="&zhuangtai&"&tianshu="&tianshu&">首页</a> "  
					Response.Write "<a href="&filename&"?page="&CurrentPage-1&"&zhuangtai="&zhuangtai&"&tianshu="&tianshu&">上一页</a> "  
				End If
				
				If n-currentpage<1 Then  
					Response.Write "<font class='contents'>下一页 尾页</font>"  
				Else  
					Response.Write "<a href="&filename&"?page="&(CurrentPage+1)&"&zhuangtai="&zhuangtai&"&tianshu="&tianshu&">"  
					Response.Write "下一页</a> <a href="&filename&"?page="&n&"&zhuangtai="&zhuangtai&"&tianshu="&tianshu&">尾页</a>"  
				End If  
					Response.Write "<font class='contents'> 页次:</font><font class='contents'>"&CurrentPage&"</font><font class='contents'>/"&n&"页</font> "  
					Response.Write "<font class='contents'> 共有"&totalnumber&"笔记录 " 
					
				End Function  
			%>    </td>
  </tr>
</table><!--#include file="copyright.asp"-->
</body>
</html>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -