uleft_tm_check.php
资源名称:Nsix.rar [点击查看]
上传用户:m68239277
上传日期:2014-10-12
资源大小:824k
文件大小:8k
源码类别:
Web服务器
开发平台:
PHP
- <?php
- session_start();
- include("../inc/conn.php");
- include("check.php");
- include("configs.inc.php");
- $sqlcs=mysql_query("select * from ptime where sign='4'",$conn);
- $all_close=mysql_result($sqlcs,0,"opstate");
- if($all_close==1) echo "<script language='javascript'>window.location='left_state.php'</script>";
- $user=$_SESSION["user"];
- $drop_date=$_SESSION["downdate"];
- $open_date=$_SESSION["opendate"];
- $open_date=str_replace("-","",$open_date);
- $plate=$_SESSION["plate"];
- $agent=$_SESSION["agent"];
- $all_agent=$_SESSION["all_agent"];
- $super_agent=$_SESSION["super_agent"];
- include("../inc/cut.inc.php");
- if(!isset($_GET["act"]))
- {
- $drop_types=@$_POST["drop_type"];
- $drop_rates=@$_POST["drop_rate"];
- $drop_contents=@$_POST["drop_content"];
- $drop_moneys=@$_POST["drop_money"];
- $cuts=@$_POST["drop_cut"];
- $cut_signs=@$_POST["cut_sign"];
- if($drop_types=="特码A"||$drop_types=="特码B"||$drop_types=="特码")
- {
- if ($drop_types=="特码B"){include("Check_tb.php");}
- include("left_tnum_close.php");
- }else include("left_other_close.php");
- //单项限额
- $sql_limit=mysql_query("select * from member_cut where user_account='$user' and sign='$cut_signs'",$conn);
- $units=mysql_result($sql_limit,0,"unit_limit");
- $pours=mysql_result($sql_limit,0,"pour_limit");
- if($drop_types=="特码A"||$drop_types=="特码B")
- {
- if ($drop_types=="特码B"){include("Check_tb.php");}
- $sq="and drop_content='$drop_contents' and num_sign='1'";
- }elseif($drop_types=="正码")
- {
- $sq="and drop_content='$drop_contents' and cut_sign='$cut_signs'";
- }else $sq="and cut_sign='$cut_signs'";
- $sqltm=mysql_query("select sum(drop_money) from drop_bill where drop_date='$drop_date' and user_name='$user' $sq ",$conn);
- $myrow=mysql_fetch_array($sqltm);
- $tmcount=$myrow[0];
- $ladd=$drop_moneys+$tmcount;
- if($drop_moneys>$pours) echo "<script language='javascript'> alert('单注限额不能大于 ".$pours."!');window.location.href='uleft.php'</script>";
- if($ladd>$units) echo "<script language='javascript'> alert('单项限额不能大于 ".$units."!');window.location.href='uleft.php'</script>";
- }else
- {
- $drop_type=@$_POST["drop_type"];
- if($drop_type=="特码A")
- {
- $drop_tm="A";
- }elseif($drop_type=="特码B")
- {
- include("Check_tb.php");
- $drop_tm="B";
- }else $drop_type=="0";
- $drop_rate=@$_POST["drop_rate"];
- $drop_content=@$_POST["drop_content"];
- $drop_money=@$_POST["drop_money"];
- $cut=@$_POST["drop_cut"];
- $cut_sign=@$_POST["cut_sign"];
- if($drop_tm=="B")
- { $cut=0;
- $cut_sign=0;
- }
- $leave=$_SESSION["credit"]-$_SESSION["used"];
- if($leave>=$drop_money)
- {
- $money=$_SESSION["used"]+$drop_money;
- $sign=$_SESSION["signid"]; //num_sign
- if($sign==1||$sign==3)
- {
- $sq="num='$drop_content'";
- }else $sq="tp='$drop_content'";
- $sqlyz=mysql_query("select * from num where $sq and sign='$sign'",$conn); //二次赔率变动check
- $prate=mysql_result($sqlyz,0,"rate");
- if($_SESSION["tps"]=="b") $prate+=5;
- if(!isset($_SESSION["tpp"])) $prate-=$_SESSION["pnum"];//盘类,正码区分
- if(trim($prate)<>trim($drop_rate))
- {
- $drop_rate=$prate;
- $yesrate=1;
- }else $yesrate=0;
- if($cut_signs==2||$cut_signs==3||$cut_signs==4||$cut_signs==6||$cut_signs==7)
- {
- $drop_type="特码";
- }
- $drop_agent_cut=cut_num($agent,$cut_sign,$plate);
- $drop_all_agent_cut=cut_num($all_agent,$cut_sign,$plate);
- $drop_super_agent_cut=cut_num($super_agent,$cut_sign,$plate);
- $oks=mysql_query("insert into drop_bill(agent,all_agent,super_agent,user_name,drop_date,open_date,drop_type,
- drop_content,drop_rate,drop_cut,cut_sign,drop_money,sign,num_sign,drop_plate,drop_tm,drop_agent_cut,
- drop_all_agent_cut,drop_super_agent_cut,yesrate)values('$agent','$all_agent', '$super_agent','$user','$drop_date',
- '$open_date','$drop_type','$drop_content','$drop_rate','$cut','$cut_sign',
- '$drop_money','0','$sign','$plate','$drop_tm','$drop_agent_cut','$drop_all_agent_cut','$drop_super_agent_cut','$yesrate')",$conn);
- //bs
- $okss=mysql_query("insert into drop_bills(agent,all_agent,super_agent,user_name,drop_date,open_date,drop_type,
- drop_content,drop_rate,drop_cut,cut_sign,drop_money,sign,num_sign,drop_plate,drop_tm,drop_agent_cut,
- drop_all_agent_cut,drop_super_agent_cut,yesrate)values('$agent','$all_agent', '$super_agent','$user','$drop_date',
- '$open_date','$drop_type','$drop_content','$drop_rate','$cut','$cut_sign',
- '$drop_money','0','$sign','$plate','$drop_tm','$drop_agent_cut','$drop_all_agent_cut','$drop_super_agent_cut','$yesrate')",$conn);
- if($yesrate==1) echo "<script language='javascript'> window.location.href='uleft_tm_check_yes.php'</script>";//赔率变动转向
- $ys=mysql_query("update member set used_credit='$money' where user_account='$user'",$conn);
- if($ys) $_SESSION["used"]=$money;
- if($oks)
- {
- echo "<script language='javascript'> alert('恭喜您,下注成功!');window.location.href='uleft.php'</script>";
- }else
- {
- echo "<script language='javascript'> alert('非常抱歉,下注失败!');window.location.href='uleft.php'</script>";
- }
- }else
- {
- echo "<script language='javascript'> alert('您的信用余额不够本次下注!');window.location.href='uleft.php'</script>";
- }
- }
- ?>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <link href="../css/css2.CSS" rel="stylesheet" type="text/css">
- <style type="text/css">
- <!--
- body {
- background-color: #8FB3F3;
- }
- -->
- </style>
- <body>
- <table width="97%" height="121" border="0" align="center" cellpadding="0" cellspacing="1" class="aroundtable1">
- <form name="form1" method="post" action="uleft_tm_check.php?act=yes">
- <div align="center"><span class="style3">
- <input name="drop_cut" type="hidden" id="rate2" value="<?=$cuts?>">
- <input name="cut_sign" type="hidden" id="cut_sign" value="<?=$cut_signs?>">
- <input name="drop_type" type="hidden" id="rate2" value="<?
- if($drop_types=="特码A")
- { echo "特码";
- }else echo $drop_types;?>">
- <input name="drop_rate" type="hidden" id="rate2" value="<?=$drop_rates?>">
- <input name="drop_content" type="hidden" id="number2" value="<?=$drop_contents?>">
- <input name="drop_money" type="hidden" id="drop_money" value="<?=$drop_moneys?>">
-
- </span>
- </div>
- <div align="center"></div>
- <tr >
- <td height="31" colspan="4" background="../img2/skin1_07.png" class="fw12"><div align="center" class="fbback">您下注的是</div></td>
- </tr>
- <tr class="t12">
- <td><div align="center" class="fw12">下注方式</div></td>
- <td><div align="center" class="fw12">下注内容</div></td>
- <td><div align="center" class="fw12">赔率</div></td>
- <td height="22"> <div align="center" class="fw12">下注金额</div></td>
- </tr>
- <tr class="t17">
- <td><div align="center">
- <?
- if($drop_types=="特码A")
- { echo "特码";
- }else echo $drop_types;?></div></td>
- <td><div align="center"><?=$drop_contents?></div></td>
- <td><div align="center"><?=$drop_rates?></div></td>
- <td height="35"><div align="center"><?=$drop_moneys?></div></td>
- </tr>
- <tr class="t17">
- <td height="33" colspan="4"><div align="center"></div>
- <div align="right" class="fw12">
- <script language="javascript">
- function kk(){
- document.form1.Submit2.disabled="disabled";
- document.form1.submit();
- }
- </script>
- <div align="center"><span class="style3">
- <input name="Submit" type="button" class="buttonrmin" value="取消下注" onClick="window.location.href='uleft.php';">
- <input name="Submit2" type="button" class="buttongmin" value="确定下注" onClick="kk();">
- </span></div>
- </div>
- <div align="right"></div> <div align="center" class="fw12"></div></td>
- </tr>
- </form>
- </table>
- </body>