⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 quick_tmp.asp

📁 1。超强文件读写锁定
💻 ASP
字号:
<!--#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
  
total=0
 Dim rate_id,gold,order_num2

 Get_Kithe_Para:Get_UserInfo
if Kithe_Open=0 then
response.Redirect "order_error.asp"
end if

cache1=request("wagerstext")
number1=split(cache1,"-")
				for i=0 to ubound(number1)-1 
				number2=cstr(number1(i))
				number3=split(number2,":")
				if mid(number3(0),1,2)="NA" then
				types="正码"
				R=4
				end if
				if mid(number3(0),1,2)="SP" then
				types="特别号"
				R=0
				end if
				if i=0 then
				xznumber=mid(number3(0),4,6)
				else
				xznumber=number3(0)
				end if
				rates=cdbl(number3(1))
				gold=number3(2)
                                     total=total+gold
				rate_id=xznumber+344
				Get_Rate(rate_id)
SQL6="Select sum_money=isnull(sum(sum_m),0) from m_chilp where kithe='"&Current_Kithe_Num&"' and   sort='"&Current_Rate(0,0)&"' and chilp_value='"&Current_Rate(2,0)&"' and member='"&session("SK2user")&"'"
Set Rs5=Conn.Execute(SQL6)
   If not Rs5.Eof Then
	 sum2=Rs5("sum_money")
end if
if gold+sum2>userquota(3,R) then
response.write "<script lanuage=javascript>alert('下注金额不可大於单注限额!!');history.go(-1);</script>"
response.redirect "order_error2.asp?action=great"
response.end
end if
				
				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"
				  Cur_Rate=Current_Rate(4,0)
				  case "b"
				  Cur_Rate=Current_Rate(4,0)-0.5
				  case "c"
				  Cur_Rate=Current_Rate(4,0)-1
				  end select
				end if
				if Cur_Rate<>rates and types="特别号" then
				response.redirect "order_error2.asp?error_number="&xznumber&""
				'response.write Cur_Rate&"<br>"&rates
				end if
SQL6="Select sum_money=isnull(sum(sum_m),0) from m_chilp where kithe='"&Current_Kithe_Num&"' and member='"&session("SK2User")&"' and"
if R=4 then
SQL6=SQL6&" sort='正码' and chilp_value<>'总单' and chilp_value<>'总双'   and chilp_value<>'总大' and chilp_value<>'总小'"
else
SQL6=SQL6&" sort='"&Current_Rate(0,0)&"'  and chilp_value<>'合单' and chilp_value<>'合双'  and chilp_value<>'双' and chilp_value<>'单' and chilp_value<>'大' and chilp_value<>'小'"
end if
'response.Write SQL6
Set Rs5=Conn.Execute(SQL6)
'Set Rs6=Conn.Execute("Select sum_money=isnull(sum(sum_m),0) from m_chilp where kithe='"&Current_Kithe_Num&"' and  sort='特别号' and isnumeric(chilp_value)")
   If not Rs5.Eof Then
	 sum_money=Rs5("sum_money")
	 end if
if total>userinfo(5,0) then
 response.write "<script lanuage=javascript>alert('下注金额不可大於信用额度!!');history.go(-1);</script>"
   response.end
end if
if total+sum_money>UserQuota(2,R) then
 response.write "<script lanuage=javascript>alert('本期累计下注共:"&sum_money&"\n下注金额已超过单期限额!!');history.go(-1);</script>"
   response.end
end if
	 SQL5="select credits,current_credits,Login_name,P_agentID from m_agent where Login_name='"&UserInfo(11,0)&"'"
	Set Rs4=Conn.Execute(SQL5)
   If not Rs4.Eof Then
	 sum_money_agent=Rs4("credits")
	 end if
if total+sum_money>sum_money_agent then
 response.write "<script lanuage=javascript>alert('下注金额不可大於总代理信用额度!!!!');history.go(-1);</script>"
   response.end
end if
%>
<%'自动降水
next
 'Response.Redirect  "userleft.asp"
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<SCRIPT language=javascript>
window.setTimeout("self.location='userleft.asp'", 18000);
</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">
<!--
.style1 {
	color: #FF0000;
	font-weight: bold;
}
.style2 {color: #0000FF}
-->
</style>
</HEAD>
<BODY oncontextmenu=window.event.returnValue=false text=#000000 bgColor=#e5eaee 
leftMargin=0 topMargin=0>
<TABLE height=235 cellSpacing=0 cellPadding=0 width=230 border=0>
  <TBODY>
  <TR>
    <TD background=images/qq2.gif height=30>&nbsp;</TD></TR>
  <TR>
    <TD vAlign=top height=76>
      <TABLE height="100%" cellSpacing=0 cellPadding=0 width=227 border=0>
        <TBODY>
        <TR>
          <TD width=16 background=images/qq1.gif rowSpan=2>&nbsp;</TD>
          <TD width=215 height=26>
            <TABLE height=25 cellSpacing=0 cellPadding=0 width=200 
            background=images/pp.gif border=0>
              <TBODY>
              <TR>
                <TD align=middle><div align="center"><FONT color=#ffffff>六合彩注单</FONT></div></TD>
              </TR></TBODY></TABLE></TD></TR>
        <TR>
          <TD height=123>
            <TABLE class=table_02 height=135 cellSpacing=6 cellPadding=0 
            width="95%" align=left border=0>
              <TBODY>
              <TR>
                <TD vAlign=center width="11%" height=25><IMG height=30 
                  src="images/ico.gif" width=30></TD>
                <TD class=title_01 vAlign=center width="89%" height=20>帐户名称: 
                  <%=Session("SK2User")%></TD></TR>
              <TR>
                <TD vAlign=center><IMG height=30 src="images/ico.gif" 
                  width=30></TD>
                <TD class=title_01 vAlign=center>信用额度: <%=UserInfo(5,0)%></TD></TR>
              <TR align=left>
              <TR align=left bgColor=#cccccc>
                <TD align=middle colSpan=2>
				<table width="100%" border="0">
                <%total=0 
				Dim order_num
				for i=0 to ubound(number1)-1 
				number2=cstr(number1(i))
				number3=split(number2,":")
				if mid(number3(0),1,2)="NA" then
				types="正码"
				R=4
				end if
				if mid(number3(0),1,2)="SP" then
				types="特别号"
				R=0
				end if
				if i=0 then
				xznumber=mid(number3(0),4,6)
				else
				xznumber=number3(0)
				end if
				rates=cdbl(number3(1))
				gold=number3(2)
				order_num2=gen_key(16)
				total=total+gold
				rate_id=xznumber+344
				Get_Rate(rate_id)
	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 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"
	  case "b"
        SQL6=SQL6&" items,Rake_B,odd_numbers,odd_stock"
	  case "c"
	    SQL6=SQL6&" items,Rake_C,odd_numbers,odd_stock"
	case else
	SQL6=SQL6&" items,Rake_A,odd_numbers,odd_stock"
    end select

	  SQL6=SQL6&" from m_quota where accounts='"&Rs5("Login_Name")&"'"
      SQL6=SQL6&" order by id"
'response.Write SQL6
	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)
 end if
	'if total+
	'Set Rs6=Conn.Execute("Select Top 1 order_num From m_chilp Order By ID Desc")
    'If Not Rs6.Eof Then
    '  order_num=cLng(Rs6("order_num"))+cint(INT(88+1)*RND)
	'Else
    '  order_num=373829381
	'End If
	order_num=gen_key2(10)
	SQL="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) values ("&order_num&","&Current_Kithe_Num&",getdate(),"&UserQuota(1,R)&",'"&types&"','"&types&"','"&xznumber&"',"&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)&"')"
    'response.Write SQL
	Set Rs6=Conn.Execute(SQL)
	'自动降水
				drop_sort="特别号"
				Set Rs6=Conn.Execute("Select drop_sort,drop_value,drop_unit,low_drop from m_drop where drop_sort='"&drop_sort&"'")
				if not Rs6.eof then
				showdrop=Rs6.getrows(1)
				end if
				drop=int((Current_Rate(5,0)+gold)/showdrop(1,0))*showdrop(2,0)
				num1=(Current_Rate(5,0)+gold) mod showdrop(1,0)
				'response.Write Current_Rate(4,0)&"&nbsp;"&drop
				Set Rs6=Conn.Execute("update m_rate set wager_gold="&num1&" where item_sort='"&Current_Rate(0,0)&"' and item_value='"&Current_Rate(2,0)&"'")
				if cdbl(Current_Rate(4,0)-drop)<showdrop(3,0) then
				Set Rs6=Conn.Execute("update m_rate set current_rate="&showdrop(3,0)&" where item_sort='"&Current_Rate(0,0)&"' and item_value='"&Current_Rate(2,0)&"'")
				else
				Set Rs6=Conn.Execute("update m_rate set current_rate="&Current_Rate(4,0)-drop&" where item_sort='"&Current_Rate(0,0)&"' and item_value='"&Current_Rate(2,0)&"'")
				end if
				'自动降水
%>
 <tr>
                  <td bgcolor="#CCCCCC" ><div align="center">单号:<%=order_num%><br>
  号码:<%=xznumber%>&nbsp;下注金额:<%=gold%><br>
  可赢金额:&nbsp;<%=gold*(rates-1)%> <br>
  <%=order_num2%></div>
                    <hr></td>
                </tr><%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></TD>
              </TR>
              <TR align=left>
                <TD align=middle colSpan=2>			
				  </TD></TR>
              <TR align=left>
                <TD class=td_fail colSpan=2><FONT color=#ff0000>
				<div align="center">
				  <INPUT class=sumbit_cen onclick="self.location='userleft.asp'" type=button value=离开 name=btnCancel>
&nbsp;&nbsp;
<INPUT class=sumbit_cen onclick="javascript:window.print();" type=button value=列印 name=btnSubmit>
</div>
                </FONT></TD>
              </TR></TBODY>
            </TABLE></TD></TR></TBODY></TABLE></TD></TR>
  <TR>
    <TD vAlign=top align=middle background=images/iny.gif>&nbsp;</TD></TR>
  <TR>
    <TD vAlign=top height=10><IMG height=10 src="images/inz.gif" 
      width=230></TD></TR></TBODY></TABLE>
</BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -