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");
- 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);
- $_SESSION["menus"]="查看分类账";
- ?>
- <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: 0px;
- }
- -->
- </style>
- </head>
- <body>
- <table width="100%" height="25" border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#6a9bd8">
- <tr>
- <td width="9"> </td>
- <form name="form1">
- <td width="492" height="20" 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>
- <table width="100%" height="123" border="0" cellpadding="2" cellspacing="1" class="t12">
- <tr bgcolor="#B77700">
- <td height="30" colspan="11" class="t11"><span class="fw12"> 日期范围:
- <?=$start_time?>
- 到
- <?=$end_time?> 期数:<?php if($date_num<>"no") echo "期数:<strong>".$date_num."</strong> 期";?>
- 报表种类:分类账 </span></td>
- </tr>
- <tr bgcolor="#456594">
- <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 width="76" rowspan="2" align="center" class="fw12">总代理</td>
- <td width="76" rowspan="2" align="center" class="fw12"><div align="center" class="fw12"></div>
- <div align="center">股东</div></td>
- <td colspan="4"><div align="center"></div>
- <div align="center" class="fw12">管理员</div> </td>
- </tr>
- <tr class="t19">
- <td width="57" bgcolor="#456594"><div align="center" class="fw12">退水</div></td>
- <td width="57" bgcolor="#456594"><div align="center" class="fw12">金额</div></td>
- <td width="56" colspan="2" bgcolor="#456594"><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 cut_sign='$cut_sign' $sq ",$conn);
- $bnum=0;
- $drop_money=0;
- $user_win=0;
- $manage_cut=0;
- $manage_money=0;
- $agent_profit=0;
- $manage_result=0;
- $agent_submit=0;
- $all_agent_submit=0;
- $manage_cut=0;
- $manage_money=0;
- $manage_result=0;
- $all_agent_submit=0;
- $super_agent_submit=0;
- while($rs=mysql_fetch_array($sql))
- { $bnum++;
- $drop_money+=$rs["drop_money"];
- $user_win+=$rs["user_win"];
- $manage_cut+=$rs["manage_cut"];
- $manage_money+=$rs["manage_money"];
- $agent_profit+=$rs["agent_profit"];
- $manage_result+=$rs["manage_result"];
- $agent_submit+=$rs["agent_submit"];
- $all_agent_submit+=$rs["all_agent_submit"];
- $super_agent_submit+=$rs["super_agent_submit"];
- }
- $bnum_count+=$bnum;
- $drop_money_count+=$drop_money;
- $user_win_count+=$user_win;
- $manage_cut_count+=$manage_cut;
- $manage_money_count+=$manage_money;
- $agent_profit_count+=$agent_profit;
- $manage_result_count+=$manage_result;
- $agent_submit_count+=$agent_submit;
- $all_agent_submit_count+=$all_agent_submit;
- $super_agent_submit_count+=$super_agent_submit;
- if($bnum>0)
- {?>
- <tr class="t15">
- <td height="24" nowrap><div align="left">
- <? if($rowcs["cut_unit"]=="特码A")
- { echo "特码";
- }else echo $rowcs["cut_unit"];?>
- </div></td>
- <td align="right" nowrap><?=$bnum?></td>
- <td align="right" nowrap><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" nowrap><?=$user_win?></td>
- <td align="center" nowrap><div align="right">
- <?=$agent_submit?>
- </div></td>
- <td align="right" nowrap><?=$all_agent_submit?></td>
- <td align="right" nowrap><?=$super_agent_submit?></td>
- <td align="right" nowrap><?=$manage_cut?></td>
- <td align="right" nowrap><?=$manage_money?></td>
- <td colspan="2" align="right" nowrap><?=$manage_result?></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 align="right" nowrap><span class="fbback">
- <?=$all_agent_submit_count?>
- </span></td>
- <td align="right" nowrap><span class="fbback">
- <?=$super_agent_submit_count?>
- </span></td>
- <td nowrap><div align="right" class="fbback">
- <?=$manage_cut_count?>
- </div></td>
- <td nowrap><div align="right" class="fbback">
- <?=$manage_money_count?>
- </div></td>
- <td colspan="2" nowrap><div align="right" class="fbback">
- <?=$manage_result_count?>
- </div></td>
- </tr>
- </table>
- </body>