📄 bet.php
字号:
<?
$forumid=116;
$maxbet=200;
require("userdata/style.php");
require("global.php");
require("header.php");echo"$headertp";
include("bbsdata/level.php");
$add_title="赌大小";
$des="你正处在".$bbs_title."<br>赌大小程式中";
headguide($des,"<a href='club.php'>俱乐部</a>","<a href='bet.php'>赌大小</a>");
if ($login_status==0) {
msg_box('社区赌博','<br>状态:发生错误,您还没有登录<br><ul><li><a href="javascript:history.back(1)">返回前页</a></li><br><li><a href="login.php">现在登录</li></ul>');
exit;
}
if(!$action){
require("bbsdata/superadmin.php");
if (file_exists('bbsdata/ofstar.php')){
$ofstarfile=readfromfile('bbsdata/ofstar.php');
$qqq=explode('|',$ofstarfile);
$ofstar=$qqq[1];
}
else $ofstar=$manager;
list($fb,$name0,$pwd0,$usericon0,$email0,$oicq0,$regdate0,$sign0,$homepage0,$area0,$comment0,$honor0,$lastpost0,$postamount0,$pe0,$none0,$rvrc0,$lasttime,$nowtime,$icq,$sex,$born,$guoji,$tuijianren,$money0,$lasttitle,$lastaddr,$group,$yanzheng,$tdpost,$sx,$star,$bei1,$bei2,$bei3,$bei4,$bei5,$bei6)=get_user_info($ofstar);
list($fb,$name,$pwd,$usericon,$email,$oicq,$regdate,$sign,$homepage,$area,$comment,$honor,$lastpost,$postamount,$pe,$none,$rvrc,$lasttime,$nowtime,$icq,$sex,$born,$guoji,$tuijianren,$money,$lasttitle,$lastaddr,$group,$yanzheng,$tdpost,$sx,$star,$bei1,$bei2,$bei3,$bei4,$bei5,$bei6)=get_user_info($username);
if ($money>100000) {
msg_box('社区赌博','<br>状态:由于你的银子实在太夸张拉,禁止再来赌博!<br><ul><li><a href="javascript:history.back(1)">返回前页</a></li><br><li><a href="index.php">返回论坛</li></ul>');
exit;
}
if ($money<1) {
msg_box('社区赌博','<br>状态:由于你的银子实在太少了,有了1银子再来赌吧!<br><ul><li><a href="javascript:history.back(1)">返回前页</a></li><br><li><a href="index.php">返回论坛</li></ul>');
exit;
}
?>
<script language=JavaScript>
function check(theForm)
{
if (theForm.qqq.value<1)
{alert("大方点,至少要下1银子,不然怎么出来混!");
return false;}
else { return true; }
}
</script>
<div align=center>
<form method="POST" action="bet.php?action=result" name="bet">
<input type="hidden" name=ngzj value=<?=$ofstar?>>
<table border=0 cellspacing=0 cellpadding=3 align="center" width="350" bordercolordark="#FFFFFF">
<tr align="center">
<td width="33%"><font size="2" color="#000000"><img src="images/club/RUN.GIF" width="38" height="36"></font></td>
<td width="33%"><font size="2" color="#000000"><img src="images/club/RUN.GIF" width="38" height="36"></font></td>
<td width="33%"><font size="2" color="#000000"><img src="images/club/RUN.GIF" width="38" height="36"></font></td>
</tr>
<tr>
<td width="493" colspan="3" height="29" align=center><font size="1" class="c" color="#000000">
<b>赌馆庄主:<font color=green><?=$ofstar?></font> || 庄主资产:<font color=green><?=$money0?></font><br>
您现在一共有 <b><font color="#CC0000"> <?=$money?></font>银子</b> 可以作为赌注
<br>您最小下注 1 银子;最大下注 <?=$maxbet?> 银子</b></font></td>
</tr>
<tr>
<td align=center colspan="3">
<table border="0" cellspacing="0" cellpadding="0">
<tr align="center">
<td width="50%"><img src="images/club/66.gif" width="46" height="40"></td>
<td width="50%"><img src="images/club/11.gif" width="46" height="40"></td>
</tr>
<tr align="center">
<td width="50%">
<input type="radio" name="select" value="6" checked>
</td>
<td width="50%">
<input type="radio" name="select" value="1">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align=center colspan="3"><font size="2" color="#000000">我要下注:
<input type=text size=15 maxlength=3 name="qqq" value="1" style="background-color:#FEFEFF; color:#0000ff; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''">
<b>元</b></font></td>
</tr>
<tr>
<td align=center colspan="3"> <font size="2" color="#000000"> <br>
<input class=login1 type=submit value=买定离手 name=login2 style="color: #000000; background-color: #f3f3f3; border-style: solid; border-width: 1" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#f3f3f3'" onclick="return check(this.form)">
<input class=login1 type=reset value=考虑考虑 name=login2 style="color: #000000; background-color: #f3f3f3; border-style: solid; border-width: 1" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#f3f3f3'">
</font></td>
</tr></table></form>
<br>你的胜率是1/2,赢了奖1倍银子,输了赔1倍银子。<br>怎么样?敢不敢赌啊???
<br>不敢赌就从<a href="index.php" onclick="alert('不要说我是胆小鬼啊!我是好孩子我才不赌博呢!')"><font color=blue>这里</font></a>出去。
</div>
</td></tr>
</table> </td></tr></table>
<?php
require("footer.php");echo"$footertp";
}
if($action==result){
$member=$username;
$ofstar=$ngzj;//庄主代号,要注册过的
if($qqq<1||$qqq>$maxbet){
msg_box('社区赌博','<br>状态:发生错误,你输入的数字超出了范围<br><ul><li><a href="javascript:history.back(1)">返回前页</a></li><br><li><a href="index.php">返回论坛</li></ul>');
exit;
}
list($fb,$name,$pwd,$usericon,$email,$oicq,$regdate,$sign,$homepage,$area,$comment,$honor,$lastpost,$postamount,$pe,$none,$rvrc,$lasttime,$nowtime,$icq,$sex,$born,$guoji,$tuijianren,$money,$lasttitle,$lastaddr,$group,$yanzheng,$tdpost,$sx,$star,$bei1,$bei2,$bei3,$bei4,$bei5,$bei6)=get_user_info($username);
if ($rvrc>100000) {
msg_box('社区赌博','<br>状态:由于你的银子实在太夸张拉,禁止再来赌博!<br><ul><li><a href="javascript:history.back(1)">返回前页</a></li><br><li><a href="index.php">返回论坛</li></ul>');
exit;
}
if ($rvrc<1) {
msg_box('社区赌博','<br>状态:由于你的银子实在太少了,有了1银子再来赌吧!<br><ul><li><a href="javascript:history.back(1)">返回前页</a></li><br><li><a href="index.php">返回论坛</li></ul>');
exit;
}
?>
<table cellpadding=0 cellspacing=0 border=0 width=<?=$tablewidth?> bgcolor=<?=$titlecolor?> align=center>
<tr>
<td>
<table cellpadding=3 cellspacing=1 border=0 width=100%>
<tr>
<td bgcolor=<?=$titlecolor?> align=center><font color=<?=$categoryfontcolor?>"><b>赌大小</b></font></td>
</tr>
<tr><td bgcolor="<?=$forumcolorone?>">
<?
$q=$select;
$w=$qqq;
$p=$money;
if ($w>$p) {
msg_box('社区赌博','<br>状态:有没有搞错,你哪来那么多银子?<br><ul><li><a href="javascript:history.back(1)">返回前页</a></li><br><li><a href="index.php">返回论坛</li></ul>');
exit;
}
$m=rand(1,6);
if($m<=3) $m=1;else $m=6;
$s=$w;
?>
<p align=center><strong>您押的是:</strong><img src=images/club/<?=$q?><?=$q?>.gif>
<br><strong><font color=#CC0000>结 果:</font></strong><img src=images/club/<?=$m?><?=$m?>.gif><br><br>
<?
if ($m==$q)
{
print <<<EOT
恭喜,恭喜,您赢了 $s 银子 :)<br><br>
<b><font color=blue>庄家:</font></b> 好厉害哦,简直是高进二世嘛~!<br> <br>
<b><font color=#CC0000>我说:</font></b> <a href="bet.php">再来一次,玩死你~!</a> <br><br>
<a href="index.php">算了,见好就收~!</a>
EOT;
$memberfile="$userpath/$member.php";
list($fb,$name,$userpwd,$usericon,$useremail,$usericq,$regdate,$sign,$homepage,$area,$introduction,$honor,$last_post,$postamount,$eamil,$pe,$rvrc,$lasttime,$nowtime,$icq,$sex,$born,$guoji,$tuijianren,$money,$lasttitle,$lastaddr,$group,$yanzheng,$tdpost,$sx,$star,$bei1,$bei2,$bei3,$bei4,$bei5,$bei6) = explode("|",readfromfile($memberfile));
$money=$s+$money;
writetofile($memberfile,"$fb|$name|$userpwd|$usericon|$useremail|$usericq|$regdate|$sign|$homepage|$area|$introduction|$honor|$last_post|$postamount|$eamil|$pe|$rvrc|$lasttime|$nowtime|$icq|$sex|$born|$guoji|$tuijianren|$money|$lasttitle|$lastaddr|$group|$yanzheng|$tdpost|$sx|$star|$bei1|$bei2|$bei3|$bei4|$bei5|$bei6");
$ofstarfile="$userpath/$ofstar.php";
list($fb,$name,$userpwd,$usericon,$useremail,
$usericq,$regdate,$sign,$homepage,$area,$introduction,$honor,$last_post,$postamount,$eamil,$pe,$rvrc0,
$lasttime,$nowtime,$icq,$sex,$born,$guoji,$tuijianren,$money0,
$lasttitle,$lastaddr,$group,$yanzheng,$tdpost,$sx,$star,$bei1,$bei2,$bei3,$bei4,$bei5,$bei6)
= explode("|",readfromfile($ofstarfile));
$money0=-$s+$money0;
writetofile($ofstarfile,"$fb|$name|$userpwd|$usericon|$useremail|$usericq|$regdate|$sign|$homepage|$area|$introduction|$honor|$last_post|$postamount|$eamil|$pe|$rvrc0|$lasttime|$nowtime|$icq|$sex|$born|$guoji|$tuijianren|$money0|$lasttitle|$lastaddr|$group|$yanzheng|$tdpost|$sx|$star|$bei1|$bei2|$bei3|$bei4|$bei5|$bei6");
if(file_exists('bbsdata/ofstar.php')){
$ofstarfile=readfromfile('bbsdata/ofstar.php');
$qqq=explode('|',$ofstarfile);
if($money>=$money0) {
$qqq[1]=$member;
$uuu=implode('|',$qqq);
writetofile("bbsdata/ofstar.php",$uuu);
echo "<script>alert('恭喜恭喜,你的金钱已经超过了庄主,现在银子赌馆将由你做庄!等着收钱吧,呵呵~~');</script>";
}
}
}
if ($m!=$q)
{
print <<<EOT
您今天真背,输了$w 元:(<br><br>
<b><font color=blue>庄家:</font></b> 呵呵还要来吗? 有赌未为输哦~!<br> <br>
<b><font color=#CC0000>我说:</font></b> <a href="bet.php">再来,呸,我就不相信这么倒霉~!</a><br><br>
<a href="index.php">今天真倒霉,不来了,下次再玩~!</a>
EOT;
$memberfile="$userpath/$member.php";
list($fb,$name,$userpwd,$usericon,$useremail,
$usericq,$regdate,$sign,$homepage,$area,
$introduction,$honor,$last_post,$postamount,$eamil,$pe,$rvrc,
$lasttime,$nowtime,$icq,$sex,$born,$guoji,$tuijianren,$money,
$lasttitle,$lastaddr,$group,$yanzheng,$tdpost,$sx,$star,$bei1,$bei2,$bei3,$bei4,$bei5,$bei6)
= explode("|",readfromfile($memberfile));
$money=-$w+$money;
writetofile($memberfile,"$fb|$name|$userpwd|$usericon|$useremail|$usericq|$regdate|$sign|$homepage|$area|$introduction|$honor|$last_post|$postamount|$eamil|$pe|$rvrc|$lasttime|$nowtime|$icq|$sex|$born|$guoji|$tuijianren|$money|$lasttitle|$lastaddr|$group|$yanzheng|$tdpost|$sx|$star|$bei1|$bei2|$bei3|$bei4|$bei5|$bei6");
$ofstarfile="$userpath/$ofstar.php";
list($fb,$name,$userpwd,$usericon,$useremail,
$usericq,$regdate,$sign,$homepage,$area,
$introduction,$honor,$last_post,$postamount,$eamil,$pe,$rvrc0,
$lasttime,$nowtime,$icq,$sex,$born,$guoji,$tuijianren,$money0,
$lasttitle,$lastaddr,$group,$yanzheng,$tdpost,$sx,$star,$bei1,$bei2,$bei3,$bei4,$bei5,$bei6)
= explode("|",readfromfile($ofstarfile));
$money0=$s+$money0;
writetofile($ofstarfile,"$fb|$name|$userpwd|$usericon|$useremail|$usericq|$regdate|$sign|$homepage|$area|$introduction|$honor|$last_post|$postamount|$eamil|$pe|$rvrc0|$lasttime|$nowtime|$icq|$sex|$born|$guoji|$tuijianren|$money0|$lasttitle|$lastaddr|$group|$yanzheng|$tdpost|$sx|$star|$bei1|$bei2|$bei3|$bei4|$bei5|$bei6");
}
?>
<br><br><b>您现有<font color="#CC0000"><?=$money?></font>银子</b>
<br><b>而庄主有<font color="#CC0000"><?=$money0?></font>银子</b>
</td></tr>
</table> </td></tr></table>
<?php
require("footer.php");echo"$footertp";}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -