📄 hqtgame02_101.asp
字号:
<%@ LANGUAGE=VBScript codepage ="936" %>
<%
Response.Buffer = True
Response.Expires = 0
Response.CacheControl = "Private"
Sub Msg (v)
Response.Write "<html><head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><title>二十一点</title><meta http-equiv='pragma' content='no-cache'><style type=text/css>body{color:black;font-family:宋体;font-size:9pt;background-color:buttonface;border-bottom:medium none;border-left:medium none;border-right:medium none;border-top:medium none;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px}</style></head><body leftMargin=0 topMargin=0 marginheight=0 marginwidth=0>"
Response.Write "<script Language=JavaScript>alert('" & v & "');window.close();</script></body></html>"
Response.End
End Sub
nickname=Session("hxf_u_nickname")
If Session("hxf_u_inthechat") = "" Then Msg "您尚未登录,不能进行游戏。"
If nickname = "" Then Msg "您尚未登录,不能进行游戏。"
If nickname = "聊天室管理员" Then Msg "不能以聊天室管理员的身份进行游戏。"
If Session("hxf_g_game02") <> "" Then Response.Redirect "hqtgame02_102.asp"
n = Year(Date)
y = Month(Date)
r = Day(Date)
s = Hour(Time())
f = Minute(Time())
m = Second(Time())
If Len(y) = 1 Then y = "0" & y
If Len(r) = 1 Then r = "0" & r
If Len(s) = 1 Then s = "0" & s
If Len(f) = 1 Then f = "0" & f
If Len(m) = 1 Then m = "0" & m
sj = n & "-" & y & "-" & r & " " & s & ":" & f & ":" & m
playgametime = Request.Cookies("HqtChatLimit")("playgametime")
If IsDate(playgametime) Then
If DateDiff("n", playgametime, sj) < 3 Then Msg "两次进行游戏的时间间隔必须大于 3 分钟!"
End If
f1 = Request.Form("f1")
If f1 = "" Then Msg "请输入下注金额!"
If Not IsNumeric(f1) Then Msg "下注金额必须为数字!"
f1 = Int(f1)
If f1 < 10 Or f1 > 300 Then Msg "下注金额必须是大于 10 且小于 300 的整数!"
If Int(Session("hxf_u_hb")) < f1 Then Msg "您的货币不足以下注!"
If f1 * 2 > Application("wsaxhxf_c_chatmoney") Then Msg "聊天室资金库不足,暂时不能进行此游戏!"
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
connstr=Application("wsaxhg_connstr")
conn.open connstr
sql = "SELECT hb FROM reginfo WHERE kill = '0' AND username = '" & nickname & "'"
rs.open sql, conn, 1, 3
If rs.Eof And rs.Bof Then
rs.Close
conn.Close
Set rs = Nothing
Set conn = Nothing
Msg "用户名“" & nickname & "”不存在,不能进行游戏!"
End If
yhb = rs("hb")
If yhb < f1 Then
rs.Close
conn.Close
Set rs = Nothing
Set conn = Nothing
Msg "您的货币不足以下注!"
End If
yhb = yhb - f1
rs("hb") = yhb
rs.Update
rs.Close
Session("hxf_u_hb") = yhb
sql = "SELECT value FROM system WHERE name = 'chatmoney'"
rs.open sql, conn, 1, 3
chatmoney = rs("value")
chatmoney = Int(chatmoney) + f1
rs("value") = chatmoney
rs.Update
rs.Close
conn.Close
Set rs = Nothing
Set conn = Nothing
Application.Lock
Application("wsaxhxf_c_chatmoney") = chatmoney
Application.UnLock
card = "AW,AX,AY,AZ,2W,2X,2Y,2Z,3W,3X,3Y,3Z,4W,4X,4Y,4Z,5W,5X,5Y,5Z,6W,6X,6Y,6Z,7W,7X,7Y,7Z,8W,8X,8Y,8Z,9W,9X,9Y,9Z,10W,10X,10Y,10Z,JW,JX,JY,JZ,QW,QX,QY,QZ,KW,KX,KY,KZ"
card = RndRank(card, ",", 1000)
Dim game(6)
game(0) = f1
game(1) = card
game(2) = -1
game(3) = 0
game(4) = 0
game(5) = ""
game(6) = ""
Function RndRank (p_source, p_list, p_times)
p_spsource = Split(p_source, p_list)
ubp_spsource = UBound(p_spsource) + 1
Randomize
For p_i = 1 To p_times
p_x1 = Int(Rnd * ubp_spsource)
p_x2 = Int(Rnd * ubp_spsource)
p_tempf1 = p_spsource(p_x1)
p_spsource(p_x1) = p_spsource(p_x2)
p_spsource(p_x2) = p_tempf1
Next
RndRank = Join(p_spsource, p_list)
End Function
Session("hxf_g_game02") = Join(game, "|")
Response.Cookies("HqtChatLimit")("playgametime") = sj
Response.Redirect "hqtgame02_102.asp"
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -