📄 count_result_tm.asp
字号:
<!--#include file="mConn.asp"-->
<!--#include file="sk2.asp"-->
<!--#include file="mConst.asp"-->
<%'计算特别号
If Session("SK2Admin")="" and isnumeric(request("issue")) Then
Response.Redirect "Admin_Login.Asp"
Response.End
End If
kithe=request("issue")
Set Rs6=Conn.Execute("Select Top 1 ID,NN,ND,NA,N1,N2,N3,N4,N5,N6 From m_Kithe where NN='"&kithe&"'")
If Not Rs6.Eof Then
Current_KitheTable=Rs6.GetRows(1)
else
response.write "<script lanuage=javascript>alert('还未开奖,请先开奖');history.go(-1);</script>"
response.end
end if
Set Rs6=Conn.Execute("Select ID,color From m_color Order By ID")
If Not Rs6.Eof Then
Get_Para_Color=Rs6.GetRows(-1)
End If
Set Rs6=Conn.Execute("Select ID,m_number From m_sxnumber Order By ID")
If Not Rs6.Eof Then
Get_sx_Color=Rs6.GetRows(-1)
End If
Select Case Request("K6")
Case "K1"
M=0:N=6
t1="t1"
count_tm
Case "K2"
M=5:N=11
t1="t2"
count_tm
Case "K3"
M=10:N=16
t1="t3"
count_tm
Case "K4"
M=15:N=21
t1="t4"
count_tm
Case "K5"
M=20:N=26
t1="t5"
count_tm
Case "K6"
M=25:N=31
t1="t6"
count_tm
Case "K7"
M=30:N=36
t1="t7"
count_tm
Case "K8"
M=35:N=41
t1="t8"
count_tm
Case "K9"
M=40:N=46
t1="t9"
count_tm
Case "K10"
M=45:N=50
t1="t10"
count_tm
Case "K11"
t1="t11"
count_tdan
Case "K12"
t1="t12"
count_ts
Case "K13"
t1="t13"
count_tda
Case "K14"
t1="t14"
count_txiao
Case "K15"
t1="t15"
count_thp
Case "K16"
t1="t16"
count_tlp
Case "K17"
t1="t17"
count_tlanp
Case "K18"
t1="t18"
count_thdan
Case "K19"
t1="t19"
count_ths
Case Else
Response.Redirect "index_result.asp"
Response.End
End Select
Sub count_tm
number1=0
sum_num=0
set Count_rs=server.createobject("adodb.recordset")
sql="Select chilp_value,sort,result,ID from m_chilp where sort='特别号' and Kithe='"&Kithe&"'"
Count_rs.open sql,conn,1,1
do while not Count_rs.eof
if isnumeric(Count_rs("chilp_value")) then
if cint(Count_rs("chilp_value"))>M and cint(Count_rs("chilp_value"))<N then
sum_num=sum_num+1
Set Rs6=Conn.Execute("update m_chilp set banlance='1' where ID='"&Count_rs("ID")&"'")
if cint(Current_KitheTable(3,0))=cint(Count_rs("chilp_value")) then
number1=number1+1
Set Rs6=Conn.Execute("update m_chilp set result=1 where ID='"&Count_rs("ID")&"'")
else
Set Rs6=Conn.Execute("update m_chilp set result=0 where ID='"&Count_rs("ID")&"'")
end if
end if
end if
Count_rs.movenext
loop
Set Rs6=Nothing
if number1<1 then
number1=-cint(sum_num)
end if
response.Redirect "index_result.asp?"&t1&"="&number1&""
response.end
End Sub
'特单
Sub count_tdan
number1=0
sum_num=0
Set Rs6=Conn.Execute("update m_chilp set banlance='1' where sort='特别号' and chilp_value='单' and Kithe='"&Kithe&"'")
set Count_rs=server.createobject("adodb.recordset")
sql="Select chilp_value,sort,result,ID from m_chilp where sort='特别号' and chilp_value='单' and Kithe='"&Kithe&"'"
Count_rs.open sql,conn,1,1
do while not Count_rs.eof
if cint(Current_KitheTable(3,0))=49 then
Set Rs6=Conn.Execute("update m_chilp set result=0,amount='和局' where ID='"&Count_rs("ID")&"'")
else
sum_num=sum_num+1
if cint(Current_KitheTable(3,0)) mod 2=1 and trim(Count_rs("chilp_value"))="单" then
number1=number1+1
Set Rs6=Conn.Execute("update m_chilp set result=1 where ID='"&Count_rs("ID")&"'")
else
Set Rs6=Conn.Execute("update m_chilp set result=0 where ID='"&Count_rs("ID")&"'")
end if
end if
Count_rs.movenext
loop
Set Rs6=Nothing
if number1<1 then
number1=-cint(sum_num)
end if
response.Redirect "index_result.asp?"&t1&"="&number1&""
response.end
End Sub
'特双
Sub count_ts
number1=0
sum_num=0
Set Rs6=Conn.Execute("update m_chilp set banlance='1' where sort='特别号' and chilp_value='双' and Kithe='"&Kithe&"'")
set Count_rs=server.createobject("adodb.recordset")
sql="Select chilp_value,sort,result,ID from m_chilp where sort='特别号' and chilp_value='双' and Kithe='"&Kithe&"'"
Count_rs.open sql,conn,1,1
do while not Count_rs.eof
if cint(Current_KitheTable(3,0))=49 then
Set Rs6=Conn.Execute("update m_chilp set result=0,amount='和局' where ID='"&Count_rs("ID")&"'")
else
sum_num=sum_num+1
if cint(Current_KitheTable(3,0)) mod 2=0 and trim(Count_rs("chilp_value"))="双" then
number1=number1+1
Set Rs6=Conn.Execute("update m_chilp set result=1 where ID='"&Count_rs("ID")&"'")
else
Set Rs6=Conn.Execute("update m_chilp set result=0 where ID='"&Count_rs("ID")&"'")
end if
end if
Count_rs.movenext
loop
Set Rs6=Nothing
if number1<1 then
number1=-cint(sum_num)
end if
response.Redirect "index_result.asp?"&t1&"="&number1&""
response.end
End Sub
Sub count_tda
number1=0
sum_num=0
Set Rs6=Conn.Execute("update m_chilp set banlance='1' where sort='特别号' and chilp_value='大' and Kithe='"&Kithe&"'")
set Count_rs=server.createobject("adodb.recordset")
sql="Select chilp_value,sort,result,ID from m_chilp where sort='特别号' and chilp_value='大' and Kithe='"&Kithe&"'"
Count_rs.open sql,conn,1,1
do while not Count_rs.eof
if cint(Current_KitheTable(3,0))=49 then
Set Rs6=Conn.Execute("update m_chilp set result=0,amount='和局' where ID='"&Count_rs("ID")&"'")
else
sum_num=sum_num+1
if cint(Current_KitheTable(3,0)) >24 and trim(Count_rs("chilp_value"))="大" then
number1=number1+1
Set Rs6=Conn.Execute("update m_chilp set result=1 where ID='"&Count_rs("ID")&"'")
else
Set Rs6=Conn.Execute("update m_chilp set result=0 where ID='"&Count_rs("ID")&"'")
end if
end if
Count_rs.movenext
loop
Set Rs6=Nothing
if number1<1 then
number1=-cint(sum_num)
end if
response.Redirect "index_result.asp?"&t1&"="&number1&""
response.end
End Sub
Sub count_txiao
number1=0
sum_num=0
Set Rs6=Conn.Execute("update m_chilp set banlance='1' where sort='特别号' and chilp_value='小' and Kithe='"&Kithe&"'")
set Count_rs=server.createobject("adodb.recordset")
sql="Select chilp_value,sort,result,ID from m_chilp where sort='特别号' and chilp_value='小' and Kithe='"&Kithe&"'"
Count_rs.open sql,conn,1,1
do while not Count_rs.eof
if cint(Current_KitheTable(3,0))=49 then
Set Rs6=Conn.Execute("update m_chilp set result=0,amount='和局' where ID='"&Count_rs("ID")&"'")
else
sum_num=sum_num+1
if cint(Current_KitheTable(3,0)) <25 and trim(Count_rs("chilp_value"))="小" then
number1=number1+1
Set Rs6=Conn.Execute("update m_chilp set result=1 where ID='"&Count_rs("ID")&"'")
else
Set Rs6=Conn.Execute("update m_chilp set result=0 where ID='"&Count_rs("ID")&"'")
end if
end if
Count_rs.movenext
loop
Set Rs6=Nothing
if number1<1 then
number1=-cint(sum_num)
end if
response.Redirect "index_result.asp?"&t1&"="&number1&""
response.end
End Sub
Sub count_thp
number1=0
sum_num=0
Set Rs6=Conn.Execute("Select ID,color From m_color Order By ID")
If Not Rs6.Eof Then
Get_Para_Color=Rs6.GetRows(-1)
End If
Set Rs6=Conn.Execute("update m_chilp set banlance='1' where sort='色波' and chilp_value='红波' and Kithe='"&Kithe&"'")
set Count_rs=server.createobject("adodb.recordset")
sql="Select chilp_value,sort,result,ID from m_chilp where sort='色波' and chilp_value='红波' and Kithe='"&Kithe&"'"
Count_rs.open sql,conn,1,1
do while not Count_rs.eof
sum_num=sum_num+1
if trim(Get_Para_Color(1,cint(Current_KitheTable(3,0))-1))="r" and trim(Count_rs("chilp_value"))="红波" then
number1=number1+1
Set Rs6=Conn.Execute("update m_chilp set result=1 where ID='"&Count_rs("ID")&"'")
else
Set Rs6=Conn.Execute("update m_chilp set result=0 where ID='"&Count_rs("ID")&"'")
end if
Count_rs.movenext
loop
Set Rs6=Nothing
if number1<1 then
number1=-cint(sum_num)
end if
response.Redirect "index_result.asp?"&t1&"="&number1&""
response.end
End Sub
Sub count_tlp
number1=0
sum_num=0
Set Rs6=Conn.Execute("Select ID,color From m_color Order By ID")
If Not Rs6.Eof Then
Get_Para_Color=Rs6.GetRows(-1)
End If
Set Rs6=Conn.Execute("update m_chilp set banlance='1' where sort='色波' and chilp_value='绿波' and Kithe='"&Kithe&"'")
set Count_rs=server.createobject("adodb.recordset")
sql="Select chilp_value,sort,result,ID from m_chilp where sort='色波' and chilp_value='绿波' and Kithe='"&Kithe&"'"
Count_rs.open sql,conn,1,1
do while not Count_rs.eof
sum_num=sum_num+1
if trim(Get_Para_Color(1,cint(Current_KitheTable(3,0))-1))="g" and trim(Count_rs("chilp_value"))="绿波" then
number1=number1+1
Set Rs6=Conn.Execute("update m_chilp set result=1 where ID='"&Count_rs("ID")&"'")
else
Set Rs6=Conn.Execute("update m_chilp set result=0 where ID='"&Count_rs("ID")&"'")
end if
Count_rs.movenext
loop
Set Rs6=Nothing
if number1<1 then
number1=-cint(sum_num)
end if
response.Redirect "index_result.asp?"&t1&"="&number1&""
response.end
End Sub
Sub count_tlanp
number1=0
sum_num=0
Set Rs6=Conn.Execute("Select ID,color From m_color Order By ID")
If Not Rs6.Eof Then
Get_Para_Color=Rs6.GetRows(-1)
End If
Set Rs6=Conn.Execute("update m_chilp set banlance='1' where sort='色波' and chilp_value='蓝波' and Kithe='"&Kithe&"'")
set Count_rs=server.createobject("adodb.recordset")
sql="Select chilp_value,sort,result,ID from m_chilp where sort='色波' and chilp_value='蓝波' and Kithe='"&Kithe&"'"
Count_rs.open sql,conn,1,1
do while not Count_rs.eof
sum_num=sum_num+1
if trim(Get_Para_Color(1,cint(Current_KitheTable(3,0))-1))="b" and trim(Count_rs("chilp_value"))="蓝波" then
number1=number1+1
Set Rs6=Conn.Execute("update m_chilp set result=1 where ID='"&Count_rs("ID")&"'")
else
Set Rs6=Conn.Execute("update m_chilp set result=0 where ID='"&Count_rs("ID")&"'")
end if
Count_rs.movenext
loop
Set Rs6=Nothing
if number1<1 then
number1=-cint(sum_num)
end if
response.Redirect "index_result.asp?"&t1&"="&number1&""
response.end
End Sub
Sub count_thdan
number1=0
sum_num=0
number_h=int(Current_KitheTable(3,0)/10)+int(Current_KitheTable(3,0) mod 10)
Set Rs6=Conn.Execute("update m_chilp set banlance='1' where sort='特别号' and chilp_value='合单' and Kithe='"&Kithe&"'")
set Count_rs=server.createobject("adodb.recordset")
sql="Select chilp_value,sort,result,ID from m_chilp where sort='特别号' and chilp_value='合单' and Kithe='"&Kithe&"'"
Count_rs.open sql,conn,1,1
do while not Count_rs.eof
if cint(Current_KitheTable(3,0))=49 then
Set Rs6=Conn.Execute("update m_chilp set result=0,amount='和局' where ID='"&Count_rs("ID")&"'")
else
sum_num=sum_num+1
if cint(number_h) mod 2=1 and trim(Count_rs("chilp_value"))="合单" then
number1=number1+1
Set Rs6=Conn.Execute("update m_chilp set result=1 where ID='"&Count_rs("ID")&"'")
else
Set Rs6=Conn.Execute("update m_chilp set result=0 where ID='"&Count_rs("ID")&"'")
end if
end if
Count_rs.movenext
loop
Set Rs6=Nothing
if number1<1 then
number1=-cint(sum_num)
end if
response.Redirect "index_result.asp?"&t1&"="&number1&""
response.end
End Sub
Sub count_ths
number1=0
sum_num=0
number_h=int(Current_KitheTable(3,0)/10)+int(Current_KitheTable(3,0) mod 10)
Set Rs6=Conn.Execute("update m_chilp set banlance='1' where sort='特别号' and chilp_value='合双' and Kithe='"&Kithe&"'")
set Count_rs=server.createobject("adodb.recordset")
sql="Select chilp_value,sort,result,ID from m_chilp where sort='特别号' and chilp_value='合双' and Kithe='"&Kithe&"'"
Count_rs.open sql,conn,1,1
do while not Count_rs.eof
if cint(Current_KitheTable(3,0))=49 then
Set Rs6=Conn.Execute("update m_chilp set result=0,amount='和局' where ID='"&Count_rs("ID")&"'")
else
sum_num=sum_num+1
if cint(number_h) mod 2=0 and trim(Count_rs("chilp_value"))="合双" then
number1=number1+1
Set Rs6=Conn.Execute("update m_chilp set result=1 where ID='"&Count_rs("ID")&"'")
else
Set Rs6=Conn.Execute("update m_chilp set result=0 where ID='"&Count_rs("ID")&"'")
end if
end if
Count_rs.movenext
loop
Set Rs6=Nothing
if number1<1 then
number1=-cint(sum_num)
end if
response.Redirect "index_result.asp?"&t1&"="&number1&""
response.end
End Sub
%>
<%'response.write "<script lanuage=javascript>alert('有"&number1&"条记录赢了');location.href='index_result.asp?t2="&number1&"';"%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -