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

📄 admin_toll1.asp

📁 本源代码为 网雷弹窗联盟程序的源代码,欢迎大家的下载,学习与交流
💻 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>&nbsp;</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>发布人</td>
    <td>应答人</td>
    <td>交易数量[点]</td>
    <td>单价[分]</td>
    <td>总金额[元]</td>
    <td>交易状态</td>
    <td>发布时间</td>
    <td>成交时间</td>
    <td>卖方收入</td>
    <td>网站所得</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">&nbsp;</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>个站点&nbsp;首页 上一页&nbsp;"
  	else
    		response.write "共<b><font color=red>"&totalnumber&"</font></b>个站点&nbsp;<a href="&filename&"?page=1>首页</a>&nbsp;"
    		response.write "<a href="&filename&"?page="&CurrentPage-1&">上一页</a>&nbsp;"
  	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 "&nbsp;页次:<strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>页 "
    	response.write "&nbsp;<b>"&maxperpage&"</b>个站点/页 "
%>
转到:
  <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>

⌨️ 快捷键说明

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