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

<%call head()
'==============================
call saycardd("砸金蛋结果")

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>8 then 
  Call Error("数字无效！必须1-16中的数字")
  end if
Function RndNumber(Min,Max) 
Randomize 
RndNumber=Int((Max - Min + 1) * Rnd() + Min) 
End Function 
dx=RndNumber(1,8)
jb=clng(num*8)
dim rsd
set rsd=server.CreateObject("ADODB.RecordSet")
rsd.open "select ID from users where id = "&myid&" and zdsj >= '"&DateAdd("s", -60*60, Now())&"'",conn,1,1
if not rsd.eof then
  rsd.close
 set rsd=Nothing
  Call Error("每1小时只能砸蛋一次!!!!<br/>您上次砸蛋的时间是:"&zdsj&"")
END IF
rsd.close
set rsd=Nothing

if clng(dx)=clng(num1) then 
response.write "<img src='/bbs/game/img/Win.gif' alt='中奖啦'/><br/>"

       conn.Execute("update users set myjb=myjb+"&jb&",zdsj='"&now&"' where id="&myid)
if myid<>0 then
mz="[url=/bbs/uinfo.asp?id="&myid&"&sid=[sid]&saytk=[saytk]]"&myni&"[/url]"
else
mz="游客"
end if
conn.execute("insert into sqdt(shijian,dz)values('"&now&"','"&mz&"在(url=/bbs/zd/index.asp?sid=[sid]&saytk=[saytk])砸蛋(/url)砸到了金蛋耶~~获得"&jb&getcent&"')")
response.write "哇噻~眼前一片金光四射！恭喜您砸到金蛋啦！<br/>"
response.write "本次奖金:"&jb&"<br/>"
else
if myid<>0 then
mz="[url=/bbs/uinfo.asp?id="&myid&"&sid=[sid]&saytk=[saytk]]"&myni&"[/url]"
else
mz="游客"
end if
conn.execute("insert into sqdt(shijian,dz)values('"&now&"','"&mz&"在(url=/bbs/zd/index.asp?sid=[sid]&saytk=[saytk])砸蛋(/url)砸到了一堆粪土，扣除血本"&num&getcent&"')")
response.write "<img src='fentu.gif' alt='粪土'/>很遗憾，您砸到了一堆粪土！扣除血本:"&num&getcent&"别灰心！下次金蛋就是您的了！<br/>"
       conn.Execute("update users set myjb=myjb-"&num&",zdsj='"&now&"' where id="&myid)
end if
conn.close
Set conn = Nothing
response.write "--------<br/>"
Response.write "<a href=""index.asp?sid="&sid&"&amp;saytk="&saytk&""">继续砸蛋</a>"
Response.write "<br/><a href=""/bbs/game/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><br/>(c) "&Request.ServerVariables("SERVER_NAME")&"["&String(2-Len(hour(now)),"0") & hour(now) &":"&String(2-len(minute(now)),"0") & minute(now)&"]"
call headsay()%>