table_class_bill.php
资源名称:Nsix.rar [点击查看]
上传用户:m68239277
上传日期:2014-10-12
资源大小:824k
文件大小:6k
源码类别:
Web服务器
开发平台:
PHP
- <?php
- session_start();
- include("checks.php");
- include("../inc/base_status.inc.php");
- $_SESSION["menus"]="查看分类账";
- if($down_type<>"all")
- {
- $sq=" and sign='$down_type'";
- }else $sq="";
- $sqlcs=mysql_query("select * from member_cut where user_account='admin' and sign<>'0' $sq order by sign asc",$conn);
- ?>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <link href="../css/css.CSS" rel="stylesheet" type="text/css">
- <title></title>
- <style type="text/css">
- <!--
- body {
- margin-left: 10px;
- }
- -->
- </style>
- </head>
- <body>
- <table width="693" border="0" align="left" cellpadding="0" cellspacing="0">
- <tr bgcolor="#417dec">
- <td width="9" height="35"> </td>
- <form name="form1">
- <td width="492" class="fw12">代理商 报表管理(清单)</td>
- <td width="183" class="fw12"><div align="right"><a href="table.php" class="ah">查询</a> <a href="#" class="ah" onClick="document.execCommand('print','true','true')">列印</a> <a href="table.php" class="ah">返回上一页</a></div></td>
- </form>
- <td width="10"> </td>
- </tr>
- </table><br><br><br>
- <table width="692" height="123" border="0" cellpadding="2" cellspacing="1" class="t12">
- <tr>
- <td height="30" colspan="9" bgcolor="#456594"><span class="fw12"> 日期范围:
- <?=$start_time?>
- 到
- <?=$end_time?> <?php if($date_num<>"no") echo "期数:<strong>".$date_num."</strong> 期";?>
- 报表种类:分类账 </span></td>
- </tr>
- <tr class="t11">
- <td width="109" rowspan="2"><div align="center" class="fw12">下注种类</div>
- <div align="center"></div></td>
- <td width="57" rowspan="2"><div align="center" class="fw12">笔数</div> <div align="center"></div></td>
- <td width="109" rowspan="2"><div align="center" class="fw12">下注金额</div> <div align="center"></div></td>
- <td width="64" rowspan="2"><div align="center" class="fw12">会员</div> <div align="center"></div></td>
- <td width="76" rowspan="2" align="center" class="fw12">代理商</td>
- <td colspan="3"><div align="center"></div>
- <div align="center" class="fw12">总代理</div>
- <div align="center"></div></td>
- <td width="60" rowspan="2"><div align="center"></div>
- <div align="center" class="fw12">股东</div></td>
- </tr>
- <tr class="t19">
- <td width="57" bgcolor="#666666"><div align="center" class="fw12">退水</div></td>
- <td width="57" bgcolor="#666666"><div align="center" class="fw12">金额</div></td>
- <td width="57" bgcolor="#666666"><div align="center" class="fw12">结果</div></td>
- </tr> <?php
- if($date_num=="no")
- {
- $sq=" and drop_time>='$start_time' and drop_time<='$end_time' ";
- }else $sq=" and drop_date='$date_num' ";
- $count_cuts=0;
- while($rowcs=mysql_fetch_array($sqlcs))
- {
- $cut_sign=$rowcs["sign"];
- $sql=mysql_query("select * from drop_bill where all_agent='$all_agent' and cut_sign='$cut_sign' $sq ",$conn);
- $bnum=0;
- $drop_money=0;
- $user_win=0;
- $all_agent_cut=0;
- $all_agent_money=0;
- $agent_profit=0;
- $all_agent_result=0;
- $agent_submit=0;
- $all_agent_submit=0;
- $all_agent_cut=0;
- $all_agent_money=0;
- $all_agent_result=0;
- $all_agent_submit=0;
- while($rs=mysql_fetch_array($sql))
- { $bnum++;
- $drop_money+=$rs["drop_money"];
- $user_win+=$rs["user_win"];
- $all_agent_cut+=$rs["all_agent_cut"];
- $all_agent_money+=$rs["all_agent_money"];
- $agent_profit+=$rs["agent_profit"];
- $all_agent_result+=$rs["all_agent_result"];
- $agent_submit+=$rs["agent_submit"];
- $all_agent_submit+=$rs["all_agent_submit"];
- }
- $bnum_count+=$bnum;
- $drop_money_count+=$drop_money;
- $user_win_count+=$user_win;
- $all_agent_cut_count+=$all_agent_cut;
- $all_agent_money_count+=$all_agent_money;
- $agent_profit_count+=$agent_profit;
- $all_agent_result_count+=$all_agent_result;
- $agent_submit_count+=$agent_submit;
- $all_agent_submit_count+=$all_agent_submit;
- if($bnum>0)
- {?>
- <tr class="t15">
- <td height="24"><div align="left">
- <? if($rowcs["cut_unit"]=="特码A")
- {
- echo "特码";
- }else echo $rowcs["cut_unit"];
- ?>
- </div></td>
- <td align="right"><?=$bnum?></td>
- <td align="right"><a href="table_class_bill_details.php?cutsign=<?=$cut_sign?>&dates=<?=$date_num?>&droptype=<?=$rowcs["cut_unit"]?>" class="ags"><?=$drop_money?></a></td>
- <td align="right"><?=$user_win?></td>
- <td align="center"><div align="right">
- <?=$agent_submit?>
- </div></td>
- <td align="right"><?=$all_agent_cut?></td>
- <td align="right"><?=$all_agent_money?></td>
- <td align="right"><?=$all_agent_result?></td>
- <td align="right"> <?=$all_agent_submit?></td>
- </tr><? }
- }
- ?>
- <tr class="t13">
- <td height="27" nowrap><div align="center"></div>
- <div align="right" class="fbback">总计:</div></td>
- <td nowrap><div align="right" class="fbback">
- <?=$bnum_count?>
- </div></td>
- <td nowrap><div align="right" class="fbback">
- <?=$drop_money_count?>
- </div></td>
- <td nowrap><div align="right" class="fbback">
- <?=$user_win_count?>
- </div></td>
- <td align="center" nowrap><div align="right"><span class="fbback">
- <?=$agent_submit_count?>
- </span></div></td>
- <td nowrap><div align="right" class="fbback">
- <?=$all_agent_cut_count?>
- </div></td>
- <td nowrap><div align="right" class="fbback">
- <?=$all_agent_money_count?>
- </div></td>
- <td nowrap><div align="right" class="fbback">
- <?=$all_agent_result_count?>
- </div></td>
- <td nowrap><div align="right" class="fbback"><?=$all_agent_submit_count?>
- </div></td>
- </tr>
- </table>
- </body>