⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gambling.asp

📁 论坛建站的源代码
💻 ASP
📖 第 1 页 / 共 2 页
字号:
					</tr>
					<tr align="center">
						<td>金额</td>
						<td><input type="text" name="PlayMoney1" size="5" value="0" /></td>
						<td><input type="text" name="PlayMoney2" size="5" value="0" /></td>
						<td><input type="text" name="PlayMoney3" size="5" value="0" /></td>
						<td><input type="text" name="PlayMoney4" size="5" value="0" /></td>
						<td><input type="text" name="PlayMoney5" size="5" value="0" /></td>
						<td><input type="text" name="PlayMoney6" size="5" value="0" /></td>
					</tr>
				</table>
			</td>
		</tr>
		<tr class="CommonListCell">
			<td align="center"><input type="submit" value="确 定" /></td>
		</tr>
	</table>
</form>
<%
end sub



sub GuessNumber3Result
	Computer1=fix(rnd*6)+1
	Computer2=fix(rnd*6)+1
	Computer3=fix(rnd*6)+1
	
			
	PlayMoney=0
	i=0
	Do While i < 6
		i=i+1
		TempMoney=RequestInt("PlayMoney"&i)
		if TempMoney>0 then
			TotlePlayMoney=TotlePlayMoney+TempMoney
			PlaySelectList=PlaySelectList&"<Img src=images/plus/dice"&i&".gif title='"&TempMoney&" 金币' > "
			
			StartMoney=PlayMoney
			if i=Computer1 then PlayMoney=PlayMoney+TempMoney
			if i=Computer2 then PlayMoney=PlayMoney+TempMoney
			if i=Computer3 then PlayMoney=PlayMoney+TempMoney
			if StartMoney=PlayMoney then PlayMoney=PlayMoney-TempMoney '如果没中就扣钱
			
		end if
	loop
	
	
	if Request_Method <> "POST" then Alert("提交方式错误!您本次使用的是"&Request_Method&"提交方式!")
	if TotlePlayMoney < 10 then Alert("最少赌注不能少于10金币")
	if TotlePlayMoney > 500 then Alert("最大赌注不能超过500金币")
	if TotlePlayMoney > CookieUserMoney then Alert("你的金币不够!")

%> <br />
<table border="0" cellpadding="3" width="500" cellspacing="1" class="CommonListArea">
	<tr class="CommonListTitle">
		<td align="center">你的下注</td>
	</tr>
	<tr>
		<td align="center" class="CommonListCell"><%=PlaySelectList%> </td>
	</tr>
	<tr class="CommonListTitle">
		<td align="center">结果</td>
	</tr>
	<tr>
		<td align="center" class="CommonListCell">
		<img src="images/plus/dice<%=Computer1%>.gif" />
		<img src="images/plus/dice<%=Computer2%>.gif" />
		<img src="images/plus/dice<%=Computer3%>.gif" /> <br />
		</td>
	</tr>
	<tr class="CommonListCell">
		<td align="center" height="50"><%
	if PlayMoney=0 then
		%><font size="3">本局持平</font><%
	elseif PlayMoney>0 then

		%><font size="3">恭喜,你赢了 <b><font color="CC0000"><%=PlayMoney%></font> 金币</b></font><%	
	else
		%><font size="3">很遗憾,你输了 <b><font color="CC0000"><%=Abs(PlayMoney)%> </font> 金币</b></font><%	
end if

Execute("update ["&TablePrefix&"Users] Set UserMoney=UserMoney+"&PlayMoney&" where UserID="&CookieUserID&"")

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




sub GuessNumber50
%> <br />
<form method="POST" action="?" name="form" >
	<input type="hidden" name="menu" value="GuessNumber50Result" />
	<table border="0" cellspacing="1" cellpadding="5" width="600" class="CommonListArea">
		<tr align="center" class="CommonListTitle">
			<td width="33%">赌 数 字</td>
		</tr>
		<tr align="center" class="CommonListCell">
			<td width="33%"><div style="float:left">快速选择:<input type="radio" value="Big" id="FastSelectType"  name="FastSelectType" />大 <input type="radio" value="Small" id="FastSelectType" name="FastSelectType" />小 <input type="radio" value="One" id="FastSelectType" name="FastSelectType" />单 <input type="radio" id="FastSelectType" value="Two" name="FastSelectType" />双</div>
			
			<div style="float:right"><input type=text id=PlayMoney name=PlayMoney size=5 value=500 /> 
				<input type="button" value="快速压注" onclick="FastSelect()" /></div></td>
		</tr>
		<tr class="CommonListTitle">
			<td width="960" align="center">请 下 注</td>
		</tr>
		<tr class="CommonListCell">
			<td align="center">
			<div align="center">
				<table border="0" cellspacing="0" cellpadding="5" width="100%">
<%
	i=0
	Do While i < 50

		if i mod 10 = 0 then response.write "<tr align=center>"
		i=i+1
response.write "<td><b>"&i&"</b><br /><input type=text id=PlayMoney"&i&" name=PlayMoney"&i&" size=5 value=0 /></td>"

		if i mod 10 = 0 then response.write "</tr>"
			loop
%>


				</table>
			</div>
			</td>
		</tr>
		<tr class="CommonListCell">
			<td align="center"><input type="submit" value="确 定" /></td>
		</tr>
	</table>
</form>



<script language="JavaScript" type="text/javascript">
function FastSelect(){

PlayMoney=$("PlayMoney").value

var FastSelectType;
var FormObject = document.forms["form"];
for (var i=0;i<FormObject.elements["FastSelectType"].length;i++) {
	if(FormObject.elements["FastSelectType"][i].checked){   
		FastSelectType=FormObject.elements["FastSelectType"][i].value;
		break;
	}
}

if (!FastSelectType){alert("你没有选择快速压注的类型")}

if (FastSelectType=="One"){
	for (var i=1; i <= 50; i++) {
	if(i % 2  == 1){
			$("PlayMoney"+i).value= PlayMoney/25;
		}else{
			$("PlayMoney"+i).value= 0;
		}
	}
}

if (FastSelectType=="Two"){
	for (var i=1; i <= 50; i++) {
	if(i % 2  == 0){
			$("PlayMoney"+i).value= PlayMoney/25;
		}else{
			$("PlayMoney"+i).value= 0;
		}
	}
}


if (FastSelectType=="Big"){

	for (var i=1; i <= 25; i++) {
	$("PlayMoney"+i).value= 0;
	}
	
	for (var i=26; i <= 50; i++) {
	$("PlayMoney"+i).value= PlayMoney/25;
	}

}



if (FastSelectType=="Small"){
	for (var i=1; i <= 25; i++) {
	$("PlayMoney"+i).value= PlayMoney/25;
	}
	for (var i=26; i <= 50; i++) {
	$("PlayMoney"+i).value= 0;
	}
}

}
</script>

<%
end sub



sub GuessNumber50Result
	Computer=fix(rnd*50)+1

	PlayMoney=0
	i=0
	Do While i < 50
		i=i+1
		TempMoney=RequestInt("PlayMoney"&i)
		if TempMoney>0 then

			TotlePlayMoney=TotlePlayMoney+TempMoney
			PlaySelectList=PlaySelectList&"<b><font size=5 title='"&TempMoney&" 金币'>"&i&"</font></b> "
			
			StartMoney=PlayMoney
			if i=Computer then PlayMoney=PlayMoney+TempMoney*40
			if StartMoney=PlayMoney then PlayMoney=PlayMoney-TempMoney '如果没中就扣钱
			
		end if
	loop
	
	
	if Request_Method <> "POST" then Alert("提交方式错误!您本次使用的是"&Request_Method&"提交方式!")
	if TotlePlayMoney<10 then Alert("最少赌注不能少于10金币")
	if TotlePlayMoney>5000 then Alert("最大赌注不能超过5000金币")
	if TotlePlayMoney > CookieUserMoney then Alert("你的金币不够!")

%> <br />
<table border="0" cellpadding="3" width="500" cellspacing="1" class="CommonListArea">
	<tr class="CommonListTitle">
		<td align="center">你的下注</td>
	</tr>
	<tr>
		<td align="center" class="CommonListCell"><%=PlaySelectList%> </td>
	</tr>
	<tr class="CommonListTitle">
		<td align="center">结果</td>
	</tr>
	<tr>
		<td align="center" class="CommonListCell"><b><font size=7><%=Computer%></font></b>
		</td>
	</tr>
	<tr class="CommonListCell">
		<td align="center" height="50"><%
	if PlayMoney=0 then
		%><font size="3">本局持平</font><%
	elseif PlayMoney>0 then

		%><font size="3">恭喜,你赢了 <b><font color="CC0000"><%=PlayMoney%></font> 金币</b></font><%	
	else
		%><font size="3">很遗憾,你输了 <b><font color="CC0000"><%=Abs(PlayMoney)%> </font> 金币</b></font><%	
end if

Execute("update ["&TablePrefix&"Users] Set UserMoney=UserMoney+"&PlayMoney&" where UserID="&CookieUserID&"")

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


%> 

<hr width="250" size="1" />您现在身上共有 <b><font color="CC0000"><%=Execute("Select UserMoney from ["&TablePrefix&"Users] where UserName='"&CookieUserName&"'")(0)%></font> 
金币</b><br />
<hr width="250" size="1" /><br />
<input onclick="history.back()" type="button" value=" &lt;&lt; 返 回 " /> <br />

<%
HtmlBottom
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -