<!-- #include file="Inc.asp" -->
<!-- #include file="Inc/Page_Cls.asp" -->
<%
Dim Comeurl
If Not BBS94KK.Founduser then BBS94KK.GoToerr(11)
BBS94KK.Head"社区赌场"
'BBS94KK.CheckMake
Comeurl=Trim(Request.ServerVariables("HTTP_REFERER"))
Select Case Request("menu")
	Case"dx"
		dx()
	Case"ds"
		ds()
	Case"sz"
		sz()
	Case"dx1"
		Checkup()
		dx1()
	Case"ds1"
		Checkup()
		ds1()
	Case"sz1"
		Checkup()
		sz1()
	Case Else
		play()
End Select	
BBS94KK.Footer()
Set BBS94KK=Nothing
Sub Alert(message,sflag,Comeurl)
message = replace(message,"'","\'")
Response.Write ("<script type=""text/vbscript"">msgbox """&message&""","&sflag&",""提示！！"""&vbcrlf&"window.location.href="""&Comeurl&"""</script>")
Response.End
End Sub

Sub Checkup()
Dim dmoney
dmoney=Request.Form("money")
	If Not BBS94KK.Fun.isInteger(dmoney) Then Call Alert("请输入整数数字",16,Comeurl)
dmoney=int(dmoney)
	If int(Session(CacheName & "MyInfo")(7))<50 Then Call Alert("您已经倾家荡产,还身负外债,不宜赌博啦,去发些帖子赚钱吧!",16,"index.asp")
	If dmoney>int(Session(CacheName & "MyInfo")(7)) Then Call Alert("你的钱不够！",16,Comeurl)
	If dmoney<10 or dmoney>500 Then  Call Alert("输入错误！赌注范围10-500",16,Comeurl)
End Sub

Sub play()
	Dim Caption,Content
	Caption="大埔赌场"
	Content="<table width='98%' align='center'><tr><td align='center'><img src='plusimg/duchang/daxiao.gif' width='303' height='237' border='0'></td><td><ul><li><font color='#FF0000'><b>赌骰子</b></font>赔率:1:1<a href='Duchang.asp?menu=sz'>现在进入&gt;&gt;</a>"&_ 
    " <br><br><br><li><b><font color='#FF0000'>赌大小</font></b>赔率:1:1<a href='Duchang.asp?menu=dx'>现在进入&gt;&gt;</a><br><br><br></li></ul><ul><li><b><font color='#FF0000'>猜点数</font></b>赔率1：3<a href='Duchang.asp?menu=ds'>现在进入</a>&gt;&gt;<br><br></ul></td></tr></table>"
		BBS94KK.ShowTable Caption,Content
End Sub

sub dx()%>
<form method="POST" action="Duchang.asp?menu=dx1">
<center>
<table borderColor="#a4b6d7" cellSpacing="0" width="400" border="1" height="54" style="border-collapse: collapse" cellpadding="6">
	<tr align="center"><td width="190" colspan="2">
	  <font size=3 style="font-size: 9pt"><b>赌 场 - 赌 大 小</b></font>
	  </td><td width="183" colspan="2"><p>最大下注现金是 <b><font color="#CC0000"> 500</font>元</b></p> </td>
	</tr>
	<tr align="center"><td width="134"><img src="plusimg/duchang/run.gif" width="38" height="36"></td>
		<td width="109" colspan="2"><img src="plusimg/duchang/run.gif" width="38" height="36"></td>
		<td width="117"><img src="plusimg/duchang/run.gif" width="38" height="36"></td>
	</tr>
	<tr><td bgcolor="#C4D4E5" width="386" colspan="4">
	  <p align="center"><font style="font-size:9pt"><b>
	  &nbsp;&nbsp;请选择</b></font></td>
	</tr>
	<tr><td align="center" colspan="4" width="386">
	  <table border="0" cellspacing="0" cellpadding="0" width="386">
		<tr align="center"><td width="194">
		<p align="right"><img src="plusimg/duchang/big.gif"></td>
		<td width="192">
		<p align="left"><img src="plusimg/duchang/small.gif"></td></tr><tr align="center">
		<td width="194">
		<p align="right"><input type="radio" name="dddimg" value="big" checked></td>
		<td width="192">
		<p align="left">
		<input type="radio" name="dddimg" value="small">
		</td>
		</tr>
	  </table></td>
	 </tr>
	<tr>
		<td align="center" colspan="4" width="386">我要下注：
			<input type="text" name="money" size="10" value="50"> &nbsp;<b>元</b>
		</td>
	</tr>
	<tr>
	<td align="center" bgColor="#C4D4E5" colspan="4" width="386"><input type="submit" value="下注啦！！！" name="B1" style="font-size: 12px">
	</td>
	</tr>
	</table><br />提示：您现在一共有现金<b><font color="#CC0000"><%=Session(CacheName & "MyInfo")(7)%></font> 元</b> 可以作为赌注<br>

</center>
</form>
<%end sub
sub ds()%>
<form method="POST" action="Duchang.asp?menu=ds1">
<center>
<table border="1" cellspacing="0" cellpadding="3" width="350" bordercolor="#A4B6D7" style="border-collapse: collapse">
<tr align="center"><td width="33%"><p align="center"> 
  <font style="font-size: 9pt"><b>赌 场 - 猜 点 数</b></font></p></td>
 </tr>
<tr align="center"><td width="33%"><img src="plusimg/duchang/run.gif"></td></tr>
<tr>
<td bgcolor="#A4B6D7" width="960"><font style="font-size:9pt"><b>&nbsp;&nbsp;请选择</b></font></td>
</tr>
<tr>
	<td align="center">
		<table border="0" cellspacing="0" cellpadding="0">
		 <tr align="center">
			<td width="17%"><img src="plusimg/duchang/1.gif"></td><td width="17%"><img src="plusimg/duchang/2.gif"></td>
			<td width="16%"><img src="plusimg/duchang/3.gif"></td><td width="17%"><img src="plusimg/duchang/4.gif"></td>
			<td width="17%"><img src="plusimg/duchang/5.gif"></td><td width="16%"><img src="plusimg/duchang/6.gif"></td>
		 </tr>
		 <tr align="center">
		 <td width="17%"><input type="radio" name="dddimg" value="1" checked></td>
		 <td width="17%"><input type="radio" name="dddimg" value="2"></td>
		 <td width="16%"><input type="radio" name="dddimg" value="3"></td>
		 <td width="17%"><input type="radio" name="dddimg" value="4"></td>
		 <td width="17%"><input type="radio" name="dddimg" value="5"></td>
		 <td width="16%"><input type="radio" name="dddimg" value="6"></td>
		 </tr>
	  </table>
   </td>
</tr>
<tr>
<td align="center">我要下注：
<input type="text" name="money" size="10" value="50"> &nbsp;<b> 元</b></td></tr><tr><td align="center" bgColor="#A4B6D7"><input type="submit" value="下注啦！！！" name="B1" style="font-size: 12px">
</td>
</tr></table></form>
  提示：您现在一共有现金<b><font color="#CC0000"><%=Session(CacheName & "MyInfo")(7)%></font> 元</b> 可以作为赌注<br>
<%end sub

sub sz()%>
<form method="POST" action="Duchang.asp?menu=sz1"><input type="hidden" name=menu value=szover>
    <center>
<table border=1 cellspacing=0 cellpadding=6 width="400" style="border-collapse: collapse" bordercolor="#A4B6D7" height="115">
<tr>
  <td bgcolor="#C4D4E5" width="160" bordercolor="#A4B6D7" height="9" align="center">
  <font size="3" style="font-size: 9pt"><b>赌场 - 赌骰子</b></font></td>
  <td bgcolor="#C4D4E5" width="160" bordercolor="#A4B6D7" height="9" align="right">最大下注现金是 <b><font color="#CC0000">500</font> 元</b></td>
</tr><tr bgColor=FAF0E2>
  <td align=center bgcolor="#FFFFFF" bordercolor="#A4B6D7" height="12" colspan="2">您现在一共有现金 <b><font color="#CC0000"><%=Session(CacheName & "MyInfo")(7)%></font>
元</b> 可以作为赌注</td></tr><tr>
  <td align=center bgcolor="#ECF5FF" bordercolor="#A4B6D7" height="20" colspan="2">我要下注：
<input type="text" name="money" size="10" value="50"> <b> 元</b></td></tr><tr>
  <td align=center bgColor=#C4D4E5 height="23" colspan="2"><input type="submit" value="下注啦！！！" name="B1" style="font-size: 12px"></td>
</tr></table>  
  </center>
</form>
<%End sub

sub dx1()
dim dmoney,ds,d1,d2,d3,zs,zds,zdss
dmoney=int(request.form("money"))
ds=lcase(request.form("dddimg"))
If ds<>"small" and ds<>"big" Then Call Alert("这里不是赌砖头",16,Comeurl)
Randomize
d1=fix(rnd*6)+1
d2=fix(rnd*6)+1
d3=fix(rnd*6)+1
zs=d1+d2+d3
If zs>9 Then 
zds="大"
zdss="big"
Else
zds="小"
zdss="small"
End If
%>
<center><font style="font-size:9pt"><b><font color="#0000CC">您押的是</font></b></br><img src="plusimg/duchang/<%=ds%>.gif">
<table borderColor="#a4b6d7" cellSpacing="0" width="400" border="1" height="54" style="border-collapse: collapse" cellpadding="6">
<tr bgcolor="#F2D9B3"><td colspan="3" align="center" bgcolor="#C4D4E5"><b>结果:<%=zs%>点，<%=zds%></b></td>
</tr>
<tr><td width="33%" align="center" bgcolor="#ECF5FF"><img src="plusimg/duchang/<%=d1%>.gif"></td>
<td width="33%" align="center" bgcolor="#ECF5FF"><img src="plusimg/duchang/<%=d2%>.gif"></td>
<td width="34%" align="center" bgcolor="#ECF5FF"><img src="plusimg/duchang/<%=d3%>.gif"></td></tr>
<tr><td colspan="3" align="center" bgcolor="#ECF5FF"> <br>
<%if ds=zdss then%>
	<p><font size="3">嘻嘻~，赢了： <b><font color="#CC0000"><%=dmoney%></font> 元</b</font></p>
<table width="80%" border="0" cellspacing="0" cellpadding="5">
<tr><td align="right"><b><font color="#000099">庄家：</font></b></td>
	<td colspan=2>您真厉害呀~！还要来吗？</td>
</tr>
<tr><td align="right"><b><font color="#CC0000">我说：</font></b></td>
	<td colspan="2"><a href="Duchang.asp?menu=dx">再来，我今天运气不错耶~！</a></td>
</tr>
<tr><td align="right"></td><td colspan="2"><a href="Duchang.asp">见好就收，呵，您都傻的~！</a></td>
</tr></table>
<%dmoney=int(Session(CacheName & "MyInfo")(7))+int(dmoney)
else%>
<p><font size="3">真倒霉，输了： <b><font color="#CC0000"><%=dmoney%></font> 元</b></font></p>
<table width="80%" border="0" cellspacing="0" cellpadding="5">
	<tr><td align="right"><b><font color="#000099">庄家：</font></b></td><td colspan=2>呵呵还要来吗？ 有赌未为输哦~！</td></tr><tr><td align="right"><b><font color="#CC0000">我说：</font></b></td><td colspan="2"><a href="Duchang.asp?menu=dx">再来，呸，我就不相信这么倒霉~！</a></td>
	</tr>
	<tr><td align="right"></td><td colspan="2"><a href="Duchang.asp">今天真倒霉，不来了，下次再玩~！</a></td></tr></table>
<%
dmoney=int(Session(CacheName & "MyInfo")(7))-int(dmoney)
End If
BBS94KK.Execute("Update [KK_user] Set Coin="&dmoney&" where Name='"&BBS94KK.MyName&"' ")
Session(CacheName & "MyInfo")= Empty
BBS94KK.UserLoginTrue
%>
<hr width="250" size="1">
您现在有现金：<b><%=dmoney%></b>:元
<hr width="250" size="1"></td></tr></table></center>
<%end sub
sub ds1()
dim dmoney,ds,d1
dmoney=request.form("money")
ds=request("dddimg")
If Not BBS94KK.Fun.isInteger(ds) Then Call Alert("这里不是赌砖头",16,Comeurl)
Randomize
d1=fix(rnd*6)+1
%>
<center>
<table border="1" cellpadding="3" width="400" cellspacing="0" bordercolor="#A4B6D7" style="border-collapse: collapse">
<tr bgcolor="#F2D9B3"><td align="center" bgcolor="#A4B6D7"><font style="font-size:9pt"><b>您押的是</b></font><b><%=ds%>点</b></td>
<td align="center" bgcolor="#A4B6D7"><font><b>结果:</b></font><b><%=d1%>点</b></td>
</tr><tr><td align="center"><img src="plusimg/duchang/<%=ds%>.gif"></td>
<td align="center"><Img src="plusimg/duchang/<%=d1%>.gif">
</span></a></td></tr>
<%
if int(d1)=int(ds) then
dmoney=int(Session(CacheName & "MyInfo")(7))+int(dmoney)*3
%>
<tr><td colspan="2" align="center" bgcolor="#ECF5FF" width="392"> <br><p><font size="3">嘻嘻~，赢了： <b><font color="#CC0000"><%=request("money")*3%></font> 元</b></font></p><table width="80%" border="0" cellspacing="0" cellpadding="5"><tr><td align="right"><b><font color="#000099">庄家：</font></b></td><td colspan="2">您真厉害呀~！还要来吗？</td></tr><tr><td align="right"><b><font color="#CC0000">我说：</font></b></td>
<td colspan="2"><a href="Duchang.asp?menu=ds">再来，我今天运气不错耶~！</a></td></tr>
<tr><td align="right">　</td><td colspan="2"><a href="Duchang.asp">见好就收，呵，您都傻的~！</a></td>
</tr></table>
<%else%>
<tr><td colspan="2" align="center" bgcolor="#ECF5FF" width="392"> <br><p><font size="3">真倒霉，输了： <b><font color="#CC0000"><%=int(dmoney)%></font> 元</b></font></p><table width='80%' border="0" cellspacing="0" cellpadding="5"><tr><td align="right"><b><font color="#000099">庄家：</font></b></td><td colspan="2">呵呵还要来吗？ 有赌未为输哦~！</td></tr><tr><td align="right"><b><font color="#CC0000">我说：</font></b></td><td colspan="2"><a href="Duchang.asp?menu=ds">再来，呸，我就不相信这么倒霉~！</a></td>
</tr><tr><td align="right"></td><td colspan="2"><a href="Duchang.asp">今天真倒霉，不来了，下次再玩~！</a></td></tr></table>
<%
dmoney=int(Session(CacheName & "MyInfo")(7))-int(dmoney)
end if
BBS94KK.Execute("Update [KK_user] Set Coin="&dmoney&" where Name='"&BBS94KK.MyName&"' ")
Session(CacheName & "MyInfo")= Empty
BBS94KK.UserLoginTrue
%>
<hr width="250" size="1">
您现在有现金：<b><font color="#CC0000"><%=dmoney%></font></b>:元
<hr width="250" size="1"></td></tr></table></center>
<font size="3"></font>
<%end sub
sub sz1()
dim dmoney,d1,d2,d3,b1,b2,b3,zj,ni
dmoney=request("money")
Randomize
d1=fix(rnd*6)+1
d2=fix(rnd*6)+1
d3=fix(rnd*6)+1
b1=fix(rnd*6)+1
b2=fix(rnd*6)+1
b3=fix(rnd*6)+1
zj=d1+d2+d3
ni=b1+b2+b3
%>
<center>
<table borderColor="#a4b6d7" cellSpacing="0" width="400" border="1" height="54" style="border-collapse: collapse" cellpadding="6">

<tr><td colspan="3" align="center" bgcolor="#ECF5FF" height="12"<font color="#0000CC">□-庄家骰子：</font><%=zj%>点 </td>
</tr>

<tr>
<td align="center" height="30"><img src="plusimg/duchang/<%=d1%>.gif"></td>
<td align="center" height="30"><img src="plusimg/duchang/<%=d2%>.gif"></td>
<td align="center" height="30"><img src="plusimg/duchang/<%=d3%>.gif"></td>
</tr>

<tr><td colspan="3" align="center" bgcolor="#ECF5FF" height="12"<font color="#0000CC">□-您的骰子：</font><%=ni%>点 </td>
</tr>

<tr>
<td align="center" height="30"><img src="plusimg/duchang/<%=b1%>.gif"></td>
	<td align="center" height="30"><img src="plusimg/duchang/<%=b2%>.gif"></td>
	<td align="center" height="30"><img src="plusimg/duchang/<%=b3%>.gif"></td>
</tr>

<tr><td colspan="3" align="center" bgcolor="#ECF5FF"> <br>

<%if zj<ni then%>
	<p><font size="3">嘻嘻~，赢了： <b><font color="#CC0000"><%=dmoney%></font> 元</b</font></p>
<table width="80%" border="0" cellspacing="0" cellpadding="5">
<tr><td align="right"><b><font color="#000099">庄家：</font></b></td>
	<td colspan=2>您真厉害呀~！还要来吗？</td>
</tr>
<tr><td align="right"><b><font color="#CC0000">我说：</font></b></td>
	<td colspan="2"><a href="Duchang.asp?menu=sz">再来，我今天运气不错耶~！</a></td>
</tr>
<tr><td align="right"></td><td colspan="2"><a href="Duchang.asp">见好就收，呵，您都傻的~！</a></td>
</tr></table>
<%dmoney=int(Session(CacheName & "MyInfo")(7))+int(dmoney)
else%>
<p><font size="3">真倒霉，输了： <b><font color="#CC0000"><%=dmoney%></font> 元</b></font></p>
<table width="80%" border="0" cellspacing="0" cellpadding="5">
	<tr><td align="right"><b><font color="#000099">庄家：</font></b></td><td colspan=2>呵呵还要来吗？ 有赌未为输哦~！</td></tr><tr><td align="right"><b><font color="#CC0000">我说：</font></b></td><td colspan="2"><a href="Duchang.asp?menu=sz">再来，呸，我就不相信这么倒霉~！</a></td>
	</tr>
	<tr><td align="right"></td><td colspan="2"><a href="Duchang.asp">今天真倒霉，不来了，下次再玩~！</a></td></tr></table>
<%
dmoney=int(Session(CacheName & "MyInfo")(7))-int(dmoney)
end if
BBS94KK.Execute("Update [KK_user] Set Coin="&dmoney&" where Name='"&BBS94KK.MyName&"' ")
Session(CacheName & "MyInfo")= Empty
BBS94KK.UserLoginTrue
%>
<hr width="250" size="1">
您现在有现金：<b><%=dmoney%></b>:元
<hr width="250" size="1"></td></tr></table></center>
<%end sub%>