<!-- #include file=../../inc/BBSsetup.asp -->
<!-- #include file=../../inc/Board_Popfun.asp -->
<!-- #include file=../../inc/ubbcode.asp -->
<!-- #include file=../../inc/Constellation.asp -->
<!-- #include file=../../user/inc/UserTopic.asp -->
<!-- #include file=inc/const.asp -->
<%

DEF_BBS_HomeUrl = "../../"
const npage = 2

GBL_CHK_TempStr=""
OpenDatabase
CheckUserOnline

Function IsObjInstalled(strClassString)
	On Error Resume Next
	IsObjInstalled = False
	Err = 0
	Dim xTestObj
	Set xTestObj = Server.CreateObject(strClassString)
	If 0 = Err Then IsObjInstalled = True
	Set xTestObj = Nothing
	Err = 0
End Function

dim ObjInstalled
ObjInstalled=IsObjInstalled("Scripting.FileSystemObject")

dim FoundErr
dim master
if CheckSupervisorUserName = 1  then
	master=true
  else
        master=false
end if

if GBL_CHK_User="" then
	response.write "<script>location.href='" & DEF_BBS_HomeUrl & "User/Login.asp?u=" & urlencode(Request.Servervariables("SCRIPT_NAME") & "?" & Request.QueryString) & "'</script>"
end if
'首部信息
dim headvar,stats
	headvar="&nbsp>>&nbsp<a href=play.asp><font class=NavColor>社区赌场</font></a>"
        if request.querystring("menu")="dx" then
		stats=">>&nbsp赌围骰"
	  elseif request.querystring("menu")="ds" then
		stats=">>&nbsp猜点数"
          elseif request.querystring("menu")="sz" then
	  	stats=">>&nbsp赌骰子"
          elseif request.querystring("menu")="dx1" then
		stats=">>&nbsp赌围骰结果"
          elseif request.querystring("menu")="ds1" then
		stats=">>&nbsp猜点数结果"
          elseif request.querystring("menu")="sz1" then
	  	stats=">>&nbsp赌骰子结果"
          elseif request.querystring("menu")="setup" then
	  	stats=">>&nbsp参数设置"
          elseif request.querystring("menu")="savesetup" then
	  	stats=">>&nbsp参数设置"
          else
                stats=""
        end if
BBS_SiteHead DEF_SiteNameString&" "&DEF_BBS_Name,GBL_board_ID,headvar&" "&stats

dim sql,rs
dim points,charmpoint
dim d1,d2,d3,b1,b2,b3,zj,ni
set rs= server.createobject("adodb.recordset")
sql="select * from LeadBBS_User where UserName='" & GBL_CHK_User&"'"
rs.open sql,con,1,3

select case Request("menu")
case ""
call play()

case "dx"
call dx()

case "ds"
call ds()

case "sz"
call sz()

case "setup"
call setup()

case "dx1"
call checkup()
call dx1()

case "ds1"
call checkup()
call ds1()

case "sz1"
call checkup()
call sz1()

case "savesetup"

call savesetup()

end select

sub Error2(message)
%>
<table width="<%=DEF_BBS_ScreenWidth%>" align=center class=TBone>
  <tr class=tbhead2>
     <td align=center ><b><font class=HeadFont>错误信息</font></b></td>
  </tr>
  <tr class=tbbg1>
    <td height=30><li><%response.write message%></li></td>
  </tr>
  <tr class=tbbg1>
    <td height=30 align=center><a href="#" onclick=javascript:history.back()>返&nbsp&nbsp&nbsp回</a></td>
  </tr>
</table>
<%
end sub


sub checkup()

points=int(request("points"))
if rs("points")<0 then
    FoundErr=true
    error2("大侠,别拼命,你的钱已变成负数了")
else
   if rs("points") -points <0  then
     FoundErr=true
     error2("你的钱不够！")
   end if
end if

if points-minjinqian<0 or points-maxjinqian>0 then
   FoundErr=true
   error2("输入错误！超出设定的赌注范围")
end if

if rs("charmpoint")<0 then
   FoundErr=true
   Error2("大侠,别拼命,你的魅力值为负了")
else
   if rs("charmpoint")-meili<0 then
      FoundErr=true
      error2("您的魅力值不够了，赶快到社区去发贴吧!")
  end if
end if
end sub



sub play()

%>


<center>
<table cellpadding=3 cellspacing=1 align=center width="<%=DEF_BBS_ScreenWidth%>" class=TBone>
  <tr class=tbhead2>
    <td align=center><b><font class=HeadFont>社区博彩中心</font></b></td>
  </tr>
  <tr align="center" class=tbbg1>
    <td height="129">
      <table border="0" width="100%" cellspacing="0" cellpadding="6">
        <tr class=tbbg1>
          <td width="50%" align="center" valign=top>
             <table border="0" width="100%" cellspacing="0" cellpadding="0" >
               <tr>
                 <td>&nbsp&nbsp&nbsp&nbsp<font size=3 color=red>警告：</font>
                         <ul><blockquote><li>每次赌钱，您的魅力值会扣 <b><%=meili%></b> ！</li>
                                         <li>经验值会扣 <b><%=jinyan%></b> ！</blockquote></td>
               </tr>
               <tr>
                  <td align=center><img src="pic/daxiao.gif" width="303" height="237" border="0"></td>
               </tr>
             </table>
           </td>
           <td width="50%" >
<ul><li><b><a href="play.asp?menu=sz">赌骰子</a></b></font><p>游戏规则：庄家随机出三个<b>骰子</b>，玩家也随机出三个<b>骰子</b>，谁大，谁赢，赔率 <b>1：<%=py1%></b></p>
<blockquote><p align="right"><a href="play.asp?menu=sz">现在进入&gt;&gt;</a></p></blockquote>



<li><b><a href="play.asp?menu=ds">猜点数</a></b><p>游戏规则：电脑随机出一个<b>骰子</b>，您选择骰子的点数，如果<b>骰子</b>的点数和您选的点数一样，您就赢了，赔率 <b>1：<%=py2%></b></font></p>
<ul>
<blockquote><p align="right"><a href="play.asp?menu=ds">现在进入&gt;&gt;</a></p></blockquote>
</li></ul>

<li><b><a href="play.asp?menu=dx">赌围骰</a></b><p>游戏规则：电脑随机出三个<b>骰子</b>，您选择可能会出现的三个<b>骰子</b>，如果<b>骰子</b>和您选的一样，您就赢了，赔率 <b>1：<%=py3%></b></font></p>
<ul>
<blockquote><p align="right"><a href="play.asp?menu=dx">现在进入&gt;&gt;</a></p></blockquote>
</li></ul>

<li><b><a href="race.asp">赛马场</a></b><p>游戏规则：在电脑给出的八匹马中，您选择可能会获得第一名的马，如果选中了，您就赢了，赔率 <b>1：<%=py4%></b></p>
<ul>
<blockquote><p align="right"><a href="race.asp">现在进入&gt;&gt;</a></p></blockquote>
</li></ul>

<%if master then%>
<li><b><a href="play.asp?menu=setup">参数设置</a></b><p>设置说明：论坛管理员可以设定每次赌钱需消耗的魅力值、经验值、最大赌注、最小赌注以及赔率。您现在设定的是：魅力值<font color=red><%=MEILI%></font>点、经验值<font color=red><%=jinyan%></font>点、最大赌注<font color=red><%=maxjinqian%></font>元、最小赌注<font color=red><%=minjinqian%></font>元！</p>
<ul>
<blockquote><p align="right"><a href="play.asp?menu=setup">现在进入&gt;&gt;</a></p></blockquote>
</li></ul>
<%end if%>

</td></tr></table></td></tr></table></center>

<%


end sub%>

<%sub dx()%>
<br>


<table cellpadding=3 cellspacing=1 align=center width="<%=DEF_BBS_ScreenWidth%>" class=TBone>
 <form method="POST" action="play.asp?menu=dx1"><input type="hidden" name=menu value=dxover>
  <tr class=tbhead2 align=center >
    <td align=center ><b><font class=HeadFont>赌 场 - 赌 围 骰</font></b></font></td>
  </tr>
  <tr class=tbbg1>
    <td align=center>
      <table border="0" width="<%=DEF_BBS_ScreenWidth%>" cellpadding=0 cellspacing=0 class=tbbg1>
        <tr class=tbbg1>
          <td align=center>
              <img src="pic/run.gif" width="38" height="36" >&nbsp;&nbsp
              <img src="pic/run.gif" width="38" height="36">&nbsp;&nbsp
              <img src="pic/run.gif" width="38" height="36">
          </td>
        </tr>
       </table>
  </tr>
  <tr class=tbbg1>
    <td >
       <p align="center"><font style=font-size:9pt><b>请选择</b></font>
    </td>
  </tr>
  <tr class=tbbg1>
    <td align=center  >
      <table border="0" cellspacing="0" cellpadding="0" width=60% >
        <tr align="center" >
         <td align="center"><img src="pic/w1.gif"></td>
         <td align="center"><img src="pic/w2.gif"></td>
         <td align="center"><img src="pic/w3.gif"></td>
         <td align="center"><img src="pic/w4.gif"></td>
         <td align="center"><img src="pic/w5.gif"></td>
         <td align="center"><img src="pic/w6.gif"></td>
        </tr>
        <tr align="center">
         <td align="center"><input type="radio" name="dddimg" value="1" checked></td>
         <td align="center"><input type="radio" name="dddimg" value="2"></td>
         <td align="center"><input type="radio" name="dddimg" value="3"></td>
         <td align="center"><input type="radio" name="dddimg" value="4"></td>
         <td align="center"><input type="radio" name="dddimg" value="5"></td>
         <td align="center"><input type="radio" name="dddimg" value="6"></td>
        </tr>
       </table>
      </td>
     </tr>
     <tr class=tbbg1>
      <td align=center>我要下注：
           <input type="text" name="points" size="10" value="10"> &nbsp;<b> 元</b>&nbsp&nbsp&nbsp<font color=red>*</font>&nbsp最小下注是 <b><font color="#CC0000"><%=minjinqian%></font> 元，</b>最大下注是 <b><font color="#CC0000"><%=maxjinqian%></font> 元</b>。
      </td>
     </tr>
     <tr class=tbbg1>
      <td align=center >
         <input type="submit" value="下注啦！！！" name="B1" style="font-size: 12px">
      </td>
     </tr>
    </form>
   </table>
  

<center>
警告：每次赌钱，您的魅力值会扣 <font color="#CC0000"><b><%=meili%></b></font>，经验值会扣 <font color="#CC0000"><b><%=jinyan%></b></font> ！
<br>您现有魅力值为<font color=red><b><%=rs("charmpoint")%></b></font>，经验值为<font color=red><b><%=clng(rs("onlinetime")/60)%></b></font>
<br>您现在一共有金钱  <b><font color="#CC0000"><%=rs("points")%></font></b>元 可以作为赌注<br>

<%
end sub

sub ds()%>
<br>
<form method="POST" action="play.asp?menu=ds1"><input type="hidden" name=menu value=dsover>
<center>
<table cellpadding=3 cellspacing=1 align=center width="<%=DEF_BBS_ScreenWidth%>" class=TBone>
  <tr class=tbhead2 align=center >
   <td align="center"><b><font class=HeadFont>赌 场 - 猜 点 数</font></b></td>
  </tr>
  <tr align="center" class=tbbg1>
    <td><img src="pic/run.gif"></td>
  </tr>
  <tr>
    <td class=tbbg1 align="center"><b>请选择</b></font></td>
  </tr>
  <tr class=tbbg1>
    <td align=center>
     <table border="0" cellspacing="0" cellpadding="0" class=tbbg1>
       <tr align="center" class=tbbg1>
         <td><img src="pic/dice1.gif"></td><td width="17%"><img src="pic/dice2.gif"></td>
         <td><img src="pic/dice3.gif"></td><td width="17%"><img src="pic/dice4.gif"></td>
         <td><img src="pic/dice5.gif"></td><td width="16%"><img src="pic/dice6.gif"></td>
       </tr>
       <tr align="center" class=tbbg1>
         <td><input type="radio" name="dddimg" value="1" checked></td>
         <td><input type="radio" name="dddimg" value="2"></td>
         <td><input type="radio" name="dddimg" value="3"></td>
         <td><input type="radio" name="dddimg" value="4"></td>
         <td><input type="radio" name="dddimg" value="5"></td>
         <td><input type="radio" name="dddimg" value="6"></td>
       </tr>
      </table>
     </td>
    </tr>
    <tr class=tbbg1>
      <td align=center>
          我要下注：<input type="text" name="points" size="10" value="10"> &nbsp;<b> 元</b>
           &nbsp;&nbsp;&nbsp;<font color=red>*</font>最小下注 <B><font color=red><%=minjinqian%></font> 元</b>，最大下注是 <b><font color=red><%=maxjinqian%></font> 元</b>
      </td>
    </tr>
    <tr class=tbbg1>
       <td align=center><input type="submit" value="下注啦！！！" name="B1" style="font-size: 12px"></td>
    </tr>
   </table>
 </form>
警告：每次赌钱，您的魅力值会扣 <font color="#CC0000"><b><%=meili%></b></font>，经验值会扣 <font color="#CC0000"><b><%=jinyan%></b></font> ！
<br>您现有魅力值为<font color=red><b><%=rs("charmpoint")%></b></font>，经验值为<font color=red><b><%=clng(rs("onlinetime")/60)%></b></font>
<br>您现在一共有金钱  <b><font color="#CC0000"><%=rs("points")%></font></b>元 可以作为赌注<br>
<%
end sub

sub sz()%>
<form method="POST" action="play.asp?menu=sz1"><input type="hidden" name=menu value=szover>
<center>
<table cellpadding=3 cellspacing=1 align=center width="<%=DEF_BBS_ScreenWidth%>" class=TBone>
  <tr class=tbhead2 align=center >
     <td align="center"><b><font class=HeadFont>赌场 - 赌骰子</font></b></td>
  </tr>
  <tr class=tbbg1>
     <td align=center>您现在一共有金钱 <b><font color="#CC0000"><%=rs("points")%></font>元</b> 可以作为赌注
     </td>
  </tr>
  <tr class=tbbg1>
     <td align=center >
        我要下注：<input type="text" name="points" size="10" value="10"> <b> 元</b>
        &nbsp&nbsp&nbsp<font color=red>*</font>最小下注是 <b><font color="#CC0000"><%=minjinqian%> </font> 元</b>，最大下注是 <b><font color="#CC0000"><%=maxjinqian%></font> 元</b>
     </td>
  </tr>
  <tr class=tbbg1>
     <td align=center>
          <input type="submit" value="下注啦！！！" name="B1" style="font-size: 12px">
     </td>
  </tr>
 </table>
</form>
警告：每次赌钱，您的魅力值会扣 <font color="#CC0000"><b><%=meili%></b></font>，经验值会扣 <font color="#CC0000"><b><%=jinyan%></b></font> ！
<br>您现有魅力值为<font color=red><b><%=rs("charmpoint")%></b></font>，经验值为<font color=red><b><%=clng(rs("onlinetime")/60)%></b></font>
<br>您现在一共有金钱  <b><font color="#CC0000"><%=rs("points")%></font></b>元 可以作为赌注<br>
<%
end sub



sub dx1()
points=request("points")
if FoundErr=true then
  exit sub
end if
dim ds
ds=request("dddimg")
Randomize
d1=int(rnd*6)+1
d2=int(rnd*6)+1
d3=int(rnd*6)+1
%>

<table cellpadding=3 cellspacing=1 align=center width="<%=DEF_BBS_ScreenWidth%>" class=TBone>
  <tr class=tbhead2>
   <td align=center><b><font class=HeadFont>赌 围 骰 结 果</font></b></td>
  </tr>
  <tr class=tbbg1>
   <td align=center>


<table cellpadding=3 cellspacing=1 align=center width="<%=DEF_BBS_ScreenWidth%>" class=TBone>
  <tr class=tbbg1>
     <td align=center><b><font color="#0000CC"  style=font-size:9pt>您押的是</font></b></td>
  </tr>
  <tr class=tbbg1>
     <td align=center><img src=pic/w<%=ds%>.gif></td>
  </tr>
  <tr class=tbbg1>
     <td align="center" ><b><font color="#0000CC"  style=font-size:9pt>结果是</font></b></td>
  </tr>
  <tr class=tbbg1>
     <td align="center"><img src=pic/dice<%=d1%>.gif>&nbsp;&nbsp;&nbsp;
                        <img src=pic/dice<%=d2%>.gif>&nbsp;&nbsp;&nbsp;
                        <img src=pic/dice<%=d3%>.gif>
     </td>
  </tr>
  <tr class=tbbg1>
     <td align="center" > <br>
<%
if ds=""&d1&"" and ds=""&d2&"" and ds=""&d3&"" then
%>
          <p><font size="3">嘻嘻~，赢了： <b><font color="#CC0000"><%=points*py3%></font> 元</b></font></p>
       <table width="80%" border="0" cellspacing="1" cellpadding="5" class=TBone>
         <tr class=tbbg1>
           <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="play.asp?menu=dx">再来，我今天运气不错耶~！</a></td>
         </tr>
         <tr class=tbbg1>
           <td align="right">　</td>
           <td colspan="2"><a href=play.asp target=_top>见好就收，呵，您都傻的~！</a></td>
         </tr>
       </table>
<%
points=rs("points")+points*py3
else

%>
          <p><font size="3">真倒霉，输了： <b><font color="#CC0000"><%=points%></font> 元</b></font></p>
       <table width="80%" border="0" cellspacing="1" cellpadding="5" class=TBone>
         <tr class=tbbg1>
           <td align="right"><b><font color="#000099">庄家：</font></b></td>
           <td colspan="2">呵呵还要来吗？ 有赌未为输哦~！</td>
         </tr>
         <tr class=tbbg1>
           <td align="right"><b><font color="#CC0000">我说：</font></b></td>
           <td colspan="2"><a href="play.asp?menu=dx">再来，呸，我就不相信这么倒霉~！</a></td>
         </tr>
         <tr class=tbbg1>
           <td align="right">　</td>
           <td colspan="2"><a href=play.asp target=_top>今天真倒霉，不来了，下次再玩~！</a></td>
         </tr>
       </table>
<%
points=rs("points")-points
end if
rs("points")=points
rs("charmpoint")=rs("charmpoint")-meili
rs("onlinetime")=clng(rs("onlinetime")/60-jinyan)*60
rs.update
%>
<hr width="250" SIZE="1">
您现在有金钱：<b><%=rs("points")%> 元 </b>魅力:<%=rs("charmpoint")%>
<hr width="250" SIZE="1">
    </td>
  </tr>
</table>

</td>
</tr>
</table>

</center><font size="3"></font>
<%
end sub



sub ds1()
points=request("points")
if FoundErr=true then
  exit sub
end if
dim ds
ds=cint(request("dddimg"))
Randomize
d1=fix(rnd*6)+1
%>
<br>
<center>
<table border="0" cellpadding="3" width="400" cellspacing="1" class=tbbg1>
  <tr class=tbbg1>
     <td align="center"><b>您押的是</b></td>
     <td align="center"><b>结果:</b></font><b><%=d1%>点</b></td>
  </tr>
  <tr class=tbbg1>
     <td align="center"><img src="pic/dice<%=ds%>.gif"></td>
     <td align="center"><Img src="pic/dice<%=d1%>.gif"></td>
  </tr>

<%
if ds=d1 then

%>
  <tr class=tbbg1>
     <td colspan="2" align="center" > <br><p><font size="3">嘻嘻~，赢了： <b><font color="#CC0000"><%=points*py2%></font> 元</b></font></p>
        <table width="80%" border="0" cellspacing="0" cellpadding="5">
          <tr class=tbbg1>
            <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="play.asp?menu=ds">再来，我今天运气不错耶~！</a></td>
          </tr>
          <tr class=tbbg1>
            <td align="right">　</td>
            <td colspan="2"><a href=play.asp target=_top>见好就收，呵，您都傻的~！</a></td>
          </tr>
         </table>
<%points=rs("points")+points*py2
else%>
   <tr class=tbbg1>
      <td colspan="2" align="center" > <br><p><font size="3">真倒霉，输了： <b><font color="#CC0000"><%=points%> </font> 元</b></font></p>
         <table width="80%" border="0" cellspacing="0" cellpadding="5">
            <tr class=tbbg1>
               <td align="right"><b><font color="#000099">庄家：</font></b></td>
               <td colspan="2">呵呵还要来吗？ 有赌未为输哦~！</td>
            </tr>
            <tr class=tbbg1>
               <td align="right"><b><font color="#CC0000">我说：</font></b></td>
               <td colspan="2"><a href=play.asp?menu=ds>再来，呸，我就不相信这么倒霉~！</a></td>
            </tr>
            <tr class=tbbg1>
               <td align="right">　</td>
               <td colspan="2"><a href=play.asp target=_top>今天真倒霉，不来了，下次再玩~！</a></td>
            </tr>
         </table>
<%
points=rs("points")-points
end if
rs("points")=points
rs("charmpoint")=rs("charmpoint")-meili
rs("onlinetime")=clng(rs("onlinetime")/60-jinyan)*60
rs.update
%>
<hr width="250" SIZE="1">
您现在有金钱：<b><font color="#CC0000"><%=rs("points")%></font> 元 </b>魅力:<%=rs("charmpoint")%>
<hr width="250" SIZE="1"></td></tr></table></center>
<font size="3"></font>
<%
end sub

sub sz1()

points=request("points")
if FoundErr=true then
  exit sub
end if
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
%>
<br>
<center>
<table cellpadding=3 cellspacing=1 align=center width="<%=DEF_BBS_ScreenWidth%>" class=TBone>
  <tr class=tbhead2>
   <td align=center><b><font class=HeadFont>赌 骰 子 结 果</font></b></td>
  </tr>
  <tr class=tbbg1>
   <td align=center>

<table border="0" cellspacing="1" cellpadding="6" width="400" height="314" class=TBone>
  <tr class=tbbg1>
     <td colspan="3" align="center" height="12"><font color="#0000CC">□-庄家骰子：</font><%=zj%>点</td>
  </tr>
  <tr class=tbbg1>
     <td align="center" height="30"><img src=pic/dice<%=d1%>.gif></td>
     <td align="center" height="30"><img src=pic/dice<%=d2%>.gif></td>
     <td align="center" height="30"><img src=pic/dice<%=d3%>.gif></td>
  </tr>
  <tr class=tbbg1>
     <td colspan="3" align="center" height="12"><font color="#CC0000">□-您的骰子：</font><%=ni%>点</td>
  </tr>
  <tr class=tbbg1>
     <td align="center" height="30"><img src=pic/dice<%=b1%>.gif></td>
     <td align="center" height="30"><img src=pic/dice<%=b2%>.gif></td>
     <td align="center" height="30"><img src=pic/dice<%=b3%>.gif></td>
  </tr>
  <tr class=tbbg1>
     <td colspan="3" align="center" height="116">
<%
if zj<ni then

%>
        <table width="100%" border="0" cellspacing="1" cellpadding="5" class=TBone>
          <tr class=tbbg1>
            <td align="right" height="50">　</td>
            <td colspan="2" height="50"><font size="3">&nbsp;嘻嘻~，赢了：<b><font color="#CC0000"><%=points*py1%></font> 元</b></font></td>
          </tr>
          <tr class=tbbg1>
            <td align="right"><b><font color="#000099"> 庄家：</font></b></td>
            <td colspan="2">&nbsp;您真厉害呀~！还要来吗？ </td>
          </tr>
          <tr class=tbbg1>
            <td align="right"><b><font color="#CC0000">我要：</font></b></td>
            <td colspan="2">&nbsp;<a href="play.asp?menu=sz">再来，我今天运气不错耶~！</a></td>
          </tr>
          <tr class=tbbg1>
            <td align="right">　</td>
            <td colspan="2">&nbsp;<a href=play.asp target=_top>见好就收，呵呵，走人咯~！</a></td>
           </tr>
         </table>
<%
points=rs("points")+points*py1
else
%>
<center>
        <table width="100%" border="0" cellspacing="1" cellpadding="5"  class=TBone>
           <tr class=tbbg1>
             <td height="50">　</td>
             <td colspan="2" height="50"><p><font size="3">&nbsp;真倒霉，输了： <b><font color="#CC0000"><%=points%></font> 元</b></font></p></td>
           </tr>
           <tr class=tbbg1>
             <td align="right"><b><font color="#000099"> 庄家：</font></b></td>
             <td colspan="2">&nbsp;呵呵~还要来吗？ 有赌未必输哦~！</td>
           </tr>
           <tr class=tbbg1>
             <td align="right" rowspan="2"><b><font color="#CC0000"> 我要：</font></b></td>
             <td colspan="2">&nbsp;<a href="play.asp?menu=sz">再来，呸，我就不相信这么倒霉~！</a></td>
           </tr>
           <tr class=tbbg1>
             <td colspan="2">&nbsp;<a href=play.asp target=_top>今天真倒霉，走~了，下次再玩~！</a></td>
           </tr>
         </table>
</center>
<%
points=rs("points")-points
end if

rs("points")=points
rs("charmpoint")=rs("charmpoint")-meili
rs("onlinetime")=clng(rs("onlinetime")/60-jinyan)*60
rs.update
%>
<hr size="1" width="250">
您现在有金钱：<font color="#CC0000"><b><%=rs("points")%></b></font><b> 元</b> 魅力：<%=rs("charmpoint")%>
<hr size="1" width="250">
       </td>
     </tr>
   </table>

</td>
</tr>
</table>
</center>
<%
end sub

sub setup()
 if not master then
   error2("您不是管理员，无权进入!")
   exit sub
 else
%>

<table cellpadding=3 cellspacing=1 align=center width="<%=DEF_BBS_ScreenWidth%>" class=TBone>
 <form method="POST" action="play.asp?menu=savesetup"> 
  <tr class=tbhead2>
   <td align=center colspan=2><b><font class=HeadFont>参 数 设 置</font></b></td>
  </tr>
  <tr class=tbbg1>
   <td align=right>最大下注数：</td>
   <td><input name=maxjinqian type=text value=<%=maxjinqian%>> &nbsp&nbsp<font color=red>*</font>设定每注最大赌注</td>
  </tr>
  <tr class=tbbg1>
   <td align=right>最小下注数：</td>
   <td><input name=minjinqian type=text value=<%=minjinqian%>> &nbsp&nbsp<font color=red>*</font>设定每注最小赌注</td>
  </tr>
  <tr class=tbbg1>
   <td align=right>魅力值：</td>
   <td><input name=meili type=text value=<%=meili%>> &nbsp&nbsp<font color=red>*</font>设定每次参赌消耗魅力值</td>
  </tr>
  <tr class=tbbg1>
   <td align=right>经验值：</td>
   <td><input name=jinyan type=text value=<%=jinyan%>> &nbsp&nbsp<font color=red>*</font>设定每次参赌消耗经验值</td>
  </tr>
  <tr class=tbbg1>
   <td align=right>赌骰子赔率：</td>
   <td><input name=py1 type=text value=<%=py1%>> &nbsp&nbsp<font color=red>*</font>设定赌骰子赔率</td>
  </tr>
  <tr class=tbbg1>
   <td align=right>猜点数赔率：</td>
   <td><input name=py2 type=text value=<%=py2%>> &nbsp&nbsp<font color=red>*</font>设定猜点数赔率</td>
  </tr>
  <tr class=tbbg1>
   <td align=right>赌围骰赔率：</td>
   <td><input name=py3 type=text value=<%=py3%>> &nbsp&nbsp<font color=red>*</font>设定赌围骰赔率</td>
  </tr>
  <tr class=tbbg1>
   <td align=right>赛马赔率：</td>
   <td><input name=py4 type=text value=<%=py4%>> &nbsp&nbsp<font color=red>*</font>设定赛马赔率</td>
  </tr>
  <tr class=tbbg1>
   <td colspan=2 align=center><input name=set type=submit value=" 确定 " <% If ObjInstalled=false Then response.write "disabled" %>></td>
  </tr>
  <%
    If ObjInstalled=false Then
       Response.Write "<tr class='tbbg1'><td height='40' colspan='2'><b><font color=red>你的服务器不支持 FSO(Scripting.FileSystemObject)! 不能使用本功能。<br>请直接修改“inc/const.asp”文件中的内容。</font></b></td></tr>"
    End If
  %>
 </form>
</table>

<%
 end if
end sub

sub savesetup()
   if not master then
     error2("您不是管理员，无权设置!")
     exit sub
   end if
   If ObjInstalled = False Then
       error2("你的服务器不支持 FSO(Scripting.FileSystemObject)!")
     exit sub
   end if
        dim fso,hf
	set fso=Server.CreateObject("Scripting.FileSystemObject")
	set hf=fso.CreateTextFile(Server.mappath("inc/const.asp"),true)
	hf.write "<" & "%" & vbcrlf
        hf.write vbcrlf
        hf.write "'◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆" & vbcrlf
        hf.write "'◆◆◆◆           社区赌场插件for leadbbs2.88由gafc改写                    ◆◆◆◆" & vbcrlf
        hf.write "'◆◆◆◆如你的服务器不支持FSO，请手动更改此文件，将数值设为你需要的数值即可 ◆◆◆◆" & vbcrlf
	hf.write "'◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆" & vbcrlf
        hf.write vbcrlf
        hf.write vbcrlf
        hf.write "Const maxjinqian=" & chr(34) & trim(request("maxjinqian")) & chr(34) & "       '限制每注最大赌注" & vbcrlf
	hf.write "Const minjinqian=" & chr(34) & trim(request("minjinqian")) & chr(34) & "        '限制每注最小赌注" & vbcrlf
	hf.write "Const MEILI=" & chr(34) & trim(request("MEILI")) & chr(34) & "              '每注花去魅力" & vbcrlf
	hf.write "Const jinyan=" & chr(34) & trim(request("jinyan")) & chr(34) & "             '每注花去经验" & vbcrlf
	hf.write "Const py1=" & chr(34) & trim(request("py1")) & chr(34) & "                '赌骰子赔率" & vbcrlf
	hf.write "Const py2=" & chr(34) & trim(request("py2")) & chr(34) & "                '猜点数赔率" & vbcrlf
	hf.write "Const py3=" & chr(34) & trim(request("py3")) & chr(34) & "              '赌围骰赔率" & vbcrlf
        hf.write "Const py4=" & chr(34) & trim(request("py4")) & chr(34) & "              '赛马赔率赔率" & vbcrlf
        hf.write "%" & ">"
	hf.close
	set hf=nothing
	set fso=nothing
%>
<table cellpadding=3 cellspacing=1 align=center width="<%=DEF_BBS_ScreenWidth%>" class=TBone>
  <tr class=tbhead2>
    <td align=center colspan=2><b><font class=HeadFont>参 数 设 置</font></b></td>
  </tr>
  <tr class=tbbg1>
    <td align=center height=120>参数设置成功！</td>
  </tr>
  <tr class=tbbg1>
    <td align=center><a href=play.asp>社区赌场</a>&nbsp&nbsp&nbsp&nbsp<a href=javascript:history.go(-1)>参数设置</a></td>
  </tr>
</table>
<%
end sub


'尾部信息
If GBL_TableBottomString <> "" Then %>
 <table width=<%=DEF_BBS_ScreenWidth%> border=0 cellspacing=0 cellpadding=0 align=center>
   <tr><td><%=GBL_TableBottomString%></td></tr>
 </table>
<% End If 
  SiteBottom 
   If GBL_SiteBottomString <> "" Then Response.Write GBL_SiteBottomString
rs.close
set rs=nothing
%>