<!--#include file="../inc.asp"-->
<!--#include file="../ydzq.asp"-->
<% Call head()
Call cardgame("49选1",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,num1,jb,dx
num=Request("num")
num1=Request("num1")
if num="" or num=<0 or IsNumeric(num)=False then
  Call Error("押金无效！")
  end if
num=clng(num)
if num>100000 then 
  Call Error("押金最高100000,大赌伤身呀！")
  end if
if num<1000 then 
  Call Error("押金最低1000！")
  end if
if myjb<num then

  Call Error("呵呵！你的"&getcent&"不够啊！")
  end if

if num1<1 or num1>49 then 
  Call Error("数字无效！必须1-49中的数字")
  end if
Function RndNumber(Min,Max) 
Randomize 
RndNumber=Int((Max - Min + 1) * Rnd() + Min) 
End Function 
dx=RndNumber(1,49)
jb=clng(num*42)
if clng(dx)=clng(num1) then 
response.write "<img src='img/Win.gif' alt='中奖啦'/><br/>"

       conn.Execute("update users set myjb=myjb+"&jb&" where id="&myid)

response.write "恭喜您，中奖啦！<br/>奖金:"&j&""
response.write "开奖结果:"&dx&"<br/>本次奖金:"&jb&"<br/>"
response.write "你的投注数字为:"&num1&"<br/>"
conn.execute("insert into sqdt(shijian,dz)values('"&now&"','"&mz&"在(url=/bbs/game/49.asp?sid=[sid]&saytk=[saytk])49选1(/url)中奖了！获得奖金"&jb&"。。')")
else
conn.execute("insert into sqdt(shijian,dz)values('"&now&"','"&mz&"在(url=/bbs/game/49.asp?sid=[sid]&saytk=[saytk])49选1(/url)投注数字为:"&num1&"，扣除血本:"&num&getcent&"')")
response.write "开奖结果:"&dx&"<br/>本次奖金:"&jb&"<br/>"
response.write "你的投注数字为:"&num1&"<br/>"
response.write "很遗憾，你没有没有中奖！<br/>扣除血本:"&num&getcent&"<br/>"
       conn.Execute("update users set myjb=myjb-"&num&" where id="&myid)
end if
conn.close
set conn=nothing
response.write "--------<br/>"
Response.write "<a href=""49.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()%>