?? editcarddingdan.asp
字號(hào):
<!--#include file="conn.asp"-->
<%if session("bjxadmin")="" then
response.Write "<script language='javascript'>alert('網(wǎng)絡(luò)超時(shí)或您還沒(méi)有登陸!');window.location.href='login.asp';</script>"
response.End
else
if session("flag")=2 then
response.Write "<p align=center><font color=red>您沒(méi)有此項(xiàng)目管理權(quán)限!</font></p>"
response.End
end if
end if
dim action,card_dingdanid
card_dingdanid=request("card_dingdanid")
action=request("action")
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from BJX_card_dingdan where card_dingdanid="&card_dingdanid&" ",conn,1,3
if action="no" then
rs("zhuangtai")=1
rs.Update
rs.Close
set rs=nothing
end if
if action="yes" then
rs("zhuangtai")=0
rs.Update
rs.Close
set rs=nothing
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">
<style type="text/css">
<!--
.style1 {
color: #FFFFFF;
font-weight: bold;
}
-->
</style>
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td valign="top">
<%'開(kāi)始分頁(yè)
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")
rs.open "select * from BJX_card_dingdan ",conn,1,1
if rs.eof And rs.bof then
Response.Write "<p align='center' class='contents'> 對(duì)不起,您選擇的狀態(tài)目前還沒(méi)有訂單!</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,"editcarddingdan.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"editcarddingdan.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"editcarddingdan.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">
<tr >
<td colspan="7" align="right" background="../images/admin_bg_1.gif"><div align="center" class="style1">點(diǎn)卡訂單管理</div></td>
</tr>
<tr >
<td width="20%" align="center">訂單號(hào)</td>
<td width="8%" align="center">貨物</td>
<td width="10%" align="center">訂貨人姓名</td>
<td width="10%" align="center">電話</td>
<td width="15%" align="center">Email</td>
<td align="center">地址</td>
<td width="10%" align="center">處理</td>
</tr><%do while not rs.eof%>
<tr >
<td align="center"><%=rs("dingdanhao")%></td>
<td align="center"><a href="addcard.asp?bookid=<%=rs("bookid")%>"><%=rs("bookid")%></a></td>
<td align="center"><%=rs("userzhenshiname")%></td>
<td align="center"><%=rs("usertel")%></td>
<td align="center"><%=rs("useremail")%></td>
<td align="center"><%=rs("shouhuodizhi")%>(<%=rs("youbian")%>)</td>
<td align="center"><% if rs("zhuangtai")=0 then %>
<a href="editcarddingdan.asp?card_dingdanid=<%=rs("card_dingdanid")%>&action=no"><font color=red>未處理</font></a>
<%else%>
<a href="editcarddingdan.asp?card_dingdanid=<%=rs("card_dingdanid")%>&action=yes"><font color=blue>已處理</font></a>
<%end if%></td>
</tr>
<%i=i+1
if i>=MaxPerPage then Exit Do
rs.movenext
loop
rs.close
set rs=nothing%>
</table>
<%
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&"?zhuangtai="&zhuangtai&">"
else
Response.Write "<form method=Post action="&filename&"?zhuangtai="&zhuangtai&"&namekey="&namekey&">"
end if
'//////////////////
Response.Write "<p align='center' class='contents'> "
If CurrentPage<2 Then
Response.Write "<font class='contents'>首頁(yè) 上一頁(yè)</font> "
Else
'///////////////////
if namekey="" then
Response.Write "<a href="&filename&"?page=1&zhuangtai="&zhuangtai&" class='contents'>首頁(yè)</a> "
Response.Write "<a href="&filename&"?page="&CurrentPage-1&"&zhuangtai="&zhuangtai&" class='contents'>上一頁(yè)</a> "
ELSE
Response.Write "<a href="&filename&"?page=1&zhuangtai="&zhuangtai&"&namekey="&namekey&" class='contents'>首頁(yè)</a> "
Response.Write "<a href="&filename&"?page="&CurrentPage-1&"&zhuangtai="&zhuangtai&"&namekey="&namekey&" class='contents'>上一頁(yè)</a> "
end if
'//////////////////
End If
If n-currentpage<1 Then
Response.Write "<font class='contents'>下一頁(yè) 尾頁(yè)</font>"
Else
'////////////////////////
if namekey="" then
Response.Write "<a href="&filename&"?page="&(CurrentPage+1)&"&zhuangtai="&zhuangtai&" class='contents'>"
Response.Write "下一頁(yè)</a> <a href="&filename&"?page="&n&"&zhuangtai="&zhuangtai&" class='contents'>尾頁(yè)</a>"
else
Response.Write "<a href="&filename&"?page="&(CurrentPage+1)&"&zhuangtai="&zhuangtai&"&namekey="&namekey&" class='contents'>"
Response.Write "下一頁(yè)</a> <a href="&filename&"?page="&n&"&zhuangtai="&zhuangtai&"&namekey="&namekey&" class='contents'>尾頁(yè)</a>"
end if
'/////////////////////
End If
Response.Write "<font class='contents'> 頁(yè)次:</font><font class='contents'>"&CurrentPage&"</font><font class='contents'>/"&n&"頁(yè)</font> "
Response.Write "<font class='contents'> 共有"&totalnumber&"筆訂單 "&maxperpage&"筆訂單/頁(yè)</font> "
Response.Write "<font class='contents'>轉(zhuǎn)到:</font><input type='text' name='page' size=2 maxlength=10 class=smallInput value="¤tpage&">"
Response.Write " <input type='submit' class='contents' value='GO' name='cndok'></form>"
End Function
%>
</td>
</tr>
</table>
<!--#include file="bjxfoot.asp"-->
</body>
</html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -