📄 exportmoney50.asp
字号:
<%response.ContentType ="application/vnd.ms-excel"%>
<% Response.AddHeader "Content-Disposition", "attachment; filename=奖金前50名会员"%>
<!-- #include file="include/adovbs.inc" -->
<!-- #include file="include/dataconn.asp" -->
<!-- #include file="include/checksession.asp" -->
<!-- #include file="common.asp" -->
<%
Response.Buffer =false
Response.Expires=-1
'thistoday =year(now)&"-"&month(now)&"-"&day(now)
dtfrom=trim(request("dtfrom"))
dtto=trim(request("dtto"))
set HyRs=server.CreateObject("adodb.recordset")
sql = "SELECT HyNumber,sum(AllMoney) as MoneyCount FROM HyMoneyLog"
sql =sql & " where computetime>='"&dtfrom&"' and computetime<='"&dtto&"'"
sql =sql & " group by HyNumber order by sum(AllMoney) desc"
HyRs.Open sql,conn
j=HyRs.RecordCount
%>
<html>
<head>
<meta NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<META http-equiv=Content-Type content="text/html; charset=gb2312">
</head>
<body leftmargin="10" topmargin="10" marginwidth="0" marginheight="0">
<%
if j>0 then
%>
<table border="1" cellpadding="0" cellspacing="0" width="98%" bordercolordark="#e0f4ff" bordercolorlight="#162d6b">
<tr bgcolor="#DDDDDD">
<td width="4%"> <div align="center">序号</div></td>
<td width="6%"> <div align="center">姓名</div></td>
<td width="6%"> <div align="center">会员编号</div></td>
<td width="8%"> <div align="center">当月奖金</div></td>
</tr>
<%
dim x
i=1
while (not HyRs.eof)
%>
<tr height="25">
<td> <div align="center">
<% =i%>
</div></td>
<td><div align="center">
<%=GetNameByNumber(HyRs("HyNumber"))%> </div></td>
<td><div align="center"><%=HyRs("HyNumber")%> </div></td>
<td> <div align="center">
<% =HyRs("MoneyCount")%>
</div></td>
<%
HyRs.movenext
i=i+1
wend %>
</tr>
<%
else
Response.Write "奖金还没有计算!<a href='javascript:history.back()'>返回</a>"
end if%>
</table>
<p></p>
<%if j>0 then%>
<%end if%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -