"); } $row = mysql_fetch_assoc($result); extract($row); $tdate = date('m/d/y h:ia', strtotime($trans_date)); // Check Auth $reflink = ' '; if($auth_lvl >= $adm_auth) { if(($trans_type == 'S') || ($trans_type == 'R') || ($trans_type == 'F')) { $reflink = "Refund"; } } elseif($auth_lvl >= $mer_auth) { if($_SESSION['merch_id'] <> $merch_id) { do_error("Access Denied."); } if(($trans_type == 'S') || ($trans_type == 'R') || ($trans_type == 'F')) { $reflink = "Refund"; } } elseif($auth_lvl >= $aff_auth) { do_error("Access Denied."); } elseif($auth_lvl >= $cus_auth) { if($_SESSION['cust_id'] <> $cust_id) { do_error("Access Denied."); } } else { do_error("Access Denied."); } $query = "SELECT f_name, m_name, l_name, gen_code FROM cust WHERE cust_id='$cust_id'"; $result2 = db_query($query,__LINE__ ,__FILE__); list($fn,$mn,$ln,$gc) = mysql_fetch_row($result2); print ""; if($auth_lvl >= $mer_auth) { print ""; } if($auth_lvl >= $adm_auth) { print ""; } print "
Transaction Detail
Cust - $cust_id $fn $mn $ln $gc $reflink
Trans - $trans_id$tdate".$trans_types[$trans_type]."$amount
Merchant ID - $merch_idAff Code - $affil_codeIP - $ip_addrRef - $referer
Source - $sourceSource ID - $source_idStatus - $trans_status[$status] 
"; if(($trans_type == 'S') || ($trans_type == 'R')) { if($is_recurring == 'Y') { $rcrlit = 'Yes'; } else { $rcrlit = 'No'; } $query = "SELECT site_name FROM sites WHERE site_id='$site_id' AND merch_id='$merch_id'"; $result = db_query($query,__LINE__ ,__FILE__); $site_name = mysql_result($result, 0); $query = "SELECT item_type FROM item WHERE item_id='$item_id' AND site_id='$site_id' AND merch_id='$merch_id'"; $result = db_query($query,__LINE__ ,__FILE__); $item_type = mysql_result($result, 0); $descp = get_descp($merch_id,$site_id,$item_id,$trans_id,1); print ""; if($auth_lvl >= $mer_auth) { print ""; } print ""; if($auth_lvl >= $mer_auth) { print ""; } print ""; if($is_recurring == 'Y') { $query = "SELECT is_recurring, recur_amt, recur_per, last_rcr_trans_id, last_rcr_trans_date, last_rcr_amount, recur_count, recur_total, next_recur, cancel_date, cancel_trans_id FROM recur WHERE recur_id='$ref_recur_id'"; $rresult = db_query($query,__LINE__ ,__FILE__); $rnumber = MYSQL_NUMROWS($rresult); if($rnumber < 1) { do_error("Internal Error - Ref_recur_id invalid in trans rec for trans_id=$trans_id"); } list($isr, $ra, $rp, $last_rcr_trans_id, $last_rcr_trans_date, $last_rcr_amount, $recur_count, $recur_total, $next_recur, $cancel_date, $cancel_trans_id) = mysql_fetch_row($rresult); if($isr == 'Y') { print ""; } else { print ""; if($cancel_trans_id == 0) { print ""; } else { print ""; } } } if($item_type < 4) { $query = "SELECT username, password FROM pswd WHERE pswd_id='$ref_pswd_id'"; $result = db_query($query,__LINE__ ,__FILE__); list($un,$pw) = mysql_fetch_row($result); print "
Site ID$site_id
Site Name$site_name
Item ID$item_id
Item$descp
Amount$amount
Recurring Charge$rcrlit
Still Recurring?Yes
Next Rebill$next_recur
Amount$ra
 Cancel Rebill
Still Recurring?No
Cancel Date$cancel_date
Cancel Trans IDCancel For Nonpayment
Cancel Trans ID$cancel_trans_id
Username$un
Password$pw
"; } } elseif($trans_type == 'P') { print ""; print ""; if($auth_lvl >= $adm_auth) { print ""; print "
Payment Type$payment_types[$pymt_type]
Amount$amount
Return Payment
"; } } elseif($trans_type == 'C') { print "
Reason
$reason
"; } elseif($trans_type == 'D') { print "
Reason
$reason
"; } elseif($trans_type == 'B') { print "
Reason
$reason
"; } elseif($trans_type == 'F') { print ""; print "
Fee Type$fee_types[$fee_type]
Descp$item_descp
"; } elseif($trans_type == 'X') { $rtmp = $cancel_reasons[$reason]; print "
Reason
$reason - $rtmp
"; } print "
"; do_footer('C'); ?>