order_list.asp
来自「用ASP写的电子购物系统」· ASP 代码 · 共 151 行
ASP
151 行
<%@ LANGUAGE = VBScript %>
<!--#INCLUDE FILE="include/manager.asp" -->
<!--#INCLUDE FILE="../include/util.asp" -->
<% REM ######################################################################### %>
<% REM %>
<% REM ORDER_LIST.ASP %>
<% REM Microsoft Commerce Server v3.00 %>
<% REM %>
<% REM Copyright (c) 1996-98 Microsoft Corporation. All rights reserved. %>
<% REM %>
<% REM ######################################################################### %>
<% REM header: %>
<% pageTitle = "订单列表" %>
<%functionno=3%>
<!--#INCLUDE FILE="checkuser.asp" -->
<HTML>
<HEAD>
<TITLE> <% = pageTitle %> </TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html"; charset="gb2312">
<LINK REL=stylesheet HREF="manager.css" TYPE="text/css">
<% stdListRange = 15 %>
</HEAD>
<BODY TOPMARGIN="0">
<!--#INCLUDE FILE="include/header.asp"--->
<table border="0" width="770" height="423" cellspacing="0" cellpadding="0">
<tr>
<td width="140" valign="top" >
<!--#INCLUDE FILE = "include/menu.asp" -->
</td>
<td width="1" bgcolor="#000000" ></td>
<td width="600" height="423" align="center" valign="top" class="main">
<br>
<% REM query form: %>
<form method="post" name=form1 >
<table border="0" cellspacing="0" width="46%">
<tr>
<td width="24%" class="mainleft">用户名</td>
<td width="76%"><input type="text" name="shoppername" size="20"></td>
</tr>
<tr>
<td width="24%" class="mainleft">订单状态</td>
<td width="76%">
<select name="status">
<option selected></option>
<option >未交易</option>
<option>已确认</option>
<option>已交易</option>
<option>作废</option>
</select>
</tr>
<tr>
<td width="24%" class="mainleft">订单时间</td>
<TD width="76%" VALIGN=TOP colspan=2>
<input name=year size=4 maxlength=4 value=<%=year(now())%>>年
<SELECT name=month size=1>
<% cmonth=month(now())
for i=1 to 12
if cmonth=i then
Response.Write "<option selected>" & i
else
Response.Write "<option>" & i
end if
next%>
</SELECT>
月
<SELECT name=day size=1>
<% cday=day(now())
for i=1 to 31
if cday=i then
Response.Write "<option selected>" & i
else
Response.Write "<option>" & i
end if
next%>
</SELECT> 日
</TD>
</tr>
</table>
<table border="0" cellspacing="0" width="46%">
<tr>
<td width="50%"><div align="center"><center><p><input type="submit" value="查询"
name="Ok"></td>
<td width="50%"><div align="left"><p><input type="reset" value="重填" name="Cancle"></td>
</tr>
</table>
</form>
<% REM list vars: %>
<%
listElemTemplate = "order_edit.asp"
listElement = "orders"
Dim strSQL,strTemp
if Request("move")="" or Session("order_sql")="" then
'shoppername
strSQL=""
strTemp=Trim(Request.Form("shoppername"))
if strTemp<>"" then
strSQL=strSQL & "shoppername like '" & Replace(strTemp,"'","''") & "%'"
end if
'order status
strTemp=Trim(Request.Form("status"))
if strTemp<>"" then
if strSQL="" then
strSQL=strSQL & " status='" & strTemp & "'"
else
strSQL=strSQL & " and status='" & strTemp & "'"
end if
end if
'order date
strTemp=checknum(Request("year"),4)
if not isnull(strtemp) then
if strSQL="" then
strSQL=strSQL & " to_date(to_char(date_entered,'yyyy-mm-dd'),'yyyy-mm-dd')=to_date('" & strTemp & "-" & Request("month") & "-" & Request("day") & "','yyyy-mm-dd')"
else
strSQL=strSQL & " and to_date(to_char(date_entered,'yyyy-mm-dd'),'yyyy-mm-dd')=to_date('" & strTemp & "-" & Request("month") & "-" & Request("day") & "','yyyy-mm-dd')"
end if
end if
if strSQL="" then
strSQL="SELECT * FROM shop_order ORDER BY order_id desc"
else
strSQL="SELECT * FROM shop_order WHERE " & strSQL & " ORDER BY order_id desc"
end if
cmdTemp.CommandText = strSQL
session("order_sql")=strSQL
else
cmdTemp.CommandText = session("order_sql")
end if
%>
<% if not(Request("OK")="") or not (Request("move")="") then%>
<!--#INCLUDE FILE="include/list.asp" -->
<%end if%>
</td>
</table>
<% REM footer: %>
<!--#INCLUDE FILE="include/copyright.asp" -->
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?