📄 sort_count.asp
字号:
<%'创建时间:2004/07/12
'创建人:
'功能:用于代理统计
%>
<!--#include file="Include/conn.asp"-->
<!--#include file="Include/Islogin.asp"-->
<% type1=request.querystring("type1")
rank=request.querystring("rank")
set Count_rs=server.createobject("adodb.recordset")
' if rank=2 then
'Count_sql="select Invest_type,a.Invest_name,cs,Invest_issue,sm ,T_commision,Fact_money= sm*(1-T_commision) from ( select Invest_type,Invest_name,Invest_issue,cs=count(Invest_type),sm=sum(Invest_money) from Invest where Invest_frist='"&session("A_name")&"' and Invest_banlance=0 group by Invest_type,Invest_name,Invest_issue ) a left join member b on a.Invest_name=b.member_name order by a.Invest_type"
'else if rank=3 then
'Count_sql="select Invest_type,a.Invest_name,cs,Invest_issue,sm ,T_commision,Fact_money= sm*(1-T_commision) from ( select Invest_type,Invest_name,Invest_issue,cs=count(Invest_type),sm=sum(Invest_money) from Invest where Invest_second='"&session("A_name")&"' and Invest_banlance=0 group by Invest_type,Invest_name,Invest_issue ) a left join member b on a.Invest_name=b.member_name order by a.Invest_type"
'else
'Count_sql="select Invest_type,a.Invest_name,cs,Invest_issue,sm ,T_commision,Fact_money= sm*(1-T_commision) from ( select Invest_type,Invest_name,Invest_issue,cs=count(Invest_type),sm=sum(Invest_money) from Invest where Invest_second='"&session("A_name")&"' or Invest_frist='"&session("A_name")&"' and Invest_banlance=0 group by Invest_type,Invest_name,Invest_issue ) a left join member b on a.Invest_name=b.member_name order by a.Invest_type"
'end if
'end if
if rank=2 then
Count_sql="select Invest_type,a.Invest_name,cs,Invest_issue,sm ,Commision=case when Invest_type='1' then T_commision when Invest_type='2' then Z_commision when Invest_type='3' then Twain_commision when Invest_type='4' then L_commision end,Fact_money=case when Invest_type='1' then sm*(1-T_commision) when Invest_type='2' then sm*(1-Z_commision) when Invest_type='3' then sm*(1-Twain_commision) when Invest_type='4' then sm*(1-L_commision) end from ( select Invest_type,Invest_name,Invest_issue,cs=count(Invest_type),sm=sum(Invest_money) from Invest where Invest_frist='"&session("A_name")&"' and Invest_banlance=0 group by Invest_type,Invest_name,Invest_issue ) a left join member b on a.Invest_name=b.member_name order by a.Invest_type"
else if rank=3 then
Count_sql="select Invest_type,a.Invest_name,cs,Invest_issue,sm ,Commision=case when Invest_type='1' then T_commision when Invest_type='2' then Z_commision when Invest_type='3' then Twain_commision when Invest_type='4' then L_commision end,Fact_money=case when Invest_type='1' then sm*(1-T_commision) when Invest_type='2' then sm*(1-Z_commision) when Invest_type='3' then sm*(1-Twain_commision) when Invest_type='4' then sm*(1-L_commision) end from ( select Invest_type,Invest_name,Invest_issue,cs=count(Invest_type),sm=sum(Invest_money) from Invest where Invest_second='"&session("A_name")&"' and Invest_banlance=0 group by Invest_type,Invest_name,Invest_issue ) a left join member b on a.Invest_name=b.member_name order by a.Invest_type"
else
Count_sql="select Invest_type,a.Invest_name,cs,Invest_issue,sm ,Commision=case when Invest_type='1' then T_commision when Invest_type='2' then Z_commision when Invest_type='3' then Twain_commision when Invest_type='4' then L_commision end,Fact_money=case when Invest_type='1' then sm*(1-T_commision) when Invest_type='2' then sm*(1-Z_commision) when Invest_type='3' then sm*(1-Twain_commision) when Invest_type='4' then sm*(1-L_commision) end from ( select Invest_type,Invest_name,Invest_issue,cs=count(Invest_type),sm=sum(Invest_money) from Invest where Invest_second='"&session("A_name")&"' or Invest_frist='"&session("A_name")&"' and Invest_banlance=0 group by Invest_type,Invest_name,Invest_issue ) a left join member b on a.Invest_name=b.member_name order by a.Invest_type"
end if
end if
Count_rs.open Count_sql,conn,1,1
%>
<html>
<head>
<link href="include/css.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
body {
margin-top: 0px;
}
.style2 {color: #FF9900}
.style4 {color: #FF9900; font-weight: bold; }
.unnamed1 {
color: #FF9900;
text-decoration: none;
}
a:link {
color: #FF6600;
text-decoration: none;
}
a:visited {
color: #CC9900;
text-decoration: none;
}
a:hover {
color: #FF6600;
text-decoration: none;
}
-->
</style></head>
<body style="background-color: #F2F2F2">
<BR>
<table border="1" width="739" cellspacing="0" cellpadding="0" bordercolor="#E0E0E0" style="border-collapse: collapse" height="10%">
<tr>
<td width="731" valign="top">
<center><table width="96%" border="1" cellspacing="1" bordercolor="#F2F2F2" bordercolorlight="#F2F2F2" bordercolordark="#9D9CA4">
<tr bgcolor="#f2f2f2">
<td colspan="12"><span class="style4"><a href="A_count.asp?rank=2">下级代理</a> <a href="A_count.asp?rank=3">直属会员</a> <a href="A_count.asp">所有的</a> </span></td>
</tr>
<tr bgcolor="#f2f2f2">
<td colspan="12"><span class="style2">
<input type="radio" name="radiobutton" onclick="javascript:self.location.href='Sort_count.asp?type1=1'">
特码
<input type="radio" name="radiobutton" onclick="javascript:self.location.href='Sort_count.asp?type1=2'">
正码
<input type="radio" name="radiobutton" >
正码1-6 <input type="radio" name="radiobutton" onclick="javascript:self.location.href='Sort_count.asp?type1=3'">
两面 <input type="radio" name="radiobutton" >
波色 <input type="radio" name="radiobutton" onclick="javascript:self.location.href='Sort_count.asp?type1=4'"> 连码</span></td>
</tr>
<tr align="center" bgcolor="#CCCCCC">
<td width="16%" height="25" bgcolor="#BCD5E4">类别</td>
<td width="8%" height="25" bgcolor="#BCD5E4">投注会员</td>
<td width="18%" height="25" bgcolor="#BCD5E4">投注金额</td>
<td width="12%" height="25" bgcolor="#BCD5E4">实投</td>
<td width="12%" height="25" bgcolor="#BCD5E4">佣金</td>
<td width="12%" height="25" bgcolor="#BCD5E4">彩金</td>
<td width="22%" height="25" bgcolor="#BCD5E4">下注期数</td>
</tr>
<%
do while not Count_rs.eof
%>
<tr align="center" bgcolor="#f2f2f2">
<td><%select case Count_rs("Invest_type")
case "1"
response.write "特码"
case "2"
response.write "正码"
case "3"
response.write "两面"
case "4"
response.write "连码"
end select%> </td>
<td><%=Count_rs("Invest_name")%> </td>
<td><%=Count_rs("sm")%> </td>
<td><font color="#ff0000"><%=Count_rs("Fact_money")%></font> </td>
<td><%=formatnumber(Count_rs("Commision"),,-1)%> </td>
<td><%=Count_rs("sm")*Count_rs("commision")%> </td>
<td><%=Count_rs("Invest_issue")%> </td>
</tr>
<%Count_rs.movenext
loop%>
<tr align="center" bgcolor="#f2f2f2">
<td> </td>
<td></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -