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

📄 reg1.asp

📁 为一网站销售代码
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->
<!--#include file="func.asp"-->
<%
dim sql,rs,CardId,CardPwd,GameId,GameType,CardType,Name,ContactTel,Oicq,Email,TypeTemp,area,server1,option1,card2,card3,card4,pw2,pw3,pw4
TypeTemp=split(request("gamelist"),"|")
CardId=request("CardId")
CardPwd=Encrypt(request("CardPwd"))
GameId=request("GameId")
GameType=TypeTemp(0)
CardType=TypeTemp(1)
Name=request("Name")
ContactTel=request("ContactTel")
Oicq=request("Oicq")
Email=request("Email")
area=request("area")
card2=request("T1")
card4=request("T3")
card3=request("T2")
pw2=Encrypt(request("T4"))
pw3=Encrypt(request("T5"))
pw4=Encrypt(request("T6"))
option1=request("cardtype")
server1=request("server1")
option1=trim(right(option1,2))
if CardId="" or CardPwd="" or GameId="" or GameType="" or CardType="" or Name="" or ContactTel="" or Oicq="" or Email="" then Response.Redirect "messbox.asp?code=60"
select case TypeTemp(2)
case "传奇":
      select case option1
      case "V2":call chuanqi2()
      case "V3":call chuanqi3()
      case "V4":call chuanqi4()
      case else:call chuanqi1()
      end select
case "斑斑":call bb()
case else:
      select case option1
      case "V2":call other2()
      case "V3":call other3()
      case "V4":call other4()
      case else:call other1()
      end select
end select
Response.Redirect "messbox.asp?code=150" '已经成功登记注册信息,我们会尽快开通!
sub bb()
   if area="" or server1="" then Response.Redirect "messbox.asp?code=60"
   GameType=GameType&"[第" & area & "区]"&"[" & server1 & "服务器]"
   
	sql="select top 1 * from Card where CardId='"&CardId&"' and CardPwd='"&CardPwd&"'"
	set rs=conn.execute(sql)
	if not(rs.eof) or not(rs.bof) then
		if rs("Isell") then
			if rs("IsFill") then
			    Response.Redirect "messbox.asp?code=51" '此卡已经充值过
			else
				if rs("CardType")=CardType then
					conn.execute("insert into Register(CardID,CardPwd,GameID,GameType,CardType,CName,ContactTel,Oicq,Email,DealCase) values('"&CardID&"','"&CardPwd&"','"&GameId&"','"&GameType&"','"&CardType&"','"&Name&"','"&ContactTel&"','"&Oicq&"','"&Email&"','暂未开通')")
					conn.execute("update Card set IsFill=1 where CardId='"&CardId&"' and CardPwd='"&CardPwd&"'")
				else
					Response.Redirect "messbox.asp?code=50" '卡的类型不匹配
				end if
			end if
		else
			Response.Redirect "messbox.asp?code=52" '此卡还没有售出
		end if
	else
		Response.Redirect "messbox.asp?code=53" '卡号或者密码错误"
	end if
	rs.close()
	set rs=nothing
	CloseDatabase
end sub
sub chuanqi1()
   if area="" then Response.Redirect "messbox.asp?code=60"
   GameType=GameType&"[第" & area & "区]"
   sql="select top 1 * from Card where CardId='"&CardId&"' and CardPwd='"&CardPwd&"'"
	set rs=conn.execute(sql)
	if not(rs.eof) or not(rs.bof) then
		if rs("Isell") then
			if rs("IsFill") then
				Response.Redirect "messbox.asp?code=51" '此卡已经充值过
			else			
				if rs("CardType")=CardType then
				    if option1="V1" then
				    GameType=GameType&"[月卡]"
				    end if
					conn.execute("insert into Register(CardID,CardPwd,GameID,GameType,CardType,CName,ContactTel,Oicq,Email,DealCase) values('"&CardID&"','"&CardPwd&"','"&GameId&"','"&GameType&"','"&CardType&"','"&Name&"','"&ContactTel&"','"&Oicq&"','"&Email&"','暂未开通')")
					conn.execute("update Card set IsFill=1 where CardId='"&CardId&"' and CardPwd='"&CardPwd&"'")
				else
					Response.Redirect "messbox.asp?code=50" '卡的类型不匹配
				end if
			end if
		else
			Response.Redirect "messbox.asp?code=52" '此卡还没有售出
		end if
	else
		Response.Redirect "messbox.asp?code=53" '卡号或者密码错误"
	end if
	rs.close()
	set rs=nothing
	CloseDatabase
end sub
sub chuanqi2()
	if card2="" or pw2="" then Response.Redirect "messbox.asp?code=60"
	if CardId=card2 then Response.Redirect "messbox.asp?code=54"
    if CardPwd=pw2 then Response.Redirect "messbox.asp?code=54"
    if area="" then Response.Redirect "messbox.asp?code=60"
    GameType=GameType&"[第" & area & "区]"
    sql="select * from Card"
	set rs=conn.execute(sql)
    if rs.eof then
    Response.Redirect "messbox.asp?code=57" 
    else
    dim se1,se2,i
    se1=true
    se2=true
    i=0
     do while not rs.eof
       if rs("CardId")=CardId and rs("CardPwd")=CardPwd then
          i=i+1
          if not rs("Isell") then
             se1=false
             Response.Redirect "messbox.asp?code=52" '此卡还没有售出
          else
             if rs("IsFill") then
                Response.Redirect "messbox.asp?code=51" '此卡已经充值过
                se1=false
             else
               if rs("CardType")<>CardType then
                  Response.Redirect "messbox.asp?code=50" '卡的类型不匹配
                  se1=false
               end if
             end if
           end if
       end if
       if rs("CardId")=card2 and rs("CardPwd")=pw2 then
          i=i+1
          if not rs("Isell") then
             Response.Redirect "messbox.asp?code=52" '此卡还没有售出
             se2=false
          else
             if rs("IsFill") then
                Response.Redirect "messbox.asp?code=51" '此卡已经充值过
                se2=false
             else
               if rs("CardType")<>CardType then
                  Response.Redirect "messbox.asp?code=50" '卡的类型不匹配
                  se2=false
               end if
             end if
           end if
       end if
     rs.movenext
     loop
     if i<>2 then
     Response.Redirect "messbox.asp?code=56"
     end if
     GameType=GameType&"[季卡]"
     if se1=true and se2=true then
		conn.execute("insert into Register(CardID,CardPwd,GameID,GameType,CardType,CName,ContactTel,Oicq,Email,DealCase) values('"&CardID&"','"&CardPwd&"','"&GameId&"','"&GameType&"','"&CardType&"','"&Name&"','"&ContactTel&"','"&Oicq&"','"&Email&"','暂未开通')")
		conn.execute("update Card set IsFill=1 where CardId='"&CardId&"' and CardPwd='"&CardPwd&"'")
		conn.execute("insert into Register(CardID,CardPwd,GameID,GameType,CardType,CName,ContactTel,Oicq,Email,DealCase) values('"&card2&"','"&pw2&"','"&GameId&"','"&GameType&"','"&CardType&"','"&Name&"','"&ContactTel&"','"&Oicq&"','"&Email&"','暂未开通')")
		conn.execute("update Card set IsFill=1 where CardId='"&card2&"' and CardPwd='"&pw2&"'")
	 end if	
	rs.close()
	set rs=nothing
	CloseDatabase
end if
end sub
sub chuanqi3()
    if area="" then Response.Redirect "messbox.asp?code=60"
    GameType=GameType&"[第" & area & "区]"
	if card2="" or card3="" or pw3="" or pw2="" then Response.Redirect "messbox.asp?code=60"
	if CardId=card2 or CardId=card3 or card2=card3 then Response.Redirect "messbox.asp?code=54"
    if CardPwd=pw2 or CardPwd=pw3 or pw2=pw3 then Response.Redirect "messbox.asp?code=54"
    sql="select * from Card"
	set rs=conn.execute(sql)
    if rs.eof then
    Response.Redirect "messbox.asp?code=57" 
    else
    dim se1,se2,se3,i
    se1=true
    se2=true
    se3=true
    i=0
     do while not rs.eof
       if rs("CardId")=CardId and rs("CardPwd")=CardPwd then
          i=i+1
          if not rs("Isell") then
             se1=false
             Response.Redirect "messbox.asp?code=52" '此卡还没有售出
          else
             if rs("IsFill") then
                Response.Redirect "messbox.asp?code=51" '此卡已经充值过
                se1=false
             else
               if rs("CardType")<>CardType then
                  Response.Redirect "messbox.asp?code=50" '卡的类型不匹配
                  se1=false
               end if
             end if
           end if
       end if
       if rs("CardId")=card2 and rs("CardPwd")=pw2 then
          i=i+1
          if not rs("Isell") then
             Response.Redirect "messbox.asp?code=52" '此卡还没有售出
             se2=false
          else
             if rs("IsFill") then
                Response.Redirect "messbox.asp?code=51" '此卡已经充值过
                se2=false
             else
               if rs("CardType")<>CardType then
                  Response.Redirect "messbox.asp?code=50" '卡的类型不匹配
                  se2=false
               end if
             end if
           end if
       end if
       if rs("CardId")=card3 and rs("CardPwd")=pw3 then
          i=i+1
          if not rs("Isell") then
             Response.Redirect "messbox.asp?code=52" '此卡还没有售出
             se3=false
          else
             if rs("IsFill") then
                Response.Redirect "messbox.asp?code=51" '此卡已经充值过
                se3=false
             else
               if rs("CardType")<>CardType then
                  Response.Redirect "messbox.asp?code=50" '卡的类型不匹配
                  se3=false
               end if
             end if
           end if

       end if
     rs.movenext
     loop
     if i<>3 then
     Response.Redirect "messbox.asp?code=56"
     end if
     GameType=GameType&"[半年卡]"
     if se1=true and se2=true and se3=true then
		conn.execute("insert into Register(CardID,CardPwd,GameID,GameType,CardType,CName,ContactTel,Oicq,Email,DealCase) values('"&CardID&"','"&CardPwd&"','"&GameId&"','"&GameType&"','"&CardType&"','"&Name&"','"&ContactTel&"','"&Oicq&"','"&Email&"','暂未开通')")
		conn.execute("update Card set IsFill=1 where CardId='"&CardId&"' and CardPwd='"&CardPwd&"'")
		conn.execute("insert into Register(CardID,CardPwd,GameID,GameType,CardType,CName,ContactTel,Oicq,Email,DealCase) values('"&card2&"','"&pw2&"','"&GameId&"','"&GameType&"','"&CardType&"','"&Name&"','"&ContactTel&"','"&Oicq&"','"&Email&"','暂未开通')")
		conn.execute("update Card set IsFill=1 where CardId='"&card2&"' and CardPwd='"&pw2&"'")
        conn.execute("insert into Register(CardID,CardPwd,GameID,GameType,CardType,CName,ContactTel,Oicq,Email,DealCase) values('"&card3&"','"&pw3&"','"&GameId&"','"&GameType&"','"&CardType&"','"&Name&"','"&ContactTel&"','"&Oicq&"','"&Email&"','暂未开通')")
		conn.execute("update Card set IsFill=1 where CardId='"&card3&"' and CardPwd='"&pw3&"'")
	 end if
 end if
	rs.close()
	set rs=nothing
	CloseDatabase
end sub
sub chuanqi4()
   if area="" then Response.Redirect "messbox.asp?code=60"
   GameType=GameType&"[第" & area & "区]"

	if card2="" or card3="" or card4="" or pw3="" or pw2="" or pw4="" then Response.Redirect "messbox.asp?code=60"
	if CardId=card2 or CardId=card3 or CardId=card4 or card2=card3 or card2=card4 or card3=card4 then Response.Redirect "messbox.asp?code=54"
    if CardPwd=pw2 or CardPwd=pw3 or CardPwd=pw4 or pw2=pw3 or pw2=pw4 or pw3=pw4 then Response.Redirect "messbox.asp?code=54"
    sql="select * from Card"
	set rs=conn.execute(sql)
    if rs.eof then
    Response.Redirect "messbox.asp?code=57" 
    else
    dim se1,se2,se3,se4,i
    se1=true
    se2=true
    se3=true
    se4=true
    i=0
     do while not rs.eof
       if rs("CardId")=CardId and rs("CardPwd")=CardPwd then
          i=i+1
          if not rs("Isell") then
             se1=false
             Response.Redirect "messbox.asp?code=52" '此卡还没有售出
          else
             if rs("IsFill") then
                Response.Redirect "messbox.asp?code=51" '此卡已经充值过
                se1=false
             else
               if rs("CardType")<>CardType then
                  Response.Redirect "messbox.asp?code=50" '卡的类型不匹配
                  se1=false
               end if
             end if
           end if
       end if
       if rs("CardId")=card2 and rs("CardPwd")=pw2 then
          i=i+1
          if not rs("Isell") then
             Response.Redirect "messbox.asp?code=52" '此卡还没有售出
             se2=false
          else
             if rs("IsFill") then
                Response.Redirect "messbox.asp?code=51" '此卡已经充值过
                se2=false
             else
               if rs("CardType")<>CardType then
                  Response.Redirect "messbox.asp?code=50" '卡的类型不匹配
                  se2=false
               end if
             end if
           end if
       end if
       if rs("CardId")=card3 and rs("CardPwd")=pw3 then
          i=i+1
          if not rs("Isell") then
             Response.Redirect "messbox.asp?code=52" '此卡还没有售出
             se3=false
          else
             if rs("IsFill") then
                Response.Redirect "messbox.asp?code=51" '此卡已经充值过
                se3=false
             else
               if rs("CardType")<>CardType then
                  Response.Redirect "messbox.asp?code=50" '卡的类型不匹配
                  se3=false
               end if
             end if
           end if

⌨️ 快捷键说明

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