📄 editdingdan.asp
字号:
<!--#include file="conn.asp"-->
<%
if request.cookies("days6")("shjianame")="" then
response.Redirect "admin_login.asp"
response.End
end if
set rs_s=server.CreateObject("adodb.recordset")
rs_s.open "select * from shjia where username='"&request.cookies("days6")("shjianame")&"' ",conn,1,1
id=rs_s("shjiaid")
if id<>"" then
if not isnumeric(id) then
response.write"<script>alert(""非法访问!"");location.href=""../index.asp"";</script>"
response.end
end if
end if
if request.QueryString("action")="del" then
set rs=server.CreateObject("adodb.recordset")
rs.open "select distinct(dingdan),actionid from shop_action where actionid in ("&request("selectdel")&") ",conn,1,1
dingdan=rs("dingdan")
rs.close
set rs=nothing
conn.execute "delete from shop_action where actionid in ("&request("selectdel")&")"
response.Redirect "editdingdan.asp"
end if
%>
<html><head><title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../images/css.css" rel="stylesheet" type="text/css">
</head>
<body>
<%dim zhuangtai,namekey
namekey=trim(request("namekey"))
zhuangtai=trim(request("zhuangtai"))
select2=trim(request("select2"))
if zhuangtai<>"" then
if not isnumeric(zhuangtai) then
response.write"<script>alert(""非法访问!"");location.href=""../index.asp"";</script>"
response.end
end if
end if
if zhuangtai="" then zhuangtai=request.QueryString("zhuangtai")
if namekey="" then namekey=request.querystring("namekey")
if select2="" then namekey=request.querystring("select2")
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td valign="top">
<%'开始分页
Const MaxPerPage=12
dim totalPut
dim CurrentPage
dim TotalPages
dim j
dim sql
if Not isempty(request("page")) then
currentPage=Cint(request("page"))
else
currentPage=1
end if
set rs=server.CreateObject("adodb.recordset")
if namekey="" then
'//按状态查询
if zhuangtai=0 or zhuangtai="" then
select case zhuangtai
case "0"
rs.open "select distinct(dingdan),shjiaid,actionid,userid,userzhenshiname,actiondate,songhuofangshi,zhifufangshi,zhuangtai from shop_action where zhuangtai<6 and shjiaid="&id&" order by actiondate desc",conn,1,1
case ""
rs.open "select distinct(dingdan),shjiaid,actionid,userid,userzhenshiname,actiondate,songhuofangshi,zhifufangshi,zhuangtai from shop_action where zhuangtai<6 and shjiaid="&id&" order by actiondate desc",conn,1,1
end select
else
rs.open "select distinct(dingdan),shjiaid,actionid,userid,userzhenshiname,actiondate,songhuofangshi,zhifufangshi,zhuangtai from shop_action where zhuangtai="&zhuangtai&" and shjiaid="&id&" order by actiondate",conn,1,1
end if
else
'//按用户查询
select case select2
case "0"
rs.open "SELECT user.username,shop_action.userid,shop_action.shjiaid,shop_action.actionid, shop_action.dingdan, shop_action.userzhenshiname, shop_action.zhifufangshi, shop_action.songhuofangshi, shop_action.zhuangtai, shop_books.bookname, shop_action.actiondate, shjia.name, shjia.UserName FROM ((shjia INNER JOIN shop_action ON shjia.shjiaID = shop_action.shjiaid) INNER JOIN shop_books ON (shjia.shjiaID = shop_books.shjiaid) AND (shop_action.bookid = shop_books.bookid)) INNER JOIN [user] ON shop_action.userid = user.UserID where shop_action.dingdan='"&namekey&"'or shjia.UserName='"&namekey&"' or shop_books.bookname='"&namekey&"'or shjia.name='"&namekey&"'or user.username='"&namekey&"' and shop_action.shjiaid="&id&" order by shop_action.actiondate ",conn,1,1
case "1"
rs.open "SELECT user.username,shop_action.userid,shop_action.shjiaid,shop_action.actionid, shop_action.dingdan, shop_action.userzhenshiname, shop_action.zhifufangshi, shop_action.songhuofangshi, shop_action.zhuangtai, shop_books.bookname, shop_action.actiondate, shjia.name, shjia.UserName FROM ((shjia INNER JOIN shop_action ON shjia.shjiaID = shop_action.shjiaid) INNER JOIN shop_books ON (shjia.shjiaID = shop_books.shjiaid) AND (shop_action.bookid = shop_books.bookid)) INNER JOIN [user] ON shop_action.userid = user.UserID where shop_action.dingdan='"&namekey&"' and shop_action.shjiaid="&id&" order by shop_action.actiondate ",conn,1,1
case "2"
rs.open "SELECT user.username,shop_action.userid,shop_action.shjiaid,shop_action.actionid, shop_action.dingdan, shop_action.userzhenshiname, shop_action.zhifufangshi, shop_action.songhuofangshi, shop_action.zhuangtai, shop_books.bookname, shop_action.actiondate, shjia.name, shjia.UserName FROM ((shjia INNER JOIN shop_action ON shjia.shjiaID = shop_action.shjiaid) INNER JOIN shop_books ON (shjia.shjiaID = shop_books.shjiaid) AND (shop_action.bookid = shop_books.bookid)) INNER JOIN [user] ON shop_action.userid = user.UserID where shjia.UserName='"&namekey&"' and shop_action.shjiaid="&id&" order by shop_action.actiondate ",conn,1,1
case "3"
rs.open "SELECT user.username,shop_action.userid,shop_action.shjiaid,shop_action.actionid, shop_action.dingdan, shop_action.userzhenshiname, shop_action.zhifufangshi, shop_action.songhuofangshi, shop_action.zhuangtai, shop_books.bookname, shop_action.actiondate, shjia.name, shjia.UserName FROM ((shjia INNER JOIN shop_action ON shjia.shjiaID = shop_action.shjiaid) INNER JOIN shop_books ON (shjia.shjiaID = shop_books.shjiaid) AND (shop_action.bookid = shop_books.bookid)) INNER JOIN [user] ON shop_action.userid = user.UserID where shop_books.bookname='"&namekey&"' and shop_action.shjiaid="&id&" order by shop_action.actiondate ",conn,1,1
case "4"
rs.open "SELECT user.username,shop_action.userid,shop_action.shjiaid,shop_action.actionid, shop_action.dingdan, shop_action.userzhenshiname, shop_action.zhifufangshi, shop_action.songhuofangshi, shop_action.zhuangtai, shop_books.bookname, shop_action.actiondate, shjia.name, shjia.UserName FROM ((shjia INNER JOIN shop_action ON shjia.shjiaID = shop_action.shjiaid) INNER JOIN shop_books ON (shjia.shjiaID = shop_books.shjiaid) AND (shop_action.bookid = shop_books.bookid)) INNER JOIN [user] ON shop_action.userid = user.UserID where shjia.name='"&namekey&"' and shop_action.shjiaid="&id&" order by shop_action.actiondate ",conn,1,1
case "5"
rs.open "SELECT user.username,shop_action.userid,shop_action.shjiaid,shop_action.actionid, shop_action.dingdan, shop_action.userzhenshiname, shop_action.zhifufangshi, shop_action.songhuofangshi, shop_action.zhuangtai, shop_books.bookname, shop_action.actiondate, shjia.name, shjia.UserName FROM ((shjia INNER JOIN shop_action ON shjia.shjiaID = shop_action.shjiaid) INNER JOIN shop_books ON (shjia.shjiaID = shop_books.shjiaid) AND (shop_action.bookid = shop_books.bookid)) INNER JOIN [user] ON shop_action.userid = user.UserID where user.username='"&namekey&"' and shop_action.shjiaid="&id&" order by shop_action.actiondate ",conn,1,1
end select
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,"editdingdan.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"editdingdan.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"editdingdan.asp"
end if
end if
end if
sub showContent
dim i
i=0
%>
<table class="tableBorder" width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<form name="form1" method="post" action="editdingdan.asp?action=del">
<tr bgcolor="#E8F1FF">
<td colspan="7" align="right" background="../images/admin_bg_1.gif"><b><font color="#ffffff">订单号下单用户订货人姓名付款方式收货方式订单状态</font></b>
<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="editdingdan.asp?zhuangtai=0" selected>--选择查讯状态--</option>
<option value="editdingdan.asp?zhuangtai=0" >全部订单状态</option>
<option value="editdingdan.asp?zhuangtai=1" >未作任何处理</option>
<option value="editdingdan.asp?zhuangtai=2" >用户已经划出款</option>
<option value="editdingdan.asp?zhuangtai=3" >服务商已经收到款</option>
<option value="editdingdan.asp?zhuangtai=4" >服务商已经发货</option>
<option value="editdingdan.asp?zhuangtai=5" >用户已经收到货</option>
</select></td>
</tr>
<tr bgcolor="#E8F1FF">
<td width="17%" align="center">订单号</td>
<td width="16%" align="center">下单用户</td>
<td width="18%" align="center">订货人姓名</td>
<td width="16%" align="center">付款方式</td>
<td width="13%" align="center">收货方式</td>
<td width="14%" align="center">订单状态</td>
<td width="6%" align="center">选 择</td>
</tr>
<%do while not rs.eof
dim Godbook,username
set Godbook=server.CreateObject("adodb.recordset")
Godbook.open "select username from [user] where userid="&rs("userid"),conn,1,1
username=trim(Godbook("username"))
Godbook.close
set Godbook=nothing
%>
<tr bgcolor="#E8F1FF">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -