📄 admin_dingdan.asp
字号:
<!-- #include file="conn.asp"-->
<%
dim sql
dim rs
dim mboard
dim currentpage
if request("page")="" or request("page")<1 then
currentpage=1
else
currentpage=request("page")
end if
dim maxperpage
maxperpage=30
dim maxpage
dim count
dim counti
counti=0
dim countj
countj=1
search=request("search")
if search="" then
search="全部"
else
search=request("search")
end if
mode=request("mode")
xxx=request("xxx")
if mode="" then
mode=1
end if
if xxx="" then
xxx=1
end if
mboard=104
%>
<%
set rs=server.CreateObject("ADODB.recordset")
rs.open "index",conn,3,3
name=rs("name")
rs.close
set rs=nothing
%>
<title><%=name%>购物--管理系统</title>
<link rel="stylesheet" href="style.css" type="text/css">
<meta NAME=GENERATOR Content=""Microsoft FrontPage 4.0"" CHARSET=GB2312>
<BODY leftmargin="0" bottommargin="0" rightmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<br>
<table width="95%" border="0" cellspacing="1" cellpadding="3" align=center class="tableBorder">
<form action="admin_dingdan.asp" method="post">
<tr>
<th width="100%" colspan="4" height=25>商品订单记录查询</th>
</tr>
<tr>
<td width="15%" height=25 class="forumrow">查询类别</td>
<td width="40%" class="forumrow">
<select name="mode" size="1">
<option value="1">全部</option>
<option value="2">未审核</option>
<option value="3">作废</option>
<option value="4">已付款</option>
</select>
<select name="xxx" size="1">
<option value="1">全部信息</option>
<option value="2">指定信息</option>
</select>
</td>
<td width="15%" class="forumrow">关键字</td>
<td width="30%" class="forumrow">
<input name="search" size="20">
</td>
</tr>
<tr>
<td height="100%" colspan="4" class="forumrow">
如果你要多项查找,请在关键字中加空格。
</td>
</tr>
<tr>
<td height="15" colspan="4" class=forumrow>
<input type="submit" style="CURSOR:hand" value="查 询">
</td>
</tr>
</form>
</table>
<br>
<%
set rs=server.CreateObject("ADODB.recordset")
if mode=1 then
select case xxx
case "1"
sql = "select * from orders order by id desc"
case "2"
aryKeywords = Split(search, " ")
sql = "select * from orders where"
For i = 0 To UBound(aryKeywords)
sql = sql & tempJoinWord & "(" & _
"ddbh LIKE '%" & aryKeywords(i) & "%' OR " & _
"khbh LIKE '%" & aryKeywords(i) & "%' OR " & _
"custname LIKE '%" & aryKeywords(i) & "%' OR " & _
"sw_shipvia LIKE '%" & aryKeywords(i) & "%' OR " & _
"sw_term LIKE '%" & aryKeywords(i) & "%' OR " & _
"total LIKE '%" & aryKeywords(i) & "%' OR " & _
"time LIKE '%" & aryKeywords(i) & "%')"
tempJoinWord = " OR "
Next
sql = sql & "order by id desc"
end select
elseif mode=2 then
select case xxx
case "1"
sql = "select * from orders where zt='未审核' order by id desc"
case "2"
aryKeywords = Split(search, " ")
sql = "select * from orders where zt='未审核' and"
For i = 0 To UBound(aryKeywords)
sql = sql & tempJoinWord & "(" & _
"ddbh LIKE '%" & aryKeywords(i) & "%' OR " & _
"khbh LIKE '%" & aryKeywords(i) & "%' OR " & _
"custname LIKE '%" & aryKeywords(i) & "%' OR " & _
"sw_shipvia LIKE '%" & aryKeywords(i) & "%' OR " & _
"sw_term LIKE '%" & aryKeywords(i) & "%' OR " & _
"total LIKE '%" & aryKeywords(i) & "%' OR " & _
"time LIKE '%" & aryKeywords(i) & "%')"
tempJoinWord = " OR "
Next
sql = sql & "order by id desc"
end select
elseif mode=3 then
select case xxx
case "1"
sql = "select * from orders where zt='作废' order by id desc"
case "2"
aryKeywords = Split(search, " ")
sql = "select * from orders where zt='作废' and"
For i = 0 To UBound(aryKeywords)
sql = sql & tempJoinWord & "(" & _
"ddbh LIKE '%" & aryKeywords(i) & "%' OR " & _
"khbh LIKE '%" & aryKeywords(i) & "%' OR " & _
"custname LIKE '%" & aryKeywords(i) & "%' OR " & _
"sw_shipvia LIKE '%" & aryKeywords(i) & "%' OR " & _
"sw_term LIKE '%" & aryKeywords(i) & "%' OR " & _
"total LIKE '%" & aryKeywords(i) & "%' OR " & _
"time LIKE '%" & aryKeywords(i) & "%')"
tempJoinWord = " OR "
Next
sql = sql & "order by id desc"
end select
elseif mode=4 then
select case xxx
case "1"
sql = "select * from orders where zt='已付款' order by id desc"
case "2"
aryKeywords = Split(search, " ")
sql = "select * from orders where zt='已付款' and"
For i = 0 To UBound(aryKeywords)
sql = sql & tempJoinWord & "(" & _
"ddbh LIKE '%" & aryKeywords(i) & "%' OR " & _
"khbh LIKE '%" & aryKeywords(i) & "%' OR " & _
"custname LIKE '%" & aryKeywords(i) & "%' OR " & _
"sw_shipvia LIKE '%" & aryKeywords(i) & "%' OR " & _
"sw_term LIKE '%" & aryKeywords(i) & "%' OR " & _
"total LIKE '%" & aryKeywords(i) & "%' OR " & _
"time LIKE '%" & aryKeywords(i) & "%')"
tempJoinWord = " OR "
Next
sql = sql & "order by id desc"
end select
end if
rs.open sql,conn,3,3
if rs.eof and rs.bof then
response.write "<br><center>暂时还没有你要查询的订单!</center>"
response.end
else
count=rs.recordcount
if count mod maxperpage = 0 then
maxpage=count \ maxperpage
else
maxpage=count \ maxperpage +1
end if
if cint(currentpage) > cint(maxpage) then
currentpage=1
end if
%>
<%
sub page
if count<>0 then
%>
<table width="100%" cellspacing=0 cellpadding=0 class=forumrow align=center>
<form method="post" name="gopage" action="admin_dingdan.asp?mode=<%=mode%>&xxx=<%=xxx%>&search=<%=search%>">
<tr>
<td width=100% align=center>
<%
if CurrentPage<2 then
response.write "共有订单"&count&"条 首页 上一页 "
else
response.write "共有订单"&count&"条 <a href=admin_dingdan.asp?moad="&mode&"&xxx="&xxx&"&search="&search&"&page=1>首页</a> "
response.write "<a href=admin_dingdan.asp?moad="&mode&"&xxx="&xxx&"&search="&search&"&page="&CurrentPage-1&">上一页</a> "
end if
if maxpage-currentpage<1 then
response.write "下一页 尾页 "
else
response.write "<a href=admin_dingdan.asp?moad="&mode&"&xxx="&xxx&"&search="&search&"&page="&(CurrentPage+1)&">"
response.write "下一页</a> <a href=admin_dingdan.asp?moad="&mode&"&xxx="&xxx&"&search="&search&"&page="&maxpage&">尾页</a> "
end if
response.write "页次:<strong><font color=red>"&CurrentPage&"</font>/"&maxpage&"</strong>页"
response.write " <b>"&maxperpage&"</b>条订单/页 "
%>
转到
<select name=page onchange="submit()">
<%
for i=1 to maxpage
if cint(i)=cint(currentpage) then
flag="selected"
else
flag=""
end if
response.write "<option " & flag & " value=" & i & ">" & i & "</option>"
next
%>
</select>
页
</td>
</tr>
</form>
</table>
<%
end if
end sub%>
<table width="95%" border="0" cellspacing="1" cellpadding="3" align="center" class="tableBorder">
<tr>
<th width="100%" colspan="6" height="25">商品订单管理</th>
</tr>
<tr>
<td width="15%" height="25" class="forumrow" align="center">订 单 号</td>
<td width="15%" class="forumrow" align="center">下单用户编号</td>
<td width="15%" class="forumrow" align="center">收货人姓名</td>
<td width="15%" class="forumrow" align="center">付款方式</td>
<td width="30%" class="forumrow" align="center">收货方式</td>
<td width="10%" class="forumrow" align="center">订单状态</td>
</tr>
<%
if cint(currentpage)<=cint(maxpage) then
rs.move (currentpage-1)*maxperpage
showcontent
end if
sub showcontent
do while not rs.eof
%>
<tr>
<td height="25" class="forumrow" align="center"><a href=# onClick="javascript:window.open('admin_dd.asp?ddbh=<%=rs("ddbh")%>','','width=700,height=400,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;"><%=rs("ddbh")%></a></td>
<td class="forumrow" align="center"><a href="admin_xguser.asp?bianhao=<%=rs("khbh")%>"><%=rs("khbh")%></a></td>
<td class="forumrow" align="center"><%=rs("custname")%></td>
<td class="forumrow" align="center"><%=rs("sw_term")%></td>
<td class="forumrow" align="center"><%=rs("sw_shipvia")%></td>
<td class="forumrow" align="center"><%=rs("zt")%></td>
</tr>
<%
counti=counti+1
rs.movenext
if counti>=maxperpage then
exit do
end if
loop
end sub
end if
rs.close
set rs=nothing
%>
<tr>
<td height="22" colspan="6" class="forumrow">
<%call page%>
</td>
</tr>
</table>
<%
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -