⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_order.asp

📁 广告策划中心整站程序
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="../Comm/subconn.asp"-->

<%
dim cls
if session("admin")="" then
	Response.Redirect("admin.asp")	
else
	if session("flag")<>"0" then
	
		cls = Instr(session("flag"), "order")
		if cls <= 0 then
	%>
		<script language="javascript">
			if (confirm("您的操作权限不够,系统拒绝你的访问,请点确定返回,或者点取消退出重新登录"))
			  location.href="admin.asp";
			else
			  location.href="quit.asp";
		</script>
	<%
		end if
	end if
end if
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="admin.css" type="text/css">
<title>订单管理</title>
<style type="text/css"><!--
a:link {color: #FFFFFF;text-decoration: none;}
a:visited {color: #FFFFFF;text-decoration: none;}
a:hover {color: #FFFF99;text-decoration: underline;}
.b{color:#cccc99;font-size:10pt;border:dotted 1px}
--></style>
<script language="JavaScript" type="text/JavaScript">
function CheckAll(form)  {
  for (var i=0;i<form.elements.length;i++)    {
    var e = form.elements[i];
    if (e.name != 'chkall')       e.checked = form.chkall.checked; 
   }
  }

</script>
</head>

<body bgcolor="#336699" background="../images/bggreen.gif" text=#ffffff topmargin="0">
<!--#include file="top.asp"-->
<table border="0" cellpadding="2" cellspacing="5" style="border-collapse: collapse" bordercolor="#222222" width="772" height="150" bgcolor="#336699" align="center">
<tr><td width=125 valign="top">
<!--#include file="admin_left.asp"--> 
   </td><td valign="top" width=647>      
    <table border="1" cellpadding="2" cellspacing="4" style="border-collapse: collapse" bordercolor="#222222" width="100%">
    <tr><td width="100%">当前位置: <a href="admin.asp">网站管理中心</a>--订单管理</td></tr>
    <tr><td width="100%">
<%
action = request("action")
if request("search") = "ok" then
	
	if request("status") <> "" then
	session("status")  = request("status")
	else
	session("status")  = ""
	end if
	
	if request("ordertime") <> "" then
	session("ordertime") = request("ordertime")
	else
	session("ordertime") = ""
	end if

	if request("men") <> "" then
	session("men") = request("men")
	else
	session("men") = ""
	end if
else
end if

%>

<%
if action="" then
%>
	<br>
	<table width=100% border=0 cellpadding=2 cellspacing=2>
	<form action="admin_order.asp" name="search" method=get><tr><td>状态 <select name="status">
	<option value="" selected>---所有订单---</option>
<%	Dim a,b,c 
	'显示状态类型表
	set rs=server.createobject("adodb.recordset") 
	sql="select * from OrderStatusType Order by Status asc " 
	rs.Open sql,conn,1,1 
	if rs.bof and rs.eof then
			response.write "<option selected>-没区分状态-</option>"
	else
			Do While Not rs.eof	
				response.write "<option value='"&rs("Status")&"'>"&rs("StatusDefine")&"</option>"
				rs.movenext
				if rs.eof then
				exit do
				end if		
			loop
	end if
	rs.close
	set rs=nothing

%>
</select></td>
	<td>订购/收货人 <input type="text" name="men" size="10" maxlength="20"></td>
	<td><input type="radio" name="ordertime" value="yesterday">昨天
	<input type="radio" name="ordertime" value="today">今天
	<input type="radio" name="ordertime" value="" checked>所有
	</td><input type="hidden" name="search" value="ok">
	<td><input type="submit" value="提交"></td></tr>
	</form></table>
	<hr width="100%" size="1" noshade color=white><br>
	<SCRIPT LANGUAGE="JavaScript">
	<!--
	function checkdel(delid){	
	if(confirm('删除选定的订单'))
	{location.href="admin_prod.asp?action=del&id="+delid;}
	}
	//-->
	</SCRIPT>
	<table border="1" style="border-collapse: collapse;border:dotted 1px" bordercolor="#333333" cellpadding=3 width=100%>
	<form name=Prodlist action=admin_order.asp method=post><tr bgcolor="#003366">	
	<td nowrap align=center>订单编号</td> 
	<td nowrap width=50  align=center>总金额</td>
	<td nowrap align=center>支付类型</td>
	<td nowrap width=80 align=center>收货人</td>	
	<td nowrap align=center>下单时间</td>
	<td nowrap width=140 align=center>状态</td>
	<td>选</td>
	</tr>
<%
status = session("status")
ordertime   = session("ordertime")
men = session("men") 
dim rs,msg_per_page
	dim sql
	msg_per_page = 10 '定义每页显示记录条数
	set rs = server.createobject("adodb.recordset")
	sql = "select a.ID,a.OrderNum,a.OrderSum,a.PayType,a.RecName,a.OrderTime,a.Status,b.StatusDefine from OrderList a,OrderStatustype b where a.del=false and a.Status=b.Status "
	if status<>"" then sql = sql + " and a.Status='"&status&"'"
	if ordertime="today" then sql = sql + " and a.OrderTime = Date()"
	if ordertime="yesterday" then sql = sql + " and a.OrderTime= Date()-1"
	if men<>"" then sql= sql+ " and a.RecName like '%"&men&"%' or a.UserId like '%"&men&"%'"
	sql= sql+" order by OrderTime desc" '按照下单日期显示

	rs.cursorlocation = 3 '使用客户端游标,可以使效率提高
	rs.pagesize = msg_per_page '定义分页记录集每页显示记录数
	rs.open sql,conn,1,1 

	if err.number<>0 then '错误处理
		response.write "<br><br><br>数据库操作失败:" & err.description
		err.clear
	else
		if not (rs.eof and rs.bof) then '检测记录集是否为空
			totalrec = RS.RecordCount 'totalrec:总记录条数
			if rs.recordcount mod msg_per_page = 0 then '计算总页数,recordcount:数据的总记录数
			n = rs.recordcount\msg_per_page 'n:总页数
			else 
			n = rs.recordcount\msg_per_page+1 
			end if 
			currentpage = request("page") 'currentpage:当前页
			If currentpage <> "" then
				currentpage = cint(currentpage)
				if currentpage < 1 then 
					currentpage = 1
				end if 
				if err.number <> 0 then 
					err.clear
					currentpage = 1
				end if
			else
				currentpage = 1
			End if 
			if currentpage*msg_per_page > totalrec and not((currentpage-1)*msg_per_page < totalrec)then 
				currentPage=1
			end if
			rs.absolutepage = currentpage 'absolutepage:设置指针指向某页开头
			rowcount = rs.pagesize 'pagesize:设置每一页的数据记录数
			dim i
			dim k
	%>
			<%   
			do while not rs.eof and rowcount>0
				response.write "<tr><td class=b><a href=""admin_order.asp?action=list&ID="&rs("OrderNum")&""">"&_
				rs("OrderNum")&"</a></td><td class=b>"&_
				rs("OrderSum")&"</td><td class=b>"&rs("PayType")&"</td><td class=b>"&rs("RecName")&"</td><td class=b>"&rs("OrderTime")&_
				"</td><td class=b align=center><a href=""admin_order.asp?action=list&ID="&rs("OrderNum")&""">"&rs("StatusDefine")&"</a></td><td class=b><input type='checkbox' value='"&rs("ID")&"' name=id></td></tr>"
				
				rowcount=rowcount-1
				rs.movenext   
			loop
		else
		response.write "<tr><td colspan=9 align=center class=b><BR>无满足条件订单<BR><BR></td></tr>"
		end if
	end if     
	rs.close
	conn.close
	set rs=nothing
	set coon=nothing
	%>
	
	<tr><td colspan=6 class=b align=right>	
	<input type="submit" name="action" value="删除" onclick="{if(confirm('该操作不可恢复!\n\n确实删除选定的订单?')){this.document.Prodlist.submit();return true;}return false;}"> 	
	</td><td><input type='checkbox' name=chkall onclick='CheckAll(this.form)'></td></tr></form></table>
	<%call listPages()
else
end if%>

<%if action="cls" then
response.write "<br><br><br>这里是产品类别管理<br><br><br>"
else
end if%>
            
<%if action="list" then
	OrderNum=request("ID")
	call Orderdetail()
end if%>   

<%if action="删除" then
	delid=replace(request("id"),"'","")
	call orderdel()
end if%>

<%if action="close" then     
	ProdNum=replace(request("id")," ","")
	call prodclose()
end if%>

<%if action="modifypost" then
end if%>

<%if action="addtypepost" then
end if%>

<%if action="11" then
delid=replace(request("id")," ","")
call proddel()

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -