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

📄 admin_payplatform.asp

📁 个人网站比较简短
💻 ASP
📖 第 1 页 / 共 2 页
字号:
    Response.Write "<form name='myform' method='post' action='Admin_PayPlatform.asp'>" & vbCrLf
    Response.Write "  <table width='100%'  border='0' cellpadding='2' cellspacing='1' class='border'>" & vbCrLf
    Response.Write "    <tr align='center'>" & vbCrLf
    Response.Write "      <td colspan='2' class='title'><b>修 改 在 线 支 付 平 台</b></td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>" & vbCrLf
    Response.Write "      <td width='30%' align='right'>平台名称:</td>" & vbCrLf
    Response.Write "      <td><input name='PlatformName' type='text' id='PlatformName' size='50' maxlength='20' value='" & rsPayPlatform("PlatformName") & "' disabled></td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>" & vbCrLf
    Response.Write "      <td width='30%' align='right'>对外显示的名称:</td>" & vbCrLf
    Response.Write "      <td><input name='ShowName' type='text' id='ShowName' size='50' maxlength='30' value='" & rsPayPlatform("ShowName") & "'> <font color='#FF0000'>*</font></td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>" & vbCrLf
    Response.Write "      <td width='30%' align='right'>说明:</td>" & vbCrLf
    Response.Write "      <td><textarea name='Description' cols='42' rows='5'>" & rsPayPlatform("Description") & "</textarea></td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>" & vbCrLf
    Response.Write "      <td width='30%' align='right'>商户ID</td>" & vbCrLf
    Response.Write "      <td><input name='AccountsID' type='text' id='AccountsID' size='50' maxlength='50' value='" & rsPayPlatform("AccountsID") & "'> <font color='#FF0000'>*</font></td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>" & vbCrLf
    Response.Write "      <td width='30%' align='right'>MD5密钥:</td>" & vbCrLf
    Response.Write "      <td><input name='MD5Key' type='password' id='MD5Key' size='50' maxlength='255' value='" & rsPayPlatform("MD5Key") & "'> <font color='#FF0000'>*</font></td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr class='tdbg'>" & vbCrLf
    Response.Write "      <td width='30%' align='right'>手续费率:</td>" & vbCrLf
    Response.Write "      <td><input name='Rate' type='text' id='Rate' size='5' maxlength='5' value='" & rsPayPlatform("Rate") & "'>% <font color='#FF0000'>*</font><br>" & vbCrLf
    Response.Write "        <input name='PlusPoundage' type='checkbox' value='1' " & IsRadioChecked(rsPayPlatform("PlusPoundage"), True) & "> 手续费由付款人额外支付</td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    Response.Write "    <tr align='center' class='tdbg'>" & vbCrLf
    Response.Write "      <td height='50' colspan='2'><input name='PlatformID' type='hidden' id='PlatformID' value='" & PlatformID & "'>" & vbCrLf
    Response.Write "      <input name='Action' type='hidden' id='Action' value='SaveModify'>" & vbCrLf
    Response.Write "          <input type='submit' name='Submit' value='保存在线支付平台'></td>" & vbCrLf
    Response.Write "    </tr>" & vbCrLf
    Response.Write "  </table>" & vbCrLf
    Response.Write "</form>" & vbCrLf
    Response.Write "" & vbCrLf
    Set rsPayPlatform = Nothing
End Sub

Sub SaveBank()
    Dim PlatformID, ShowName, AccountsID, Accounts, MD5Key, Rate
    Dim rsPayPlatform, sqlPlatform
    PlatformID = Trim(Request("PlatformID"))
    ShowName = Trim(Request("ShowName"))
    AccountsID = Trim(Request("AccountsID"))
    Accounts = Trim(Request("Accounts"))
    MD5Key = Trim(Request("MD5Key"))
    Rate = Trim(Request("Rate"))
    If PlatformID = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>请指定PlatformID!</li>"
    Else
        PlatformID = PE_CLng(PlatformID)
    End If
    If ShowName = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>请指定平台对外显示的名称</li>"
    End If
    If AccountsID = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>请指定商户ID</li>"
    End If
    If MD5Key = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>请指定MD5密钥</li>"
    End If
    If Rate = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>请指定手续费率</li>"
    Else
        Rate = PE_CDbl(Rate)
    End If
    
    
    If FoundErr = True Then Exit Sub
    
    sqlPlatform = "select * from PE_PayPlatform where PlatformID=" & PlatformID
    Set rsPayPlatform = Server.CreateObject("adodb.recordset")
    rsPayPlatform.Open sqlPlatform, Conn, 1, 3
    
    rsPayPlatform("ShowName") = ShowName
    rsPayPlatform("Description") = Trim(Request("Description"))
    rsPayPlatform("AccountsID") = AccountsID
    rsPayPlatform("MD5Key") = MD5Key
    rsPayPlatform("Rate") = Rate
    rsPayPlatform("PlusPoundage") = PE_CBool(Trim(Request("PlusPoundage")))
    rsPayPlatform.Update
    rsPayPlatform.Close
    Set rsPayPlatform = Nothing
    Call WriteEntry(2, AdminName, "保存在线支付平台信息成功:" & AccountsID)
    Call CloseConn
    Response.Redirect "Admin_PayPlatform.asp"
End Sub

Sub DisableBank()
    Dim PlatformID
    PlatformID = Trim(Request("PlatformID"))
    If PlatformID = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>请指定在线支付平台ID</li>"
    Else
        PlatformID = PE_CLng(PlatformID)
    End If
    If FoundErr = True Then Exit Sub
    Dim trs
    Set trs = Conn.Execute("select IsDefault from PE_PayPlatform where PlatformID=" & PlatformID & "")
    If trs.BOF And trs.EOF Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>找不到指定的在线支付平台</li>"
    Else
        If trs(0) = True Then
            FoundErr = True
            ErrMsg = ErrMsg & "<li>不能禁用默认的在线支付平台</li>"
        End If
    End If
    Set trs = Nothing
    If FoundErr = True Then Exit Sub
    
    Select Case Action
    Case "Disable"
        Conn.Execute ("update PE_PayPlatform set IsDisabled=" & PE_True & " where PlatformID=" & PlatformID & "")
    Case "Enable"
        Conn.Execute ("update PE_PayPlatform set IsDisabled=" & PE_False & " where PlatformID=" & PlatformID & "")
    End Select

    Call CloseConn
    Response.Redirect "Admin_PayPlatform.asp"
End Sub

Sub Order()
    Dim PlatformID, OrderID
    PlatformID = Trim(Request("PlatformID"))
    OrderID = Trim(Request("OrderID"))
    If PlatformID = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>请指定在线支付平台ID</li>"
    Else
        PlatformID = PE_CLng(PlatformID)
    End If
    If OrderID = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>请指定OrderID</li>"
    Else
        OrderID = PE_CLng(OrderID)
    End If
    If FoundErr = True Then Exit Sub
    Conn.Execute ("update PE_PayPlatform set OrderID=" & OrderID & " where PlatformID=" & PlatformID & "")
    Call CloseConn
    Response.Redirect "Admin_PayPlatform.asp"
End Sub

Sub SetDefault()
    Dim PlatformID
    PlatformID = Trim(Request("PlatformID"))
    If PlatformID = "" Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>请指定PlatformID</li>"
        Exit Sub
    Else
        PlatformID = PE_CLng(PlatformID)
    End If

    Conn.Execute ("update PE_PayPlatform set IsDefault=" & PE_False & "")
    Conn.Execute ("update PE_PayPlatform set IsDefault=" & PE_True & " where  PlatformID=" & PlatformID)
    Call CloseConn
    Response.Redirect "Admin_PayPlatform.asp"
End Sub
%>

⌨️ 快捷键说明

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