now_bill_all.php
上传用户:m68239277
上传日期:2014-10-12
资源大小:824k
文件大小:5k
源码类别:

Web服务器

开发平台:

PHP

  1. <?php 
  2. session_start();
  3. include("checks.php");
  4. include("../inc/conn.php");
  5. include("../inc/profit.inc.php");
  6. $agents=$_SESSION["all_agent"];
  7. $_SESSION["menus"]="全部";
  8. $drop_date=$_SESSION["downdate"];
  9. include("../inc/base_status.inc.php");
  10. include("../inc/mains.js.php");
  11. include("../inc/char.inc.php");
  12. $minrmb=10000;
  13. if(isset($_GET["plate"]))
  14. {
  15.  $plate=$_GET["plate"];
  16. }else
  17. {
  18.  $plate="all";
  19. }
  20. if(isset($_GET["become"]))
  21. {
  22. $become=$_GET["become"];
  23. }else
  24. { $become="all";
  25. }
  26. for($i=0;$i<=18;$i++)
  27. {
  28.   if(strlen($i)==1)
  29.   { $n="0".$i;
  30.    }else $n=$i;
  31.    $my="";
  32.    $nt=0;
  33.   if($plate=="all")
  34.   {
  35.   $sq="";
  36.   }else
  37.   {
  38.    $sq="and drop_plate='$plate'";
  39.   } 
  40.   $sql=mysql_query("select * from drop_bill where all_agent='$agents' and  drop_date='$drop_date' and cut_sign='$i' $sq",$conn);
  41.   while($row=mysql_fetch_array($sql))
  42.   {
  43.      $agent=$row["agent"];  
  44.  $profit=profits($agent,1);//取代理成数
  45.  $all_agent=$row["all_agent"]; //取总代理成数
  46.  $all_profit=profits($all_agent,2);
  47.  $agent_profit_all=profits($agent,4);//代理中总代成数
  48.  $pg=$agent_profit_all+$profit;;
  49.  if($pg<>$all_profit)
  50.  {
  51.    $all_profit=$agent_profit_all;
  52.  }else $all_profit=$all_profit-$profit;
  53.  if($become=="all"):
  54.      $drop_money=$row["drop_money"];
  55.      else:
  56.      $drop_money=$row["drop_money"]*($all_profit)*0.01;
  57.      endif;
  58.    $my+=$drop_money;
  59.    $nt++;
  60.   }
  61.   $sqla=mysql_query("select * from member_cut where sign='$i'",$conn);
  62.   if($my=="") $my=0;
  63.   if(mysql_num_rows($sqla)>0)
  64.  {
  65.    $menus[$i]=mysql_result($sqla,0,"cut_unit");
  66.    $sign[$i]=mysql_result($sqla,0,"sign");
  67.   }
  68.    $note[$i]=$nt;
  69.    $money[$i]=$my;
  70.    $cn+=$nt;
  71.    $cm+=$my;
  72. }
  73. ?>
  74. <html>
  75. <head>
  76. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  77. <link href="../css/css.CSS" rel="stylesheet" type="text/css">
  78. <title><?=$titles?></title>
  79. <style type="text/css">
  80. <!--
  81. body {
  82. margin-left: 10px;
  83. }
  84. -->
  85. </style>
  86. <script language="JavaScript" type="text/JavaScript">
  87. <!--
  88. function MM_jumpMenu(targ,selObj,restore){ //v3.0
  89.   eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  90.   if (restore) selObj.selectedIndex=0;
  91. }
  92. //-->
  93. </script>
  94. </head>
  95. <body onLoad="show5();" oncontextmenu="return false" onselectstart="return false" 
  96. onkeydown="return (event.ctrlKey &amp;&amp; event.keyCode == 78) ? false : true" 
  97. ondragstart="return false" onmouseover="window.status=''; return true">
  98. <table width="800" border="0" cellspacing="0" cellpadding="0">
  99.   <tr bgcolor="#417dec">
  100.     <td width="9">&nbsp;</td>
  101.      <form name="form1">
  102.        <td width="518" class="fw12">即时注单 <a href="#" class="awnoline"></a> <?=$drop_date?> 期 <a href="#" class="awnoline"></a> 成数
  103.          <select name="menu2" onChange="MM_jumpMenu('self',this,0)">
  104.          <option value="?menu=5&become=all&plate=<?=$plate?>" <?php if($become=="all"||$become=="") echo "selected"?>>全部</option>
  105.          <option value="?menu=5&become=part&plate=<?=$plate?>" <?php if($become=="part") echo "selected"?>>成数</option>
  106.      
  107.        </select>
  108.     盘类
  109.          <select name="menu1" onChange="MM_jumpMenu('self',this,0)">
  110.             <option value="?menu=5&plate=all&become=<?=$become?>"<?php if($plate=="all"||$plate=="") echo "selected"?>>全部</option>
  111.            <option value="?menu=5&plate=A&become=<?=$become?>" <?php if($plate=="A") echo "selected"?>>A盘</option>
  112.            <option value="?menu=5&plate=B&become=<?=$become?>" <?php if($plate=="B") echo "selected"?>>B盘</option>
  113.            <option value="?menu=5&plate=C&become=<?=$become?>" <?php if($plate=="C") echo "selected"?>>C盘</option>
  114.         
  115.          </select> 
  116.         更新
  117.         <?php include("now_update.inc.php");?></td>  
  118.        <td width="264" class="fw12"><div align="right">
  119.        <?php include("now_bill_list.php");?></div></td>
  120.      </form> 
  121.     <td width="10">&nbsp;</td>
  122.   </tr>
  123. </table>
  124. <?php include("../inc/times.inc.php");?>
  125. <table border="0" cellpadding="0" cellspacing="5">
  126.   <tr>
  127.     <td valign="top"><div align="center">
  128.       <table height="47" border="0" align="left" cellpadding="5" cellspacing="1" class="t12">
  129.         <tr class="t11">
  130.           <td height="24"><div align="center" class="fw12">项目</div></td>
  131.           <td><div align="center" class="fw12">下注笔数</div></td>
  132.           <td><div align="center" class="fw12">下注金额</div></td>
  133.           </tr><?php 
  134.   for($i=1;$i<=18;$i++)
  135.             {
  136.   ?>
  137.         <tr>
  138.           <td height="20" class="t11"><div align="right" class="fw12">
  139.   <?php if($menus[$i]=="特码A")
  140.   { echo "特码";
  141.   }else echo $menus[$i];?></div></td>
  142.           <td class="t15"><div align="center" class="fblue12"><?=$note[$i]?></div></td>
  143.           <td class="t15"><div align="center"<? if($money[$i]>=$minrmb) echo "class='fred12'";?>><a href="now_bill_details.php?m=all&sign=<?=$sign[$i]?>" class="ags">
  144.             <?=rmb($money[$i])?></a></div></td>
  145.           </tr><? }?>
  146.       </table>
  147.     </div></td>
  148.   </tr>
  149.   <tr>
  150.     <td valign="top">合计:<span class="fbback"><?=$cn?></span> 笔 金额:<span class="fbback"><?=rmb($cm)?></span></td>
  151.   </tr>
  152. </table>
  153. </body>
  154. </html>