📄 out_lottery.php
字号:
<?php
session_start();
include("../inc/conn.php");
include_once($_SESSION["inclanguage"]);
include_once($_SESSION["morelanguage"]);
include("check.php");
$user=$_SESSION["user"];
include("../inc/main.js.php");
$menu=$pn_outlottery;
$sqlbuys=mysql_query("select outlimit from config where sign='1'",$conn);
$outlimit=mysql_result($sqlbuys,0,"outlimit");
mysql_query("update online set title='$menu' where user_account='$user'",$conn);
$yes=3;
if(isset($_GET["ins"])) $yes=0;
$sql=mysql_query("select user_credit,used_credit from member where user_account='$user'",$conn);
$ucredit=round(mysql_result($sql,0,"user_credit"),0);
$used=mysql_result($sql,0,"used_credit");
$jmoney=$ucredit-$used;
$sqlt=mysql_query("select * from lottery where user_account='$user' and checks='0'",$conn);
if(mysql_num_rows($sqlt)<>0)
{ $haves=1;
}else $haves=0;
if(isset($_GET["act"]))
{
$password=md5($_POST["password"]);
$tpassword=md5($_POST["tpassword"]);
$money=$_POST["money"];
$cart_type=$_POST["cart_type"];
$cart_number=$_POST["cart_number"];
$cart_name=$_POST["cart_name"];
$cart_area=$_POST["cart_area"];
$cart_city=$_POST["cart_city"];
$cart_open=$_POST["cart_open"];
$limit_time=$_POST["limit_time"];
$_SESSION["tmmoney"]=$money;
$_SESSION["tmcart_number"]=$cart_number;
$_SESSION["tmcart_name"]=$cart_name;
$_SESSION["tmcart_city"]=$cart_city;
$_SESSION["tmcart_open"]=$cart_open;
$sqltn=mysql_query("select * from member where user_account='$user' and user_password='$password'",$conn);
$sqltp=mysql_query("select * from member where user_account='$user' and tpassword='$tpassword'",$conn);
$tps=mysql_num_rows($sqltp);
/* if($haves==1)
{
echo "<script language=javascript>alert('对不起,您上次提交的彩金未结算,请等彩到达您银行账户号再提彩!');</script>";
}else
*/
if(mysql_num_rows($sqltn)==0)
{
echo "<script language=javascript>alert('".$pn_loginpassworderror."!');</script>";
}elseif($tps==0)
{
echo "<script language=javascript>alert('".$pn_lotterypassworderror."!');</script>";
}elseif($money>$jmoney)
{
echo "<script language=javascript>reform.fsubmit.disabled=false;alert('".$pn_lotterymoneynooutmoney." ".$jmoney."');</script>";
}else
{
$times=date("Y-d-m H:i:s");
$order_number=date("YdmHis");
$names=$_SESSION["name"];
$ip=$_SERVER["REMOTE_ADDR"];
$ok=mysql_query("insert into lottery(order_number,user_account,user_name,money,tmoney,cart_type,cart_number,cart_name,cart_area,cart_city,cart_open,limit_time,times,ip)values('$order_number','$user','$names','$money','$money','$cart_type','$cart_number','$cart_name','$cart_area','$cart_city','$cart_open','$limit_time','$times','$ip')",$conn);
if($ok)
{
$oks=mysql_query("update member set user_credit=user_credit-$money where user_account='$user'",$conn);
if($oks)
{
$sql=mysql_query("",$conn);
$user_credit=$jmoney-$money;
$yes=1;
$_SESSION["tmmoney"]="";
$_SESSION["tmcart_number"]="";
$_SESSION["tmcart_name"]="";
$_SESSION["tmcart_city"]="";
$_SESSION["tmcart_open"]="";
echo "<script language='javascript'>parent.leftFrame.location.reload();</script>";
}else
{
mysql_query("delete from lottery where user_account='$user' and order_number='$order_number'",$conn);
$yes=2;
$_SESSION["tyes"]=2;
}
}else
{
$yes=2;
}
}
}
?><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<link href="../styles/css_g/css2.CSS" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
margin-left: 8px;
margin-top: 0px;
margin-right: 10px;
background-image: url(../styles/nimg_g/main.gif);
}
-->
</style>
<STYLE>
LI {
LINE-HEIGHT: 16pt
}
</STYLE>
</HEAD>
<script language="javascript">
function checks()
{
if(reform.password.value=="")
{
alert("<?=$pn_pleaseinputpassword?>!");
reform.password.focus();
return false;
}else if(reform.tpassword.value=="")
{
alert("<?=$pn_pleaseloginlotterypassword?>!");
reform.tpassword.focus();
return false;
}else if(reform.cart_type.value=="")
{
alert("<?=$pn_selectcarttype?>!");
reform.cart_type.focus();
return false;
}else if(reform.cart_number.value=="")
{
alert("<?=$pn_inputcartnumber?>!");
reform.cart_number.focus();
return false;
}else if(reform.cart_name.value=="")
{
alert("<?=$pn_cartmastername?>!");
reform.cart_name.focus();
return false;
}else if(reform.cart_area.value=="")
{
alert("<?=$pn_selectcity?>");
reform.cart_area.focus();
return false;
}else if(reform.cart_city.value=="")
{
alert("<?=$pn_selectarea?>!");
reform.cart_city.focus();
return false;
}else if(reform.cart_open.value=="")
{
alert("<?=$pn_inputopenaccount?>!");
reform.cart_open.focus();
return false;
}else if(reform.money.value=="")
{
alert("<?=$pn_inputlotterymoney?>!");
reform.money.focus();
return false;
}else if(parseFloat(reform.money.value)<<?=$outlimit?>)
{
alert("<?=$pn_lotterynolow?><?=$outlimit?>!");
reform.money.focus();
return false;
}else if(parseFloat(reform.money.value)>parseFloat(reform.jmoney.value))
{
alert("<?=$pn_lotterynomaxmoney?> <?=$jmoney?>!");
reform.money.value="";
reform.money.focus();
return false;
}else
{
reform.fsubmit.value="<?=$pn_confirmservering?>...";
reform.fsubmit.disabled=true;
return true;
}
}
/*else if(parseFloat(reform.haves.value)==1)
{
alert("对不起,您上次提交的彩金未结算,请等彩到达您银行账户号再提彩!");
return false;
}*/
</script>
<body onLoad="show5();">
<table width="95%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="5" ></td>
</tr>
</table>
<?php include("../inc/linemsg.php");?>
<table width="95%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="5" ></td>
</tr>
</table>
<table width="688" height="24" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="1%" height="24"><img src="../styles/nimg/menu_l.gif" width="10" height="29"></td>
<td width="97%" valign="bottom" background="../styles/nimg/menu_c.gif"><table width="100%" height="19" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="13%" class="fw12"><?=$pn_outlottery?></td>
<td width="41%" nowrap></td>
<td width="44%" align="right" nowrap><div id="liveclock"> </div>
</td>
<td width="2%"> </td>
</tr>
</table></td>
<td width="2%"><img src="../styles/nimg/menu_r.gif" width="10" height="29"></td>
</tr>
</table>
<table width="685" border="0" cellpadding="0" cellspacing="1" class="t11">
<tr>
<td height="248" valign="top" class="t17">
<table width="679" border="0">
<?php if($yes==0){?>
<tr>
<td><table width="641" height="303" border="0" align="center">
<form name="reform" method="post" action="?act=yes" onSubmit="return checks();"><tr>
<td width="97" height="26"><?=$pn_memberaccount?>:</td>
<td width="534"><?=$_SESSION["user"]?>
</td>
</tr>
<tr>
<td height="25"><?=$pn_loginpassword?>:</td>
<td><input name="password" type="password" class="input" id="password" style=" width:130px; " size="20"></td>
</tr>
<tr>
<td height="27"><?=$pn_lotterypassword?>:</td>
<td><input name="tpassword" type="password" class="input" id="tpassword" style=" width:130px; " size="20"></td>
</tr>
<tr>
<td height="27"><?=$pn_carttype?>:</td>
<td><select name="cart_type" id="cart_type">
<option value="" selected><?=$pn_selectcarttypes?></option>
<option value="<?=$pn_chinacobank?>" ><?=$pn_chinacobank?></option>
<option value="<?=$pn_chinaicbcbank?>" ><?=$pn_chinaicbcbank?></option>
<option value="<?=$pn_chinamakebank?>" ><?=$pn_chinamakebank?></option>
<option value="<?=$pn_chinatrafficbank?>" ><?=$pn_chinatrafficbank?></option>
<option value="<?=$pn_chinacombank?>" ><?=$pn_chinacombank?></option>
<option value="<?=$pn_chinafoodbank?>" ><?=$pn_chinafoodbank?></option>
<option value="<?=$pn_chinapeoplebank?>" ><?=$pn_chinapeoplebank?></option>
<option value="<?=$pn_chinapostbank?>" ><?=$pn_chinapostbank?></option>
<option value="<?=$pn_chinamanbank?>" ><?=$pn_chinamanbank?></option>
</select></td>
</tr>
<tr>
<td height="27"><?=$pn_cartnumber?>:</td>
<td><input name="cart_number" type="text" class="input" id="cart_number" value="<?=$_SESSION["tmcart_number"]?>" size="20"></td>
</tr>
<tr>
<td height="26"><?=$pn_cartmastername?>:</td>
<td><input name="cart_name" type="text" class="input" id="cart_name" value="<?=$_SESSION["tmcart_name"]?>" size="20"></td>
</tr>
<tr>
<td height="24"><?=$pn_cartarea?>:</td>
<td><select name="cart_area" id="cart_area">
<option value="" selected><?=$pn_selectcartareas?></option>
<?php for($i=0;$i<count($area);$i++) echo '<option value="'.$area[$i].'">'.$area[$i].'</option>';?>
</select>
<?=$pn_area?>
<input name="cart_city" type="text" class="input" id="cart_city" value="<?=$_SESSION["tmcart_city"]?>" size="8">
<?=$pn_cityinfo?></td>
</tr>
<tr>
<td height="25"><?=$pn_openlocation?>:</td>
<td><input name="cart_open" type="text" class="input" id="cart_open" value="<?=$_SESSION["tmcart_open"]?>" size="20"></td>
</tr>
<tr>
<td height="26"><?=$pn_lotterymoney?>:</td>
<td><input name="money" type="text" class="input" id="money" value="<?=$_SESSION["tmmoney"]?>" size="20">
<?=$pn_rmb?> <?=$pn_nowoutlottery?> <font color=#ff0000><?=$jmoney?></font> RMB
<input name="jmoney" type="hidden" id="jmoney" value="<?=$jmoney?>">
<input name="haves" type="hidden" id="haves" value="<?=$haves?>">
<?=$pn_lotterynolows?><span class="fred12"><?=$outlimit?></span><?=$pn_rmb?></td>
</tr>
<tr>
<td height="27"> </td>
<td><input type="reset" name="Submit" value=" <?=$pn_reset?> ">
<input type="submit" name="fsubmit" value=" <?=$pn_confirms?> ">
</td>
</tr></form><? }elseif($yes==3){?>
<tr>
<td> </td>
<td><?=$pn_outlotteryinfos?></td>
</tr>
</table></td>
</tr><? }elseif($yes==1){?>
<tr>
<td height="105" align="center"><br><br><br><table width="263" border="0">
<tr>
<td colspan="2" align="center"><p><img src="../images/ok.gif" width="20" height="20" align="absmiddle"><span class="fred"> <?=$pn_lotterysucces?>!</span></p>
<p> </p></td>
</tr>
<tr>
<td width="141" height="27" align="right"><?=$pn_nowaccountmoney?>:</td>
<td width="112" > <span align="center" class="fblue12"> <?=$user_credit?></span> <?=$pn_rmb?></td>
</tr>
<tr>
<td height="20" align="right"><?=$pn_outlotterymoney?>:</td>
<td height="20" >
<span align="center" class="fred12"><?=$money?></span> <?=$pn_rmb?> </td>
</tr>
<tr>
<td height="20" align="right"><?=$pn_rootlotterymoney?>:</td>
<td height="20" >
<span align="center" class="fred12"><?=$money?></span> <?=$pn_rmb?></td>
</tr>
<tr align="center">
<td height="38" colspan="2">[<a href="out_lottery.php"><?=$pn_back?></a>]</td>
</tr>
</table></td>
</tr><? }elseif($yes==2){?>
<tr>
<td height="163"><table width="276" height="107" border="0" align="center">
<tr>
<td height="55" align="center"><img src="../images/loser.gif" width="20" height="20" align="absmiddle"> <span class="fred"><?=$pn_lotteryloser?>!</span></td>
</tr>
<tr>
<td align="center">[<a href="out_lottery.php"><?=$pn_back?></a>] </td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
</tr><? }?>
</table></td>
</tr>
</table><br>
</BODY>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -