📄 znumber_check.php
字号:
<?php
session_start();
include("../inc/conn.php");
include_once($_SESSION["inclanguage"]);
include("check.php");
include("configs.inc.php");
include("other_close.php");
if($tclose==1) echo "<script>window.location='znumber.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"];
$sqlm=mysql_query("select unit_limit,pour_limit from member_cut where user_account='$user' and sign='5'",$conn);
$minrmb=$drop_lows;
$znumber="正码";//$pn_rightnumber
$units=mysql_result($sqlm,0,"unit_limit");
$maxrmb=mysql_result($sqlm,0,"pour_limit");
$agent_profit=$_SESSION["agent_profit"];
$all_agent_profit=$_SESSION["all_agent_profit"];
$super_agent_profit=$_SESSION["super_agent_profit"];
?>
<link href="../styles/css_g/css2.CSS" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
background-image: url(../images/order_ph31.gif);
background-color: #C0C0C0;
}
.style1 {font-weight: bold}
-->
</style>
<?php
include("../inc/cut.inc.php");
if(isset($_GET["act"]))
{
if(isset($_POST["drop_number_t"]))
{
$rcount=$_POST["rcount"];
$leave=$_SESSION["credit"]-$_SESSION["used"];
if($leave<$rcount)
{
echo "<script language='javascript'> alert('".$pn_creditmsg."!');window.location.href='uleft.php'</script>";
}else
{
$drop_number_t=$_POST["drop_number_t"];
$drop_type_t=$_POST["drop_type_t"];
$drop_rate_t=$_POST["drop_rate_t"];
$drop_money_t=$_POST["drop_money_t"];
$a_t=split(",",$drop_number_t);
$c_t=split(",",$drop_rate_t);
$d_t=split(",",$drop_money_t);
$cut=cut(5);
$drop_agent_cut=cut_num($agent,5,$plate);
$drop_all_agent_cut=cut_num($all_agent,5,$plate);
$drop_super_agent_cut=cut_num($super_agent,5,$plate);
for($i=0;$i<count($a_t)-1;$i++)
{
$sqlyz=mysql_query("select rate from num where num='$a_t[$i]' and sign='3' and user_account='$guser'",$conn); //赔率变动check
$prate=mysql_result($sqlyz,0,"rate");
if($prate<>$c_t[$i])
{
$yesrate=1;
$ys=1;
}else $yesrate=0;
$sqlss=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_agent_cut,drop_all_agent_cut,
drop_super_agent_cut,yesrate,agent_profit,all_agent_profit,super_agent_profit)values('$agent','$all_agent','$super_agent','$user','$drop_date','$open_date','$drop_type_t',
'$a_t[$i]','$c_t[$i]','$cut','5','$d_t[$i]','1','3','$plate','$drop_agent_cut','$drop_all_agent_cut','$drop_super_agent_cut','$yesrate','$agent_profit','$all_agent_profit','$super_agent_profit')",$conn);
//bs
if($sqlss) $money+=$d_t[$i];
}
}
}
if(isset($_POST["drop_number_d"])) //d
{
$drop_number_d=$_POST["drop_number_d"];
$drop_type_d=$_POST["drop_type_d"];
$number_type="正码";
$drop_rate_d=$_POST["drop_rate_d"];
$drop_cut_d=$_POST["drop_cut_d"];
$cut_sign_d=$_POST["cut_sign_d"];
$drop_money_d=$_POST["drop_money_d"];
$a_d=split(",",$drop_number_d);
$c_d=split(",",$drop_rate_d);
$cut_d=split(",",$drop_cut_d);
$sign_d=split(",",$cut_sign_d);
$d_d=split(",",$drop_money_d);
for($i=0;$i<count($a_d)-1;$i++)
{
$drop_agent_cut=cut_num($agent,$sign_d[$i],$plate);
$drop_all_agent_cut=cut_num($all_agent,$sign_d[$i],$plate);
$drop_super_agent_cut=cut_num($super_agent,$sign_d[$i],$plate);
$sqlyz=mysql_query("select rate from num where tp='$a_d[$i]' and sign='2' and user_account='$guser'",$conn); //赔率变动check
$prate=mysql_result($sqlyz,0,"rate");
$prate-=$_SESSION["tdnum"];
if(trim($prate)<>trim($c_d[$i])):
$c_d[$i]=$prate;
$yesrate=1;
$ys=1;
$_SESSION["yesrate"]=1;
else:
$yesrate=0;
endif;
$sqldd=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_agent_cut,
drop_all_agent_cut,drop_super_agent_cut,yesrate,agent_profit,all_agent_profit,super_agent_profit)values('$agent','$all_agent','$super_agent',
'$user','$drop_date','$open_date','$number_type','$a_d[$i]','$c_d[$i]','$cut_d[$i]','$sign_d[$i]','$d_d[$i]','1','2','$plate',
'$drop_agent_cut','$drop_all_agent_cut','$drop_super_agent_cut','$yesrate','$agent_profit','$all_agent_profit','$super_agent_profit')",$conn);
//bs
if($sqldd) $money+=$d_d[$i];
}
}
$sqlr=mysql_query("select * from drop_bill where sign='1' and user_name='$user' order by id desc",$conn);
//bs
$sqlrs=mysql_query("select * from drop_bills where sign='1' and user_name='$user' order by id desc",$conn);
?>
<table width="220" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="23" background="../images/order_ph11.gif">
</td></tr>
<tr>
<td height="36" background="../images/order_ph21.jpg"><div align="center" class="fw12"><?=$pn_pourstate?></div></td>
</tr>
<tr>
<td><table width="220" height="74" border="0" align="center" cellpadding="2" cellspacing="1" class="t12">
<tr class="t11">
<td><div align="center" class="fw12"><?=$pn_pourtype?></div></td>
<td><div align="center" class="fw12"><?=$pn_pourcontent?></div></td>
<td><div align="center" class="fw12"><?=$pn_rate?></div></td>
<td height="26">
<div align="center" class="fw12"><?=$pn_pourmoney?></div></td>
<td class="fw12"><?=$pn_state?></td>
</tr>
<?php
while($rowr=mysql_fetch_array($sqlr))
{ if($rowr["yesrate"]=="1")
{ $ts="class='t13'";
}else $ts="class='t15'";?>
<tr class="t20" <?=$ts?>>
<td height="22"><?=$rowr["drop_type"]?></td>
<td height="22"><?=$rowr["drop_content"]?></td>
<td height="22">
<div align="right">
<?=$rowr["drop_rate"]?>
</div></td>
<td height="22">
<div align="right">
<?=$rowr["drop_money"]?>
</div></td>
<td><div align="center" class="fgreng"><? if($rowr["yesrate"]=="1")
{ echo "<font color='red'>".$pn_loser."</font>";
}else echo $pn_success;?></div> </td>
</tr>
<?
} $moneys=$money+$_SESSION["used"]; //更新信用额度
$ys=mysql_query("update member set used_credit='$moneys' where user_account='$user'",$conn);
if($ys) $_SESSION["used"]=$moneys;
mysql_query("update drop_bill set sign='0' where user_name='$user'",$conn);
mysql_query("delete from drop_bill where user_name='$user' and yesrate='1'",$conn);
//bs
mysql_query("update drop_bills set sign='0' where user_name='$user'",$conn);
mysql_query("delete from drop_bills where user_name='$user' and yesrate='1'",$conn);
?> <tr class="t11">
<td height="22" colspan="3"><div align="right" class="fw12"> <?=$pn_count?>:</div></td>
<td height="22"><div align="right" class="fw12"><?=$money?></div></td>
<td><input name="rcount" type="hidden" id="rcount" value="<?=$all_money?>"></td>
</tr>
<meta http-equiv="refresh" content="20;URL=uleft.php">
</table></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<div align="center"><a href="uleft.php">[<?=$pn_back?>]</a>
<?
}else
{
$check=null; //下单双份问题
for($i=1;$i<=49;$i++)
{
if(strlen($i)==1)
{ $n="0".$i;
}else $n=$i;
$sp="t".$n;
$totxt=$_POST[$sp];
if($totxt<>"") $check.=$n.",";
}
//$check=@$_POST["check"];
$list=split(",",$check);
function outscript($arr)
{
echo "<script language='javascript'>".$arr."</script>";
}
for($i=0;$i<count($list)-1;$i++)
{
$p="t".$list[$i];
$txt=@$_POST[$p];
$rmb_count+=$txt;
}
?>
<script language="javascript">
function fs()
{
myform.fsubmit.value="<?=$pn_waitting?>..";
myform.fsubmit.disabled=true;
parent.MainFrame.myform.reset();
myform.submit();
}
</script>
</div>
<table width="220" border="0" align="center" cellpadding="0" cellspacing="1">
<form name="myform" method="post" action="znumber_check.php?act=yes">
<tr>
<td><table width="220" height="97" border="0" align="center" cellpadding="0" cellspacing="1" class="t12">
<tr class="t11" >
<td height="34" colspan="4" background="../images/left_up.jpg"><div align="center" class="fw12"><?=$pn_youpouris?></div></td>
</tr>
<tr class="t11">
<td><div align="center" class="fw12"><?=$pn_pourtype?></div></td>
<td><div align="center" class="fw12"><?=$pn_pourcontent?></div></td>
<td><div align="center" class="fw12"><?=$pn_rate?></div></td>
<td height="22">
<div align="center" class="fw12"><?=$pn_pourmoney?></div></td>
</tr>
<?php
$x=0;
for($i=0;$i<count($list)-1;$i++)
{
$p="t".$list[$i];
$txt=@$_POST[$p];
if($txt<>"")
{
$number=$list[$i]; //单项限额
$drop_money=$txt;
$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='5'",$conn);
$myrow=mysql_fetch_array($sqltm);
$tmcount=$myrow[0];
$ladd=$drop_money+$tmcount;
if($ladd>$units) echo "<script language='javascript'> alert('".$pn_rightnumber." ".$number." ".$pn_unitlimitnomax." ".$units."');history.back();</script>";
if($txt<$minrmb)
{
outscript("alert('".$pn_pourlimitlow." ".$minrmb."');history.back(1);");
}elseif($txt>$maxrmb)
{
echo outscript("alert('".$pn_rightnumber." ".$number." ".$pn_pourhigh." ".$maxrmb."');history.back(1);");
}else
{
if(substr($txt,0,1)=="0") $txt=substr($txt,1,strlen($txt));
$x++;
?>
<tr class="t20">
<td><div align="center">
<?=$znumber?>
</div></td>
<td><div align="center">
<?=$list[$i]?>
</div></td>
<td><div align="center">
<?php
$sql=mysql_query("select * from num where sign='3' and num='$list[$i]' order by id asc",$conn);
$rate=mysql_result($sql,0,"rate");
$droprate_t.=$rate.",";
echo $rate;
?>
</div></td>
<td height="26"><div align="center">
<?php
$tmoney.=$txt.",";
$recount+=$tmoney;
echo $txt;
?>
</div></td>
</tr>
<?php
}
}
}
for($i=7;$i<11;$i++)
{
$d="d".$i;
$txtd=$_POST[$d];
if($txtd<>"")
{
$f=$i;
switch($f)
{
case "7":
$cond.="7,";
$tcontent="总单";
$cutd.=cut(6).",";
$signd.=cutsign(6).",";
break;
case "8":
$cond.="8,";
$tcontent="总双";
$cutd.=cut(6).",";
$signd.=cutsign(6).",";
break;
case "9":
$cond.="9,";
$tcontent="总大";
$cutd.=cut(7).",";
$signd.=cutsign(7).",";
break;
case "10":
$cond.="10,";
$tcontent="总小";
$cutd.=cut(7).",";
$signd.=cutsign(7).",";
break;
}
$sqld=mysql_query("select * from num where sign='2' and num='$f' order by id asc",$conn);
$rated=mysql_result($sqld,0,"rate");
if($plate=="A")
{ $rateds=$rated;
$_SESSION["tdnum"]=0;
}
if($plate=="B")
{ $rateds=$rated-0.01;
$_SESSION["tdnum"]=0.01;
}
if($plate=="C")
{ $rateds=$rated-0.02;
$_SESSION["tdnum"]=0.02;
}
$rated=$rateds;
$drate.=$rated.",";
$dmoney.=$txtd.",";
$dcontent.=$tcontent.",";
echo "<tr class=t20><td><div align=center>".$znumber."</div></td>";
echo "<td><div align=center>".$tcontent."</div></td>";
echo "<td><div align=center>".$rated."</div></td>";
echo "<td><div align=center>".$txtd."</div></td><tr>";
$rmb_count+=$txtd;
}
}
if($rmb_count==""||$rmb_count==0) outscript("alert('".$pn_inputpourmoney."!');history.back(1);");
?>
<tr class="t11">
<td height="22" colspan="4"><div align="center"></div>
<div align="right" class="fw12"> <?=$pn_all?> <span class="style1">
<?=$x?>
</span> <?=$pn_pour?> <?=$pn_count?>: <span class="style1">
<?=$rmb_count?>
</span> </div>
<div align="right"></div>
<div align="center" class="fw12"> </div></td>
</tr>
</table></td>
</tr>
<tr>
<td height="27"> <div align="center">
<input name="Submit" type="button" class="buttonrmin" value="<?=$pn_cancelpour?>" onclick="javascript:window.location.href='uleft.php'">
<input name="fsubmit" type="submit" class="buttongmin" value="<?=$pn_confirm?>" onClick="fs();">
<input name="drop_number_t" type="hidden" id="drop_number_t" value="<?=$check?>">
<input name="drop_type_t" type="hidden" id="znumber" value="<?=$znumber?>">
<input name="drop_rate_t" type="hidden" id="check" value="<?= $droprate_t?>">
<input name="drop_money_t" type="hidden" id="check" value="<?=$tmoney?>">
<input name="rcount" type="hidden" id="check" value="<?=$recount?>">
<input name="drop_number_d" type="hidden" id="drop_number_d" value="<?=$dcontent?>">
<input name="drop_type_d" type="hidden" id="drop_type_d" value="<?=$znumber?>">
<input name="drop_rate_d" type="hidden" id="drop_number_d" value="<?=$drate?>">
<input name="drop_cut_d" type="hidden" id="drop_cut_d" value="<?=$cutd?>">
<input name="cut_sign_d" type="hidden" id="drop_cut_d" value="<?=$signd?>">
<input name="drop_money_d" type="hidden" id="drop_number_d" value="<?=$dmoney?>">
</div></td>
</tr> </form>
</table>
<div align="center">
<? }?>
</div>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -