admin_cardsaddsave.asp

来自「国内第一数字点卡销售程序。功能强大。 完整无错!数据文件经MD5加密!经严格测」· ASP 代码 · 共 147 行

ASP
147
字号
<!--#include file="conn.asp"-->
<%
if session("admin_rank")<>1 and session("admin_rank")<>4 then
response.write("<script>alert('您无权查看本页,SORRY!');window.location=('login.asp')</script>")
response.end
end if
%>
<link rel="stylesheet" type="text/css" href="css.css">
<%
dim rs
set rs=server.createobject("adodb.recordset")
dim cardnumber,cardpassword,cardpassword1,cgnum,sbnum,hhhh
cgnum=0
sbnum=0

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
dim so,inn,ik,mpi,woA,woB,cck,hw_name
Function strCount(strA, strB)
    Dim lngA,lngB,lngC
    lngA=Len(strA)
    lngB=Len(strB)
    lngC=Len(Replace(strA, strB, ""))
    strCount=(lngA-lngC)/lngB
End Function 
hw_id=request("hw_id")
sql="select * from hw where hw_id="&hw_id
rs.open sql,conn,3,3
hw_name=rs("hw_name")
rs.close

so =trim(request("so"))
so=replace(so,Chr(13) & Chr(10),"|")
inn=strCount(so,"|")
h1=len(so)
if mid(so,h1,1)="|" then
inn=inn-1
end if
ik=split(so,"|")
for mpi=0 to inn
'''''''''''''''''''''''提取单行成功,继续其他操作
woA=trim(ik(mpi))
	if len(woA)>2 then
		woA=replace(woA,"										"," ")
		woA=replace(woA,"									"," ")
		woA=replace(woA,"								"," ")
		woA=replace(woA,"							"," ")
		woA=replace(woA,"						"," ")
		woA=replace(woA,"					"," ")
		woA=replace(woA,"				"," ")
		woA=replace(woA,"			"," ")
		woA=replace(woA,"		"," ")
		woA=replace(woA,"	"," ")
		woA=replace(woA,"                       "," ")
		woA=replace(woA,"                      "," ")
		woA=replace(woA,"                     "," ")
		woA=replace(woA,"                    "," ")
		woA=replace(woA,"                   "," ")
		woA=replace(woA,"                  "," ")
		woA=replace(woA,"                 "," ")
		woA=replace(woA,"                "," ")
		woA=replace(woA,"               "," ")
		woA=replace(woA,"              "," ")
		woA=replace(woA,"             "," ")
		woA=replace(woA,"            "," ")
		woA=replace(woA,"           "," ")
		woA=replace(woA,"          "," ")
		woA=replace(woA,"         "," ")
		woA=replace(woA,"        "," ")
		woA=replace(woA,"       "," ")
		woA=replace(woA,"      "," ")
		woA=replace(woA,"     "," ")
		woA=replace(woA,"    "," ")
		woA=replace(woA,"   "," ")
		woA=replace(woA,"  "," ")
		woB=split(woA," ")
		cardnumber=trim(woB(0))
		cardpassword=trim(woB(1))
		'response.write "卡号:" & cardnumber & "  密码:" & cardpassword & "<br>"
        sql="select * from tingcardnum where hw_number='"&cardnumber&"'"
        rs.open sql,conn,3,3
        if rs.eof then
        rs.addnew
        rs("hw_id")=hw_id
        rs("hw_name")=hw_name
        rs("hw_number")=cardnumber
        rs("hw_pass")=strAnsi2Unicode(Base64encode(strUnicode2Ansi(cardpassword)))
        rs("hw_ok")=true
        rs("hw_date")=Now()
        cgnum=cgnum+1
		rs.update
		else
		sbnum=sbnum+1
	end if
		end if
		rs.close
	next
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>欢迎进入后台管理</title>

</head>

<body>

<table border="0" width="650" cellpadding="2" height="384" bgcolor="#008000" cellspacing="1">
  <tr>
 <td bgcolor="#000080" height="1" width="651">
  <p align="center"><font color="#FFFFFF"><b>游戏卡库存添加</b></font></p>
 </td>
  </tr>
  <tr>
 <td height="227" width="651" valign="top" bgcolor="#FFFFFF">
 <p align="center"> 
 <p align="center"> 
 <div align="center">
  <center>
  <table border="0" cellspacing="1" width="71%" height="121" bgcolor="#000000" cellpadding="3">
    <tr>
      <td width="100%" height="14" bgcolor="#000097"><font color="#FFFFFF">添加库存</font></td>
    </tr>
    <tr>
      <td width="100%" height="81" bgcolor="#EEEEEE">
        <p align="center" style="margin-top: 0; margin-bottom: 0"><font size="3" color="#FF0000">成功的在库存中添加了<%=cgnum%>个<%=hw_name%>!</font></p>
        <hr noshade size="1">
      </center>
      <p align="left" style="margin-top: 0; margin-bottom: 0"><%=sbnum%>个卡号因为已经存在而入库失败<b><font color="#000097">请继续其他操作。</font></b></td>
  </tr>
  <center>
  <tr>
    <td width="100%" height="14" bgcolor="#000080">
      <p align="center"><font color="#FFFFFF"><a href="admin_Cardsadd2.asp">
		<font color="#FFFFFF">[继续加卡]</font></a>&nbsp;&nbsp;&nbsp; </font></td>   
  </tr>
  </table>
  </center>
 </div>
 </td>
  </tr>
  </table>
</body>

</html>

⌨️ 快捷键说明

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