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

📄 history_count_select.asp

📁 1。超强文件读写锁定
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%'创建时间:2004/07/13
'创建人:
'功能:用于代理统计已结算的投注
'2006-03-52加多一个和局判断
%>
<!--#include file="Include/conn.asp"-->
<!--#include file="Include/Islogin.asp"-->
<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}
.unnamed1 {
	color: #FF9900;
	text-decoration: none;
}
.style4 {color: #FF9900; font-weight: bold; }
.style5 {
	color: #FF6600;
	font-weight: bold;
}
.style6 {color: #FF6600}
.style9 {color: #333333}
.style11 {color: #CC9900}
.style8 {color: #000000}

-->
</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" align="center">
<form name="form2" method="post" action="history_count_select.asp">
  <font size="2">请输入期数<b>:</b></font>
    <input name="issue" type="text" class="input" id="issue" size="20">
  <input name="Submit" type="submit" class="botton" value="提交">
</form>
<p>第
  <%
 issue=request.Form("issue")
  response.write issue
  dim s
  s=session("A_name")
  set M_rs=server.createobject("adodb.recordset")

    M_sql="select Agent_page,Agent_online,Agent_id,Agent_name,Agent_realname,Agent_total,Agent_list,Agent_rank,Agent_restart,Agent_fronttime,Agent_regtime from Agent where Agent_name='"&s&"'"
 M_rs.open M_sql,conn,1,3
    M_rs("Agent_page")="帐户历史"
  M_rs.update%>
  期账户历史
  <% '------------------------------------------------------------------------------------------------------------------------
'下级代理区:
if session("A_rank")=1 then
 set Count_rs=server.createobject("adodb.recordset")
'Count_sql="select invest_second, total_invest=sum(invest_money),me_result=sum(i.mem_result),ag_result=sum(i.ag_result),ma_result=sum(i.ma_result) from (select invest_money,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 ,ag_result=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_rate*invest_agzc-(invest_money*invest_agzc+invest_money*invest_mazc*invest_maco-invest_money*invest_agco*(invest_mazc+invest_agzc))) end ,ma_result=case when invest_result=0 then invest_money*invest_mazc*(1-invest_maco)when invest_result=1 then -(invest_money*invest_rate*invest_mazc-invest_money*invest_mazc*(1-invest_maco)) end ,invest_second from invest where invest_issue="&issue&" and invest_frist='"&session("a_name")&"' and invest_banlance=1 and invest_amount is null ) i group by invest_second"
count_sql="select invest_second, total_invest=sum(invest_money),me_result=sum(i.mem_result),ag_result=sum(i.ag_result),ma_result=sum(i.ma_result) from (select invest_money,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 ,ag_result=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_rate*invest_agzc-(invest_money*invest_agzc+invest_money*invest_mazc*invest_maco-invest_money*invest_agco*(invest_mazc+invest_agzc))) end ,ma_result=case when invest_result=0 then invest_money*invest_mazc*(1-invest_maco)when invest_result=1 then -(invest_money*invest_rate*invest_mazc-invest_money*invest_mazc*(1-invest_maco)) end ,invest_second from invest where invest_issue="&issue&" and invest_frist='"&session("a_name")&"' and invest_banlance=1 and invest_amount is null union all SELECT Invest_money, 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, ag_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, ma_result = CASE WHEN invest_type <> 4 THEN (CASE WHEN invest_result = 0 THEN invest_money * invest_mazc * (1 - invest_maco) WHEN invest_result = 1 THEN - (invest_money * invest_rate1 * invest_mazc - invest_money * invest_mazc * (1 - invest_maco)) END) WHEN invest_type = 4 THEN (CASE WHEN invest_result = 0 THEN invest_money * invest_mazc * (1 - invest_maco) WHEN invest_result = 1 THEN - ((invest_money * win_thow * invest_rate1 * invest_mazc + invest_money * win_zhow * invest_rate2 * invest_mazc) - invest_money * invest_zs * invest_mazc * (1 - invest_maco)) END) END,Invest_second FROM Invest_l WHERE (Invest_issue ="&issue&") AND (Invest_frist = '"&session("a_name")&"') AND (Invest_banlance = 1) AND (Invest_amount IS NULL)) i GROUP BY invest_second "
Count_rs.open Count_sql,conn,1,1
'response.write count_sql
%>
</p>
<center>
<table width="96%"  border="1" cellspacing="1" bordercolor="#F2F2F2" bordercolorlight="#F2F2F2" bordercolordark="#9D9CA4" height="87">
  <tr bgcolor="#E5EAEE">
    <td colspan="20" width="784" height="12"><span class="style11"><a href="#"><strong>分销商区:</strong></a><strong>( 点击分销商名字,可直接查看此代理的详细投注清况)</strong></span></td>
  </tr>
  <tr align="center" bgcolor="#CCCCCC">
    <td width="70" height="20" bgcolor="#BCD5E4"><span class="style9">代理商</span></td>
    <td width="114" height="20" bgcolor="#BCD5E4"><span class="style9">投注金额</span></td>
    <td width="114" height="20" bgcolor="#BCD5E4"><span class="style9">会员结果</span></td>
    <td width="114" bgcolor="#BCD5E4" height="20">应收分销商</td>
    <td width="114" bgcolor="#BCD5E4" height="20">您的最终结果</td>
    <td width="114" bgcolor="#BCD5E4" height="20">应付管理员</td>
    <td width="68" height="20" bgcolor="#BCD5E4"><span class="style9">下注期数</span></td>
    <td width="72" height="20" bgcolor="#BCD5E4"><span class="style9">详细</span></td>
  </tr>
  <%  do while not Count_rs.eof %>
    <tr align="center" bgcolor="#f2f2f2">
	<td width="70" height="23"><a href="History_count_detail_select.asp?second=<%=Count_rs("Invest_second")%>&issue=<%=issue%>"><%=Count_rs("Invest_second")%></a> </td>
    <td width="114" height="23"><%=round(count_rs("total_invest"))%> </td>
    <td width="114" height="23"><%=round(count_rs("me_result"))%> </td>
    <td width="114" height="23"><%=round((count_rs("ag_result"))+(count_rs("ma_result")))%> </td>
    <td width="114" height="23"><%=round(count_rs("ag_result"))%>  </td>
    <td width="114" height="23"><%=round(count_rs("ma_result"))%> </td>
    <td width="68" height="23"><%=issue%> </td>
    <td width="72" height="23"><a href="History_count_detail_select.asp.asp?second=<%=Count_rs("Invest_second")%>&issue=<%=issue%>">详细资料</a></td>
  </tr>
  <% A_Total=A_Total+(count_rs("total_invest"))
  me_result=me_result+(count_rs("me_result"))
  ag_result=ag_result+(count_rs("ag_result"))
  ma_result=ma_result+(count_rs("ma_result"))
  fei_result=fei_result+(count_rs("ag_result"))+(count_rs("ma_result"))

⌨️ 快捷键说明

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