📄 history_count_select.asp
字号:
Count_rs.movenext
loop
set Count_rs=nothing%>
<tr align="center" bgcolor="#f2f2f2">
<td width="70" height="12"><strong>小计:</strong></td>
<td width="114" height="12"><span class="style5 style8"><%=A_Total%></span></td>
<td align="center" width="114" height="12"><%=round(me_result) %></td>
<td align="center" width="114" height="12"><%=round(fei_result)%></td>
<td align="center" width="114" height="12"><%=round(ag_result)%></td>
<td align="center" width="114" height="12"><%=round(ma_result)%></td>
<td align="left" width="68" height="12"> </td>
<td align="left" width="72" height="12"> </td>
</tr>
</table></td>
</tr>
</table>
<% else
' End
'-----------------------------------------------------------------------------------------------------%>
<%'----------------------------------------------------------------------------------------------
'会员区:
type1=request.querystring("type1")
set Count_rs2=server.createobject("adodb.recordset")
'Count_sql2="select in_money=sum(invest_money),mem_result=isnull(sum(mem_result),0),fei_result=isnull(sum(fei_result),0),re=count(*),invest_name from (select mem_result=case when invest_result=0 then -(invest_money*(1-invest_feico))when invest_result=1 then invest_money*invest_rate-invest_money*(1-invest_feico) end ,fei_result=case when invest_result=0 then invest_money*invest_feizc-invest_money*invest_feico+invest_money*invest_agco*(invest_mazc+invest_agzc)when invest_result=1 then -(invest_money*invest_rate*invest_feizc-(invest_money*invest_feizc-invest_money*invest_feico+invest_money*invest_agco*(invest_mazc+invest_agzc))) end ,invest_money,invest_name from invest where invest_issue="&issue&" and invest_second='"&session("a_name")&"' and invest_banlance=1 and invest_amount is null) i group by invest_name "
count_sql2="select in_money=sum(invest_money),mem_result=isnull(sum(mem_result),0),fei_result=isnull(sum(fei_result),0),re=count(*),invest_name from (select mem_result=case when invest_result=0 then -(invest_money*(1-invest_feico))when invest_result=1 then invest_money*invest_rate-invest_money*(1-invest_feico) end ,fei_result=case when invest_result=0 then invest_money*invest_feizc-invest_money*invest_feico+invest_money*invest_agco*(invest_mazc+invest_agzc)when invest_result=1 then -(invest_money*invest_rate*invest_feizc-(invest_money*invest_feizc-invest_money*invest_feico+invest_money*invest_agco*(invest_mazc+invest_agzc))) end ,invest_money,invest_name from invest where invest_issue="&issue&" and invest_second='"&session("a_name")&"' and invest_banlance=1 and invest_amount is null union all SELECT mem_result = CASE WHEN invest_type <> 4 THEN (CASE WHEN invest_result = 0 THEN - (invest_money * (1 - invest_feico)) WHEN invest_result = 1 THEN invest_money * invest_rate1 - invest_money * (1 - invest_feico) END) WHEN invest_type = 4 THEN (CASE WHEN invest_result = 0 THEN - (invest_money * (1 - invest_feico) * invest_zs) WHEN invest_result = 1 THEN invest_money * win_thow * invest_rate1 + invest_money * win_zhow * invest_rate2 - invest_money * invest_zs * (1 - invest_feico) END) END, fei_result = CASE WHEN invest_type <> 4 THEN (CASE WHEN invest_result =0 THEN invest_money * invest_agzc + invest_money * invest_mazc * invest_maco - invest_money * invest_agco * (invest_mazc + invest_agzc) WHEN invest_result = 1 THEN - (invest_money * invest_rate1 * invest_agzc - (invest_money * invest_agzc + invest_money * invest_mazc * invest_maco - invest_money * invest_agco * (invest_mazc + invest_agzc))) END) WHEN invest_type = 4 THEN (CASE WHEN invest_result = 0 THEN invest_money * invest_agzc + invest_money * invest_mazc * invest_maco - invest_money * invest_agco * (invest_mazc + invest_agzc) WHEN invest_result = 1 THEN - ((invest_money * win_thow * invest_rate1 * invest_agzc + invest_money * win_zhow * invest_rate2 * invest_agzc) - (invest_money * invest_zs * invest_agzc + invest_money * invest_zs * invest_mazc * invest_maco - invest_money * invest_zs * invest_agco * (invest_mazc + invest_agzc))) END) END, Invest_money,Invest_name FROM Invest_l WHERE (Invest_issue ="&issue&") AND (invest_second='"&session("a_name")&"') AND (Invest_banlance = 1) AND (Invest_amount IS NULL) ) i group by invest_name "
Count_rs2.open Count_sql2,conn,1,1
'response.write count_sql2
'------------------------------------------------------------------------------------------------%>
<table border="1" width="739" cellspacing="0" cellpadding="0" bordercolor="#E0E0E0" style="border-collapse: collapse" height="100%">
<tr>
<td width="731" valign="top" align="center">
<center>
<table width="96%" border="1" cellspacing="1" bordercolor="#F2F2F2" bordercolorlight="#F2F2F2" bordercolordark="#9D9CA4" height="115">
<tr align="left" bgcolor="#E5EAEE">
<td height="18" colspan="17"><strong>直属会员区:( 点击投注者名字,可直接查看此会员的详细投注清况)</strong></td>
</tr>
<tr align="center" bgcolor="#E5EAEE">
<td height="18" colspan="17"><span class="style2">
<a href="#" onClick="javascript:history.go(-1)"> </a></span>
</td>
</tr>
<tr align="center" bgcolor="#CCCCCC">
<td width="8%" height="20" bgcolor="#BCD5E4">投注者</td>
<td width="12%" height="20" bgcolor="#BCD5E4">投注笔数</td>
<td width="12%" height="20" bgcolor="#BCD5E4">投注金额</td>
<td width="16%" height="20" bgcolor="#BCD5E4">投注者结果</td>
<td width="18%" bgcolor="#BCD5E4" height="20">您的最终结果</td>
<td width="18%" bgcolor="#BCD5E4" height="20">应付总代理</td>
<td width="18%" height="20" bgcolor="#BCD5E4">下注期数</td>
</tr>
<%
do while not Count_rs2.eof
%>
<tr align="center" bgcolor="#f2f2f2">
<td height="22"><a href="History_Person_detail_select.asp?name=<%=Count_rs2("Invest_name")%>&issue=<%=issue%>"><%=Count_rs2("Invest_name")%></a> </td>
<td height="22"><%=count_rs2("re")%> </td>
<td height="22"><%=int(count_rs2("in_money"))%> </td>
<td height="22"><%=int(count_rs2("mem_result"))%> </td>
<td height="22"><%=int(count_rs2("fei_result"))%> </td>
<td height="22"><%if count_rs2("mem_result")>0 then
if count_rs2("fei_result")>0 then
ag_result2=-(int(count_rs2("mem_result"))+int(count_rs2("fei_result")))
response.write ag_result2
else
ag_result2=-(int(count_rs2("mem_result"))-abs(int(count_rs2("fei_result"))))
response.write ag_result2
end if
else
ag_result2=abs(int(count_rs2("mem_result")))-int(count_rs2("fei_result"))
response.write ag_result2
end if%> </td>
<td height="22"><%=issue%> </td>
</tr>
<%Total=Total+int(count_rs2("in_money"))
Record=Record+count_rs2("re")
in_Result=in_Result+int(count_rs2("mem_result"))
fei_result=fei_result+int(count_rs2("fei_result"))
ag_result=ag_result+ag_result2
Count_rs2.movenext
loop%>
<tr align="center" bgcolor="#f2f2f2">
<td height="12"><strong>小计:</strong></td>
<td height="12"><strong>总</strong><%=Record%>笔 </td>
<td height="12">总共<%=Total%>元</td>
<td height="12">总结果:<%=in_result%>元 </td>
<td height="12"><%=fei_result%></td>
<td align="center" height="12"><%=ag_result%></td>
<td align="left" height="12"> </td>
</tr>
</table>
<%end if%>
<p> </p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -