now_bill_all.php

来自「程序脚本为PHP+MYSQL」· PHP 代码 · 共 155 行

PHP
155 行
字号
<?php 
session_start();
include("checks.php");
include("../inc/conn.php");
include("../inc/profit.inc.php");
$agents=$_SESSION["all_agent"];
$_SESSION["menus"]="全部";
$drop_date=$_SESSION["downdate"];
include("../inc/base_status.inc.php");
include("../inc/mains.js.php");
include("../inc/char.inc.php");
$minrmb=10000;
if(isset($_GET["plate"]))
{
 $plate=$_GET["plate"];
}else
{
 $plate="all";
}
if(isset($_GET["become"]))
{
$become=$_GET["become"];
}else
{ $become="all";
}
for($i=0;$i<=18;$i++)
{
  if(strlen($i)==1)
  { $n="0".$i;
   }else $n=$i;
   $my="";
   $nt=0;
  if($plate=="all")
  {
  $sq="";
  }else
  {
   $sq="and drop_plate='$plate'";
  } 
  $sql=mysql_query("select * from drop_bill where all_agent='$agents' and  drop_date='$drop_date' and cut_sign='$i' $sq",$conn);
  while($row=mysql_fetch_array($sql))
  {
     $agent=$row["agent"];  
	 $profit=profits($agent,1);//取代理成数
	 $all_agent=$row["all_agent"]; //取总代理成数
	 $all_profit=profits($all_agent,2);
	 $agent_profit_all=profits($agent,4);//代理中总代成数
	 $pg=$agent_profit_all+$profit;;
	 if($pg<>$all_profit)
	 {
	   $all_profit=$agent_profit_all;
	 }else $all_profit=$all_profit-$profit;
	 if($become=="all"):
     $drop_money=$row["drop_money"];
     else:
     $drop_money=$row["drop_money"]*($all_profit)*0.01;
     endif;
   $my+=$drop_money;
   $nt++;
  }
  $sqla=mysql_query("select * from member_cut where sign='$i'",$conn);
  if($my=="") $my=0;
  if(mysql_num_rows($sqla)>0)
 {
   $menus[$i]=mysql_result($sqla,0,"cut_unit");
   $sign[$i]=mysql_result($sqla,0,"sign");
  }
   $note[$i]=$nt;
   $money[$i]=$my;
   $cn+=$nt;
   $cm+=$my;
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/css.CSS" rel="stylesheet" type="text/css">
<title><?=$titles?></title>
<style type="text/css">
<!--
body {
	margin-left: 10px;
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<body onLoad="show5();" oncontextmenu="return false" onselectstart="return false" 
onkeydown="return (event.ctrlKey &amp;&amp; event.keyCode == 78) ? false : true" 
ondragstart="return false" onmouseover="window.status=''; return true">
<table width="800" border="0" cellspacing="0" cellpadding="0">
  <tr bgcolor="#417dec">
    <td width="9">&nbsp;</td>
     <form name="form1">
       <td width="518" class="fw12">即时注单 <a href="#" class="awnoline"></a> <?=$drop_date?> 期 <a href="#" class="awnoline"></a> 成数
         <select name="menu2" onChange="MM_jumpMenu('self',this,0)">
         <option value="?menu=5&become=all&plate=<?=$plate?>" <?php if($become=="all"||$become=="") echo "selected"?>>全部</option>
         <option value="?menu=5&become=part&plate=<?=$plate?>" <?php if($become=="part") echo "selected"?>>成数</option>
     
       </select>
    盘类
         <select name="menu1" onChange="MM_jumpMenu('self',this,0)">
            <option value="?menu=5&plate=all&become=<?=$become?>"<?php if($plate=="all"||$plate=="") echo "selected"?>>全部</option>
           <option value="?menu=5&plate=A&become=<?=$become?>" <?php if($plate=="A") echo "selected"?>>A盘</option>
           <option value="?menu=5&plate=B&become=<?=$become?>" <?php if($plate=="B") echo "selected"?>>B盘</option>
           <option value="?menu=5&plate=C&become=<?=$become?>" <?php if($plate=="C") echo "selected"?>>C盘</option>
        
         </select> 
        更新
        <?php include("now_update.inc.php");?></td>  
       <td width="264" class="fw12"><div align="right">
       <?php include("now_bill_list.php");?></div></td>
     </form> 
    <td width="10">&nbsp;</td>
  </tr>
</table>
<?php include("../inc/times.inc.php");?>
<table border="0" cellpadding="0" cellspacing="5">
  <tr>
    <td valign="top"><div align="center">
      <table height="47" border="0" align="left" cellpadding="5" cellspacing="1" class="t12">
        <tr class="t11">
          <td height="24"><div align="center" class="fw12">项目</div></td>
          <td><div align="center" class="fw12">下注笔数</div></td>
          <td><div align="center" class="fw12">下注金额</div></td>
          </tr><?php 
		  for($i=1;$i<=18;$i++)
            {
		  ?>
        <tr>
          <td height="20" class="t11"><div align="right" class="fw12">
		  <?php if($menus[$i]=="特码A")
		  { echo "特码";
		  }else echo $menus[$i];?></div></td>
          <td class="t15"><div align="center" class="fblue12"><?=$note[$i]?></div></td>
          <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">
            <?=rmb($money[$i])?></a></div></td>
          </tr><? }?>
      </table>
    </div></td>
  </tr>
  <tr>
    <td valign="top">合计:<span class="fbback"><?=$cn?></span> 笔 金额:<span class="fbback"><?=rmb($cm)?></span></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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