?? manage_eshop.asp
字號:
<!--#include file="conn.asp"-->
<script language="javascript">
function confirmdel(id,page){
if (confirm("真的要?jiǎng)h除這個(gè)訂單?"))
window.location.href="Delorderlist.asp?id="+id+"&page="+page
}
</script>
<html>
<head>
<title>專題管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Admin_Style.css" rel="stylesheet" type="text/css">
</head>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top">
<strong><br>
</strong> <table width="759" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="24">
<div align="center" style="background-image: url('../Images/topbg1.gif')"><strong>訂單管理</strong></div></td>
</tr>
<tr>
<td>
<%
flag="尚未處理"
set rs=server.createobject("adodb.recordset")
sqltext="select * from OrderList order by RegTime desc"
rs.open sqltext,conn,1,1
dim MaxPerPage
MaxPerPage=20
'假如沒有數(shù)據(jù)時(shí)
'If rs.eof and rs.bof then
'call showpages
'response.write "<p align='center'><font color='#ff0000'>還沒任何用戶訂單</font></p>"
'response.end
'End if
'取得頁數(shù),并判斷用戶輸入的是否數(shù)字類型的數(shù)據(jù),如不是將以第一頁顯示
dim text,checkpage
text="0123456789"
Rs.PageSize=MaxPerPage
for i=1 to len(request("page"))
checkpage=instr(1,text,mid(request("page"),i,1))
if checkpage=0 then
exit for
end if
next
If checkpage<>0 then
If NOT IsEmpty(request("page")) Then
CurrentPage=Cint(request("page"))
If CurrentPage < 1 Then CurrentPage = 1
If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount
Else
CurrentPage= 1
End If
If not Rs.eof Then Rs.AbsolutePage = CurrentPage end if
Else
CurrentPage=1
End if
call showpages
call list
If Rs.recordcount > MaxPerPage then
call showpages
end if
'顯示帖子的子程序
Sub list()%>
<table width="100%" border="0" cellspacing="2" cellpadding="3">
<tr>
<td width="18%" height="25" bgcolor="#E1F4EE"> <div align="center">訂單編號</div></td>
<td width="20%" bgcolor="#E1F4EE"> <div align="center">客戶姓名</div></td>
<td width="22%" bgcolor="#E1F4EE"> <div align="center">聯(lián)系電話</div></td>
<td width="15%" bgcolor="#E1F4EE"> <div align="center">處理情況</div></td>
<td width="15%" bgcolor="#E1F4EE"> <div align="center">訂單詳情</div></td>
<td width="10%" bgcolor="#E1F4EE"> <div align="center">操作</div></td>
</tr>
<%
if not rs.eof then
i=0
do while not rs.eof
%>
<tr>
<td bgcolor="#E1F4EE"> <div align="center"><%=rs("Form_Id")%></div></td>
<td bgcolor="#E1F4EE"> <div align="center"><%=rs("UserName")%></div></td>
<td bgcolor="#E1F4EE"> <div align="center"><%=rs("Phone")%></div></td>
<td bgcolor="#E1F4EE"> <div align="center">
<%If rs("Flag")="尚未處理" Then%>
尚未處理
<%else%>
<b><font color="#FF0000">已經(jīng)發(fā)貨</font></b>
<%End If%>
</div></td>
<td bgcolor="#E1F4EE"> <div align="center">
<%response.write "<a href='Manage_Eshop_detail.asp?ID="&rs("Form_Id")&"&page="&CurrentPage&"' >詳細(xì)資料</a>"
%>
</div></td>
<td bgcolor="#E1F4EE"> <div align="center">
<%response.write "<a href='javascript:confirmdel(" & rs("Form_Id") & ","& CurrentPage&")'>刪除</a>"
%>
</div></td>
</tr>
<%
i=i+1
if i >= MaxPerpage then exit do
rs.movenext
loop
end if
%>
<tr bgcolor="#C0C0C0">
<td height="25" colspan="6" bgcolor="#E1F4EE">
<%
Response.write "<strong><font color='#000000'>-> 全部-</font>"
Response.write "共</font>" & "<font color=#FF0000>" & Cstr(Rs.RecordCount) & "</font>" & "<font color='#000000'>件商品</font></strong> "
Response.write "<strong><font color='#000000'>第</font>" & "<font color=#FF0000>" & Cstr(CurrentPage) & "</font>" & "<font color='#000000'>/" & Cstr(rs.pagecount) & "</font></strong> "
If currentpage > 1 Then
response.write "<strong><a href='Manage_Product.asp?&page="+cstr(1)+"'><font color='#000000'>首頁</font></a><font color='#ffffff'> </font></strong>"
Response.write "<strong><a href='Manage_Product.asp?page="+Cstr(currentpage-1)+"'><font color='#000000'>上一頁</font></a><font color='#ffffff'> </font></strong>"
Else
Response.write "<strong><font color='#000000'>上一頁 </font></strong>"
End if
If currentpage < Rs.PageCount Then
Response.write "<strong><a href='Manage_Product.asp?page="+Cstr(currentPage+1)+"'><font color='#000000'>下一頁</font></a><font color='#ffffff'> </font>"
Response.write "<a href='Manage_Product.asp?page="+Cstr(Rs.PageCount)+"'><font color='#000000'>尾頁</font></a></strong> "
Else
Response.write ""
Response.write "<strong><font color='#000000'>下一頁</font></strong> "
End if
'response.write "</td><td align='right'>"
'response.write "<font color='#000000' >轉(zhuǎn)到:</font><input type='text' name='page' size=4 maxlength=4 class=smallInput value="&Currentpage&"> "
'response.write "<input class=buttonface type='submit' value='Go' name='cndok'> "
%>
</td>
</tr>
</table>
<%
End sub
rs.close
conn.close
%>
</td>
</tr>
</table>
</td>
</tr>
</table>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -