<!--#include file="../inc.asp"-->
<!--#include file="../ydzq.asp"-->
<% Call head()
Call cardgame("赛马",yanse10)


if myid<>0 then
mz="[url=/bbs/uinfo.asp?id="&myid&"&amp;sid=[sid]&saytk=[saytk]]"&myni&"[/url]"
else
mz="游客"
end if
dim num,msg
num=request("num")
if num<>"" then
   num=Clng(num)
   if num>Clng(myjb) or Clng(myjb) < 1000 then
      msg="你的&#x91D1;&#x5E01;还不够赛马!"
      response.write msg & "<br/><a href='saima.asp?sid=" & sid & "&amp;saytk="&saytk&"'>重新赛过</a><br/>------------<br/><a href='index.asp?sid=" & sid & "'>返回</a>"
call head1()
	conn.close
	set objgbrs=nothing
	Set conn = Nothing
	response.end
   end if
   if num<1000 then
      msg="最低投注额为1000!"
      response.write msg & "<br/><a href='saima.asp?sid=" & sid & "&amp;saytk="&saytk&"'>重新赛过</a><br/>------------<br/><a href='index.asp?sid=" & sid & "'>返回</a>"
call head1()
	conn.close
	set objgbrs=nothing
	Set conn = Nothing
	response.end
   end if
   if num>10000 then
      msg="最高投注额为10000&#x91D1;&#x5E01;!"
      response.write msg & "<br/><a href='saima.asp?sid=" & sid & "&amp;saytk="&saytk&"'>重新赛过</a><br/>------------<br/><a href='index.asp?sid=" & sid & "'>返回</a>"
call head1()
	conn.close
	set objgbrs=nothing
	Set conn = Nothing
	response.end
   end if
  else
    msg="赛马可不是件容易的事哦!"
      response.write msg & "<br/><a href='saima.asp?sid=" & sid & "&amp;saytk="&saytk&"'>重新赛过</a><br/>------------<br/><a href='index.asp?sid=" & sid & "'>返回</a>"
call head1()
	conn.close
	set objgbrs=nothing
	Set conn = Nothing
	response.end
  end if
  if Clng(request("select"))>4 or Clng(request("select"))<1 then
      conn.Execute(sql)
      msg=" 数据非法"
      response.write msg & "<br/><a href='saima.asp?sid=" & sid & "&amp;saytk="&saytk&"'>重新赛过</a><br/>------------<br/><a href='index.asp?sid=" & sid & "'>返回</a>"
call head1()
	conn.close
	set objgbrs=nothing
	Set conn = Nothing
	response.end
  end if
Randomize
ds=Clng(request("select"))
d1=fix(rnd*4)+1
d2=fix(rnd*10)+1
d3=fix(rnd*10)+1
function redx()
d1=fix(rnd*4)+1
if d1>4 then redx
end function

if d2=1 and d3=1 or d2=6 and d3=6  then 
    response.write"赛马神童：送你10&#x91D1;&#x5E01;<br/>"
    sql="update users set myjb=myjb+10 where id="& myid
   conn.Execute(sql)
   end if 

if d2=2 and d3=2 or d2=7 and d3=7  then 
    response.write"赛马神童：送你2倍押金，开心吧？<br/>"
    sql="update users set myjb=myjb+ " & num & "*2 where id="& myid
   conn.Execute(sql)
   end if 
if d2=3 and d3=3 or d2=8 and d3=8  then 
    response.write"赛马神童：谁说十赛九输，我管你输还是赢，送你88&#x91D1;&#x5E01;。<br/>"
    sql="update users set myjb=myjb+88 where id="&myid
   conn.Execute(sql)
   end if 
if d2=4 and d3=4 or d2=9 and d3=9  then 
    response.write"赛马神童：恭喜恭喜，天上掉下了68&#x91D1;&#x5E01;，还不说声谢谢！<br/>"
    sql="update users set myjb=myjb+68 where id="& myid
   conn.Execute(sql)
   end if 
if d2=5 and d3=5 or d2=10 and d3=10  then 
    response.write"赛马神童：你押多少，我就送你多少好了。<br/>"
    sql="update users set myjb=myjb+" & num & " where id="& myjb
   conn.Execute(sql)
   end if 



if ds=d1 then
    conn.execute("insert into sqdt(shijian,dz)values('"&now&"','"&mz&"在(url=/bbs/game/saima.asp?sid=[sid]&saytk=[saytk])赛马(/url)中赢了：" & num*2 & "水点')")
     response.write "你押的是:<br/>" & ds & "号马<br/>跑的结果:<br/><img src='img1/" & d1 & ".gif' alt='" & d1 & "'/><br/>" & d1 & "号马胜出"
    response.write "<br/>恭喜恭喜！你赢了：" & num*2 & "&#x91D1;&#x5E01;" 
     sql="update users set myjb=myjb+" & num*2 & " where id="& myid
    conn.Execute(sql)
   else
response.write "你押的是:<br/>" & ds & "号马<br/>跑的结果:<br/><img src='img1/" & d1 & ".gif' alt='" & d1 & "'/><br/>" & d1 & "号马胜出"
      response.write "<br/>你输了：" & num & "&#x91D1;&#x5E01;"
     sql="update users set myjb=myjb-" & num & " where id="&myid
    conn.Execute(sql)
   end if
	conn.close
	set objgbrs=nothing
	Set conn = Nothing
response.write "<br/>--------<br/>"
Response.write "<br/><a href=""saima.asp?sid="&sid&"&amp;saytk="&saytk&""">继续游戏</a>"
Response.write "<br/><a href=""index.asp?sid="&sid&"&amp;saytk="&saytk&""">社区娱乐</a>"
Response.write "<br/><a href=""../index.asp?sid="&sid&"&amp;saytk="&saytk&""">社区首页</a>"
Response.write "<br/><a href=""/index.asp?sid="&sid&"&amp;saytk="&saytk&""">网站首页</a><br/>"
call head1()%>