?? orderlist_20030324.asp
字號:
<!--#include file="../include/bkconn.asp"-->
<!--#include file="checkUser.asp"-->
<%
function selectTreeList(i,deep)
dim sql
dim rs
dim tempi
dim rsID
set rs=server.createObject("adodb.recordset")
sql="select * from productSort where fatherID=39"
rs.open sql,conn,1,1
'if rs.eof then
' exit function
'else
do while not rs.eof
rsID=rs("id")
rsName=rs("name")
response.write "<option value="&rsID
if trim(rsID)=trim(productSort) then response.write " selected"
response.write ">"
'response.write "rsid="&rsid&",productsort="&productsort&"---"
response.write rsName&"</option>"
rs.movenext
loop
'end if
end function
Function selected(firstval,secondval)
If firstval=secondval then
selected="selected"
End if
End Function
%>
<%
dim rs,sql
dim page,maxPerPage
productSort=trim(request("productSort"))
mykeyword=trim(request("mykeyword"))
selectsearch=trim(request("selectsearch"))
date1=trim(request("date1"))
date2=trim(request("date2"))
searchstr=""
if request("mysearch")="product" then
if productsort<>"0" then searchstr=" and productsort=" & productsort & " "
if mykeyword<>"" then
searchstr=" and " & selectsearch & " like '%" & mykeyword & "%' "
end if
sql="SELECT * FROM product,orderdetail,orders where orders.id=orderdetail.orderid and product.id=orderdetail.productid and 1=1 and state=0 " & searchstr
sql=sql&" order by product.id desc"
else
if date1<>"" then
searchstr=" and createdate between #" & date1 & "# "
else
searchstr=" and createdate between #2002-1-1# "
end if
if date2<>"" then
searchstr=searchstr & " and #" & date2 & "# "
else
searchstr=searchstr & " and #" & now() & "# "
end if
sql="select * from orders where state=0 " & searchstr
sql=sql&" order by id desc"
end if
maxPerPage=10 '每頁顯示的記錄數(shù)
page=Request("page")
if (page="" or isempty(page)) then page=1
thisUrl="orderList.asp?true=1"
session("adminOldUrl")=thisUrl&"&page="&page
set rs=server.createobject("adodb.recordset")
'response.write sql
'response.end
rs.open sql,conn,1,1
rs.pagesize=MaxPerPage
%>
<html>
<head>
<title>訂單維護</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../main.css" type="text/css">
<script language=Javascript>
<!--
function jumpTo(i){
if(i==1){
this.document.location="<%=thisUrl%>";}
if(i==2){
this.document.location="<%=thisUrl%>&page=<%=page-1%>";}
if(i==3){
this.document.location="<%=thisUrl%>&page=<%=page+1%>";}
if(i==4){
this.document.location="<%=thisUrl%>&page=<%=rs.pageCount%>";}
}
//-->
</script>
</head>
<body bgcolor="#9CC7EF" text="#000000" leftmargin="0" topmargin="0">
<br>
<table width="90%" border="0" cellspacing="0" cellpadding="0" height="16">
<tr>
<td>
<div align="center">訂單維護</div>
</td>
</tr>
</table>
<%if request("mysearch") ="product" then %>
<table width="99%" border="1" bordercolordark=#9CC7EF bordercolorlight=#145AA0 cellspacing="0" cellpadding="4" align="center">
<tr bgcolor="#4296E7">
<form method="post" action="orderlist.asp" name="form1">
<td height="14" colspan="7">
<div align="center"></div>
<div align="right"><font color="#FFFFFF">關(guān)鍵詞:
<input type="hidden" name="mysearch" value="product">
</font>
<input type="text" name="myKeyword" size="16" value="<%=myKeyword%>">
<select name="selectsearch" >
<option value="productname" <%=selected(selectsearch,"name")%> >產(chǎn)品名稱</option>
<option value="remark" <%=selected(selectsearch,"remark")%> >廠 號</option>
</select>
<select name="productSort">
<option value="0">全部分類</option>
<%call selectTreeList(0,0)%>
</select>
<input type="submit" name="Submit2" value="搜索">
</div>
</td>
</form>
</tr>
<tr bgcolor="#4296E7">
<form method="post" action="orderlist.asp" name="form1">
<td height="14" colspan="7">
<div align="right"><font color="#FFFFFF">
<input type="hidden" name="mysearch" value="orderdate">
日期:</font> <font color="#FFFFFF">從</font>
<input type="text" name="date1" size="16" value="<%=date1%>">
<font color="#FFFFFF">到</font>
<input type="text" name="date2" size="16" value="<%=date2%>">
<input type="submit" name="Submit2" value="搜索">
</div>
</td>
</form>
</tr>
<tr bgcolor="#5EA5E6">
<td width="2%" nowrap>
<div align="center"><font color="#FFFFFF"> 編號</font></div>
</td>
<td width="20%" nowrap>
<div align="center"><font color="#FFFFFF">產(chǎn)品名稱</font></div>
</td>
<td width="5%" nowrap>
<div align="center"><font color="#FFFFFF">客戶帳號</font></div>
</td>
<td width="16%" nowrap>
<div align="center"><font color="#FFFFFF">地址</font></div>
</td>
<td width="31%" nowrap>
<div align="center"><font color="#FFFFFF">電話</font></div>
</td>
<td width="6%" nowrap>
<div align="center"><font color="#FFFFFF">Email</font></div>
</td>
<td width="6%" nowrap>
<div align="center"><font color="#FFFFFF">詳細</font></div>
</td>
</tr>
<%
'dim rsID
i=1
if not (rs.eof or err) then rs.move (page-1)*maxPerPage
do while not (rs.eof or err)
rsID=rs("id")
%>
<tr>
<td width="2%">
<div align="center"><%=rs("orderid")%></div>
</td>
<td width="16%" nowrap><%=rs("productName")%></td>
<%if rs("memberID")<>"非會員" then %>
<td width="5%" title="點擊查看會員信息" style="cursor:hand" onClick="Javascript:window.location='memberMod.asp?memberID=<%=rs("memberID")%>'" bgcolor="#0099FF" nowrap><%=rs("memberID")%> </td>
<%else %>
<td width="20%">非會員</td>
<%end if %>
<td width="31%"><%=rs("address")%></td>
<td width="6%" nowrap><%=rs("phone")%></td>
<td width="6%" nowrap><%=rs("email")%></td>
<td width="14%" title="點擊查看訂單具體信息" style="cursor:hand" onClick="Javascript:window.location='orderMod.asp?id=<%=rs("id")%>'" bgcolor="#009999" nowrap>處理</td>
</tr>
<%
i=i+1
if i>maxPerPage then exit do
rs.moveNext
loop
%>
<tr bgcolor="#4296E7">
<td colspan="7">
<div align="right"><font color=#FFFFFF><%=rs.recordCount%> 項 第<%=page%>/<%=rs.pageCount%>
頁 </font>
<%if page>1 then%>
<input type="button" name="Submit3" value="首頁" onClick="Javascript:jumpTo(1)">
<input type="submit" name="Submit4" value="上頁" onClick="Javascript:jumpTo(2)">
<%else%>
<input type="button" name="Submit3" value="首頁" disabled>
<input type="submit" name="Submit4" value="上頁" disabled>
<%end if
if rs.recordCount>page*maxPerPage then%>
<input type="submit" name="Submit5" value="下頁" onClick="Javascript:jumpTo(3)">
<input type="submit" name="Submit6" value="末頁" onClick="Javascript:jumpTo(4)">
<%else%>
<input type="submit" name="Submit5" value="下頁" disabled>
<input type="submit" name="Submit6" value="末頁" disabled>
<%end if%>
</div>
</td>
</tr>
</table>
<%else%>
<table width="99%" border="1" bordercolordark=#9CC7EF bordercolorlight=#145AA0 cellspacing="0" cellpadding="4" align="center">
<tr bgcolor="#4296E7">
<form method="post" action="orderlist.asp" name="form1">
<td height="14" colspan="7">
<div align="center"></div>
<div align="right"><font color="#FFFFFF">關(guān)鍵詞:
<input type="hidden" name="mysearch" value="product">
</font>
<input type="text" name="myKeyword" size="16" value="<%=myKeyword%>">
<select name="selectsearch" >
<option value="productname" <%=selected(selectsearch,"name")%> >產(chǎn)品名稱</option>
<option value="remark" <%=selected(selectsearch,"remark")%> >廠 號</option>
</select>
<select name="productSort">
<option value="0">全部分類</option>
<%call selectTreeList(0,0)%>
</select>
<input type="submit" name="Submit2" value="搜索">
</div>
</td>
</form>
</tr>
<tr bgcolor="#4296E7">
<form method="post" action="orderlist.asp" name="form1">
<td height="14" colspan="7">
<div align="right"><font color="#FFFFFF">
<input type="hidden" name="mysearch" value="orderdate">
日期:</font> <font color="#FFFFFF">從</font>
<input type="text" name="date1" size="16" value="<%=date1%>">
<font color="#FFFFFF">到</font>
<input type="text" name="date2" size="16" value="<%=date2%>">
<input type="submit" name="Submit2" value="搜索">
</div>
</td>
</form>
</tr>
<tr bgcolor="#5EA5E6">
<td width="6%" nowrap>
<div align="center"><font color="#FFFFFF"> 編號</font></div>
</td>
<td width="8%" nowrap>
<div align="center"><font color="#FFFFFF">客戶帳號</font></div>
</td>
<td width="7%" nowrap>
<div align="center"><font color="#FFFFFF">客戶姓名</font></div>
</td>
<td width="50%" nowrap>
<div align="center"><font color="#FFFFFF">地址</font></div>
</td>
<td width="12%" nowrap>
<div align="center"><font color="#FFFFFF">電話</font></div>
</td>
<td width="12%" nowrap>
<div align="center"><font color="#FFFFFF">Email</font></div>
</td>
<td width="5%" nowrap>
<div align="center"><font color="#FFFFFF">詳細</font></div>
</td>
</tr>
<%
'dim rsID
i=1
if not (rs.eof or err) then rs.move (page-1)*maxPerPage
do while not (rs.eof or err)
rsID=rs("id")
%>
<tr>
<td width="6%">
<div align="center"><%=rs("id")%></div>
</td>
<%if rs("memberID")<>"非會員" then %>
<td width="8%" title="點擊查看會員信息" style="cursor:hand" onClick="Javascript:window.location='memberMod.asp?memberID=<%=rs("memberID")%>'" bgcolor="#0099FF" nowrap><%=rs("memberID")%> </td>
<%else %>
<td width="8%">非會員</td>
<%end if %>
<td width="7%" nowrap><%=rs("customerName")%></td>
<td width="50%"><%=rs("address")%></td>
<td width="12%" nowrap><%=rs("phone")%></td>
<td width="12%" nowrap><%=rs("email")%></td>
<td width="5%" title="點擊查看訂單具體信息" style="cursor:hand" onClick="Javascript:window.location='orderMod.asp?id=<%=rs("id")%>'" bgcolor="#009999" nowrap>處理</td>
</tr>
<%
i=i+1
if i>maxPerPage then exit do
rs.moveNext
loop
%>
<tr bgcolor="#4296E7">
<td colspan="7">
<div align="right"><font color=#FFFFFF><%=rs.recordCount%> 項 第<%=page%>/<%=rs.pageCount%>
頁 </font>
<%if page>1 then%>
<input type="button" name="Submit3" value="首頁" onClick="Javascript:jumpTo(1)">
<input type="submit" name="Submit4" value="上頁" onClick="Javascript:jumpTo(2)">
<%else%>
<input type="button" name="Submit3" value="首頁" disabled>
<input type="submit" name="Submit4" value="上頁" disabled>
<%end if
if rs.recordCount>page*maxPerPage then%>
<input type="submit" name="Submit5" value="下頁" onClick="Javascript:jumpTo(3)">
<input type="submit" name="Submit6" value="末頁" onClick="Javascript:jumpTo(4)">
<%else%>
<input type="submit" name="Submit5" value="下頁" disabled>
<input type="submit" name="Submit6" value="末頁" disabled>
<%end if%>
</div>
</td>
</tr>
</table>
<%end if%>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -