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

Web服务器

开发平台:

PHP

  1. <?php 
  2. session_start();
  3. include("../inc/conn.php");
  4. include("checks.php");
  5. $all_agent=$_SESSION["all_agent"];
  6. $date_num=$_SESSION["date_num"];
  7. $start_time=$_SESSION["start_time"];
  8. $end_time=$_SESSION["end_time"];
  9. $_SESSION["menus"]="查看分类账细节";
  10. include("../inc/win_unit.php");
  11. include("../inc/base_status.inc.php");
  12. if(isset($_GET["cutsign"]))
  13. {
  14.   $droptype=$_GET["droptype"];
  15.   $cut_sign=$_GET["cutsign"];
  16.   $dates=$_GET["dates"];
  17.   $_SESSION["droptype"]=$droptype;
  18.   $_SESSION["cutsign"]=$cut_sign;
  19.   $_SESSION["ddates"]=$dates;
  20. }else
  21. {
  22.  $droptype=$_SESSION["droptype"];
  23.   $cut_sign=$_SESSION["cutsign"];
  24.   $dates=$_SESSION["ddates"];
  25. }
  26. if($date_num=="no")
  27. {
  28. $sq=" and drop_time>='$start_time' and drop_time<='$end_time' and all_agent='$all_agent'";
  29. }else $sq=" and drop_date='$dates' and all_agent='$all_agent'";
  30. $pagesize=200;
  31. $sqlc=mysql_query("select count(*) from drop_bill where cut_sign='$cut_sign'  $sq ",$conn);
  32. $myrow=mysql_fetch_array($sqlc);
  33. $numrows=$myrow[0];
  34. $pages=intval($numrows/$pagesize);
  35. if ($numrows%$pagesize) $pages++;
  36. if (isset($_GET['page'])) 
  37. $page=intval($_GET['page']);
  38. }
  39. else{
  40. $page=1;
  41. }
  42. $offset=$pagesize*($page - 1); 
  43. $sql=mysql_query("select * from drop_bill where cut_sign='$cut_sign'  $sq order by drop_time desc limit $offset,$pagesize",$conn); 
  44. ?>
  45. <head>
  46. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  47. <link href="../css/css.CSS" rel="stylesheet" type="text/css">
  48. <title></title>
  49. <style type="text/css">
  50. <!--
  51. body {
  52. margin-left: 10px;
  53. }
  54. -->
  55. </style>
  56. <script language="JavaScript" type="text/JavaScript">
  57. <!--
  58. function MM_jumpMenu(targ,selObj,restore){ //v3.0
  59.   eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  60.   if (restore) selObj.selectedIndex=0;
  61. }
  62. //-->
  63. </script>
  64. </head>
  65. <body>
  66. <table width="779" border="0" align="left" cellpadding="0" cellspacing="0">
  67.   <tr bgcolor="#417dec">
  68.     <td width="9" height="33">&nbsp;</td>
  69.     <form name="form1">
  70.       <td width="556" class="fw12">下注清单 (
  71.   <? if($droptype=="特码A")
  72.   { echo "特码";
  73.   }else echo $droptype;?>)</td>
  74.       <td width="206" class="fw12"><div align="right">&nbsp;<a href="#" class="ah" onClick="document.execCommand('print','true','true')">列印</a>&nbsp;<a href="table_search.php"  class="ah">返回上一页</a></div></td>
  75.     </form>
  76.     <td width="10">&nbsp;</td>
  77.   </tr>
  78. </table><br><br><br>
  79. <table width="779" height="100" border="0" cellpadding="2" cellspacing="1" class="t12">
  80.   <tr class="t11">
  81.     <td width="123" height="25"><div align="center" class="fw12">单号/时间</div></td>
  82.     <td width="66"><div align="center" class="fw12">账号</div></td>
  83.     <td width="66"><div align="center" class="fw12">名称</div>      <div align="center"></div></td>
  84.     <td width="47"><div align="center" class="fw12">退水</div>      <div align="center"></div></td>
  85.     <td width="100"><div align="center" class="fw12">盘类/下注期数</div>      <div align="center"></div></td>
  86.     <td width="69"><div align="center" class="fw12">下注内容</div>      <div align="center"></div></td>
  87.     <td width="68"><div align="center"></div>      
  88.     <div align="center" class="fw12">赔率</div>      <div align="center"></div>    <div align="center" class="fw12"></div>    </td>
  89.     <td width="79"><div align="center" class="fw12">下注金额</div></td>
  90.     <td width="51"><div align="center" class="fw12">退水</div></td>
  91.     <td width="53"><div align="center" class="fw12">结果</div></td>
  92.   </tr><?php while($rs=mysql_fetch_array($sql))
  93.   {  $cuts=0;
  94.      $uname=$rs["user_name"];
  95.      $sqlname=mysql_query("select * from member where user_account='$uname'",$conn);
  96.  $username=mysql_result($sqlname,0,"user_name");
  97.  $money_count+=$rs["drop_money"];
  98.  $drop_money=$rs["drop_money"];
  99.  $num_sign=$rs["num_sign"];
  100.  $drop_content=$rs["drop_content"];
  101.  $drop_type=$rs["drop_type"];
  102.  $drop_details=$rs["drop_details"];
  103.  $dates=$rs["drop_date"];
  104.  $drop_rate=$rs["drop_rate"];
  105.  $cuts=$rs["drop_money"]*$rs["drop_cut"]*0.01;
  106.  $user_win=$rs["user_win"];
  107.  $user_win_count+=$user_win;
  108.  $cut_count+=$cuts;
  109.   ?>
  110.   <tr class="t15">
  111.     <td height="26"><div align="right"><span class="fgreng"><?=$rs["ID"]?></span> <?=substr($rs["drop_time"],5)?></div>
  112.         <div align="center"></div></td>
  113.     <td><div align="right"><?=$rs["user_name"]?></div></td>
  114.     <td><div align="right"><?=$username?></div></td>
  115.     <td><div align="right"><?=$rs["drop_cut"]?></div></td>
  116.     <td><div align="right"><?=$rs["drop_plate"]?>盘/<?=$rs["drop_date"]?> <span class="fgreng"><?=substr($rs["open_date"],5)?></span> </div></td>
  117.     <td><div align="right"><?=$rs["drop_type"]?> <?=$rs["drop_content"]?>
  118.       <?php if($rs["drop_details"]<>"0") echo $rs["drop_details"]?></div></td>
  119.     <td><div align="right"><?=$rs["drop_rate"]?></div></td>
  120.     <td><div align="right">
  121. <?php $mcount=$rs["drop_money"];
  122. $mcounts+=$mcount;
  123. echo $mcount;?></div></td>
  124.     <td><div align="right">
  125. <?php $cuts=$rs["drop_money"]*$rs["drop_cut"]*0.01;
  126.   $ccounts+=$cuts;
  127.   echo $cuts; ?></div></td>
  128.     <td><div align="right"><?=$user_win?></div></td>
  129.   </tr><? }?>
  130.   <tr class="t13">
  131.     <td height="22" colspan="7" nowrap><div align="right"><span class="fbback">总计:</span></div></td>
  132.     <td nowrap><div align="right" class="fbback"><?=$mcounts?></div></td>
  133.     <td nowrap><div align="right"><strong><?=$ccounts?></strong></div></td>
  134.     <td nowrap><div align="right" >
  135. <?=$user_win_count?></div></td>
  136.   </tr>
  137.   <tr >
  138.     <td height="22" colspan="10" class="t11"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  139.                 <tr>
  140.                   <form name="form1">
  141.                     <td> <? 
  142. $fp="table_class_bill_details.php";
  143. $first=1;
  144. $prev=$page-1;
  145. $next=$page+1;
  146. $last=$pages;
  147. if ($page>1)
  148. {
  149. echo "<a href='".$fp."?page=".$first."' class='aw'>第一页</a>&nbsp;&nbsp;";
  150. echo "<a href='".$fp."?page=".$prev."' class='aw'>上一页</a>&nbsp;&nbsp;";
  151. }else
  152. {
  153.  echo "<font color='#ffffff'>第一页&nbsp;&nbsp;上一页</font>&nbsp;&nbsp;";
  154. }
  155. if ($page<$pages)
  156. {
  157. echo "<a href='".$fp."?page=".$next."' class='aw'>下一页</a>&nbsp;&nbsp;";
  158. echo "<a href='".$fp."?page=".$last."' class='aw'>最终页</a>&nbsp;&nbsp;";
  159. } else
  160. {
  161.  echo "<font color='#ffffff'>下一页&nbsp;&nbsp;最终页</font>&nbsp;&nbsp;";
  162. }
  163. $nums=$pagesize*$pages;
  164. ?><span class="fw12"> 页次:</span>
  165.                       <select name="menu1" onChange="MM_jumpMenu('self',this,0)">
  166.                         <?php for ($i=1;$i<=$pages;$i++) 
  167. {
  168. if($page==$i)
  169. { $se="selected";
  170. }else $se="";
  171.                        echo "<option value='".$fp."?page=".$i."' ".$se.">".$i."</option>"; 
  172.    }
  173.         ?>
  174.                       </select>
  175. </td>
  176.                   </form>
  177.                   <td><div align="right"><span class="fw12">共 <strong><?=$pages?></strong> 页</span><span class="fw12">&nbsp;&nbsp;</span></div></td>
  178.                 </tr>
  179.               </table></td>
  180.   </tr>
  181. </table>
  182. </body>