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

Web服务器

开发平台:

PHP

  1. <?php
  2. session_start();
  3. include_once("../inc/conn.php");
  4. include_once("check.php");
  5. include_once("configs.inc.php");
  6. include_once("tnum_close.php");
  7. $user=$_SESSION["user"];
  8. $plate=$_SESSION["plate"];
  9. $drop_date=$_SESSION["downdate"];
  10. if(isset($_GET["act"]))
  11. {
  12.   mysql_query("delete from drop_bill where user_name='$user' and yesrate='1'",$conn);   //移除变动记录
  13.   //bs
  14.   mysql_query("delete from drop_bills where user_name='$user' and yesrate='1'",$conn);   //移除变动记录
  15.   echo "<script language='javascript'>window.location.href='umain.php'</script>";
  16. }
  17. $sqlr=mysql_query("select * from drop_bill where yesrate='1' and drop_date='$drop_date' and user_name='$user' order by id desc",$conn);
  18. while($rowr=mysql_fetch_array($sqlr))//二次更新
  19. {  
  20.      $tp=$rowr["drop_content"];
  21.  $id=$rowr["ID"];
  22.  $num_sign=$rowr["num_sign"];
  23.  mysql_query("update drop_bill set sign='1' where user_name='$user' and ID='$id'",$conn);
  24.  //bs
  25.  mysql_query("update drop_bills set sign='1' where user_name='$user' and ID='$id'",$conn);
  26.  if($num_sign=="1")
  27.  {
  28.    $sq="num='$tp'";
  29.  }else $sq="tp='$tp'";
  30.  $sqlyz=mysql_query("select * from  num where $sq and sign='$num_sign'",$conn);  //二次赔率变动check
  31.      $prate=mysql_result($sqlyz,0,"rate");
  32.  if($num_sign==1) $adrate=0.5;
  33.  if($num_sign==2) $adrate=0.01;
  34.  if($num_sign==6) $adrate=0.1;
  35.            if($plate=="A")
  36. { $rateds=$prate;
  37. }
  38.                 if($plate=="B")
  39. { $rateds=$prate-$adrate;
  40. }
  41.             if($plate=="C")
  42. { $rateds=$prate-$adrate-$adrate;
  43. }
  44. $prate=$rateds;
  45.  $rate=$rowr["drop_rate"];
  46.  if($prate<>$rate) mysql_query("update drop_bill set yesrate='2',drop_rate='$prate' where ID='$id'",$conn);
  47.  //bs
  48.  if($prate<>$rate) mysql_query("update drop_bills set yesrate='2',drop_rate='$prate' where ID='$id'",$conn);
  49.  }
  50.  $sqlp=mysql_query("select * from drop_bill where sign='1' and drop_date='$drop_date' and user_name='$user' order by id desc",$conn);
  51.  //二次read
  52. ?>
  53. <style type="text/css">
  54. <!--
  55. body {
  56. margin-left: 10px;
  57. margin-top: 5px;
  58. }
  59. .style1 {font-weight: bold}
  60. -->
  61. </style>
  62. <link href="../css/css2.CSS" rel="stylesheet" type="text/css">
  63. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  64. <table border="0" cellspacing="0" cellpadding="0">
  65.       <tr>
  66.         <td><div align="center"><span class="fbred">您下注的是:</span><br>
  67.         </div></td>
  68.       </tr>
  69.       <tr>
  70.         <td><table height="74"  border="0" align="left" cellpadding="2" cellspacing="1" class="t12">
  71.           <tr class="t11">
  72.             <td><div align="center" class="fw12">下注方式</div></td>
  73.             <td><div align="center" class="fw12">下注内容</div></td>
  74.             <td><div align="center" class="fw12">赔率</div></td>
  75.             <td height="26">
  76.               <div align="center" class="fw12">下注金额</div></td>
  77.             <td class="fw12">状态</td>
  78.             <td class="fw12">&nbsp;</td>
  79.           </tr>
  80.           <?php 
  81.     while($rowp=mysql_fetch_array($sqlp))//二次更新
  82.           {   
  83.  if($rowp["yesrate"]=="2")
  84.  { $ts="class='t13'";
  85.  }else $ts="class='t15'";
  86.  ?>
  87.           <tr class="t20" <?=$ts?>>
  88.             <td height="22"><?=$rowp["drop_type"]?></td>
  89.             <td height="22"><?=$rowp["drop_content"]?></td>
  90.             <td height="22">
  91.               <div align="right">
  92.                 <?
  93. $ratets=$rowp["drop_rate"];
  94. echo $ratets;
  95. ?>
  96.             </div></td>
  97.             <td height="22">
  98.               <div align="right">
  99.                 <?=$rowp["drop_money"]?>
  100.             </div></td>
  101.             <td><div align="center" class="fgreng">
  102. <? if($rowp["yesrate"]=="2")
  103. { echo "<font color='red'>失败</font>";
  104. }else echo "成功";?></div></td>
  105.             <td><?php if($rowp["yesrate"]=="2")
  106. { echo "原因:赔率发生变动";
  107. }else $all_money+=$rowp["drop_money"];?></td>
  108.           </tr>
  109.           <? 
  110.   } $moneys=$all_money+$_SESSION["used"];  //更新信用额度
  111.             $ys=mysql_query("update member set used_credit='$moneys' where user_account='$user'",$conn);
  112.             if($ys) $_SESSION["used"]=$moneys;
  113. mysql_query("delete from drop_bill where user_name='$user' and yesrate='2'",$conn);   //移除变动记录
  114.     mysql_query("update drop_bill set sign='0' where user_name='$user'",$conn);//更新当前记录
  115.     mysql_query("update drop_bill set yesrate='0' where user_name='$user'",$conn);//更新当前记录
  116. //bs
  117. mysql_query("delete from drop_bills where user_name='$user' and yesrate='2'",$conn);   //移除变动记录
  118.     mysql_query("update drop_bills set sign='0' where user_name='$user'",$conn);//更新当前记录
  119.     mysql_query("update drop_bills set yesrate='0' where user_name='$user'",$conn);//更新当前记录
  120.   ?> <tr class="t11">
  121.             <td height="22" colspan="3"><div align="right" class="fw12">合计:</div></td>
  122.             <td height="22"><div align="right" class="fw12"><?=$all_money?></div></td>
  123.             <td>&nbsp;</td>
  124.             <td>&nbsp;</td>
  125.           </tr>
  126.          
  127.         </table></td>
  128.       </tr>
  129.       <tr>
  130.         <td>     
  131. <?php
  132. echo '请点<a href="umain.php">快速下单</a>,或稍等10秒后自动返回快速下单页面! <meta http-equiv="refresh" content="10;URL=umain.php">';
  133. ?> 
  134.       </td>
  135.       </tr>
  136.     </table>