umain_check_yes.php
资源名称:Nsix.rar [点击查看]
上传用户:m68239277
上传日期:2014-10-12
资源大小:824k
文件大小:5k
源码类别:
Web服务器
开发平台:
PHP
- <?php
- session_start();
- include_once("../inc/conn.php");
- include_once("check.php");
- include_once("configs.inc.php");
- include_once("tnum_close.php");
- $user=$_SESSION["user"];
- $plate=$_SESSION["plate"];
- $drop_date=$_SESSION["downdate"];
- if(isset($_GET["act"]))
- {
- mysql_query("delete from drop_bill where user_name='$user' and yesrate='1'",$conn); //移除变动记录
- //bs
- mysql_query("delete from drop_bills where user_name='$user' and yesrate='1'",$conn); //移除变动记录
- echo "<script language='javascript'>window.location.href='umain.php'</script>";
- }
- $sqlr=mysql_query("select * from drop_bill where yesrate='1' and drop_date='$drop_date' and user_name='$user' order by id desc",$conn);
- while($rowr=mysql_fetch_array($sqlr))//二次更新
- {
- $tp=$rowr["drop_content"];
- $id=$rowr["ID"];
- $num_sign=$rowr["num_sign"];
- mysql_query("update drop_bill set sign='1' where user_name='$user' and ID='$id'",$conn);
- //bs
- mysql_query("update drop_bills set sign='1' where user_name='$user' and ID='$id'",$conn);
- if($num_sign=="1")
- {
- $sq="num='$tp'";
- }else $sq="tp='$tp'";
- $sqlyz=mysql_query("select * from num where $sq and sign='$num_sign'",$conn); //二次赔率变动check
- $prate=mysql_result($sqlyz,0,"rate");
- if($num_sign==1) $adrate=0.5;
- if($num_sign==2) $adrate=0.01;
- if($num_sign==6) $adrate=0.1;
- if($plate=="A")
- { $rateds=$prate;
- }
- if($plate=="B")
- { $rateds=$prate-$adrate;
- }
- if($plate=="C")
- { $rateds=$prate-$adrate-$adrate;
- }
- $prate=$rateds;
- $rate=$rowr["drop_rate"];
- if($prate<>$rate) mysql_query("update drop_bill set yesrate='2',drop_rate='$prate' where ID='$id'",$conn);
- //bs
- if($prate<>$rate) mysql_query("update drop_bills set yesrate='2',drop_rate='$prate' where ID='$id'",$conn);
- }
- $sqlp=mysql_query("select * from drop_bill where sign='1' and drop_date='$drop_date' and user_name='$user' order by id desc",$conn);
- //二次read
- ?>
- <style type="text/css">
- <!--
- body {
- margin-left: 10px;
- margin-top: 5px;
- }
- .style1 {font-weight: bold}
- -->
- </style>
- <link href="../css/css2.CSS" rel="stylesheet" type="text/css">
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><div align="center"><span class="fbred">您下注的是:</span><br>
- </div></td>
- </tr>
- <tr>
- <td><table height="74" border="0" align="left" cellpadding="2" cellspacing="1" class="t12">
- <tr class="t11">
- <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="26">
- <div align="center" class="fw12">下注金额</div></td>
- <td class="fw12">状态</td>
- <td class="fw12"> </td>
- </tr>
- <?php
- while($rowp=mysql_fetch_array($sqlp))//二次更新
- {
- if($rowp["yesrate"]=="2")
- { $ts="class='t13'";
- }else $ts="class='t15'";
- ?>
- <tr class="t20" <?=$ts?>>
- <td height="22"><?=$rowp["drop_type"]?></td>
- <td height="22"><?=$rowp["drop_content"]?></td>
- <td height="22">
- <div align="right">
- <?
- $ratets=$rowp["drop_rate"];
- echo $ratets;
- ?>
- </div></td>
- <td height="22">
- <div align="right">
- <?=$rowp["drop_money"]?>
- </div></td>
- <td><div align="center" class="fgreng">
- <? if($rowp["yesrate"]=="2")
- { echo "<font color='red'>失败</font>";
- }else echo "成功";?></div></td>
- <td><?php if($rowp["yesrate"]=="2")
- { echo "原因:赔率发生变动";
- }else $all_money+=$rowp["drop_money"];?></td>
- </tr>
- <?
- } $moneys=$all_money+$_SESSION["used"]; //更新信用额度
- $ys=mysql_query("update member set used_credit='$moneys' where user_account='$user'",$conn);
- if($ys) $_SESSION["used"]=$moneys;
- mysql_query("delete from drop_bill where user_name='$user' and yesrate='2'",$conn); //移除变动记录
- mysql_query("update drop_bill set sign='0' where user_name='$user'",$conn);//更新当前记录
- mysql_query("update drop_bill set yesrate='0' where user_name='$user'",$conn);//更新当前记录
- //bs
- mysql_query("delete from drop_bills where user_name='$user' and yesrate='2'",$conn); //移除变动记录
- mysql_query("update drop_bills set sign='0' where user_name='$user'",$conn);//更新当前记录
- mysql_query("update drop_bills set yesrate='0' where user_name='$user'",$conn);//更新当前记录
- ?> <tr class="t11">
- <td height="22" colspan="3"><div align="right" class="fw12">合计:</div></td>
- <td height="22"><div align="right" class="fw12"><?=$all_money?></div></td>
- <td> </td>
- <td> </td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td>
- <?php
- echo '请点<a href="umain.php">快速下单</a>,或稍等10秒后自动返回快速下单页面! <meta http-equiv="refresh" content="10;URL=umain.php">';
- ?>
- </td>
- </tr>
- </table>