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

Web服务器

开发平台:

PHP

  1. <?php
  2. session_start();
  3. include("../inc/conn.php");
  4. include("check.php");
  5. include("configs.inc.php");
  6. $sqlcs=mysql_query("select * from ptime where sign='4'",$conn);
  7. $all_close=mysql_result($sqlcs,0,"opstate");
  8. if($all_close==1) echo "<script language='javascript'>window.location='left_state.php'</script>";
  9. $user=$_SESSION["user"];
  10. $drop_date=$_SESSION["downdate"];
  11. $open_date=$_SESSION["opendate"];
  12. $open_date=str_replace("-","",$open_date);
  13. $plate=$_SESSION["plate"];
  14. $agent=$_SESSION["agent"];
  15. $all_agent=$_SESSION["all_agent"];
  16. $super_agent=$_SESSION["super_agent"];
  17. include("../inc/cut.inc.php");
  18. if(!isset($_GET["act"]))
  19. {
  20.  $drop_types=@$_POST["drop_type"];
  21.  $drop_rates=@$_POST["drop_rate"];
  22.  $drop_contents=@$_POST["drop_content"];
  23.  $drop_moneys=@$_POST["drop_money"];
  24.  $cuts=@$_POST["drop_cut"];
  25.  $cut_signs=@$_POST["cut_sign"];
  26.  if($drop_types=="特码A"||$drop_types=="特码B"||$drop_types=="特码")
  27.  {
  28.   if ($drop_types=="特码B"){include("Check_tb.php");}
  29.   include("left_tnum_close.php"); 
  30.  }else include("left_other_close.php");
  31.   //单项限额
  32. $sql_limit=mysql_query("select * from member_cut where user_account='$user' and sign='$cut_signs'",$conn);
  33. $units=mysql_result($sql_limit,0,"unit_limit");
  34. $pours=mysql_result($sql_limit,0,"pour_limit");
  35. if($drop_types=="特码A"||$drop_types=="特码B")
  36. {
  37.   if ($drop_types=="特码B"){include("Check_tb.php");}
  38.   $sq="and drop_content='$drop_contents' and num_sign='1'";
  39. }elseif($drop_types=="正码")
  40.   $sq="and drop_content='$drop_contents' and cut_sign='$cut_signs'";
  41. }else $sq="and cut_sign='$cut_signs'";
  42. $sqltm=mysql_query("select sum(drop_money) from drop_bill where drop_date='$drop_date' and user_name='$user' $sq ",$conn);
  43. $myrow=mysql_fetch_array($sqltm);
  44. $tmcount=$myrow[0];
  45. $ladd=$drop_moneys+$tmcount;
  46. if($drop_moneys>$pours) echo "<script language='javascript'> alert('单注限额不能大于 ".$pours."!');window.location.href='uleft.php'</script>";
  47. if($ladd>$units) echo "<script language='javascript'> alert('单项限额不能大于 ".$units."!');window.location.href='uleft.php'</script>";
  48. }else
  49. {
  50.  $drop_type=@$_POST["drop_type"];
  51.  if($drop_type=="特码A")
  52.  {
  53.    $drop_tm="A";
  54.  }elseif($drop_type=="特码B")
  55.  { 
  56.    include("Check_tb.php");
  57.    $drop_tm="B";
  58.  }else $drop_type=="0";
  59.  $drop_rate=@$_POST["drop_rate"];
  60.  $drop_content=@$_POST["drop_content"];
  61.  $drop_money=@$_POST["drop_money"];
  62.  $cut=@$_POST["drop_cut"];
  63.  $cut_sign=@$_POST["cut_sign"];
  64.  if($drop_tm=="B")
  65.  { $cut=0;
  66.    $cut_sign=0;
  67.  }
  68.  $leave=$_SESSION["credit"]-$_SESSION["used"];
  69.  if($leave>=$drop_money)
  70.  {
  71.   $money=$_SESSION["used"]+$drop_money;
  72.   $sign=$_SESSION["signid"];     //num_sign
  73.   if($sign==1||$sign==3)
  74.   {
  75.    $sq="num='$drop_content'";
  76.   }else $sq="tp='$drop_content'";
  77.   $sqlyz=mysql_query("select * from  num where $sq and sign='$sign'",$conn);  //二次赔率变动check
  78.   $prate=mysql_result($sqlyz,0,"rate");
  79.   if($_SESSION["tps"]=="b") $prate+=5;
  80.   if(!isset($_SESSION["tpp"])) $prate-=$_SESSION["pnum"];//盘类,正码区分
  81.   if(trim($prate)<>trim($drop_rate))
  82.   { 
  83.     $drop_rate=$prate;
  84. $yesrate=1;
  85.   }else $yesrate=0;
  86.   if($cut_signs==2||$cut_signs==3||$cut_signs==4||$cut_signs==6||$cut_signs==7)
  87.   {
  88.      $drop_type="特码";
  89.   }
  90.   $drop_agent_cut=cut_num($agent,$cut_sign,$plate);
  91.   $drop_all_agent_cut=cut_num($all_agent,$cut_sign,$plate);
  92.   $drop_super_agent_cut=cut_num($super_agent,$cut_sign,$plate);
  93.   $oks=mysql_query("insert into drop_bill(agent,all_agent,super_agent,user_name,drop_date,open_date,drop_type,
  94.   drop_content,drop_rate,drop_cut,cut_sign,drop_money,sign,num_sign,drop_plate,drop_tm,drop_agent_cut,
  95.  drop_all_agent_cut,drop_super_agent_cut,yesrate)values('$agent','$all_agent', '$super_agent','$user','$drop_date',
  96.  '$open_date','$drop_type','$drop_content','$drop_rate','$cut','$cut_sign',
  97.   '$drop_money','0','$sign','$plate','$drop_tm','$drop_agent_cut','$drop_all_agent_cut','$drop_super_agent_cut','$yesrate')",$conn);
  98.     //bs
  99.  $okss=mysql_query("insert into drop_bills(agent,all_agent,super_agent,user_name,drop_date,open_date,drop_type,
  100.   drop_content,drop_rate,drop_cut,cut_sign,drop_money,sign,num_sign,drop_plate,drop_tm,drop_agent_cut,
  101.  drop_all_agent_cut,drop_super_agent_cut,yesrate)values('$agent','$all_agent', '$super_agent','$user','$drop_date',
  102.  '$open_date','$drop_type','$drop_content','$drop_rate','$cut','$cut_sign',
  103.   '$drop_money','0','$sign','$plate','$drop_tm','$drop_agent_cut','$drop_all_agent_cut','$drop_super_agent_cut','$yesrate')",$conn);
  104.    if($yesrate==1)  echo "<script language='javascript'> window.location.href='uleft_tm_check_yes.php'</script>";//赔率变动转向
  105.   $ys=mysql_query("update member set used_credit='$money' where user_account='$user'",$conn);
  106.   if($ys) $_SESSION["used"]=$money;
  107.   if($oks)
  108.   {
  109.    echo "<script language='javascript'> alert('恭喜您,下注成功!');window.location.href='uleft.php'</script>";
  110.   }else
  111.   {
  112.    echo "<script language='javascript'> alert('非常抱歉,下注失败!');window.location.href='uleft.php'</script>";
  113.    }
  114.   }else
  115.   {
  116.    echo "<script language='javascript'> alert('您的信用余额不够本次下注!');window.location.href='uleft.php'</script>";
  117.   }
  118.   
  119. }
  120. ?>
  121. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  122. <link href="../css/css2.CSS" rel="stylesheet" type="text/css">
  123. <style type="text/css">
  124. <!--
  125. body {
  126. background-color: #8FB3F3;
  127. }
  128. -->
  129. </style>
  130. <body>
  131. <table width="97%" height="121"  border="0" align="center" cellpadding="0" cellspacing="1" class="aroundtable1">
  132.  <form name="form1" method="post" action="uleft_tm_check.php?act=yes">
  133. <div align="center"><span class="style3">
  134. <input name="drop_cut" type="hidden" id="rate2" value="<?=$cuts?>">
  135. <input name="cut_sign" type="hidden" id="cut_sign" value="<?=$cut_signs?>">
  136. <input name="drop_type" type="hidden" id="rate2" value="<?
  137.    if($drop_types=="特码A")
  138.    { echo "特码";
  139.    }else echo $drop_types;?>">
  140.   <input name="drop_rate" type="hidden" id="rate2" value="<?=$drop_rates?>">
  141.   <input name="drop_content" type="hidden" id="number2" value="<?=$drop_contents?>">
  142.   <input name="drop_money" type="hidden" id="drop_money" value="<?=$drop_moneys?>">
  143.   &nbsp;
  144.      
  145.   </span>
  146. </div>
  147. <div align="center"></div>
  148.     <tr >
  149.       <td height="31" colspan="4" background="../img2/skin1_07.png" class="fw12"><div align="center" class="fbback">您下注的是</div></td>
  150.     </tr>
  151.     <tr class="t12">
  152.       <td><div align="center" class="fw12">下注方式</div></td>
  153.       <td><div align="center" class="fw12">下注内容</div></td>
  154.       <td><div align="center" class="fw12">赔率</div></td>
  155.       <td height="22">        <div align="center" class="fw12">下注金额</div></td>
  156.     </tr>
  157.     <tr class="t17">
  158.       <td><div align="center">
  159.   <?
  160.    if($drop_types=="特码A")
  161.    { echo "特码";
  162.    }else echo $drop_types;?></div></td>
  163.       <td><div align="center"><?=$drop_contents?></div></td>
  164.       <td><div align="center"><?=$drop_rates?></div></td>
  165.       <td height="35"><div align="center"><?=$drop_moneys?></div></td>
  166.     </tr>
  167.     <tr class="t17">
  168.       <td height="33" colspan="4"><div align="center"></div>        
  169.         <div align="right" class="fw12">
  170. <script language="javascript">
  171. function kk(){
  172. document.form1.Submit2.disabled="disabled";
  173. document.form1.submit();
  174. }
  175. </script>
  176.           <div align="center"><span class="style3">
  177.             <input name="Submit" type="button" class="buttonrmin" value="取消下注" onClick="window.location.href='uleft.php';">
  178.             <input name="Submit2" type="button" class="buttongmin" value="确定下注" onClick="kk();">
  179.           </span></div>
  180.         </div>
  181.       <div align="right"></div>      <div align="center" class="fw12"></div></td>
  182.     </tr>
  183.   </form>
  184. </table> 
  185. </body>