"; print "$login_cnt Logins, Last Login $last_login from $from_ip
"; print "Merchant Since $created

"; $period = get_period_start(date('Y-m-d')); list($y,$m,$d) = explode("-", $period); $period2 = date('Y-m-d', mktime(0,0,0,$m,$d+6,$y)); ?>
"; $result = db_query($query,__LINE__ ,__FILE__); list($clicks,$submits,$approves,$denials,$cancels,$refunds) = mysql_fetch_row($result); // calc earnings $query = "SELECT amount, trans_type FROM trans WHERE (trans_type='S' || trans_type='R' || trans_type='D') and (DATE_FORMAT(trans_date, '%Y-%m-%d') BETWEEN '$period' AND '$period2') and merch_id='$merch_id'"; $result = db_query($query,__LINE__ ,__FILE__); $number = MYSQL_NUMROWS($result); $totpay = 0; $proc_rate = $proc_rate/100; $i = 0; while ($i < $number) { list($amount, $trans_type) = mysql_fetch_row($result); $amount = abs($amount); $pay = $amount - ($amount * $proc_rate); if($trans_type == 'D') { $amount = -$amount; $pay = -$pay; } $totpay += $pay; $i++; } $totpay = sprintf("%1.2f", $totpay); print ""; print "
Quick Stats for the Week Of
Raw
Clicks
Raw
Submits
Approvals Denials Cancels Refunds Earnings
$clicks $submits $approves $denials $cancels $refunds $totpay


"; do_footer('M'); ?>