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

📄 orderlist_check.asp

📁 一套很早的多用户电子商务程序
💻 ASP
字号:
<%@ language="vbscript"%>
<%response.Expires = 0%>
<!--#include file="conn.asp"--><!--#include file="Check.asp"-->

<html>
<head>
<STYLE>BODY {
	FONT-SIZE: 9pt
}
TD {
	FONT-SIZE: 9pt; LINE-HEIGHT: 150%
}
A {
	TEXT-DECORATION: none
}
A:hover {
	TEXT-DECORATION: underline
}
</STYLE>
<title>后台管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body background="../pic/user/bg.jpg">
<%
Function formatdata(ti)
mt=month(ti)
dt=day(ti)
formatdata=mt&"月"&dt&"日"
end Function
p_shop=request.cookies("sp_name")
set rs=server.createobject("adodb.recordset")
sqltext="select * from OrderList  Where (f_pay='未汇款' or f_send='未发货') order by RegTime desc" 
rs.open sqltext,conn,1,1

dim MaxPerPage
MaxPerPage=15

'假如没有数据时
If rs.eof and rs.bof then 
   response.write "<br><p align='center'><font color='#ff0000'>没有用户订单</font></p>"
End if

'取得页数,并判断用户输入的是否数字类型的数据,如不是将以第一页显示
dim text,checkpage
text="0123456789"
 Rs.PageSize=MaxPerPage
for i=1 to len(request("page"))
   checkpage=instr(1,text,mid(request("page"),i,1))
   if checkpage=0 then
      exit for 
   end if
next

If checkpage<>0 then
      If NOT IsEmpty(request("page")) Then
        CurrentPage=Cint(request("page"))
        If CurrentPage < 1 Then CurrentPage = 1
        If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount
      Else
        CurrentPage= 1
      End If
      If not Rs.eof Then Rs.AbsolutePage = CurrentPage end if
Else
   CurrentPage=1
End if

call list
call showpages
'显示帖子的子程序
Sub list()%>
<table width="100%" border="0"  align="center" cellpadding="0" cellspacing="3">
  <tr class=main1 bgcolor="#00CCFF"> 
    <td height="20" align="center"><font color="#FFFFFF">订单编号</font></td>
    <td align="center"><font color="#FFFFFF">提交时间</font></td>
    <td height="20" align="center"><font color="#FFFFFF">支付方式</font></td>
    <td height="20" align="center"><font color="#FFFFFF">汇款状态</font></td>
    <td align="center"><font color="#FFFFFF">配送方式</font></td>
    <td align="center"><font color="#FFFFFF">发货状态</font></td>
    <td height="20" align="center"><font color="#FFFFFF">订单总额</font></td>
    <td align="center"><font color="#FFFFFF">所属商家</font></td>
  </tr>
  <%
if not rs.eof then
i=0
do while not rs.eof 
%>
  <tr class=main1 bgcolor="#E8E8E8"> 
    <td align="center" height="25"><strong><font color="#0000FF"><a href="OrderList_detail.asp?ID=<%=rs("billno")%>&p_shop=<%=rs("p_shop")%>"><%=rs("billno")%></a></font></strong></td>
    <td align="center"><%=formatdata(rs("Regtime"))%> </td>
    <td align="center" height="25"><%=rs("Pay")%></td>
    <td align="center" height="25"> 
      <%
	if rs("f_pay")="已汇款" then 
	response.Write"<font color=#FF0000><b>"&rs("f_pay")&"</b></font>"
	else response.Write rs("f_pay")
	end if
	%>
    </td>
    <td align="center"><%=rs("send")%> </td>
    <td align="center"> 
      <%
	if rs("f_send")="已发货" then 
	response.Write"<font color=#FF0000><b>"&rs("f_send")&"</b></font>"
	else response.Write rs("f_send")
	end if
	%>
    </td>
    <td align="center" height="25"><%=rs("amount")%> <font color="#999999">(元)</font></td>
    <td align="center"><font color=#0000FF><a href="../<%=rs("p_shop")%>/" target="_blank"><%=rs("p_shop")%></a></font> 
    </td>
  </tr>
  <%
   i=i+1
   if i >= MaxPerpage then exit do
   rs.movenext
   loop
end if
%>
</table>
<%
End sub
'显示翻页的子程序
sub showpages()%>
<table border="0" cellPadding="0" cellSpacing="0" width="100%" align="center" >
  <form method=Post action='orderlist_check.asp'> 
  <tr>
      <td> 
        <table border="0" cellPadding="0" cellSpacing="3" width="100%" align="center">
          <tr> 
            <td width="433" bgcolor="#00CCFF" class=main1>  
              <p align="center"> 
                <%    
   If currentpage > 1 Then
      response.write "<a href='orderlist_check.asp?&page="+cstr(1)+"'>首页</a><font color='#ffffff'><b>-</b></font>"  
      Response.write "<a href='orderlist_check.asp?page="+Cstr(currentpage-1)+"'>前页</a><font color='#ffffff'><b>-</b></font>"
   Else
      Response.write "首页<font color='#ffffff'><b>-</b></font>"
      Response.write "前页<font color='#ffffff'><b>-</b></font>"      
   End if
   
   If currentpage < Rs.PageCount Then
      Response.write "<a href='orderlist_check.asp?page="+Cstr(currentPage+1)+"'>后页</a><font color='#ffffff'><b>-</b></font>"
      Response.write "<a href='orderlist_check.asp?page="+Cstr(Rs.PageCount)+"'>尾页</a>&nbsp;&nbsp;"
   Else
      Response.write "后页-"
      Response.write "尾页&nbsp;&nbsp;"       
   End if
   Response.write "页次:" & "<font color=#FF0000>" & Cstr(CurrentPage) &  "</font>" & "<font color='#000000'>/" & Cstr(rs.pagecount) & "</font>&nbsp;"
   Response.write "<font color=#ffffff>" & Cstr(MaxPerPage) & "</font>" & "张订单/页&nbsp" & "共" & "<font color=#ffffff>" & Cstr(Rs.RecordCount) & "</font>" & "<font color='#000000'>张订单</font>&nbsp;&nbsp;"

%>
</td>
            <td width="148" align='center' bgcolor='#00CCFF'> <font  class=main1>转到: 
              <input type='text' name='page' size=4 maxlength=4 class=smallInput value="<%=Currentpage%>">
<input class=buttonface type='submit'  value='Go'  name='cndok' style='background-color: #E6E4C4'></span>

            </td>
        </tr>
      </table>
      </td>
  </tr>
  </form>
</table>
<%end sub
rs.close
conn.close
%>
</body>
</html>

⌨️ 快捷键说明

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