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

📄 orderlist_check.asp

📁 一套很早的多用户电子商务程序
💻 ASP
字号:
<%@ language="vbscript"%>
<%response.Expires = 0%>
<!--#include file="conn.asp"-->
<!--#include file="check_user.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" leftmargin="0" topmargin="0">
<%
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 p_shop='"&p_shop&"' and (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><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
call help
'显示帖子的子程序
Sub list()%>
<br>
<table width="94%" border="0"  align="center" cellpadding="0" cellspacing="3">
  <tr class=main1 bgcolor="#00CCFF"> 
    <td width="67" height="20" align="center"><font color="#FFFFFF">订单编号</font></td>
    <td width="67" align="center"><font color="#FFFFFF">提交时间</font></td>
    <td width="67" height="20" align="center"><font color="#FFFFFF">支付方式</font></td>
    <td width="67" height="20" align="center"><font color="#FFFFFF">汇款状态</font></td>
    <td width="67" align="center"><font color="#FFFFFF">配送方式</font></td>
    <td width="67" align="center"><font color="#FFFFFF">发货状态</font></td>
    <td width="67" height="20" align="center"><font color="#FFFFFF">订单总额</font></td>
    <td width="42" height="20" align="center"><font color="#FFFFFF">操作</font></td>
    <td width="49" height="20" 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"><%=rs("billno")%></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")%> </td>
    <td align="center" height="25"> <font color=#0000FF><a href="OrderList_detail.asp?ID=<%=rs("billno")%>">处理</a></font> 
    </td>
    <td align="center" height="25"> 
     <font color=#0000FF><a href="test.asp" onclick="return confirm('你确认删除该张订单吗?')">删除</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="94%" 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
sub help
%>
<table width="94%" border="0" align="center" cellpadding="0" cellspacing="3">
  <tr> 
      <td width="32" rowspan="2" valign="top">说明:</td>
      <td width="559">1、当客户<font color="#0000FF">在线支付成功</font>时订单将自动处理为已汇款。(注意:必须在你的<a href="http://www.ipay.com.cn" target="_blank">在线支付平台</a>的后台管理中设置<br>
          支付结果返回地址为:<font color="#FF0000">http://<%=request.ServerVariables("server_name")%>/paymentok.asp</font> 
        才能处理订单)</td>
    </tr>
    <tr> 
      <td>2、当你把订单处理为已汇款和已发货后此张订单将转到发货查询栏目中。你可点击发货查询进行操作。</td>
    </tr>
  </table>
<%end sub  
rs.close
conn.close
%>
</body>
</html>

⌨️ 快捷键说明

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