q_main_save6.asp
来自「买来的六合彩在线投注系统可能没有精力管理这些程序了PHP+mysql」· ASP 代码 · 共 419 行
ASP
419 行
<!--#include file="manage/mConn.asp"-->
<!--#include file="manage/mConst.asp"-->
<!--#include file="manage/sk2.asp"-->
<%
Function gen_key(digits)
dim char_array(30)
char_array(0) = "0"
char_array(1) = "1"
char_array(2) = "2"
char_array(3) = "3"
char_array(4) = "4"
char_array(5) = "5"
char_array(6) = "6"
char_array(7) = "7"
char_array(8) = "8"
char_array(9) = "9"
char_array(10) = "A"
char_array(11) = "B"
char_array(12) = "C"
char_array(13) = "D"
char_array(14) = "E"
char_array(15) = "F"
randomize
do while len(output) < digits
num = char_array(Int((15 - 0 + 1) * Rnd + 0))
output = output + num
loop
gen_key = output
End Function
'response.write gen_key(16)
%>
<%
Function gen_key2(digits)
dim char_array(10)
char_array(0) = "0"
char_array(1) = "1"
char_array(2) = "2"
char_array(3) = "3"
char_array(4) = "4"
char_array(5) = "5"
char_array(6) = "6"
char_array(7) = "7"
char_array(8) = "8"
char_array(9) = "9"
randomize
do while len(output) < digits
num = char_array(Int((9 - 0 + 1) * Rnd + 0))
output = output + num
loop
gen_key2 = output
End Function
'response.write gen_key2(10)
%>
<%
If Session("SK2User")="" Then
Response.Write ("<script Language=Javascript>alert('Please input username/password and try again!!!');window.open('index.asp','_top');</script>")
Response.End
End If
If Not ChkPost Then
Response.Write ("<script Language=Javascript>alert('Please input username/password and try again!!!');window.open('index.asp','_top');</script>")
Response.End
End If
If Not Isnumeric(Request("rate_id")) Then
Response.Write ("<script Language=Javascript>alert('Please input username/password and try again!!!');window.open('index.asp','_top');</script>")
Response.End
End If
Set Rs6=Conn.Execute("select top 1 tray_time,affice,tray_switch from m_config")
Dim affice,tray_time,tray_switch
If Not Rs6.Eof Then
affice=Rs6("affice")
tray_time=Rs6("tray_time")
tray_switch=Rs6("tray_switch")
End If
if int(datediff("s",now(),tray_time))<10 then
Response.Write ("<script language=javascript>alert('下注失败,陪率已改变,请重新选择彩球下注!');window.location.href='userleft.asp';</script>")
Response.End
end if
If tray_switch=0 Then
response.Redirect "order_error.asp"
end if
Get_UserInfo:Get_Kithe_Para
Dim rate_id,gold,order_num2
total=0
for i=1 to 62
if request("num"&i)<>"" and isnumeric(request("num"&i)) then
total=total+request("num"&i)
gold=request("num"&i)
end if
next
if cdbl(total)>cdbl(userinfo(5,0)) then
Response.Write ("<script Language=Javascript>alert('总下注金额不能大于信用额度');Location.href='userleft.asp';</script>")
Response.End
end if
total=0
for i=1 to 62
if request("num"&i)<>"" and isnumeric(request("num"&i)) then
order_num2=gen_key(16)
if request("dsdx")="true" then
if i<=6 then rate_id=clng(i+393)
if 6<i and i<=14 then
rate_id=clng(i+442)
end if
if 14<i and i<=18 then
rate_id=clng(i+445)
end if
if 18<i and i<=22 then
rate_id=clng(i+448)
end if
if 22<i and i<=26 then
rate_id=clng(i+451)
end if
if 26<i and i<=30 then
rate_id=clng(i+454)
end if
if 30<i and i<=34 then
rate_id=clng(i+457)
end if
else
if i<=49 then rate_id=clng(i+598)
if i>=50 and i<=55 then rate_id=clng(i+582)
end if
gold=(request("num"&i))
total=total+gold
Get_Kithe_Para:Get_UserInfo:Get_Rate(rate_id)
if formatnumber(Current_Rate(4,0),2,-1)=formatnumber(request("muz"&i),2,-1) then
else
tmtm=tmtm&"\n\n["&Current_Rate(2,0)&"]赔率已经改变从["&request("muz"&i)&"]降到["&Current_Rate(4,0)&"]"
end if
if Kithe_Open=0 then
response.Redirect "order_error.asp"
end if
end if
next
if tmtm<>"" then%>
<SCRIPT language=JAVASCRIPT>
javascript:if(confirm('对不起:<%=tmtm%>\n\n是否放确认只下注!')){}else{location.href='userleft.asp';parent.mainFrame.location.href='q_ws.asp'};
</SCRIPT>
<% end if
%>
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<SCRIPT language=javascript>
window.setTimeout("self.location='userleft.asp'", 180000);
</SCRIPT>
<SCRIPT language=JAVASCRIPT>
if(self == top){location = '/';}
</SCRIPT>
<script language=javascript>
function new_win(html_name,winname,w,h){
if(winname=='') winname='WINDOWS';
if(w=='') w=640;
if(h=='') h=480;
//undefined
winformat="toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,width="+w+",height="+h;
winid = window.open(html_name,winname,winformat)
}
</script>
<LINK href="style/css-g.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2800.1476" name=GENERATOR>
<style type="text/css">
<!--
.style5 {color: #000000}
body {
background-image: url(img/left_0.gif);
}
-->
</style>
</HEAD>
<BODY oncontextmenu=window.event.returnValue=false text=#000000 bgColor=#e5eaee leftMargin=0 topMargin=0>
<table width="241" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" background="img/left_0.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25"><img src="img/right_01.gif" width="25" height="49"></td>
<td background="img/right_02.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><font color="#FFFFFF"><strong>彩票注单</strong></font></td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
<td width="14" background="img/right_02.gif"><img src="img/right_03.gif" width="14" height="49"></td>
</tr>
<tr>
<td background="img/right_04.gif"> </td>
<td><table cellspacing="1" cellpadding="1" width="190" align="center" border="0">
<tbody>
<tr>
<td>帐户名称: <%=session("sk2user")%></td>
</tr>
<tr>
<td>信用额度: <%=userinfo(5,0)%></td>
</tr>
<tr>
<td><font color="red">请选择下注彩球</font></td>
</tr>
</tbody>
</table></td>
<td background="img/right_05.gif"> </td>
</tr>
<tr>
<td valign="top"><img src="img/right_06.gif" width="25" height="13"></td>
<td height="13" background="img/right_07.gif"></td>
<td valign="top"><img src="img/right_08.gif" width="14" height="13"></td>
</tr>
</table></td>
<td width="8" valign="top"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="13"> </td>
<td><table width="100%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#CBCBC9">
<tr>
<td align="center" bgcolor="#FFFFFF"><table width="99%" align="center" border="0">
<%total=0
for i=1 to 62
if request("num"&i)<>"" and isnumeric(request("num"&i)) then
order_num2=gen_key(16)
if request("dsdx")="true" then
else
if i<=49 then rate_id=clng(i+598)
if i>=50 and i<=55 then rate_id=clng(i+582)
end if
gold=(request("num"&i))
total=total+gold
Get_Kithe_Para:Get_UserInfo:Get_Rate(rate_id)
select case Current_Rate(2,0)
case "单"
R=1
case "双"
R=1
case "大"
R=2
case "小"
R=2
case "合单"
R=3
case "合双"
R=3
case "总单"
R=5
case "总双"
R=5
case "总大"
R=6
case "总小"
R=6
case else
R=23
end select
if Current_Rate(0,0)="色波" then
R=13
end if
Set Rs6=Conn.Execute("Select Top 1 Current_Credits,P_AgentID,self_cuts,super_cuts From m_agent Where Login_Name='"&UserInfo(3,0)&"' Order By ID Desc")
If Rs6.Eof Then
Set Rs6=Nothing
'Response.redirect "user_left.asp"
Response.End
end if
Agent_info= Rs6.GetRows(1)
SQL6="Select "
select case UserInfo(4,0)
case "a"
SQL6=SQL6&" items,Rake_A,odd_numbers,odd_stock"
case "b"
SQL6=SQL6&" items,Rake_B,odd_numbers,odd_stock"
case "c"
SQL6=SQL6&" items,Rake_C,odd_numbers,odd_stock"
case "d"
SQL6=SQL6&" items,Rake_D,odd_numbers,odd_stock"
case else
SQL6=SQL6&" items,Rake_A,odd_numbers,odd_stock"
end select
SQL6=SQL6&" from m_quota where accounts='"&UserInfo(3,0)&"'"
SQL6=SQL6&" order by id"
'response.Write SQL6
Set Rs6=Conn.Execute(SQL6)
If Rs6.Eof Then
Set Rs6=Nothing
End If
UserQuota_Agent=Rs6.GetRows(-1)
if Agent_info(1,0)=0 then
dai_ds=0
zong_ds=UserQuota_Agent(1,R)
else
'response.Write Agent_info(1,0)
Set Rs5=Conn.Execute("Select Top 1 Current_Credits,P_AgentID,self_cuts,super_cuts,Login_Name From m_agent Where ID='"&Agent_info(1,0)&"'")
If Rs5.Eof Then
Set Rs5=Nothing
'Response.redirect "user_left.asp"
Response.End
end if
SQL6="Select "
select case UserInfo(4,0)
case "a"
SQL6=SQL6&" items,Rake_A,odd_numbers,odd_stock"
set guan_ds=conn.execute("select Rake_A as guan_ds from m_quota where accounts=(select top 1 Login_Name from m_agent where id="&rs5("P_AgentID")&")")
case "b"
SQL6=SQL6&" items,Rake_B,odd_numbers,odd_stock"
set guan_ds=conn.execute("select Rake_B as guan_ds from m_quota where accounts=(select top 1 Login_Name from m_agent where id="&rs5("P_AgentID")&")")
case "c"
SQL6=SQL6&" items,Rake_C,odd_numbers,odd_stock"
set guan_ds=conn.execute("select Rake_C as guan_ds from m_quota where accounts=(select top 1 Login_Name from m_agent where id="&rs5("P_AgentID")&")")
case "d"
SQL6=SQL6&" items,Rake_D,odd_numbers,odd_stock"
set guan_ds=conn.execute("select Rake_D as guan_ds from m_quota where accounts=(select top 1 Login_Name from m_agent where id="&rs5("P_AgentID")&")")
case else
SQL6=SQL6&" items,Rake_A,odd_numbers,odd_stock"
set guan_ds=conn.execute("select Rake_A as guan_ds from m_quota where accounts=(select top 1 Login_Name from m_agent where id="&rs5("P_AgentID")&")")
end select
SQL6=SQL6&" from m_quota where accounts='"&Rs5("Login_Name")&"'"
SQL6=SQL6&" order by id"
Set Rs6=Conn.Execute(SQL6)
If Rs6.Eof Then
Set Rs6=Nothing
End If
UserQuota_AgentB=Rs6.GetRows(-1)
dai_ds=UserQuota_Agent(1,R)
zong_ds=UserQuota_AgentB(1,R)
guan_temp=guan_ds.GetRows(-1)
guan_ds_temp=guan_temp(0,R)
end if
Dim order_num
order_num=gen_key2(10)
if Current_Rate(0,0)="特别号" and Current_Rate(2,0)<>"单" and Current_Rate(2,0)<>"双" and Current_Rate(2,0)<>"大" and Current_Rate(2,0)<>"小" and Current_Rate(2,0)<>"合单" and Current_Rate(2,0)<>"合双" and Current_Rate(2,0)<>"红波" and Current_Rate(2,0)<>"蓝波" and Current_Rate(2,0)<>"绿波" and Current_Rate(2,0)<>"总单" and Current_Rate(2,0)<>"总双" and Current_Rate(2,0)<>"总大" and Current_Rate(2,0)<>"总小" then
select case UserInfo(4,0)
case "a"
rates=Current_Rate(4,0)
case "b"
rates=Current_Rate(4,0)-0.5
case "c"
rates=Current_Rate(4,0)-1
case "d"
rates=Current_Rate(4,0)
end select
else
if Current_Rate(2,0)="单" or Current_Rate(2,0)="双" or Current_Rate(2,0)="大" or Current_Rate(2,0)="小" or Current_Rate(2,0)="合单" or Current_Rate(2,0)="合双" or Current_Rate(2,0)="总单" or Current_Rate(2,0)="总双" or Current_Rate(2,0)="总大" or Current_Rate(2,0)="总小" then
if Current_Rate(0,0)<>"正码1-6" and Current_Rate(0,0)<>"正码过关" then
select case UserInfo(4,0)
case "a"
rates=Current_Rate(4,0)
case "b"
rates=Current_Rate(4,0)-0.01
case "c"
rates=Current_Rate(4,0)-0.02
case "d"
rates=Current_Rate(4,0)
end select
else
rates=Current_Rate(4,0)
end if
else
rates=Current_Rate(4,0)
end if
end if
Set Rs6=Conn.Execute("insert into m_chilp (order_num,kithe,chilp_time,rake,sort,chilp_types,chilp_value,rate,sum_m,Result,order_num2,Memed,Member,dai_ds,zong_ds,dai_zc,zong_zc,guan_zc,Agent_first,Agent_second,Agent_three,dagu_zc,guan_ds) values ("&order_num&","&Current_Kithe_Num&",getdate(),"&UserQuota(1,R)&",'"&Current_Rate(0,0)&"','"&Current_Rate(1,0)&"','"&Current_Rate(2,0)&"',"&rates&","&gold&",0,'"&order_num2&"','"&UserInfo(4,0)&"','"&session("SK2User")&"','"&dai_ds&"','"&zong_ds&"','"&UserInfo(7,0)&"','"&UserInfo(8,0)&"','"&UserInfo(9,0)&"','"&UserInfo(10,0)&"','"&UserInfo(11,0)&"','"&UserInfo(12,0)&"',"&UserInfo(13,0)&","&guan_ds_temp&")")
%>
<tr>
<td bgcolor="#CCCCCC" ><div align="center">单号:<%=order_num%><br />
号码:<%=Current_Rate(2,0)%> 下注金额:<%=gold%><br />
可赢金额: <%=gold*(rates-1)%> <br />
<%=order_num2%></div>
<hr /></td>
</tr>
<!--#include file="autodrop.asp"-->
<%
end if
next
'response.Write total
Set Rs6=Conn.Execute("update m_member set current_credit=current_credit-"&total&" where Login_Name='"&Session("SK2User")&"'")
Set Rs6=Nothing%>
</table>
<FONT color=#ff0000>
<INPUT class=sumbit_cen onClick="self.location='userleft.asp'" type=button value=离开 name=btnCancel>
<INPUT class=sumbit_cen onClick="javascript:window.print();" type=button value=列印 name=btnSubmit>
</FONT></td>
</tr>
</table></td>
<td width="11"> </td>
</tr>
</table></td>
</tr>
</table>
<%Response.Write ("<script Language=Javascript>alert('下注成功');parent.mainFrame.location.href='q_ws.asp';</script>")%>
</BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?