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

📄 q_main_save_bak.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)
%>
<%
  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
 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 i>55 then
			  rate_id=clng(i+393)
			  if i>59 then
			  rate_id=clng(i+496)
			  end if
			  else
   rate_id=clng(i+344)
   end if
   gold=(request("num"&i))
   'response.Write gold&"&nbsp;&nbsp;"&i&"<br>"
   total=total+gold
 Get_Kithe_Para:Get_UserInfo:Get_Rate(rate_id)

'自动降水
Set Rs5=Conn.Execute("Select sum_money=isnull(sum(sum_m),0) from m_chilp where kithe='"&Current_Kithe_Num&"' and  chilp_value='"&Current_Rate(2,0)&"'")
   If Rs5.Eof Then
     Set Rs5=Nothing
	 'Response.redirect "user_left.asp"
	 Response.End
	 else
	 'response.Write Rs5("sum_money")
select case Current_Rate(0,0)
case "特别号"
	select case Current_Rate(2,0)
	case "单"
	drop_sort="特别号单双"
	case "双"
	drop_sort="特别号单双"
	case "大"
	drop_sort="特别号大小"
	case "小"
	drop_sort="特别号大小"
	case "合单"
	drop_sort="特别号合数单双"
	case "合双"
	drop_sort="特别号合数单双"
	case else
	drop_sort="特别号"
	end select
case "正码"
	select case Current_Rate(2,0)
	case "总单"
	drop_sort="总数单双"
	case "总双"
	drop_sort="总数单双"
	case "总大"
	drop_sort="总数大小"
	case "总小"
	drop_sort="总数大小"
	end select
case "正码1-6"
	select case Current_Rate(2,0)
	case "单"
	drop_sort="正码1-6单双"
	case "双"
	drop_sort="正码1-6单双"
	case "大"
	drop_sort="正码1-6大小"
	case "小"
	drop_sort="正码1-6大小"
	case "红波"
	drop_sort="正码1-6色波"
	case "蓝波"
	drop_sort="正码1-6色波"
	case "绿波"
	drop_sort="正码1-6色波"
	end select
case "色波"
drop_sort="特别号色波"
case "十二生肖"
drop_sort="十二生肖"
case "一肖"
drop_sort="一肖"
end select
if drop_sort<>"" then
	 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)
		if Rs5("sum_money")+gold>showdrop(1,0) then
		num=cint((Rs5("sum_money")+gold)/showdrop(1,0))
			if Current_Rate(4,0)<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
				if cdbl(Current_Rate(4,0)-num*showdrop(2,0))<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
				drop=Current_Rate(3,0)-showdrop(2,0)*num
				Set Rs6=Conn.Execute("update m_rate set current_rate="&drop&" where item_sort='"&Current_Rate(0,0)&"' and item_value='"&Current_Rate(2,0)&"'")
				end if
			end if
			end if
		end if
	end if
end if
'自动降水
end if
next

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
%>
<!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'", 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}
-->
</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)-total%></TD></TR>
              <TR align=left bgcolor="#CCCCCC">
			  <TD colSpan=2 bgcolor="#CCCCCC" class=td_fail>
			  <table width="100%" 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 i>55 then
			  rate_id=clng(i+393)
			  if i>59 then
			  rate_id=clng(i+496)
			  end if
			  else
   rate_id=clng(i+344)
   end if
   gold=(request("num"&i))
   'response.Write gold&"&nbsp;&nbsp;"&i&"<br>"
   total=total+gold
 Get_Kithe_Para:Get_UserInfo:Get_Rate(rate_id)
 Dim order_num
	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
    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) values ("&order_num&","&Current_Kithe_Num&",getdate(),"&UserQuota(1,0)&",'"&Current_Rate(0,0)&"','"&Current_Rate(1,0)&"','"&Current_Rate(2,0)&"',"&Current_Rate(4,0)&","&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)&"')")
	
%>
 <tr>
                  <td bgcolor="#CCCCCC" ><div align="center">单号:<%=order_num%><br>
  号码:<%=Current_Rate(2,0)%>&nbsp;下注金额:<%=gold%><br>
  可赢金额:&nbsp;<%=gold*(Current_Rate(4,0)-1)%> <br>
  <%=order_num2%></div>
                    <hr></td>
                </tr><%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></TD>  
              <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 + -