⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 zuo2.php

📁 六合特码投注系统
💻 PHP
字号:

<?php
//单一模式
$s=$_POST['s2'];
$sz=$_POST['sz2'];
$p=$_POST['p2'];
$jin=$_POST['jin'];

//获取号码
$seedstr = split(" ",microtime(),5); 
$seed = $seedstr[0]*10000; 
srand($seed); 
$random = rand(10000000,100000000); 

$shi=date("Y-m-d H:i:s", time());
$sn="SNC".$random;
$jie="0";
$jie2="0";

//获取退水
$exec2="Select * from s where name='".$_SESSION['name']."' and s='".$s."'"; 
mysql_query("set names gbk");
$resu2=mysql_query($exec2); 
$rs2=mysql_fetch_object($resu2);

$c=$rs2->c;
$c2=$rs2->c2;

/////////////////////////////////////////////////////////

$dza=$rs2->dz;
$dca=$rs2->dc;

//如果单注超过限额
$exec2="Select * from z where name='".$_SESSION['name']."' and s='".$s."' and sz='".$sz."' and qi='".$qi2."' order by id"; 
mysql_query("set names gbk");
$resu2=mysql_query($exec2); 
while($rs2=mysql_fetch_object($resu2)) 
{ 
$jinz=$jinz+$rs2->jin;
}
$jinz=$jinz+$jin;

if (!empty($s) and $jinz>$dza)
$dzchao="dzchao";

//如果单场超过限额
$exec2="Select * from z where name='".$_SESSION['name']."' and s='".$s."' and qi='".$qi2."' order by id"; 
mysql_query("set names gbk");
$resu2=mysql_query($exec2); 
while($rs2=mysql_fetch_object($resu2)) 
{ 
$dcjin=$dcjin+$rs2->jin;
}
$dcjin=$dcjin+$jin;

if (!empty($s) and $dcjin>$dca)
$dcchao="dcchao";

/////////////////////////////////////////////////////////


//如果下注金额少于10
if (!empty($s) and $jin<10)
$shao="shao";


//信用余额是否足够
$exec="Select * from edu where name='".$_SESSION['name']."'"; 
$resu=mysql_query($exec);
$rs=mysql_fetch_object($resu);
$yu=$rs->yu-$jin;

if ($rs->yu<$jin)
$bugou="bugou";


if (!empty($s) and $oo2=="开奖时间" and empty($shao) and empty($bugou) and empty($dzchao) and empty($dcchao))
{
$cg="cg";

//更改信用余额
$exec="update edu set yu='".$yu."' where name='".$_SESSION['name']."'"; 
mysql_query("set names gbk"); 
mysql_query($exec); 

//添加记录
$exec="insert into z (qi,name,s,sz,p,jin,shi,sn,jie,jie2,c,c2) values ('".$qi2."','".$_SESSION['name']."','".$s."','".$sz."','".$p."','".$jin."','".$shi."','".$sn."','".$jie."','".$jie2."','".$c."','".$c2."')";
mysql_query("set names gbk"); 
mysql_query($exec); 
}
?>
	
	<table width="227" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="3"></td>
      </tr>
      <tr>
        <td><img src="p/frame_top.gif" width="227" height="15"></td>
      </tr>
      <tr>
        <td height="88" background="p/frame_bg.jpg" vaLign="top">
<?php
$exec="Select * from edu where name='".$_SESSION['name']."'"; 
mysql_query("set names gbk");
$resu=mysql_query($exec);
$rs=mysql_fetch_object($resu);
?>		
		<table width="200" border="0" align="center" cellpadding="3" cellspacing="2">
          <tr>
            <td align="center">
			<font color="#000080">
			帐户:
			<strong><?php echo $_SESSION['name'];?></strong>
			</font></td>
          </tr>
          <tr id="aaa"<?php if (!empty($cg) or !empty($_POST['moshi'])) {?> style="display:none"<?php }?>>
            <td align="center">
			<font color="#000080">
			信用余额:CNY&nbsp;<?php echo $rs->yu;?></font></td>
          </tr>
          <tr id="bbb"<?php if (!empty($cg) or !empty($_POST['moshi'])) {?> style="display:none"<?php }?>>
            <td align="center">
			<font color="#000080">
			信用额度:CNY&nbsp;<?php echo $rs->edu;?></font></td>
          </tr>
          <tr>
            <td id="Show" style="display:none">
			
<script Language="JavaScript">
function js(){

var p=document.getElementById("p2").value;
var jin=document.getElementById("jin").value;
var yu=<?php echo $rs->yu; ?>;

document.getElementById("ying").innerHTML = jin*p-jin;

if ((yu-jin)<0)
{
document.getElementById("yu2").innerHTML = "信用额度不足!";
document.getElementById("Submit").disabled = "disabled";
}
else
{
document.getElementById("yu2").innerHTML = yu-jin;
document.getElementById("Submit").disabled = "";
}

}





function Show(){

document.getElementById("ying").innerHTML ="";
document.getElementById("yu2").innerHTML ="";
document.getElementById("Submit").disabled = "";

var Show=document.getElementById("Show");
Show.style.display="none";

}


function Show2(){

var aaa=document.getElementById("aaa");
var bbb=document.getElementById("bbb");
var ccc=document.getElementById("ccc");
aaa.style.display="";
bbb.style.display="";
ccc.style.display="none";
}

</script>

			<form name="form" method="post" action="" style="margin:0" autocomplete="off" onSubmit="return confirm('是否确定下注?\n\n注单总数:1\n注额总数:'+form.jin.value);">
			<table width="100%" border="0" align="center" cellpadding="0" cellspacing="2">
              <tr>
                <td colspan="2" align="center" bgcolor="#DFF0FF" style="Line-height:20px">
				<strong>期数:<?php Echo $qi2;?>/2007</strong><br>
				
				<strong><span id="s" style="color:#8a4829"></span></strong>:<br>

				<strong><span id="sz"></span></strong>
				&nbsp;
				<strong style="color:#8a4829">@</strong>
				&nbsp;
				<strong><span id="p" style="color:#FF0000"></span></strong></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><font color="#000080">下注金额:</font></td>
                <td><input name="jin" type="text" id="jin" onKeyUp="js()" size="14"></td>
              </tr>
              <tr>
                <td><font color="#000080">可赢金额:</font></td>
                <td><span id="ying" style="color:#000080"></span></td>
              </tr>
              <tr>
                <td><font color="#000080">最低限额:</font></td>
                <td style="color:#000080">10</td>
              </tr>
              <tr>
                <td><font color="#000080">单注限额:</font></td>
                <td style="color:#000080">50,000</td>
              </tr>
              <tr>
                <td><font color="#000080">最高赔额:</font></td>
                <td style="color:#000080">3,000,000</td>
              </tr>
              <tr style="display:none">
                <td><font color="#000080">信用额度:</font></td>
                <td><span id="yu" style="color:#000080"><?php echo $rs->yu;?></span></td>
              </tr>
              <tr>
                <td><font color="#000080">信用余额:</font></td>
                <td><span id="yu2" style="color:#000080"></span></td>
              </tr>
              <tr>
                <td>
				<input name="s2" type="hidden" id="s2">
				<input name="sz2" type="hidden" id="sz2">
				<input name="p2" type="hidden" id="p2"></td>
                <td>
				<input type="Submit" name="Submit" value="下注" style="color:#000080">
				<input type="reset" name="Submit2" value="取消" style="color:#CC0000" onClick="Show()"></td>
              </tr>
            </table>
			</form></td>
          </tr>
		  <?php if (!empty($cg))
		  {?>
          <tr id="ccc">
            <td>
			<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td height="23" align="center" bgcolor="#90ee90"><strong>下注成功</strong></td>
              </tr>
              <tr>
                <td height="23" align="center" bgcolor="#90ee90">单号:<?php echo $sn;?></td>
              </tr>
              <tr>
                <td height="23" align="center" bgcolor="#FFFFe0"><?php echo $s;?>:</td>
              </tr>
              <tr>
                <td height="23" align="center" bgcolor="#FFFFe0">
				<strong style="color:#228b22"><script>drawstart('<?php echo $sz;?>');</script></strong>
				@
				<strong style="color:#FF0000"><?php echo $p;?></strong></td>
              </tr>
              <tr>
                <td height="23" align="center" bgcolor="#FFFFe0">下注金额:<strong><?php echo $jin;?></strong></td>
              </tr>
              <tr>
                <td height="23" align="center" bgcolor="#FFFFe0">可赢金额:<strong style="color:#FF0000"><?php echo ($jin*$p-$jin);?></strong></td>
              </tr>
              <tr>
                <td height="23" align="center" bgcolor="#FFFFe0">
				<input type="button" name="Submit3" value="确定" style="color:#000080" onClick="Show2()">
                <input type="button" name="Submit4" value="打印" onClick="window.print()" style="color:#CC0000"></td>
              </tr>
            </table></td>
          </tr>
		  <?php }?>


<?php
//非单一模式
if (!empty($_POST['moshi']))
{

For ($i=1;$i<59;$i++)
{
$jin=$_POST[$i];
$jinz=$jinz+$jin;

//////////////////////////////////////////////////////////////////

$exec2="Select * from p where id=".$i; 
mysql_query("set names gbk");
$resu2=mysql_query($exec2); 
$rs2=mysql_fetch_object($resu2);
$s=$rs2->s;
$sz=$rs2->sz;

$exec2="Select * from s where name='".$_SESSION['name']."' and s='".$s."'"; 
mysql_query("set names gbk");
$resu2=mysql_query($exec2); 
$rs2=mysql_fetch_object($resu2);

$dza=$rs2->dz;
$dca=$rs2->dc;

//如果单注超过限额
$exec2="Select * from z where name='".$_SESSION['name']."' and s='".$s."' and sz='".$sz."' and qi='".$qi2."' order by id"; 
mysql_query("set names gbk");
$resu2=mysql_query($exec2); 
$dzjin=0;
while($rs2=mysql_fetch_object($resu2)) 
{ 
$dzjin=$dzjin+$rs2->jin;
}
$dzjin=$dzjin+$jin;

if (!empty($jin) and $dzjin>$dza)
$dzchao="dzchao";

//如果单场超过限额
$exec2="Select * from z where name='".$_SESSION['name']."' and s='".$s."' and qi='".$qi2."' order by id"; 
mysql_query("set names gbk");
$resu2=mysql_query($exec2); 
$dcjin=0;
while($rs2=mysql_fetch_object($resu2)) 
{ 
$dcjin=$dcjin+$rs2->jin;
}
$dcjin=$dcjin+$jinz;

if (!empty($jin) and $dcjin>$dca)
$dcchao="dcchao";

//////////////////////////////////////////////////////////////////


//如果下注金额少于10
if (!empty($jin) and $jin<10)
$shao="shao";

}



//信用余额是否足够
$exec="Select * from edu where name='".$_SESSION['name']."'"; 
$resu=mysql_query($exec);
$rs=mysql_fetch_object($resu);
$yu=$rs->yu-$jinz;

if ($rs->yu<$jinz)
$bugou="bugou";



$ida=0;
$idc=58;
$exec="Select * from p order by id LIMIT ".$ida.",".$idc."";
mysql_query("set names gbk");
$resu=mysql_query($exec);
while($rs=mysql_fetch_object($resu)) 
{ 


$id=$rs->id;

$s=$rs->s;
$sz=$rs->sz;
$p=$rs->p;
$jin=$_POST[$id];

//获取号码
$seedstr = split(" ",microtime(),5); 
$seed = $seedstr[0]*10000; 
srand($seed); 
$random = rand(10000000,100000000); 

$shi=date("Y-m-d H:i:s", time());
$sn="SNC".$random;
$jie="0";
$jie2="0";


//获取退水
$exec2="Select * from s where name='".$_SESSION['name']."' and s='".$s."'"; 
mysql_query("set names gbk");
$resu2=mysql_query($exec2); 
$rs2=mysql_fetch_object($resu2);

$c=$rs2->c;
$c2=$rs2->c2;



if (!empty($jin) and $oo2=="开奖时间" and empty($shao) and empty($bugou) and empty($dzchao) and empty($dcchao))
{
$cg="cg";

//更改信用余额
$exec2="update edu set yu='".$yu."' where name='".$_SESSION['name']."'"; 
mysql_query("set names gbk"); 
mysql_query($exec2); 


//添加记录
$exec="insert into z (qi,name,s,sz,p,jin,shi,sn,jie,jie2,c,c2) values ('".$qi2."','".$_SESSION['name']."','".$s."','".$sz."','".$p."','".$jin."','".$shi."','".$sn."','".$jie."','".$jie2."','".$c."','".$c2."')";
mysql_query("set names gbk"); 
mysql_query($exec); 
?>
          <tr>
            <td>
			<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td height="23" align="center" bgcolor="#90ee90"><strong>下注成功</strong></td>
              </tr>
              <tr>
                <td height="23" align="center" bgcolor="#90ee90">单号:<?php echo $sn;?></td>
              </tr>
              <tr>
                <td height="23" align="center" bgcolor="#FFFFe0"><?php echo $s;?>:</td>
              </tr>
              <tr>
                <td height="23" align="center" bgcolor="#FFFFe0">
				<strong style="color:#228b22">
				<script>drawstart('<?php echo $sz;?>');</script></strong>
				@
				<strong style="color:#FF0000">
				<?php echo $p;?></strong></td>
              </tr>
              <tr>
                <td height="23" align="center" bgcolor="#FFFFe0">下注金额:<strong><?php echo $jin;?></strong></td>
              </tr>
              <tr>
                <td height="23" align="center" bgcolor="#FFFFe0">可赢金额:<strong style="color:#FF0000"><?php echo ($jin*$p-$jin);?></strong></td>
              </tr>
              <tr>
                <td height="23" align="center" bgcolor="#FFFFe0">
				<input type="button" name="Submit3" value="确定" style="color:#000080" onClick="window.location='moshi.php'">
                <input type="button" name="Submit4" value="打印" onClick="window.print()" style="color:#CC0000"></td>
              </tr>
            </table></td>
          </tr>
<?php
}

}

}
?>
        </table></td>
      </tr>
      <tr>
        <td><img src="p/frame_bottom.gif" width="227" height="15"></td>
      </tr>
    </table>
<table width="227" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="38" align="center"><font style="font-size:12px">21.5 0.0375s REPX</font></td>
  </tr>
</table>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -