table_manage.php
资源名称:Nsix.rar [点击查看]
上传用户:m68239277
上传日期:2014-10-12
资源大小:824k
文件大小:6k
源码类别:
Web服务器
开发平台:
PHP
- <?php
- session_start();
- include("checks.php");
- $sqla=mysql_query("select * from super_agent ",$conn); //read super_agent user
- $_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="99" border="0" cellpadding="0" cellspacing="1" class="t12">
- <tr>
- <td 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="69" rowspan="2"><div align="center" class="fw12">股东</div>
- <div align="center"></div></td>
- <td width="53" rowspan="2"><div align="center" class="fw12">笔数</div> <div align="center"></div> <div align="center" class="fw12"></div> <div align="center"></div></td>
- <td width="91" rowspan="2"><div align="center" class="fw12">下注金额</div> <div align="center"></div></td>
- <td width="63" rowspan="2"><div align="center" class="fw12">会员</div> <div align="center"></div></td>
- <td width="63" rowspan="2"><div align="center" class="fw12">代理商</div></td>
- <td width="63" rowspan="2"><div align="center" class="fw12">总代理</div></td>
- <td width="63" rowspan="2" align="center"><span class="fw12">股东</span></td>
- <td colspan="4"><div align="center"></div>
- <div align="center" class="fw12"></div>
- <div align="center"></div>
- <div align="center" class="fw12">公司</div> </td>
- </tr>
- <tr class="t19">
- <td width="48" align="center" bgcolor="#456594" class="fw12">退水</td>
- <td width="50" align="center" bgcolor="#456594" class="fw12">金额</td>
- <td width="40" align="center" bgcolor="#456594" class="fw12">占成</td>
- <td width="36" align="center" bgcolor="#456594" class="fw12">结果</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' ";
- while($rsp=mysql_fetch_array($sqla))
- {
- $super_agents=$rsp["user_account"];
- $sql=mysql_query("select * from drop_bill where super_agent='$super_agents' $sq",$conn);
- $bnum=0;
- $drop_money=0;
- $user_win=0;
- $manage_cut=0;
- $manage_money=0;
- $manage_profit=0;
- $manage_profit=0;
- $agent_submit=0;
- $all_agent_submit=0;
- $super_agent_submit_count=0;
- while($rs=mysql_fetch_array($sql))
- { $bnum++;
- $drop_money+=$rs["drop_money"];
- $user_win+=$rs["user_win"];
- $agent_submit+=$rs["agent_submit"];
- $manage_cut+=$rs["manage_cut"];
- $manage_money+=$rs["manage_money"];
- $manage_profit=$rs["manage_profit"];
- $manage_result+=$rs["manage_result"];
- $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;
- $manage_profit_count+=$manage_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"><div align="right"><?=$super_agents?></div></td>
- <td><div align="right"></div>
- <div align="right">
- <?=$bnum?>
- </div></td>
- <td><div align="right"><a href="table_manage_searchs.php?agent=<?=$super_agents?>" class="ags">
- <?=$drop_money?>
- </a></div></td>
- <td><div align="right">
- <?=$user_win?>
- </div></td>
- <td align="right">
- <?=$agent_submit?></td>
- <td><div align="right">
- <?=$all_agent_submit?>
- </div></td>
- <td><div align="right">
- <?=$super_agent_submit?>
- </div></td>
- <td><div align="right">
- <?=$manage_cut?>
- </div></td>
- <td><div align="right">
- <?=$manage_money?>
- </div></td>
- <td><div align="right">
- <?=$manage_profit?>
- </div></td>
- <td><div align="right">
- <?=$manage_result?>
- </div></td>
- </tr>
- <?
- }
- }?>
- <tr class="t13">
- <td height="22" nowrap><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 nowrap><div align="right"><span class="fbback">
- <?=$agent_submit_count?>
- </span></div></td>
- <td nowrap><div align="right" class="fbback">
- <?=$all_agent_submit_count?>
- </div></td>
- <td nowrap><div align="right" class="fbback">
- <?=$super_agent_submit_count?>
- </div></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 nowrap> </td>
- <td nowrap class="t10"><div align="right" class="fbback">
- <?=$manage_result_count?>
- </div></td>
- </tr>
- </table>
- </body>