<!--#include file="../Inc.asp"-->
<!--#include file="../ydzq.asp"-->
<!--#include file="conn.asp"-->
<%

call head()

Call cardgame("我要吹牛",yanse6)


dim paycent,about,about1,about2,num,TP
paycent=usb(request("paycent"))
about=usb(request("about"))
about1=usb(request("about1"))
about2=usb(request("about2"))
num=usb(request("num"))
TP=usb(request("TP"))

if TP="ok" then
if paycent="" or Isnumeric(paycent)=False then
  Call Error("下注数额无效！")
  end if

if about="" or about1="" or about2="" then
  Call Error("请正确填写，各项都不能为空！")
  end if
if num="" or Isnumeric(num)=False then
  Call Error("答案选择无效！")
  end if
  
if abs(int(paycent))>abs(int(bigpay)) then
  Call Error("为了增强互动性，每个投注最多"&abs(int(bigpay))&getcent&"！")
  end if
if abs(int(paycent))<abs(int(smallpay)) then 
 Call Error("为了增强互动性，每个投注最少"&abs(int(smallpay))&getcent&"！")
  end if
  
if myjb<abs(int(payCent)) then
  Call Error("您的"&getcent&"不足本次投注！")
  end if



set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from YD_jd where DateDiff('s',times, Now())>=-10 and useid="&myid,ydzqconn,1,2
'if not rs.eof then
  'Call Error("操作太快，请等待10秒再进行吹牛！")
  'end if
rs.addnew
rs("num")=num
rs("about")=about
rs("about1")=about1
rs("about2")=about2
rs("useid")=myid
rs("payCent")=payCent
rs("times")=now()
rs.update
rs.close
set rs=nothing

conn.execute("update Users set myjb=myjb-"&abs(int(payCent))&" where ID="&myid)

response.write "您成功说了一句吹牛！系统扣除您的"&payCent&getcent&"！<br/>"
response.write"<br/><a href=""index.asp?saytk="&saytk&"&amp;sid="&sid&""">继续吹牛>></a>"
else





Response.write "您目前共有"&myjb&getcent&"<br/>"
Response.write "特别提醒,请文明说吹牛,快乐赚"&getcent&"!<br/>"
If saytk>1 then
%><form name="form" method="post" action="pkdh.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>">
<%End if


Response.write "请输入您的下注额:(最低"&smallpay&",最高"&bigpay&")<br/>"

Response.write"<input name=""paycent"" emptyok=""true"" format=""*N"" value="""&smallpay&"""/>"&getcent&"<br/>"

Response.write "请输入您的吹牛(如:我比周杰伦还帅):<br/><input name=""about"" emptyok=""true"" maxlength=""50""/><br/>"
Response.write "请输入答案一<br/>"
Response.write "<input name=""about1"" emptyok=""true"" format=""*N"" maxlength=""30""/><br/>"
Response.write "请输入答案二<br/>"
Response.write "<input name=""about2"" emptyok=""true"" format=""*N"" maxlength=""30""/><br/>"
Response.write "<select name=""num"" value=""1"">"
Response.write "<option value=""1"">第一个是正确</option>"
Response.write "<option value=""2"">第二个是正确</option>"
Response.write "</select><br/>"
If saytk>1 then
response.write "<input type=""hidden"" name=""TP"" value=""ok""/>"
response.write "<input type=""submit"" name=""Submit"" value=""OK!决定了""></form><br/>"
else
response.write "<anchor>OK!决定了"
response.write "<go href=""pkdh.asp?saytk="&saytk&"&amp;sid="&sid&""" method=""post"" accept-charset=""utf-8"">"
response.write "<postfield name=""paycent"" value=""$(paycent)""/>"
response.write "<postfield name=""about"" value=""$(about)""/>"
response.write "<postfield name=""about1"" value=""$(about1)""/>"
response.write "<postfield name=""about2"" value=""$(about2)""/>"
response.write "<postfield name=""num"" value=""$(num)""/>"
response.write "<postfield name=""TP"" value=""ok""/>"
response.write "</go></anchor><br/>"
End if
response.write "如果其它友友选对答案,您的赌注就要输光哦,如果选错,您将获得您赌注的90%"&getcent&""
end if

conn.close
set conn=nothing
ydzqconn.close
set ydzqconn=nothing

%>
<!--#include file="fanhui.asp"-->
<%
call headsay()
%>
