?? buyer_report.asp
字號:
<!--#include file="chk.asp"-->
<!--#include file="db_conn.asp"-->
<!--#include file="../my_lib/my_request.asp"-->
<!--#include file="../my_lib/pages.asp"-->
<html>
<head>
<title>購物圖表</title>
<LINK href="style.css" rel=stylesheet type=text/css>
</head>
<body>
<!--#include file="TopManu.asp"-->
<br><div align="center">
<table border="0" width="100%" id="table1" cellspacing="0" style="border-collapse: collapse" cellpadding="0">
<tr>
<td background="image/admintoptdbg.gif">
<p align="left">
<img border="0" src="image/title_arrow.bmp" width="17" height="27" align="absmiddle"><font color="#808080"><b>打印該頁購物報表</b></font></td>
</tr>
</table>
<table width="100%" cellpadding="4" style="border: 1px solid #CCCCCC; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px; border-collapse:collapse">
<tr>
<td align="center" bgcolor="#EFEFEF" height="15" width="51">ID </td>
<td align="center" bgcolor="#EFEFEF" height="15" width="130">會員賬號</td>
<td align="center" bgcolor="#EFEFEF" height="15" width="159">注冊日期</td>
<td align="center" bgcolor="#EFEFEF" height="15" width="123">累計購物總額</td>
<td align="center" bgcolor="#EFEFEF" height="15" width="281">直方圖</td>
</tr>
<%
sql="select yqj_money from buyer"
set rs=server.createobject ("adodb.recordset")
rs.open sql,conn,1,1
For ii = 1 To rs.RecordCount
Amount = Amount + rs("yqj_money")
rs.MoveNext
Next
rs.close
set rs=nothing
Set rs= Server.CreateObject("ADODB.Recordset")
sql = "Select * From user_info_list"
rs.open sql,conn,1,1
if (rs.eof and rs.bof) then
response.write "<tr>"
response.write "<td width=500 colspan=4><font color=#FF0000>沒有相應(yīng)的數(shù)據(jù)</font></td>"
response.write "</tr>"
else
rs.PageSize =20 '每頁記錄條數(shù)
iCount=rs.RecordCount '記錄總數(shù)
iPageSize=rs.PageSize
maxpage=rs.PageCount
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif page>maxpage then
page=maxpage
end if
rs.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if
end if
i=1
while not rs.eof and i<=rs.pagesize
userid=rs("txt_login_name")
id=rs("id")
dat_regtime=rs("dat_regtime")
Set rss= Server.CreateObject("ADODB.Recordset")
ssql="select userid from buyer where userid='"&userid&"'"
rss.open ssql,conn,1,1
if rss.eof then
num=0
rss.close
set rss=nothing
else
sssql="select sum(product_price) as num from buyer where userid='"&userid&"'"
set rsss=conn.execute (sssql)
num=rsss("num")
rsss.close
set rsss=nothing
end if
Percent = Round((num/Amount)*100,2)
%>
<tr>
<td align="center" bgcolor="#FFFFFF" height="20" width="51"><%=(page-1)*19+i%></td>
<td align="center" bgcolor="#FFFFFF" height="20" width="130"><%response.write "<a href='memeber_info.asp?id="&id&"'>"&userid&"</a>"%></td>
<td align="left" bgcolor="#FFFFFF" height="20" width="159"><%=dat_regtime%></td>
<td align="center" bgcolor="#FFFFFF" height="20" width="123">
¥<%=num%>元</td>
<td bgcolor="#FFFFFF" height="20" width="281"><img src="image/poll.gif" width="<%= Percent * 2.5 %>" height="10">
<% = Percent %>
%</td>
</tr>
<%
rs.movenext
i=i+1
wend
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<tr>
<td colspan="5" bgcolor="#FFFFFF" height="20">
<div align="right">總購物金額:<font color="#FF3333">¥<% = formatNumber(Amount,0)%>元
</font></div></td>
</tr>
<tr>
<td colspan="5" align="center" bgcolor="#FFFFFF" height="20"><%call PageControl(iCount,maxpage,page,"border=0 align=left","<p align=center>")%></td>
</tr>
</table>
</div>
<div align="center">
<table border="1" width="100%" id="table1" cellspacing="1" style="border-collapse: collapse" bordercolor="#F3F3F3">
<tr>
<td>
<ul>
<font color="#FF0000"><li>特別說明</li></font>
<li>直方圖的來源:(單個用戶累計購物總額÷全部用戶的購物總額)×100%</li>
<li>累計購物總額為整數(shù)(四舍五入)</li>
</ul>
</td>
</tr>
</table>
</div>
<table border="0" width="760" id="table3" cellspacing="0" cellpadding="0" align=center>
<tr>
<td align=right><input TYPE="button" VALUE="刷新本頁" ONCLICK="location.reload()"> </td>
</tr>
</table>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -