lnumber_check.php
资源名称:Nsix.rar [点击查看]
上传用户:m68239277
上传日期:2014-10-12
资源大小:824k
文件大小:13k
源码类别:
Web服务器
开发平台:
PHP
- <?php
- session_start();
- include("../inc/conn.php");
- include("check.php");
- include("configs.inc.php");
- include("left_other_close.php");
- include("../inc/char.inc.php");
- $user=$_SESSION["user"];
- $credit=$_SESSION["credit"];
- $used=$_SESSION["used"];
- $type=$_SESSION["type"];
- $downdate=$_SESSION["downdate"];
- $dates=$downdate;
- $opendate=$_SESSION["opendate"];
- $drop_date=$_SESSION["downdate"];
- $open_date=$_SESSION["opendate"];
- $agent=$_SESSION["agent"];
- $all_agent=$_SESSION["all_agent"];
- $super_agent=$_SESSION["super_agent"];
- $open_date=str_replace("-","",$open_date);
- $plate=$_SESSION["plate"];
- include("../inc/cut.inc.php");
- $sqlm=mysql_query("select * from member_cut where user_account='$user' and sign='18'",$conn);
- $units=mysql_result($sqlm,0,"unit_limit");
- $maxrmb=mysql_result($sqlm,0,"pour_limit");
- $minrmb=$drop_lows;
- if(isset($_GET["act"]))
- {
- $drop_money=$_POST["drop_money"];
- $drop_content=$_POST["drop_content"];
- $drop_details=$_POST["drop_details"];
- $drop_rate=$_POST["drop_rate"];
- $drop_type="连码";
- if($drop_money=="")
- {
- echo "<script language='javascript'>alert('下注金额不能为空!');history.back(1);</script>";
- }else
- {
- $leave=$_SESSION["credit"]-$_SESSION["used"];
- if($leave>=$drop_money)
- {
- $money=$_SESSION["used"]+$drop_money;
- $cut=cut(18);
- $drop_agent_cut=cut_num($agent,18,$plate);
- $drop_all_agent_cut=cut_num($all_agent,18,$plate);
- $drop_super_agent_cut=cut_num($super_agent,18,$plate);
- $ok=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,drop_details,sign,num_sign,drop_plate,drop_agent_cut,
- drop_all_agent_cut,drop_super_agent_cut)values('$agent','$all_agent','$super_agent','$user','$drop_date',
- $open_date,'$drop_type','$drop_content','$drop_rate','$cut','18','$drop_money','$drop_details','0','5',
- '$plate','$drop_agent_cut','$drop_all_agent_cut','$drop_super_agent_cut')",$conn);
- //bs
- $oks=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,drop_details,sign,num_sign,drop_plate,drop_agent_cut,drop_all_agent_cut,drop_super_agent_cut)values('$agent','$all_agent','$super_agent','$user','$drop_date',$open_date,'$drop_type','$drop_content','$drop_rate','$cut','18','$drop_money','$drop_details','0','5','$plate','$drop_agent_cut','$drop_all_agent_cut','$drop_super_agent_cut')",$conn);
- $ys=mysql_query("update member set used_credit='$money' where user_account='$user'",$conn);
- if($ys) $_SESSION["used"]=$money;
- if($ok) echo "<script language='javascript'>alert('恭喜您,下注成功!');window.location.href='uleft.php';</script>";
- }else
- {
- echo "<script language='javascript'> alert('您的信用余额不够本次下注!');window.location.href='uleft.php'</script>";
- }
- }
- }
- $update_time=45;
- ?>
- <link href="../css/css2.CSS" rel="stylesheet" type="text/css">
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <meta http-equiv="refresh" content="<?=$update_time?>;URL=uleft.php">
- <style type="text/css">
- <!--
- body {
- background-color: #8FB3F3;
- margin-top: 5px;
- }
- -->
- </style>
- <?php
- if(isset($_GET["jact"]))
- {
- $drop_contents=$_POST["drop_contenta"];
- $drop_details=$_POST["drop_detailsa"];
- $drop_rates=$_POST["drop_ratea"];
- $drop_moneys=$_POST["drop_moneys"]*$_POST["units"];
- ?>
- <form name="form1" method="post" action="lnumber_check.php?act=yes">
- <div align="center"></div>
- <table width="100%" height="108" border="0" align="center" cellpadding="0" cellspacing="1" class="aroundtable1">
- <tr >
- <td height="31" colspan="4" background="../img2/skin1_07.png"><table width="98%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="98%" height="10"></td>
- </tr>
- <tr>
- <td width="98%" height="21"><div align="center"><span class="fb12">您下注的是</span></div></td>
- </tr>
- </table></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 nowrap><div align="center">连码</div></td>
- <td width="60"><div align="center"><?=$drop_contents?> <?=$drop_details?></div></td>
- <td><div align="center"><?=$drop_rates?></div></td>
- <td height="26" nowrap><div align="center"><?=$drop_moneys?></div></td>
- </tr>
- <tr class="t20">
- <td height="29" colspan="4"><div align="center"><span class="style3">
- <div align="center"><span class="style3">
- <input name="drop_rate" type="hidden" id="drop_rate3" value="<?=$drop_rates?>">
- <input name="drop_content" type="hidden" id="drop_content4" value="<?=$drop_contents?>">
- <input name="drop_details" type="hidden" id="drop_details3" value="<?=$drop_details?>">
- <input name="drop_money" type="hidden" id="drop_rate4" value="<?=$drop_moneys?>">
-
- </span>
- </div>
- <input name="Submit3" type="button" class="buttonrmin" value="取消下注" onClick="window.location.href='uleft.php';">
- <input name="Submit22" type="submit" class="buttongmin" value="确定下注">
- </span></div></td>
- </tr>
- </table>
- <br>
- </form>
- <?php
- }
- else{
- $check=$_POST["check"];
- $fp=split(",",$check);
- $unum=count($fp)-1;
- $among=$_POST["ratetype"];
- $atype=$among;
- $rate=$_POST["rate"];
- $vrate=$rate;
- if($among=="1")
- {
- $among="三全中";
- $ratemenu=$rate;
- }elseif($among=="2")
- {
- $among="三中二";
- $ay=split(",",$rate);
- $rate1=$ay[0];
- $rate2=$ay[1];
- $vrate=$rate2;
- $ratemenu="中二<font color='red'>".$rate1."</font><br>中三<font color='red'>".$rate2."</font>";
- }elseif($among=="3")
- {
- $among="二全中";
- $ratemenu=$rate;
- $vrate=$rate;
- }elseif($among=="4")
- {
- $among="二中特";
- $ay=split(",",$rate);
- $rate1=$ay[0];
- $rate2=$ay[1];
- $vrate=$rate2;
- $ratemenu="中特<font color='red'>".$rate1."</font><br>中二<font color='red'>".$rate2."</font>";
- }elseif($among=="5")
- {
- $among="特串";
- $ratemenu=$rate;
- $vrate=$rate;
- }
- if($atype==1||$atype==2)
- {
- if($unum==3)
- {
- $unums=1;
- }elseif($unum==4)
- {
- $unums=4;
- }elseif($unum==5)
- {
- $unums=10;
- }elseif($unum==6)
- {
- $unums=20;
- }elseif($unum==7)
- {
- $unums=35;
- }elseif($unum==8)
- {
- $unums=56;
- }elseif($unum==9)
- {
- $unums=84;
- }elseif($unum==10)
- {
- $unums=120;
- }
- }else
- {
- if($unum==2)
- {
- $unums=1;
- }elseif($unum==3)
- {
- $unums=3;
- }elseif($unum==4)
- {
- $unums=6;
- }elseif($unum==5)
- {
- $unums=10;
- }elseif($unum==6)
- {
- $unums=15;
- }elseif($unum==7)
- {
- $unums=21;
- }elseif($unum==8)
- {
- $unums=28;
- }elseif($unum==9)
- {
- $unums=36;
- }elseif($unum==10)
- {
- $unums=45;
- }
- }
- $number=$among; //单项限额
- $sqltm=mysql_query("select sum(drop_money) from drop_bill where drop_date='$drop_date' and user_name='$user' and drop_content='$number' and cut_sign='18'",$conn);
- $myrow=mysql_fetch_array($sqltm);
- $tmcount=$myrow[0];
- if($tmcount=="") $tmcount=0;
- ?>
- <script language="javascript">
- function checks(form)
- {
- if(form.drop_moneys.value<<?=$minrmb?>)
- {
- alert("单注金额下限不能小于 <?=$minrmb?>");
- return false;
- form.drop_moneys.focus();
- }
- if(form.drop_moneys.value><?=$maxrmb?>)
- {
- alert("单注金额上限不能大于 <?=$maxrmb?>");
- return false;
- form.drop_moneys.focus();
- }
- var cmoney=parseFloat(form.drop_moneys.value)+<?=$tmcount?>;
- if(cmoney><?=$units?>)
- {
- alert("连码 单项限额不能大于 <?=$units?>");
- return false;
- form.drop_moneys.focus();
- }
- }
- function win_money()
- {
- var rmb=this.form1.drop_moneys.value;
- amoney.innerText=rmb*<?=$unums?>;
- //this.form1.drop_money.value=rmb*<?=$unums?>;
- rmb=rmb*<?=$rate?>-rmb;
- winmoney.innerText=roundFun(rmb,2);
- }
- function Isnum(){
- return ((event.keyCode >= 48) && (event.keyCode <= 57));
- }
- function roundFun(numberRound,roundDigit) //四舍五入,保留位数为roundDigit ,供计算时用
- {
- if (numberRound>=0)
- {
- var tempNumber = parseInt((numberRound * Math.pow(10,roundDigit)+0.5))/Math.pow(10,roundDigit);
- return tempNumber;
- }
- else
- {
- numberRound1=-numberRound
- var tempNumber = parseInt((numberRound1 * Math.pow(10,roundDigit)+0.5))/Math.pow(10,roundDigit);
- return -tempNumber;
- }
- }
- </script>
- <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="aroundtable1">
- <form name="form1" method="post" action="lnumber_check.php?jact=yes" onSubmit="return checks(this);"><tr>
- <td width="253" height="31" background="../img2/skin1_07.png" ><table width="98%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="98%" height="10"></td>
- </tr>
- <tr>
- <td width="98%" height="21"><div align="center"><span class="fb12">香港六合彩 连码 下注单</span></div></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td class="t20"><table width="186" height="332" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td height="20" colspan="2"><table width="91%" height="60" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td width="38%"><div align="right">会员帐号:</div></td>
- <td width="62%" height="20"><div align="right">
- <?=$user?>
- </div></td>
- </tr>
- <tr>
- <td><div align="right">会员盘类:</div></td>
- <td height="20"><div align="right"><span class="style3">
- <?=$type?>
- 盘</span></div></td>
- </tr>
- <tr>
- <td><div align="right">信用额度:</div></td>
- <td height="20"><div align="right"><span class="style3">
- <?=rmb($credit)?>
- </span></div></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td height="13" colspan="2"><hr width="98%" size="1"></td>
- </tr>
- <tr>
- <td height="20" colspan="2"><div align="center"><font color="blue"><strong>期数
- <?=$downdate?>
- </strong></font><br>
- <strong><font color="#FF0000">连码
- <?=$among?>
- </font></strong> <span class="fat">@ </span> <font color="#FF0000">
- <?=$ratemenu?>
- </font> </div></td>
- </tr>
- <tr>
- <td height="18" colspan="2"><div align="center">
- <?=$check?>
- </div></td>
- </tr>
- <tr>
- <td height="20" colspan="2"><div align="center">组合 共 <strong>
- <?=$unums?>
- </strong> 组
- <input name="units" type="hidden" id="units" value="<?=$unums?>">
- <hr width="98%" size="1">
- </div></td>
- </tr>
- <tr>
- <td width="86"><div align="right">
- <input name="drop_money2" type="hidden" id="drop_money22">
- 下注金额:</div></td>
- <td width="100" height="20" nowrap><input name="drop_moneys" type="text" class="input" id="drop_moneys3" onKeyPress="event.returnValue=Isnum();" onKeyUp="win_money();" onBlur="win_money();" size="10" maxlength="10">
- /组 </td>
- </tr>
- <tr>
- <td><div align="right">总下注金额:</div></td>
- <td height="20"><div id="amoney" class="fred12" align="right">0 </div></td>
- </tr>
- <tr>
- <td><div align="right">可赢金额:</div></td>
- <td height="20"><div id="winmoney" class="fred12" align="right">0 </div></td>
- </tr>
- <tr>
- <td><div align="right">最低限额:</div></td>
- <td height="20"><div align="right">
- <?=$minrmb?>
- </div></td>
- </tr>
- <tr>
- <td><div align="right">单号限额:</div></td>
- <td height="20"><div align="right">
- <?=$units?>
- </div></td>
- </tr>
- <tr>
- <td><div align="right">单项限额:</div></td>
- <td height="20"><div align="right">
- <?=$maxrmb?>
- </div></td>
- </tr>
- <tr>
- <td><div align="right">已使用信用:</div></td>
- <td height="20" align="right"><?=rmb($used)?></td>
- </tr>
- <tr>
- <td height="29" colspan="2"><div align="center">
- <input name="drop_ratea" type="hidden" id="drop_rate4" value="<?=$rate?>">
- <input name="drop_detailsa" type="hidden" id="drop_details4" value="<?=$check?>">
- <input name="drop_contenta" type="hidden" id="drop_content3" value="<?=$among?>">
- <input name="Submit" type="button" class="buttonrmin" value="取消下注" onClick="javascript:window.location.href='uleft.php';">
- <input name="Submit2" type="submit" class="buttongmin" value="确定下注">
- </div></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td height="23" class="t12"><div id="jump" align="center" class="t12"></div></td>
- </tr> <script>
- function countDown(secs)
- {
- var tv;
- jump.innerText="更新秒数:"+secs+" 秒";
- if(--secs>0)
- tv=setTimeout("countDown("+secs+")",1000);
- }
- countDown(<?=$update_time?>);
- </script>
- </form>
- </table>
- <?php }?>
- <p> </p>
- <p> </p>