<!--#include file="../inc.asp"-->
<!--#include file="../ydzq.asp"-->

<% call head()
Call saycarda("挖宝结果")

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>999999 then 
  Call Error("押金最高999999,大赌伤身呀！")
  end if
if myjb<num then

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

if num1<1 or num1>16 then 
  Call Error("数字无效！必须1-16中的数字")
  end if
Function RndNumber(Min,Max) 
Randomize 
RndNumber=Int((Max - Min + 1) * Rnd() + Min) 
End Function 
dx=RndNumber(1,16)
jb=clng(num*16)
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)
if myid<>0 then
mz="[url=/bbs/uinfo.asp?id="&myid&"&amp;sid=[sid]]"&myni&"[/url]"
else
mz="游客"
end if
conn.execute("insert into sqdt(shijian,dz)values('"&now&"','"&mz&"在"&dx&"号(url=/bbs/game/wabao.asp?sid=[sid])宝箱(/url)中找到"&jb&"个"&getcent&"')")
response.write "恭喜您，挖到宝藏啦！<br/>"
response.write "挖宝结果:宝藏藏在"&dx&"号宝箱<br/>本次奖金:"&jb&"<br/>"
response.write "您打开了:"&num1&"号宝箱<br/>"
else
response.write "挖宝结果:宝藏藏在"&dx&"号宝箱<br/>"
response.write "您打开了"&num1&"号宝箱<br/>"
response.write "很遗憾，你没有挖中！<br/>扣除血本:"&num&getcent&"别灰心！下次大奖就是您的了！<br/>"
       conn.Execute("update users set myjb=myjb-"&num&" where id="&myid)
end if
response.write "--------<br/>"
Response.write "<a href=""wabao.asp?sid="&sid&"&amp;saytk="&saytk&""">继续挖宝</a>"
Response.write "<br/><a href=""index.asp?sid="&sid&"&amp;saytk="&saytk&""">返回娱乐游戏中心</a><br/>"
Response.write "<a href=""../show.asp?sid="&sid&"&amp;saytk="&saytk&""">空间</a>&gt;&gt;<a href=""/bbs/index.asp?sid="&sid&"&amp;saytk="&saytk&""">社区</a>>>"
Response.write "<a href=""/index.asp?sid="&sid&"&amp;saytk="&saytk&""">首页</a>"
'(c) "&Request.ServerVariables("SERVER_NAME")&"["&String(2-Len(hour(now)),"0") & hour(now) &":"&String(2-len(minute(now)),"0") & minute(now)&"]"
response.write"<br/>"&zqfjs&""
Call headsay()
%>