?? orderlist.asp
字號:
<!--#include file="conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
if request("action")="delete" then
sql="delete * from orderlist where oid='"&request("oid")&"'"
conn.execute sql
response.write "<script language=Javascript>alert('成功刪除此訂單!');window.location='orderlist.asp';</script>"
end if
if request("action")="dindan" then
sql="update orderlist set is_audit=1 where oid='"&request("oid")&"'"
conn.execute sql
response.write "<script language=Javascript>alert('訂單處理成功!');window.location='orderlist.asp';</script>"
end if
sql="select * from orderlist order by oid desc"
rs.open sql,conn,1,1
rs.pagesize=10
%>
<html>
<head>
<title>產(chǎn)品類別管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../edit.css" type="text/css">
<script>
function openurl(id) { window.open("list.asp?oid="+id,"","height=400,width=500,left=190,top=10,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");}
</script>
</head>
<body bgcolor="#9CC7EF" text="#000000">
<br>
<br>
<table width="80%" border="1" bordercolordark=#9CC7EF bordercolorlight=#145AA0 cellspacing="0" cellpadding="4" align="center">
<tr bgcolor="#4296E7">
<td colspan="6"> >訂單管理</td>
</tr>
<tr>
<td width="20%" height="25" align="center" nowrap>訂單號</td>
<td width="20%" align="center" nowrap>訂貨人</td>
<td width="20%" align="center" nowrap>產(chǎn) 品</td>
<td width="20%" align="center" nowrap>訂貨日期</td>
<td colspan="2" align="center" nowrap>操作</td>
</tr>
<%
if not rs.eof then
if request("page")="" then
page=1
else
page=cint(request("page"))
end if
rs.absolutepage=page
end if
for i=1 to rs.pagesize
if not rs.eof then
%>
<tr>
<td height="25" align="center"><a href="javascript:openurl(<%=rs("Form_Id")%>)"><%=rs("Form_Id")%></a></td>
<td align="center"><%=rs("name")%></td>
<td align="center"><a href="../ArticleShow.asp?hw_id=<%=rs("hw_id")%>" target="_blank"><%
set res=server.CreateObject("adodb.recordset")
sql="select hw_name from shop where hw_id="&rs("hw_id")&""
res.open sql,conn,1,1
if not res.eof then
response.Write res("hw_name")
end if
res.close
%></a></td>
<td align="center"><%=rs("pub_time")%></td>
<td align="center"><%if rs("is_audit")=1 then%><font color="#FF0000">已發(fā)貨</font><%else%><a href="?action=dindan&oid=<%=rs("oid")%>">訂單處理</a><%end if%></td>
<td align="center"><a href="?action=delete&oid=<%=rs("oid")%>">訂單刪除</a></td>
</tr>
<%
rs.movenext
end if
next
%>
<tr align="right" bgcolor="#4296E7">
<td colspan="6"><strong>第 <font color=#ff6600><%=page%></font> 頁/共 <font color=#ff6600><%=rs.pagecount%></font>
頁 <font color=#666666>
<%if page>1 then%>
<a href="?page=<%=(page-1)%>">上一頁</a>
<%else%>
上一頁
<%end if%>
</font> <font color=#666666>
<%if page<rs.pagecount then%>
<a href="?page=<%=(page+1)%>">下一頁</a>
<%else%>
下一頁
<%end if%>
</font></strong></td>
</tr>
</table>
</body>
</html>
<%
conn.close
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -