📄 b2b_ddgl.asp
字号:
<!--#include file="conn.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
if session("admin")="" then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('请先登录!');history.go(-1);</script>"
response.End
else
if request.cookies("Buy2Buy")("admin")="" then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('请先登录!');history.go(-1);</script>"
response.End
end if
end if
'限制添加权限管理员
if session("rank")=2 then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('您的管理权限未达到此操作等级!');history.go(-1);</script>"
response.End
end if
%>
<title>订单管理</title>
<script language="JavaScript" src="calendar.js"></script>
<SCRIPT LANGUAGE="JavaScript">
<!--
function checkk()
{
if(checkspace(document.form2.searchkey.value)) {
document.form2.searchkey.focus();
alert("请输入查询关键字!");
return false;
}
document.form2.submit();
}
//-->
</script>
<%dim state,namekey
namekey=trim(request.form("namekey"))
state=trim(request.form("state"))
if state="" then
state=SafeRequest("state",0)
end if
if namekey="" then
namekey=FormatSQL(SafeRequest("namekey",0))
end if
%>
<style type="text/css">
<!--
.style4 {color: #FF0000}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.STYLE1 { color: #000000;
font-weight: bold;
}
-->
</style>
<table width="99%" border="5" align="center" cellpadding="5" cellspacing="5" bordercolor="#CCCCCC" bgcolor="#FFFFFF">
<tr>
<td background="images/topbg.gif"><span class="STYLE1"><img src="images/pic5.gif" width="28" height="22" align="absmiddle" />您现在所在的位置是: <a href="adminhelp.asp">管理首页</a> -> <span class="style4">订单管理 订单列表</span></span></td>
</tr>
<tr>
<td height="167" valign="top" bgcolor="#FFFFFF">
<br>
<table width="98%" border="2" align="center" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#CCCCCC">
<tr>
<td align="right" background="images/topbg.gif">
<select name="select" onChange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}" ><base target=Right>
<option value="b2b_ddgl.asp?state=1" >选择订单状态</option>
<option value="b2b_ddgl.asp?state=0" >全部订单状态</option>
<option value="b2b_ddgl.asp?state=2" >未作任何处理</option>
<option value="b2b_ddgl.asp?state=3" >服务商已收到款</option>
<option value="b2b_ddgl.asp?state=4" >服务商已发货</option>
</select>
</td>
</tr>
</table>
<%
Const MaxPerPage=20
dim totalPut
dim CurrentPage
dim TotalPages
dim j
dim sql
if Not isempty(SafeRequest("page",1)) then
currentPage=Cint(SafeRequest("page",1))
else
currentPage=1
end if
set rs=server.CreateObject("adodb.recordset")
dim webbj5
rs.Open "select webbj5 from b2b_systemdata",conn,1,1
webbj5=CLng(trim(rs("webbj5")))
rs.Close
if Trim(Request("BeginDate"))<>"" then
BeginDate=Trim(Request("BeginDate"))&" 00:00:01"
else
BeginDate="1990-01-01 00:00:01"
end if
if Trim(Request("EndDate"))<>"" then
EndDate=Trim(Request("EndDate"))&" 23:59:59"
else
EndDate="2020-12-30 00:00:01"
end if
if namekey="" then
if state=0 or state="" then
select case state
case "0"
rs.open "select distinct(goods),userid,UserName,receipt,actiondate,deliverymethord,paymethord,state from orders where state<6 and actionDate>=#"&BeginDate&"# and actionDate<=#"&EndDate&"# order by actiondate desc",conn,1,1
case ""
rs.open "select distinct(goods),userid,UserName,receipt,actiondate,deliverymethord,paymethord,state from orders where state<5 and actionDate>=#"&BeginDate&"# and actionDate<=#"&EndDate&"# order by actiondate desc",conn,1,1
end select
else
rs.open "select distinct(goods),userid,UserName,receipt,actiondate,deliverymethord,paymethord,state from orders where state="&state&" and actionDate>=#"&BeginDate&"# and actionDate<=#"&EndDate&"# order by actiondate",conn,1,1
end if
else
'//按用户查询
if state=0 or state="" then
rs.open "select distinct(goods),userid,UserName,receipt,actiondate,deliverymethord,paymethord,state from orders where state<5 and username='"&namekey&"' order by actiondate desc",conn,1,1
else
rs.open "select distinct(goods),userid,UserName,receipt,actiondate,deliverymethord,paymethord,state from orders where state="&state&" and username='"&namekey&"' order by actiondate",conn,1,1
end if
end if
if err.number<>0 then
response.write "数据库中暂时无数据"
end if
if rs.eof And rs.bof then
Response.Write "<p align='center' class='contents'> 对不起,您选择的状态目前还没有订单!</p>"
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent
showpage totalput,MaxPerPage,"b2b_ddgl.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"b2b_ddgl.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"b2b_ddgl.asp"
end if
end if
end if
sub showContent
dim i
i=0
%>
<table width="98%" border="2" align="center" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#CCCCCC">
<tr bgcolor="#F7F7F7" align="center">
<td height="25" background="images/topbg.gif"><strong>订单号</strong></td>
<td height="25" background="images/topbg.gif"><strong>下单用户</strong></td>
<td height="25" background="images/topbg.gif"><strong>收货人</strong></td>
<td height="25" background="images/topbg.gif"><strong>金额总计</strong></td>
<td height="25" background="images/topbg.gif"><strong> 付款方式</strong></td>
<td height="25" background="images/topbg.gif"><strong> 收货方式</strong></td>
<td height="25" background="images/topbg.gif" ><strong> 订单状态</strong></td>
</tr>
<%do while not rs.eof
dim shop,username,rs2
set shop=server.CreateObject("adodb.recordset")
set rs2=server.CreateObject("adodb.recordset")
%>
<tr bgcolor="#FFFFFF" align="center">
<td height="25" background="images/topbg.gif"> <a href=# onClick="javascript:window.open('vieworder.asp?dan=<%=trim(rs("goods"))%>&username=<%=trim(rs("username"))%>&UserID=<%=trim(rs("UserID"))%>','','width=710,height=388,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;"><%=trim(rs("goods"))%></a></td>
<td height="25">
<% If rs("userid")<>0 then %>
<a href=b2b_userinfo.asp?id=<%=rs("userid")%>><%=rs("UserName")%></a>
<% Else %>
<%=rs("UserName")%>
<% End IF %> </td>
<td height="25"><%=trim(rs("receipt"))%></td>
<td height="25">
<%
shop.open "select sum(paid) as paid,sum(score) as score from orders where goods='"&trim(rs("goods"))&"' ",conn,1,1
rs2.open "select * from delivery where deliveryid="&rs("deliverymethord"),conn,1,1
if rs2.eof and rs2.bof then
response.write "<font color=#FF6600>"&Round((shop("paid")),2)&"元</font>"
else
Dim LngFee,strSubject
strSubject = rs2("subject")
If strSubject = "" Then
strSubject = "方式已被删除"
End If
IF webbj5 = 0 Then
LngFee = rs2("fee")
Else
If shop("paid")>=Webbj5 Then
LngFee = 0
Else
LngFee = rs2("fee")
End If
End IF
response.write "<font color=#FF6600>"&Round((shop("paid")*(1+rs2("payfee")/100)+LngFee),2)&"元</font>"
End If
rs2.close
shop.close
set shop=nothing
%></td>
<td height="25"> <%
rs2.open "select * from delivery where deliveryid="&int(rs("paymethord")),conn,1,1
if rs2.eof and rs2.bof then
response.write "方式已被删除"
else
response.Write trim(rs2("subject"))
end if
rs2.Close
set rs2=nothing
%> </td>
<td height="25"> <% = strSubject %> </td>
<td height="25"> <%
select case rs("state")
case "1"
response.write "未作任何处理"
case "2"
response.write "未作任何处理"
case "3"
response.write "服务商已收到款"
case "4"
response.write "服务商已发货"
case "5"
response.write "用户已经收到货"
case "6"
response.write "为完成订单"
end select%> </td>
</tr>
<%i=i+1
if i>=MaxPerPage then Exit Do
rs.movenext
loop
rs.close
set rs=nothing%>
<tr><td colspan="7" bgcolor="#FFFFFF">
<%
End Sub
Function showpage(totalnumber,maxperpage,filename)
Dim n
If totalnumber Mod maxperpage=0 Then
n= totalnumber \ maxperpage
Else
n= totalnumber \ maxperpage+1
End If
if namekey="" then
Response.Write "<form method=Post action="&filename&"?state="&state&">"
else
Response.Write "<form method=Post action="&filename&"?state="&state&"&namekey="&namekey&">"
end if
Response.Write "<p align='center' class='contents'> "
If CurrentPage<2 Then
Response.Write "<font class='contents'>首 页 上一页</font> "
Else
if namekey="" then
Response.Write "<a href="&filename&"?page=1&state="&state&" class='contents'>首 页</a> "
Response.Write "<a href="&filename&"?page="&CurrentPage-1&"&state="&state&" class='contents'>上一页</a> "
ELSE
Response.Write "<a href="&filename&"?page=1&state="&state&"&namekey="&namekey&" class='contents'>首 页</a> "
Response.Write "<a href="&filename&"?page="&CurrentPage-1&"&state="&state&"&namekey="&namekey&" class='contents'>上一页</a> "
end if
End If
If n-currentpage<1 Then
Response.Write "<font class='contents'>下一页 末 页</font>"
Else
if namekey="" then
Response.Write "<a href="&filename&"?page="&(CurrentPage+1)&"&state="&state&" class='contents'>"
Response.Write "下一页</a> <a href="&filename&"?page="&n&"&state="&state&" class='contents'>末 页</a>"
else
Response.Write "<a href="&filename&"?page="&(CurrentPage+1)&"&state="&state&"&namekey="&namekey&" class='contents'>"
Response.Write "下一页</a> <a href="&filename&"?page="&n&"&state="&state&"&namekey="&namekey&" class='contents'>末 页</a>"
end if
End If
Response.Write "<font class='contents'> 页次:</font><font class='contents'>"&CurrentPage&"</font><font class='contents'>/"&n&"页</font> "
Response.Write "<font class='contents'> 共有"&totalnumber&"笔订单 "&maxperpage&"笔订单/页</font> "
Response.Write "<font class='contents'>转到:</font><input type='text' name='page' size=2 maxlength=10 class=smallInput value="¤tpage&">"
Response.Write " <input type='submit' class='input_bot' value='跳转' name='cndok' ></form>"
End Function
%></td></tr></table></td>
</tr></table>
<br>
<table width="99%" border="5" align="center" cellpadding="5" cellspacing="5" bordercolor="#CCCCCC" bgcolor="#FFFFFF">
<tr>
<td height="20" background="images/topbg.gif"><span class="STYLE1"><img src="images/pic5.gif" width="28" height="22" align="absmiddle" />您现在所在的位置是: <a href="adminhelp.asp">管理首页</a> -> <span class="style4">订单搜索</span></span></td>
</tr>
<tr>
<td height="34" bgcolor="#FFFFFF">
<br>
<table width="90%" border="0" align="center" cellpadding="1" cellspacing="1">
<tr>
<form name="form1" method="post" action="b2b_ddgl.asp"><td width="25%" align="right">以下单用户名查询:</td>
<td width="75%"><input name="namekey" type="text" class="input_sr" id="namekey2" onFocus="this.value=''" size="14">
<select name="state" id="select">
<option value="0" >全部订单状态</option>
<option value="1" >未作任何处理</option>
<option value="3" >服务商已收到款</option>
<option value="4" >服务商已发货</option>
</select>
<input name="Submit" type="submit" class="input_bot" value="查 询"></td>
</tr>
<tr>
<td align="right">以订单时间段批量查询:</td>
<td><input name="BeginDate" type="text" class="input_sr" id="BeginDate" onFocus="calendar()" size="14" />
日 至
<input name="EndDate" type="text" class="input_sr" id="EndDate" onFocus="calendar()" size="14" />
日
<input name="Submit" type="submit" class="input_bot" value="查 询"></td></form>
</tr>
<tr>
<form name="form2" method="post" action="../b2b_ddid.asp"><td align="right">以订单号查询:</td>
<td><input name="searchkey" type="text" class="input_sr" id="searchkey" size="30" />
<input name="Submit3" type="submit" class="input_bot" onclick="return checkk();" value="查 询" /></td></form>
</tr>
</table></td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -