📄 doit2.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/cardshop.asp" -->
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request.Form("cardname") <> "") Then
Recordset1__MMColParam = Request.Form("cardname")
End If
%>
<%
Dim Recordset1__MMColParam2
Recordset1__MMColParam2 = "1"
If (Request.Form("cardpass") <> "") Then
Recordset1__MMColParam2 = Request.Form("cardpass")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_cardshop_STRING
Recordset1.Source = "SELECT * FROM cardatabase WHERE cardname = '" + Replace(Recordset1__MMColParam, "'", "''") + "' AND cardpass ='" + Replace(Recordset1__MMColParam2, "'", "''") + "'"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
gname=Trim(Request.Form("gname"))
gaccount=Trim(Request.Form("gaccount"))
gpass=Trim(Request.Form("gpass"))
gdis=Trim(Request.Form("gdis"))
gserver=Trim(Request.Form("gserver"))
filltype=Trim(Request.Form("filltype"))
cardtype=Trim(Request.Form("cardtype"))
gother=Trim(Request.Form("gother"))
cardname=Trim(Request.Form("cardname"))
cardpass=Trim(Request.Form("cardpass"))
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="refresh" content="8;URL=index.asp">
</head>
<body>
<%
if len(cardname)<9 then
Response.Write("您输入的卡号,或该卡号密码效验错误")
response.End()
end if
card=right(cardname,len(cardname)-3)
'card=left(card, len(card)-2)
if not IsNumeric(card) then
Response.Write("您输入的卡号,或该卡号密码效验错误")
response.End()
end if
pass=clng(card)\99
if cstr(pass) <> cstr(left(cardpass,len(pass))) then
Response.Write("您输入的卡号或密码不正确,或该卡号密码效验错误")
response.End()
end if
%>
<%
if recordset1.bof and recordset1.eof then
Response.Write("您输入的卡号或密码不正确,或该卡不存在")
response.End()
end if
%>
<%
if (Recordset1.Fields.Item("valid").Value)="disablecard" then
Response.Write("该卡已经在" & Recordset1.Fields.Item("operatedate").Value & "被使用过了<br>")
Trim(Request.Form("在首页您可以查到更详细的信息"))
response.End()
end if
%>
<%
datetime=cstr(now())
detail=""
if gaccount<>"" then detail=detail+"帐号:" +gaccount + "||"
if gpass<>"" then detail=detail+"密码:" +gpass + "||"
if gdis<>"" then detail=detail+"区:" +gdis + "||"
if gserver<>"" then detail=detail+"服务器:" +gserver + "||"
if filltype<>"" then detail=detail+"冲值类型:" +filltype + "||"
if cardtype<>"" then detail=detail+"点卡种类:" +cardtype + "||"
if gother<>"" then detail=detail+"备注:" +gother + "||"
cost1=left(cardname,3)
cost1=right(cost1,1)
select case cost1
case "a"
cost=5
case "b"
cost=10
case "c"
cost=15
case "d"
cost=20
case "e"
cost=25
case "f"
cost=30
case "g"
cost=35
case "h"
cost=40
case "i"
cost=45
case "j"
cost=50
case "k"
cost=55
case "l"
cost=60
case "m"
cost=65
case "n"
cost=70
case "o"
cost=75
case "p"
cost=80
case "q"
cost=85
case "r"
cost=90
case "s"
cost=95
case "t"
cost=100
case "u"
cost=12
case "v"
cost=14
case "w"
cost=16
case "x"
cost=18
case "y"
cost=32
case "z"
cost=48
case "A"
cost=5
case "B"
cost=10
case "C"
cost=15
case "D"
cost=20
case "E"
cost=25
case "F"
cost=30
case "G"
cost=35
case "H"
cost=40
case "I"
cost=45
case "J"
cost=50
case "K"
cost=55
case "L"
cost=60
case "M"
cost=65
case "N"
cost=70
case "O"
cost=75
case "P"
cost=80
case "Q"
cost=85
case "R"
cost=90
case "S"
cost=95
case "T"
cost=100
case "U"
cost=12
case "V"
cost=14
case "W"
cost=16
case "X"
cost=18
case "Y"
cost=32
case "Z"
cost=48
end select
cardnumber=cardname
finish="waiting"
%>
<%
if(cardnumber <> "") then Command1__a1 = cardnumber
if(cost <> "") then Command1__a2 = cost
if(detail <> "") then Command1__a3 = detail
if(finish <> "") then Command1__a4 = finish
if(gname <> "") then Command1__a5 = gname
%>
<%
set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_cardshop_STRING
Command1.CommandText = "INSERT INTO operate (cardnumber, cost, detail, finish, gamename) VALUES ('" + Replace(Command1__a1, "'", "''") + "','" + Replace(Command1__a2, "'", "''") + "','" + Replace(Command1__a3, "'", "''") + "','" + Replace(Command1__a4, "'", "''") + "','" + Replace(Command1__a5, "'", "''") + "') "
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()
%>
<%
ipdata = Request.ServerVariables("REMOTE_ADDR") & "->"& Request.ServerVariables("HTTP_X_FORWARDED_FOR")
%>
<%
Command2__a1 = now()
if(ipdata <> "") then Command2__a2 = ipdata
if("disablecard" <> "") then Command2__a3 = "disablecard"
if(cardname <> "") then Command2__b1 = cardname
%>
<%
set Command2 = Server.CreateObject("ADODB.Command")
Command2.ActiveConnection = MM_cardshop_STRING
Command2.CommandText = "UPDATE cardatabase SET operatedate='" + Replace(Command2__a1, "'", "''") + "', userip='" + Replace(Command2__a2, "'", "''") + "', valid='" + Replace(Command2__a3, "'", "''") + "' WHERE cardname ='" + Replace(Command2__b1, "'", "''") + "'"
Command2.CommandType = 1
Command2.CommandTimeout = 0
Command2.Prepared = true
Command2.Execute()
%>
充值成功,稍后返回 <a href="index.asp">首页</a>
<p>
游戏名称:<%= gname %><br>
充值金额:<%= cost %>元<br>
详细信息:<%= detail %><p>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -