} else { $fullname = get_fullname(); $username = get_username(); $techcash = new TechCash(); $techcash->init(); $mit_id = getMitID($techcash, $username); //$mit_id = "111010083"; $accounts = $techcash->getAccountNumbers($mit_id); foreach($accounts as $index => $row) { $balance = $techcash->getLatestBalance($mit_id, $row['ACCOUNTNUMBER']); $accounts[$index]['BALANCE'] = TechCash::dollar_string($balance); $accounts[$index]['NAME'] = $techcash->getAccountName($row['ACCOUNTNUMBER']); } $techcash->close(); require "$page->branch/index.html"; } $page->output(); function last_4($mit_id) { return substr($mit_id, 5, 4); } function detailURL($account) {
$page->error_page('TechCASH', 'techcash', $error_text); //require "$page->branch/not_supported.html"; } else { $fullname = get_fullname(); $username = get_username(); $account_id = $_REQUEST['id']; $techcash = new TechCash(); $techcash->init(); $account_name = $techcash->getAccountName($account_id); $mit_id = getMitID($techcash, $username); //$mit_id = "111010083"; $transactions = $techcash->getLatestTransactions($mit_id, $account_id, 500); $current_cents =$techcash->getLatestBalance($mit_id, $account_id); $techcash->close(); $current_balance = TechCash::dollar_string($current_cents); $transactions = TechCash::dollar_string_rows($transactions, array("APPRVALUEOFTRAN", "BALVALUEAFTERTRAN")); $previous_date = $transactions[count($transactions)-1]['UNIX_TRANDATE']; require "$page->branch/detail.html"; $page->output(); } ?>