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