?? match.asp
字號:
<!-- #include file="conn.asp" -->
<%h1="艾基腦"
h2="馬虎"
h3="赤馬尾"
h4="瑪雅俠"
h5="雷電"
h6="蒙面怪客"
h7="NASAKI"
h8="極度兇獸"
%>
<head><title>賭馬馬場</title>
<META content=text/html; charset=gb2312 http-equiv=Content-Type>
<STYLE>
#Layer0 {
HEIGHT: 20px; LEFT: -100px; POSITION: absolute; TOP: -100px; WIDTH: 60px; Z-INDEX: 10
}
#Layer1 {
HEIGHT: 20px; LEFT: -100px; POSITION: absolute; TOP: -100px; WIDTH: 60px; Z-INDEX: 20
}
#Layer2 {
HEIGHT: 20px; LEFT: -100px; POSITION: absolute; TOP: -100px; WIDTH: 60px; Z-INDEX: 30
}
#Layer3 {
HEIGHT: 20px; LEFT: -100px; POSITION: absolute; TOP: -100px; WIDTH: 60px; Z-INDEX: 40
}
#Layer4 {
HEIGHT: 20px; LEFT: -100px; POSITION: absolute; TOP: -100px; WIDTH: 60px; Z-INDEX: 50
}
#Layer5 {
HEIGHT: 20px; LEFT: -100px; POSITION: absolute; TOP: -100px; WIDTH: 60px; Z-INDEX: 60
}
#Layer6 {
HEIGHT: 20px; LEFT: -100px; POSITION: absolute; TOP: -100px; WIDTH: 60px; Z-INDEX: 60
}
#Layer7 {
HEIGHT: 20px; LEFT: -100px; POSITION: absolute; TOP: -100px; WIDTH: 60px; Z-INDEX: 60
}
BODY {
FONT-SIZE: 9pt; LINE-HEIGHT: 13pt; WORD-SPACING: normal
}
P {
FONT-SIZE: 9pt; LINE-HEIGHT: 13pt; WORD-SPACING: normal
}
TD {
FONT-SIZE: 9pt; LINE-HEIGHT: 13pt; WORD-SPACING: normal
}
</STYLE>
<style type="text/css">
select, input{font-size:9pt}
td{height:35;background:#ffffff;color:#ffffff;font-size:14}
</style>
</head>
<%
horseto=0
win=Request.Form("win")
if win="" then%>
<script language="vbscript">
msgbox "對不起,您沒有選擇馬匹!"
location.href = "horse.asp"
</script>
<%else
pledge=Request.Form("pledge")
if not isnumeric(pledge) then%>
<script language="vbscript">
msgbox "請輸入數(shù)字!"
location.href = "horse.asp"
</script>
<%
elseif int(pledge) - pledge <>0 then
%>
<script language="vbscript">
msgbox "請輸入整數(shù)!"
location.href = "horse.asp"
</script>
<%
elseif pledge < 10 then
%>
<script language="vbscript">
msgbox "對不起,您的賭注太小,賭注下限是10NG!"
location.href = "horse.asp"
</script>
<%
elseif pledge >999 then
%>
<script language="vbscript">
msgbox "別玩的過火了,賭注上限是999NG!"
location.href = "horse.asp"
</script>
<%
else
dim horse(7)
for i=0 to 7
horse(i)=Request.Form("horse"&i)
if i= win-1 then
horse(i)=pledge
else horse(i)=0
end if
for j=1 to len(horse(i))
tmpasc=asc(mid(horse(i),j,1))
if tmpasc<48 or tmpasc>57 then
horse(i)=0
exit for
end if
next
horseto=horseto+horse(i)
next
horse(win-1)=pledge
if request.cookies(cn)("lgname") ="" then
%>
<script language="vbscript">
msgbox "您怎么跑到這里來的?!"
location.href = "login.asp"
</script>
<%
else
set rst=server.CreateObject ("adodb.recordset")
sqlstr="select * from user where name='"&request.cookies(cn)("lgname")&"' and int(qian)>="&horseto&""
rst.open sqlstr,myconn
if rst.EOF or rst.BOF then
%>
<script language="vbscript">
msgbox "您的現(xiàn)金不夠!"
location.href = "index.asp"
</script>
<%
else
rst.Close
set rst=nothing
sqlstr="update user set qian=qian-"&pledge&" where name='"&request.cookies(cn)("lgname")&"'"
myconn.Execute sqlstr
myconn.Close
%>
<SCRIPT language=JavaScript>
xcoor = new Array(10,10,10,10,10,10,10,10);
ycoor = new Array(60,95,125,160,195,230,265,300,335);
function doplay()
{
var x
for(j=0;j<8;j++){
x=Math.floor(10*Math.random());
xcoor[j] = xcoor[j] + x;
if ( xcoor[j] >= 600) {
document.form1.horsewin.value=j;
document.form1.prize.value='<%=horse(j)%>';
setTimeout('document.form1.submit()',1500);
return;
}
eval('document.all'+'["Layer'+j+'"]'+'.style.left='+xcoor[j]);
eval('document.all'+'["Layer'+j+'"]'+'.style.top='+ycoor[j]);
}
setTimeout('doplay()',100);
}
</SCRIPT>
<body onload=doplay() bgcolor=#FFFFFF>
<DIV id=Layer0><DD><IMG src=horse_img/h1.gif > </DD></DIV>
<DIV id=Layer1><DD><IMG src=horse_img/h2.gif > </DD></DIV>
<DIV id=Layer2><DD><IMG src=horse_img/h3.gif > </DD></DIV>
<DIV id=Layer3><DD><IMG src=horse_img/h4.gif > </DD></DIV>
<DIV id=Layer4><DD><IMG src=horse_img/h5.gif > </DD></DIV>
<DIV id=Layer5><DD><IMG src=horse_img/h6.gif > </DD></DIV>
<DIV id=Layer6><DD><IMG src=horse_img/h7.gif > </DD></DIV>
<DIV id=Layer7><DD><IMG src=horse_img/h8.gif > </DD></DIV>
<%
dim horsename(8)
horsename(1)=h1
horsename(2)=h2
horsename(3)=h3
horsename(4)=h4
horsename(5)=h5
horsename(6)=h6
horsename(7)=h7
horsename(8)=h8
win=Request.Form("win")
pledge=Request.Form("pledge")
%>
<form method="post" action="result.asp" id=form1 name=form1>
<table width=750 border=1 bgcolor=#ffffff cellpadding="3" cellspacing="0">
<tr bordercolor="#000099">
<td colspan=4 align=center style="background:#ffffff;color:#000000">
<div align="left"><b>比賽開始:</b><br>
您選擇的是 <font color="#FF0000"><b><%=win%></b></font> 號馬 <font color="#FF0000"><b><%=horsename(win)%></b></font>,投注額為 <font color="#FF0000"><b><%=pledge%></b></font> NG。</font></div>
</td>
</tr>
<tr bgcolor="#FFFFFF" bordercolor="#000099">
<td width=14 valign="middle" align="center" height="20"><font color="#000099">1</font></td>
<td width="624"> <font color="#000099">
<input type=hidden readonly maxlength=3 size=3 name="horse0" value='<%=horse(0)%>'>
</font></td>
<td width=86 height="7%" align="center">
<font color="#000099"><%=h1%></font>
</td>
</tr>
<tr bgcolor="#FFFFFF" bordercolor="#000099">
<td width="14" valign="middle" align="center" height="20"><font color="#000099">2</font></td>
<td width="624"> <font color="#000099">
<input type=hidden readonly maxlength=3 size=3 name="horse1" value='<%=horse(1)%>'>
</font></td>
<td width="86" height="7%" align="center">
<font color="#000099"><%=h2%></font>
</td>
</tr>
<tr bgcolor="#FFFFFF" bordercolor="#000099">
<td width="14" valign="middle" align="center" height="20"><font color="#000099">3</font></td>
<td width="624"> <font color="#000099">
<input type=hidden readonly maxlength=3 size=3 name="horse2" value='<%=horse(2)%>'>
</font></td>
<td width="86" height="7%" align="center">
<font color="#000099"><%=h3%></font>
</td>
</tr>
<tr bgcolor="#FFFFFF" bordercolor="#000099">
<td width="14" valign="middle" align="center" height="20"><font color="#000099">4</font></td>
<td width="624"> <font color="#000099">
<input type=hidden readonly maxlength=3 size=3 name="horse3" value='<%=horse(3)%>'>
</font></td>
<td width="86" height="7%" align="center">
<font color="#000099"><%=h4%></font>
</td>
</tr>
<tr bgcolor="#FFFFFF" bordercolor="#000099">
<td width="14" valign="middle" align="center" height="20"><font color="#000099">5</font></td>
<td width="624"> <font color="#000099">
<input type=hidden readonly maxlength=3 size=3 name="horse4" value='<%=horse(4)%>'>
</font></td>
<td width="86" height="7%" align="center">
<font color="#000099"><%=h5%></font>
</td></tr><tr bgcolor="#FFFFFF" bordercolor="#000099">
<td width="14" valign="middle" align="center" height="20"><font color="#000099">6</font></td>
<td width="624"> <font color="#000099">
<input type=hidden readonly maxlength=3 size=3 name="horse5" value='<%=horse(5)%>'>
</font></td>
<td width="86" height="7%" align="center">
<font color="#000099"><%=h6%></font>
</td>
</tr>
<tr bgcolor="#FFFFFF" bordercolor="#000099">
<td width="14" valign="middle" align="center" height="20"><font color="#000099">7</font></td>
<td width="624"> <font color="#000099">
<input type=hidden readonly maxlength=3 size=3 name="horse6" value='<%=horse(6)%>'>
</font></td>
<td width="86" height="7%" align="center">
<font color="#000099"><%=h7%></font>
</td>
</tr>
<tr bgcolor="#FFFFFF" bordercolor="#000099">
<td width="14" valign="middle" align="center" height="20"><font color="#000099">8</font></td>
<td height="31" width="624"> <font color="#000099">
<input type=hidden readonly maxlength=3 size=3 name="horse7" value='<%=horse(7)%>'>
</font></td>
<td width="86" height="7%" align="center">
<font color="#000099"><%=h8%></font>
</td>
</tr>
<tr width=100% bgcolor="#FFFFFF" bordercolor="#000099">
<input type=hidden maxlength=3 size=3 name="horsewin" value='<%=horseto%>'>
<input type=hidden maxlength=3 size=3 name="prize" value='<%=horseto%>'>
</tr>
</table>
</FORM>
</body>
<% end if
end if
end if
end if%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -