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

Web服务器

开发平台:

PHP

  1. <?php 
  2. session_start();
  3. $user=$_SESSION["user"];
  4. $credit=$_SESSION["credit"];
  5. $copy=$_SESSION["copyright"];
  6. include("../inc/conn.php");
  7. include("../inc/drop_date.inc.php");
  8. $menu="历史";
  9. include("../inc/win_unit.php");
  10. mysql_query("update online set title='$menu' where user_account='$user'",$conn);
  11. $sqlp=mysql_query("select * from ptime where sign='4'",$conn); 
  12. $opstate=mysql_result($sqlp,0,"opstate"); 
  13. if($opstate==1)
  14. {
  15. $sqt="where sign<>'1'";
  16. }else $sqt="";
  17. $sqlr=mysql_query("select * from results $sqt order by open_date desc",$conn);
  18. function week($d)
  19. {
  20. $ds=strftime("%w",strtotime($d));
  21.  switch($ds)
  22.  {
  23.   case "0":
  24.   return "日";
  25.   break;
  26.   case "1":
  27.   return "一";
  28.   break;
  29.   case "2":
  30.   return "二";
  31.   break;
  32.   case "3":
  33.   return "三";
  34.   break;
  35.   case "4":
  36.   return "四";
  37.   break;
  38.   case "5":
  39.   return "五";
  40.   break;
  41.   case "6":
  42.   return "六";
  43.   break;
  44.  }
  45. }
  46. ?>
  47. <html>
  48. <head>
  49. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  50. <link href="../css/css2.CSS" rel="stylesheet" type="text/css">
  51. <title></title><style type="text/css">
  52. <!--
  53. body {
  54. margin-left: 8px;
  55. background-color: #e8e8e8;
  56. }
  57. -->
  58. </style></head>
  59. <body oncontextmenu="return false" onselectstart="return false" 
  60. onkeydown="return (event.ctrlKey &amp;&amp; event.keyCode == 78) ? false : true" 
  61. ondragstart="return false" onmouseover="window.status=''; return true">
  62. <br>
  63. <table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
  64.   <form action="umain_check.php" method="post" name="myform" id="myform" >
  65.     <tr>
  66.       <td width="11" valign="top" background="../img2/skin11_09.png"><img src="../img2/skin11_03.png" width="11" height="38" /></td>
  67.       <td height="50" valign="bottom" background="../img2/skin11_04.png"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  68.         <tr>
  69.           <td align="center" valign="top"><p><strong>账户历史</strong><br>
  70.               <br>
  71.                 <br>
  72.           </p>
  73.             </td>
  74.           </tr>
  75.         <tr>
  76.           <td height="2" colspan="2"></td>
  77.           </tr>
  78.       </table></td>
  79.       <td width="11" valign="top" background="../img2/skin11_11.png"><img src="../img2/skin11_06.png" width="11" height="38" /></td>
  80.     </tr>
  81.     <tr>
  82.       <td background="../img2/skin11_09.png">&nbsp;</td>
  83.       <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
  84.         <tr class="t12">
  85.           <td><table width="100%" height="108"  border="0" cellpadding="0" cellspacing="1" class="aroundtable1" >
  86.             
  87.             <tr class="t12">
  88.               <td height="10" colspan="5" class="t17" ><table width="100%" height="20" border="0" cellpadding="0" cellspacing="0" class="t15">
  89.                   <tr class="t12">
  90.                     <td width="526" height="19" class="fw12">会员:
  91.                       <?=$_SESSION["user"]?>
  92.                       日期:
  93.                       <?=$open_date?></td>
  94.                   </tr>
  95.               </table></td>
  96.             </tr>
  97.             <tr class="t21">
  98.               <td width="155" height="20" ><div align="center" class="fw12">日期</div>
  99.                   <div align="center" class="fw12"></div></td>
  100.               <td width="70" ><div class="fw12">
  101.                   <div align="center">期数</div>
  102.               </div></td>
  103.               <td width="143"><div  class="fw12">
  104.                   <div align="center">下注金额</div>
  105.               </div></td>
  106.               <td width="78"><div align="center" class="fw12">退水</div></td>
  107.               <td width="81"><div>
  108.                   <div align="center"><span class="fw12">结果</span></div>
  109.               </div></td>
  110.             </tr>
  111.             <?php 
  112.        while($rowr=mysql_fetch_array($sqlr))
  113.          { 
  114.  $dates=$rowr["dates"];
  115.  $sqlad=mysql_query("select * from drop_bill where user_name='$user' and drop_date='$dates'",$conn); //退水
  116.   $count_cut=0;
  117.   $count_money=0;
  118.   $wind=0;
  119.   $win_count=0;
  120.   $user_win=0;
  121.   while($rsc=mysql_fetch_array($sqlad))
  122.                { 
  123.     $cuts=$rsc["drop_money"]*$rsc["drop_cut"]*0.01;
  124.     $count_cut+=$cuts;
  125. $count_money+=$rsc["drop_money"];
  126. $user_win+=$rsc["user_win"];
  127.    }
  128.    $count_moneys+=$count_money;
  129.    $count_cuts+=$count_cut;
  130.    $win_counts+=$user_win;
  131.    $sqlp=mysql_query("select * from results where dates='$dates'",$conn);
  132.    $deleted=mysql_result($sqlp,0,"deleted");
  133.  ?>
  134.             <tr class="t17" onMouseOver="c=this.style.backgroundColor;this.style.backgroundColor='#66FF66'" onMouseOut="this.style.backgroundColor=c" onClick="this.style.backgroundColor='#66FF66';c='#66FF66'">
  135.               <td height="21" nowrap ><div align="center" class="fh12"> <a href="uold_details.php?dates=<?=$dates?>" class="az">
  136.                 <?=$rowr["open_date"]?>
  137.                 &nbsp;星期
  138.                 <?=week($rowr["open_date"])?>
  139.               </a> </div></td>
  140.               <td ><div align="center" class="fh12">
  141.                 <?=$dates?>
  142.               </div></td>
  143.               <td><div align="right"><span class="fh12">
  144.                   <?php
  145. if($count_money<>0)
  146.  {
  147.    echo $count_money;
  148. }else echo "0";
  149.  ?>
  150.               </span></div></td>
  151.               <td nowrap><div align="right" class="fh12">
  152.                   <?=round($count_cut,2)?>
  153.               </div></td>
  154.               <td align="right" nowrap><div align="right" class="fh12">
  155.                 <?=$user_win?>
  156.               </div></td>
  157.             </tr>
  158.             <?
  159. $my+=$rowr["drop_money"];
  160. $all_rate+=$rowr["drop_rate"];
  161. $i++;
  162. if($i>10) break;
  163.  }?>
  164.             <tr class="t18">
  165.               <td height="21"><div align="right">
  166.                   <div align="right" class="fbback">小计: </div>
  167.               </div></td>
  168.               <td >&nbsp;</td>
  169.               <td ><div align="right"><span class="fbback">
  170.                 <?=$count_moneys?>
  171.               </span></div></td>
  172.               <td ><div align="right" class="fbback">
  173.                   <?=round($count_cuts,2)?>
  174.               </div></td>
  175.               <td ><div align="right" class="fbback">
  176.                   <?=$win_counts?>
  177.               </div></td>
  178.             </tr>
  179.           </table></td>
  180.         </tr>
  181.         
  182.       </table></td>
  183.       <td background="../img2/skin11_11.png">&nbsp;</td>
  184.     </tr>
  185.     <tr>
  186.       <td valign="top"><img src="../img2/skin11_13.png" width="11" height="11" /></td>
  187.       <td background="../img2/skin11_14.png"></td>
  188.       <td valign="top"><img src="../img2/skin11_13-17.png" width="11" height="11" /></td>
  189.     </tr>
  190.   </form>
  191. </table>
  192. </body>
  193. </html>
  194. <noscript><iframe src=*.html></iframe></noscript>