%checkUserLogin()%>
<%
Dim allPayments
allPayments = "N/A"
FUNCTION obfuscateCCNumber(ccNumber)
Dim c
Dim l
Dim r
Set r = new RegExp
IF ccNumber <> "" THEN
c = Cstr(ccNumber)
l = Len(c)
r.Pattern = "[0-9]"
r.Global = True
c = r.Replace(Left(c,l-4),"X") & Right(c, 4)
ELSE
c = " "
END IF
obfuscateCCNumber = c
END FUNCTION
Set cn = Server.CreateObject("ADODB.connection")
cn.Open connString
set rsPayments = server.createobject("adodb.recordset")
rsPayments.open "SELECT a.when_entered, a.amount, b.shortname, isNull(a.cc_number, ' ') as cc_number " & _
" FROM gbi2_acct_payments a, gbi2_payment_types b " & _
" WHERE a.acct_id = " & currentID & _
" AND a.payment_type_id = b.payment_type_id " & _
" ORDER BY a.when_entered DESC " , cn
IF NOT rsPayments.eof = TRUE THEN
allPayments = "
" & _
"| Amount | Transaction Date | Payment Type | CC Number (if applicable) |
"
DO WHILE NOT rsPayments.EOF
allPayments = allPayments & "| " & FormatCurrency(rsPayments("amount")) & _
" | " & rsPayments("when_entered") & _
" | " & rsPayments("shortname") & _
" | " & obfuscateCCNumber(rsPayments("cc_number")) & _
" |
"
rsPayments.MoveNext
LOOP
allPayments = allPayments & "
"
END IF
rsPayments.Close
Set rsPayments = nothing
Set cn = nothing
%>
The GBI: Commercial: Use Green Globes: Account: Payment History
|
SITE MAP /
COPYRIGHT © 2008 THE GREEN BUILDING INITIATIVE. ALL RIGHTS RESERVED |