\n");
$error_message = getLanguageText('ERRORMSG-ACCESS-DENIED');
include "form.messages.php";
return;
}
$school_num = $school_record['record_num'];
?>
0) {
?>
-
0) $mc_gross = "$" . number_format($mc_gross,2);
if ($mc_fee > 0) $mc_fee = "$" . number_format($mc_fee,2);
// Add info tips
if ($payment_status == 'Pending') {
$span_id = "status_$record_num";
$otipSpans .= "" . $otipTABLE .
sprintf($otipROW2,'Pending Reason:',$pending_reason) . "
\n";
$otipSpanIDs[] = $span_id;
$payment_status = "Pending";
}
// Unknown posting results
if ($posting_result == '') {
$results = db_query("SELECT * FROM user_account WHERE school_num = $school_num AND payment_reference = '$txn_id'");
if (db_num_rows($results) > 0) {
$posting_result = 'Posted';
}
else {
$posting_result = 'Error';
}
}
if ($posting_result == 'Pending') {
$ppFields = array("payment_date","item_name","business","receiver_email","transaction_subject","txn_type","first_name","last_name","payer_email","payer_status",
"mc_currency","mc_gross","mc_fee","reference","payment_type","payment_status","pending_reason","trx_num","posting_message");
$results = db_query("SELECT * FROM user_paypal_transactions WHERE school_num = $school_num AND txn_id = '$txn_id' ORDER BY record_num");
$span_id = "pending_$record_num";
$otipSpans .= "" . $otipTABLE;
$num = 0;
while ($row = db_fetch_array($results)) {
if ($num > 0) $otipSpans .= "
|
\n";
for ($i = 0; $i < count($ppFields); $i++) {
$field = $ppFields[$i];
$otipSpans .= sprintf($otipROW2,"$field:",$row[$field]);
}
$num++;
}
$otipSpans .= "\n";
$posting_result = "Pending";
$posting_result = "" .
"Pending";
}
// Format name
$name = "$first_name $last_name";
if (is_numeric($user_num) && $user_num > 0) {
$results = db_query("SELECT * FROM users WHERE record_num = $user_num");
$row = db_fetch_array($results);
$span_id = "user_$user_num";
if (!in_array($span_id,$otipSpanIDs)) {
$user_balance = db_getVal("select sum(transaction_amount) as balance from user_account where school_num = $school_num and user_num = $user_num AND (deleted != 'Y' OR deleted IS NULL)");
$user_balance = floatval($user_balance);
$otipSpans .= "" . $otipTABLE .
sprintf($otipROW2,"User ID: ",$row['userid']) .
sprintf($otipROW2,"User Type: ",$row['type']) .
sprintf($otipROW2,"Name: ",$row['first_name'] . ' ' . $row['last_name']) .
sprintf($otipROW2,"Email: ",$row['email']) .
sprintf($otipROW2,"Phone: ",$row['home_phone']) .
sprintf($otipROW2,'' . getLanguageText('TEXT-CURRENT-BALANCE') . ': ',$currencySymbol . number_format($user_balance,2)) .
"\n";
$otipSpanIDs[] = $span_id;
}
$name = "$name";
$pemail = $payer_email;
if (strlen($pemail) > 20) $pemail = substr($pemail,0,20) . "...";
$payer_email = "$pemail";
}
?>
|
|
|
|
|
|
|
|
|