?? admin_toll1.asp
字號:
<!--#include file="head.asp"-->
<!--#include file="AdminSession.asp"-->
<%
dim totalPut
dim CurrentPage
dim MaxPerPage
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
MaxPerPage=20
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="95%" border="0" align="center" cellpadding="6" cellspacing="1" bgcolor="#0099CC" >
<tr bgcolor="e9effe">
<td height="30" colspan="12" align="center"><b>+ 訂 單 管 理 +</b></td>
</tr>
<tr align="center" bgcolor="e9effe">
<td height="25">ID</td>
<td>交易類型</td>
<td>發(fā)布人</td>
<td>應(yīng)答人</td>
<td>交易數(shù)量[點]</td>
<td>單價[分]</td>
<td>總金額[元]</td>
<td>交易狀態(tài)</td>
<td>發(fā)布時間</td>
<td>成交時間</td>
<td>賣方收入</td>
<td>網(wǎng)站所得</td>
</tr>
<tr bgcolor="e9effe">
<td height="25" colspan="12">
<%
Sql = "Select * from Business order by Id desc"
rs.open sql,conn,3,3
if rs.eof and rs.bof then
Response.Write "<center><font color=red>還沒有訂單。</font></center>"
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
'showpage totalput,MaxPerPage,"admin_toll1.asp"
showContent
showpage totalput,MaxPerPage,"admin_toll1.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
'showpage totalput,MaxPerPage,"admin_toll1.asp"
showContent
showpage totalput,MaxPerPage,"admin_toll1.asp"
else
currentPage=1
'showpage totalput,MaxPerPage,"admin_toll1.asp"
showContent
showpage totalput,MaxPerPage,"admin_toll1.asp"
end if
end if
rs.close
set rs = nothing
end if
sub showContent
dim i
i=0
%> </td>
</tr>
<form action="" name="form1" method="post">
<%do while not rs.eof%>
<tr bgcolor="e9effe">
<td height="25" align="center"><%=rs("Id")%></td>
<td height="25" align="left"><%=rs("TradeType")%></td>
<td height="25" align="left"><%=GetName(rs("UserId"))%></td>
<td height="25" align="left"><%=GetName(rs("TollUserId"))%></td>
<td height="25" align="left"><%=rs("Quantity")%></td>
<td height="25" align="left"><%=rs("UnitPrice")%></td>
<td height="25" align="left"><%=rs("Amount")%></td>
<td height="25" align="left"><%=rs("TradeState")%></td>
<td height="25" align="left"><%=rs("PostTime")%></td>
<td height="25" align="left"><%=rs("BargainTime")%></td>
<td height="25" align="left"><%=rs("FactAmount")%></td>
<td height="25" align="left"><%=rs("ScotAmount")%></td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
<tr bgcolor="e9effe">
<td height="25" colspan="12"> </td>
</tr>
</form>
<tr bgcolor="e9effe">
<td height="25" colspan="12">
<%
end sub
function showpage(totalnumber,maxperpage,filename)
dim n
'on error resume next
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write "<table cellspacing=1 width='100%' border=0 colspan='4' ><form method=Post action="""&filename&"""><tr><td align=right> "
if CurrentPage<2 then
response.write "共<b><font color=red>"&totalnumber&"</font></b>個站點 首頁 上一頁 "
else
response.write "共<b><font color=red>"&totalnumber&"</font></b>個站點 <a href="&filename&"?page=1>首頁</a> "
response.write "<a href="&filename&"?page="&CurrentPage-1&">上一頁</a> "
end if
if n-currentpage<1 then
response.write "下一頁 尾頁"
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)&">"
response.write "下一頁</a> <a href="&filename&"?page="&n&">尾頁</a>"
end if
response.write " 頁次:<strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>頁 "
response.write " <b>"&maxperpage&"</b>個站點/頁 "
%>
轉(zhuǎn)到:
<select name='page' size='1' style="font-size: 9pt" onchange='javascript:submit()'>
<%for i = 1 to n%>
<option value='<%=i%>' <%if CurrentPage=cint(i) then%> selected <%end if%>>第<%=i%>頁</option>
<%next%>
</select>
<%
response.write "</td></tr></FORM></table>"
end function
Function GetName(UserId)
if UserId="" or isnull(UserId) then
GetName=""
else
sql="select UserName from Users where Id="&UserId
set rs_User=conn.execute (sql)
if not rs_User.eof then
GetName=rs_User(0)
else
GetName=""
end if
rs_User.close
end if
End Function
%></td>
</tr>
</table>
<SCRIPT language=javascript>
var menu=new Array(["查看訂單"]);
drawMenu(menu);
setFrameActive();
</SCRIPT>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -