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

📄 topay.aspx.vb

📁 本程序修改自飞天BBS 7.0 将原来的ASP语法迁移为ASP.NET并封装成DLL ASP.NET相对ASP有更快的执行效率以及更高的并发访问量 基于ASP.NET的DLL可以运行在支持ASP
💻 VB
📖 第 1 页 / 共 2 页
字号:
' ***************************************************
' *        本程序由AspToAspX风火轮0.99转换生成      *
' *        http://Www.AspToAspX.Cn                  *
' *        Q Q :  139227536                         *
' *        QQ群:  17152722                          *
' *        MSN :  gzliangjianhua@hotmail.com        *
' *        EMail  AspToDll@vip.163.com              *
' ***************************************************
Imports Microsoft.VisualBasic
Imports System.Web
Imports System.Math
Imports System.Web.SessionState


Public Class _TOPAY
    Inherits System.Web.UI.Page
    Implements IHttpHandler, AspToAspX_Interface

    Public AspToAspX_Host_Class_Object As Object

Public request_text
Public md5_sign
Public defaulthome
Public wzrep
Public sp_id
Public spkey
Public returnurl
Public homepage
Public paymoney
Public Random
Public spid
Public sp_key
Public cmdno
Public bill_date
Public bank_type
Public desc
Public purchaser_id
Public bargainor_id
Public sp_billno
Public transaction_id
Public total_fee
Public fee_type
Public return_url
Public attach
Public sign_text
Public unit
Public ip
Public sql
Public linkdb
Public ft
Public ku
Public ckiesdomain
Public conndb
Public ConnectionString
Public userinfo
Public userinfox
Public rs As ADODB.Recordset
Public num
Public smsnum
    Public ASPX_CONN As _CONN
    Public ASPX_FTBBS_NAV As _FTBBS_NAV
    Public ASPX_INC_PUBLICFUN As _INC_PUBLICFUN
    Public ASPX_PAGEFUN As _PAGEFUN
    Public ASPX_BBSUSER As _BBSUSER
    Public ASPX_ASP_MD5 As _ASP_MD5
    Public ASPX_INC_BBSTAIL_HTM As _INC_BBSTAIL_HTM
#Region "..."
    Public Sub AspToAspX_InitIncludeFiles()
        ASPX_CONN = New _CONN()
        ASPX_CONN.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
        ASPX_CONN.AspToAspX_InitIncludeFiles()
        ASPX_FTBBS_NAV = New _FTBBS_NAV()
        ASPX_FTBBS_NAV.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
        ASPX_FTBBS_NAV.AspToAspX_InitIncludeFiles()
        ASPX_INC_PUBLICFUN = New _INC_PUBLICFUN()
        ASPX_INC_PUBLICFUN.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
        ASPX_INC_PUBLICFUN.AspToAspX_InitIncludeFiles()
        ASPX_PAGEFUN = New _PAGEFUN()
        ASPX_PAGEFUN.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
        ASPX_PAGEFUN.AspToAspX_InitIncludeFiles()
        ASPX_BBSUSER = New _BBSUSER()
        ASPX_BBSUSER.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
        ASPX_BBSUSER.AspToAspX_InitIncludeFiles()
        ASPX_ASP_MD5 = New _ASP_MD5()
        ASPX_ASP_MD5.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
        ASPX_ASP_MD5.AspToAspX_InitIncludeFiles()
        ASPX_INC_BBSTAIL_HTM = New _INC_BBSTAIL_HTM()
        ASPX_INC_BBSTAIL_HTM.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
        ASPX_INC_BBSTAIL_HTM.AspToAspX_InitIncludeFiles()
    End Sub

    Public Sub AspToAspX_UnloadIncludeFiles()
        ASPX_CONN.AspToAspX_UnloadIncludeFiles()
        ASPX_CONN = Nothing
        ASPX_FTBBS_NAV.AspToAspX_UnloadIncludeFiles()
        ASPX_FTBBS_NAV = Nothing
        ASPX_INC_PUBLICFUN.AspToAspX_UnloadIncludeFiles()
        ASPX_INC_PUBLICFUN = Nothing
        ASPX_PAGEFUN.AspToAspX_UnloadIncludeFiles()
        ASPX_PAGEFUN = Nothing
        ASPX_BBSUSER.AspToAspX_UnloadIncludeFiles()
        ASPX_BBSUSER = Nothing
        ASPX_ASP_MD5.AspToAspX_UnloadIncludeFiles()
        ASPX_ASP_MD5 = Nothing
        ASPX_INC_BBSTAIL_HTM.AspToAspX_UnloadIncludeFiles()
        ASPX_INC_BBSTAIL_HTM = Nothing
    End Sub

#End Region
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
        AspToAspXGlobal.Application = Application
        AspToAspXGlobal.Server = Server
        AspToAspXGlobal.Response = Response
        AspToAspXGlobal.Request = Request
        AspToAspXGlobal.Session = Session
        AspToAspX_Host_Class_Object = Me
        AspToAspX_InitIncludeFiles()
        AspToAspX_Page_Init()
        End Sub
    Public Sub AspToAspX_Page_Init()
    On Error GoTo _AspToAspX_Err
    ASPX_CONN.AspToAspX_Page_Init ( )
    ASPX_FTBBS_NAV.AspToAspX_Page_Init ( )
    ASPX_INC_PUBLICFUN.AspToAspX_Page_Init ( )
    ASPX_PAGEFUN.AspToAspX_Page_Init ( )
    ASPX_BBSUSER.AspToAspX_Page_Init ( )
    ASPX_ASP_MD5.AspToAspX_Page_Init ( )
    Response.Write ( "<HTML><HEAD>" & Chr ( 13 ) ) '7
    Response.Write ( "<title>交易支付中心</title>" & Chr ( 13 ) ) '8
    Response.Write ( "<META http-equiv=Content-Type content=text/html;charset=utf-8>" & Chr ( 13 ) ) '9
    Response.Write ( "<meta http-equiv=""Cache-Control"" content=""no-cache""/> " & Chr ( 13 ) ) '10
    Response.Write ( "<script language=javascript src=""inc/cookies.js""></script>" & Chr ( 13 ) ) '11
    Response.Write ( "<script>" & Chr ( 13 ) ) '12
    Response.Write ( "var stylecook = getCookie(""STYLESHOW"");" & Chr ( 13 ) ) '13
    Response.Write ( "var style;" & Chr ( 13 ) ) '14
    Response.Write ( "var strstyle;" & Chr ( 13 ) ) '15
    Response.Write ( "if(stylecook=="""")" & Chr ( 13 ) ) '16
    Response.Write ( "{" & Chr ( 13 ) ) '17
    Response.Write ( " stylecook=1;" & Chr ( 13 ) ) '18
    Response.Write ( "}" & Chr ( 13 ) ) '19
    Response.Write ( "else" & Chr ( 13 ) ) '20
    Response.Write ( "{" & Chr ( 13 ) ) '21
    Response.Write ( " stylecook++;" & Chr ( 13 ) ) '22
    Response.Write ( "}" & Chr ( 13 ) ) '23
    Response.Write ( "style=""main0""+stylecook+"".css"";" & Chr ( 13 ) ) '24
    Response.Write ( "strstyle=""<link href=\""css/""+style+""\""  rel=\""stylesheet\"" type=\""text/css\""> "";" & Chr ( 13 ) ) '25
    Response.Write ( "document.write(strstyle);" & Chr ( 13 ) ) '26
    Response.Write ( "</script>" & Chr ( 13 ) ) '27
    Response.Write ( "</HEAD>" & Chr ( 13 ) ) '28
    Response.Write ( "</head>" & Chr ( 13 ) ) '29
    Response.Write ( "<script language=""JavaScript"" src=""inc/Main.js""></script>" & Chr ( 13 ) ) '30
    Response.Write ( "<body>" & Chr ( 13 ) ) '31
    FTBBS_HTML_MB ( ft ) '33
    defaulthome = Application ( "FTBBSMB" ) ( 31 , 0 ) '34
    wzrep = Application ( "FTBBSMB" ) ( 5 , 0 ) '35
    sp_id = Application ( "FTBBSMB" ) ( 62 , 0 ) '36
    spkey = Application ( "FTBBSMB" ) ( 63 , 0 ) '37
    returnurl = Application ( "FTBBSMB" ) ( 64 , 0 ) '38
    homepage = ft_home ( defaulthome ) '39
    ftbbs_clubuser_id = getcookie ( "clubuser_id" ) '41
    paymoney = AspToAspX_CheckIsNothing ( Request.Form ( "paymoney" ) ) '42
    Randomize ( ) '43
    Random = AspToAspX_Int ( ( 10000000000 - 1000000000 + 1 ) * AspToAspX_Rnd + 1000000000 ) '44
    If Not AspToAspX_CheckIsNumeric ( paymoney ) Then '45
        Response.Write ( "<script language='javascript'>" ) '46
        Response.Write ( "alert('金钱必须为数字!');" ) '47
        Response.Write ( "history.go(-1);" ) '48
        Response.Write ( "</script>" ) '49
        Response.End ( ) '50
    End If '51
    If AspToAspX_CheckDBNull ( paymoney ) < 100 Then '52
        Response.Write ( "<script language='javascript'>" ) '53
        Response.Write ( "alert('金额最小必大于100');" ) '54
        Response.Write ( "history.go(-1);" ) '55
        Response.Write ( "</script>" ) '56
        Response.End ( ) '57
    End If '58
    spid = sp_id '81
    sp_key = spkey '82
    cmdno = "1" '84
    bill_date = CFTGetServerDate '85
    bank_type = "0" '86
    desc = "论坛帐户充值" '95
    purchaser_id = "" '96
    bargainor_id = spid '97
    sp_billno = Random '98
    transaction_id = spid & bill_date & sp_billno '103
    total_fee = AspToAspX_CheckIsNothing ( Request.Form ( "paymoney" ) ) '104
    fee_type = "1" '105
    return_url = returnurl '106
    attach = ftbbs_clubuser_id '107
    sign_text = "cmdno=" & cmdno & "&date=" & bill_date & "&bargainor_id=" & bargainor_id & "&transaction_id=" & transaction_id & "&sp_billno=" & sp_billno & "&total_fee=" & total_fee & "&fee_type=" & fee_type & "&return_url=" & return_url & "&attach=" & attach & "&key=" & sp_key '109
    md5_sign = UCase ( ASP_MD5 ( sign_text ) ) '110
    If AspToAspX_CheckDBNull ( fee_type ) = 2 Then '111
        unit = "USD(美元)" '112
    ElseIf AspToAspX_CheckDBNull ( fee_type ) = 3 Then '113
        unit = "HKD(港币)" '114
    Else '115
        unit = "RMB(人民币)" '116
    End If '117
    ip = AspToAspX_GetRequestServerVariables ( "remote_addr" ) '119
    sql = "insert into " & ft & "ftbbs_pay_log(clubuser_id,paytype,paymoney,payresults,payip,sp_billno) values('" & ftbbs_clubuser_id & "',0,'" & paymoney & "',0,'" & ip & "','" & sp_billno & "')" '120
    conn.Execute ( sql ) '121
    If AspToAspX_CheckDBNull ( paymoney ) < 100 Then '122
        paymoney = "0" & paymoney / 100 '123
    Else '124
        paymoney = paymoney / 100 '125
    End If '126
    If AspToAspX_CheckDBNull ( getcookie ( "ftbbstype" ) ) = 1 Then '127
        Response.Write ( headhtml ) '128
    End If '129
    Response.Write ( vbCrLf )
    Response.Write ( "<table width=""99%"" border=""0"" cellspacing=""0"" cellpadding=""0"" align=""center"" class=""maintbbg"">" & Chr ( 13 ) ) '131
    Response.Write ( "  <tr>" & Chr ( 13 ) ) '132
    Response.Write ( "    <td> " & Chr ( 13 ) ) '133
    Response.Write ( "      <table width=""100%"" border=0 cellpadding=2 cellspacing=1 class=""maintbbg"">" & Chr ( 13 ) ) '134
    Response.Write ( "        <tbody>" & Chr ( 13 ) ) '135
    Response.Write ( "          <tr> " & Chr ( 13 ) ) '136
    Response.Write ( "            <td height=""25"" class=""f12bg"">&nbsp;" ) '137
    Response.Write ( userinfo ) '137
    Response.Write ( "</td>" & Chr ( 13 ) ) '137
    Response.Write ( "          </tr>" & Chr ( 13 ) ) '138
    Response.Write ( "          <tr> " & Chr ( 13 ) ) '139
    Response.Write ( "            <td height=""25"" colspan=""3"" class=""maintbtr3"">&nbsp;<a href=""" ) '140
    Response.Write ( homepage ) '140
    Response.Write ( """>论坛首页</a> " & Chr ( 13 ) ) '140
    Response.Write ( "              >> <a href=""trans.aspx"">交易中心</a> >> <a href=""tenpay.aspx"">在线充值</a></td>" & Chr ( 13 ) ) '141
    Response.Write ( "          </tr>" & Chr ( 13 ) ) '142
    Response.Write ( "        </tbody>" & Chr ( 13 ) ) '143
    Response.Write ( "      </table>" & Chr ( 13 ) ) '144
    Response.Write ( "    </td>" & Chr ( 13 ) ) '145
    Response.Write ( "  </tr>" & Chr ( 13 ) ) '146
    Response.Write ( "</table>" & Chr ( 13 ) ) '147
    Response.Write ( "<table cellspacing=0 cellpadding=0 width=""99%"" align=center border=0>" & Chr ( 13 ) ) '148
    Response.Write ( "  <tbody>" & Chr ( 13 ) ) '149
    Response.Write ( "    <tr> " & Chr ( 13 ) ) '150
    Response.Write ( "      <td height=5></td>" & Chr ( 13 ) ) '151
    Response.Write ( "    </tr>" & Chr ( 13 ) ) '152
    Response.Write ( "  </tbody>" & Chr ( 13 ) ) '153
    Response.Write ( "</table>" & Chr ( 13 ) ) '154
    Response.Write ( "<table width=""99%"" border=0 align=""center"" cellpadding=2 cellspacing=1 class=""maintbbg"">" & Chr ( 13 ) ) '155
    Response.Write ( "  <tbody>" & Chr ( 13 ) ) '156
    Response.Write ( "    <tr> " & Chr ( 13 ) ) '157
    Response.Write ( "      <td height=""27"" class=""f12bg"">" & Chr ( 13 ) ) '158
    Response.Write ( "<div align=""center"">支付订单生成如下:</div></td>" & Chr ( 13 ) ) '159
    Response.Write ( "    </tr>" & Chr ( 13 ) ) '160
    Response.Write ( "    <tr> " & Chr ( 13 ) ) '161
    Response.Write ( "      <td height=""39"" colspan=""3"" class=""maintbtr3"">" & Chr ( 13 ) ) '162
    Response.Write ( "" & Chr ( 9 ) & "  <form action=""https://www.tenpay.com/cgi-bin/v1.0/pay_gate.cgi"">" & Chr ( 13 ) ) '163
    Response.Write ( "          <table width=""60%"" border=""0"" align=""center"" cellpadding=""1"" cellspacing=""1"" bgcolor=""#FFFFFF"">" & Chr ( 13 ) ) '164
    Response.Write ( "            <tr bgcolor=""#FFFFFF"" class=""maintbtr3""> " & Chr ( 13 ) ) '165
    Response.Write ( "              <td width=""23%"" height=""30""> " & Chr ( 13 ) ) '166
    Response.Write ( "                <div align=""right"">商品名称:</div></td>" & Chr ( 13 ) ) '167
    Response.Write ( "              <td width=""77%"">" ) '168
    Response.Write ( desc ) '168
    Response.Write ( "</td>" & Chr ( 13 ) ) '168
    Response.Write ( "            </tr>" & Chr ( 13 ) ) '169
    Response.Write ( "            <tr bgcolor=""#FFFFFF"" class=""maintbtr3""> " & Chr ( 13 ) ) '170
    Response.Write ( "              <td height=""30""> " & Chr ( 13 ) ) '171
    Response.Write ( "                <div align=""right"">订 单 号:</div></td>" & Chr ( 13 ) ) '172
    Response.Write ( "              <td>" ) '173
    Response.Write ( sp_billno ) '173
    Response.Write ( "</td>" & Chr ( 13 ) ) '173
    Response.Write ( "            </tr>" & Chr ( 13 ) ) '174
    Response.Write ( "            <tr bgcolor=""#FFFFFF"" class=""maintbtr3""> " & Chr ( 13 ) ) '175
    Response.Write ( "              <td height=""30""> " & Chr ( 13 ) ) '176
    Response.Write ( "                <div align=""right"">支付金额:</div></td>" & Chr ( 13 ) ) '177
    Response.Write ( "              <td>" ) '178
    Response.Write ( paymoney ) '178
    Response.Write ( "元</td>" & Chr ( 13 ) ) '178
    Response.Write ( "            </tr>" & Chr ( 13 ) ) '179
    Response.Write ( "            <tr bgcolor=""#FFFFFF"" class=""maintbtr3""> " & Chr ( 13 ) ) '180
    Response.Write ( "              <td height=""30""> " & Chr ( 13 ) ) '181
    Response.Write ( "                <div align=""right"">货币类型:</div></td>" & Chr ( 13 ) ) '182
    Response.Write ( "              <td>" & Chr ( 13 ) ) '183
    Response.Write ( "" & Chr ( 9 ) & Chr ( 9 ) & Chr ( 9 ) & "  " ) '184
    Response.Write ( unit ) '184
    Response.Write ( vbCrLf )
    Response.Write ( "" & Chr ( 9 ) & Chr ( 9 ) & Chr ( 9 ) & "  </td>" & Chr ( 13 ) ) '185
    Response.Write ( "            </tr>" & Chr ( 13 ) ) '186
    Response.Write ( "            <tr bgcolor=""#FFFFFF"" class=""maintbtr3""> " & Chr ( 13 ) ) '187
    Response.Write ( "              <td height=""30""> " & Chr ( 13 ) ) '188
    Response.Write ( "                <div align=""right"">交易日期:</div></td>" & Chr ( 13 ) ) '189
    Response.Write ( "              <td>" ) '190
    Response.Write ( bill_date ) '190
    Response.Write ( "</td>" & Chr ( 13 ) ) '190
    Response.Write ( "            </tr>" & Chr ( 13 ) ) '191
    Response.Write ( "            <tr bgcolor=""#FFFFFF"" class=""maintbtr3""> " & Chr ( 13 ) ) '192
    Response.Write ( "              <td height=""50""> " & Chr ( 13 ) ) '193
    Response.Write ( "                <div align=""right""></div></td>" & Chr ( 13 ) ) '194
    Response.Write ( "              <td>" & Chr ( 13 ) ) '195
    Response.Write ( "                <input type=hidden name=""cmdno""" & Chr ( 9 ) & Chr ( 9 ) & Chr ( 9 ) & Chr ( 9 ) & "value=""" ) '196
    Response.Write ( cmdno ) '196
    Response.Write ( """>" & Chr ( 13 ) ) '196
    Response.Write ( "                <input type=hidden name=""date""" & Chr ( 9 ) & Chr ( 9 ) & Chr ( 9 ) & "    value=""" ) '197
    Response.Write ( bill_date ) '197
    Response.Write ( """>" & Chr ( 13 ) ) '197
    Response.Write ( "                <input type=hidden name=""bank_type""" & Chr ( 9 ) & Chr ( 9 ) & Chr ( 9 ) & "value=""" ) '198
    Response.Write ( bank_type ) '198
    Response.Write ( """>" & Chr ( 13 ) ) '198
    Response.Write ( "                <input type=hidden name=""desc""" & Chr ( 9 ) & Chr ( 9 ) & Chr ( 9 ) & Chr ( 9 ) & "value=""" ) '199
    Response.Write ( desc ) '199
    Response.Write ( """>" & Chr ( 13 ) ) '199
    Response.Write ( "                <input type=hidden name=""purchaser_id""" & Chr ( 9 ) & Chr ( 9 ) & "value=""" ) '200
    Response.Write ( purchaser_id ) '200
    Response.Write ( """>" & Chr ( 13 ) ) '200
    Response.Write ( "                <input type=hidden name=""bargainor_id""" & Chr ( 9 ) & Chr ( 9 ) & "value=""" ) '201
    Response.Write ( bargainor_id ) '201
    Response.Write ( """>" & Chr ( 13 ) ) '201
    Response.Write ( "                <input type=hidden name=""transaction_id""" & Chr ( 9 ) & "value=""" ) '202
    Response.Write ( transaction_id ) '202
    Response.Write ( """>" & Chr ( 13 ) ) '202
    Response.Write ( "                <input type=hidden name=""sp_billno""" & Chr ( 9 ) & Chr ( 9 ) & Chr ( 9 ) & "value=""" ) '203
    Response.Write ( sp_billno ) '203
    Response.Write ( """>" & Chr ( 13 ) ) '203
    Response.Write ( "                <input type=hidden name=""total_fee""" & Chr ( 9 ) & Chr ( 9 ) & Chr ( 9 ) & "value=""" ) '204
    Response.Write ( total_fee ) '204
    Response.Write ( """>" & Chr ( 13 ) ) '204
    Response.Write ( "                <input type=hidden name=""fee_type""" & Chr ( 9 ) & Chr ( 9 ) & Chr ( 9 ) & "value=""" ) '205
    Response.Write ( fee_type ) '205
    Response.Write ( """>" & Chr ( 13 ) ) '205
    Response.Write ( "                <input type=hidden name=""return_url""" & Chr ( 9 ) & Chr ( 9 ) & "value=""" ) '206
    Response.Write ( return_url ) '206
    Response.Write ( """>" & Chr ( 13 ) ) '206
    Response.Write ( "                <input type=hidden name=""attach""" & Chr ( 9 ) & Chr ( 9 ) & Chr ( 9 ) & "value=""" ) '207
    Response.Write ( attach ) '207
    Response.Write ( """>" & Chr ( 13 ) ) '207
    Response.Write ( "                <input type=hidden name=""sign""" & Chr ( 9 ) & Chr ( 9 ) & Chr ( 9 ) & Chr ( 9 ) & "value=""" ) '208
    Response.Write ( md5_sign ) '208
    Response.Write ( """>" & Chr ( 13 ) ) '208
    Response.Write ( "                <input type=""submit"" name=""Submit"" value=""财付通支付""></td>" & Chr ( 13 ) ) '209
    Response.Write ( "            </tr>" & Chr ( 13 ) ) '210
    Response.Write ( "          </table>" & Chr ( 13 ) ) '211
    Response.Write ( "        </form></td>" & Chr ( 13 ) ) '212
    Response.Write ( "    </tr>" & Chr ( 13 ) ) '213
    Response.Write ( "  </tbody>" & Chr ( 13 ) ) '214
    Response.Write ( "</table>" & Chr ( 13 ) ) '215
    ASPX_INC_BBSTAIL_HTM.AspToAspX_Page_Init ( )
    CloseDb ( ) '217
    Response.Write ( vbCrLf )

        AspToAspX_UnloadIncludeFiles()
        Exit Sub
    _AspToAspX_Err:
        AspToAspX_WriteLog ("topay_aspx Page_Init:" & Err.Description)
        Resume Next
        End Sub

⌨️ 快捷键说明

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