コード例 #1
0
ファイル: transfers.php プロジェクト: sahartak/v1poject
			
			global $depositOptions;
			$uDetails=$db->getRow('users','user_account_num="'.$getCurrentData['user_account_num'].'"','user_firstname, user_lastname, user_account_num');
			addLog('Back-end','Transfers',''.$uDetails['user_firstname'].' '.$uDetails['user_lastname'].' ('.$uDetails['user_account_num'].')',''.$_SESSION['admin']['name'].' ('.$_SESSION['admin']['refnum'].')','Withdraw deleted '.($_GET['wtrid']+0).' ('.$depositOptions[$getCurrentData['tr_status']].')');
			
			$db->close();
			header('Location: transfers.php');
			exit();
		}
		break;
    case 'pdf':
        $db            = new DBConnection();
        $transferModel = new App\Model\Transfer($db);
        
        $transfer      = $transferModel->getTransferByRef($_GET['ref']);
        $transferTypes = $transferModel->getTypes();
        $codeTypes     = $transferModel->getCodeTypes();
        
        $transfer['tr_type'] = $transferTypes[$transfer['tr_type']];
        $transfer['tr_bank_codetype'] = $codeTypes[$transfer['tr_bank_codetype']];
        $transfer = $transferModel->formatPriceValues($transfer);
        
        $mpdf = new mPDF(null, 'A4', null, null, 8, 8, 40, 20, 8, 8);
        $pdf  = new App\Utility\Pdf($db);
        
        $mpdf->SetHTMLHeader($pdf->getHeader());
        $mpdf->SetHTMLFooter($pdf->getFooter());
        
        $mpdf->WriteHTML($pdf->getBody('transfer_' . strtolower($transfer['tr_type']), $transfer));
        
        $mpdf->Output($transfer['user_account_num'] . '_' . $transfer['tr_ref'] . '.pdf', 'D');
コード例 #2
0
ファイル: users.php プロジェクト: sahartak/v1poject
     $userModel = new App\Model\User($db);
     $tradesModel = new App\Model\Trades($db);
     $transfersModel = new App\Model\Transfer($db);
     
     $user = $userModel->getUserByUid($_GET['uid']);
     $trades = $tradesModel->getUserTrades($user['user_account_num']);
     $transfers = $transfersModel->getUserTransfers($user['user_account_num']);
     
     $view = new App\View\View('user/account_statement');
     $user['account_statement'] = $view->render(array(
         'trades' => $trades,
         'tradesBuyOptions' => $tradesModel->getOptions(),
         'buyStatuses' => $tradesModel->getStatuses('buy'),
         'sellStatuses' => $tradesModel->getStatuses('sell'),
         'transfers' => $transfers,
         'transfersOptions' => $transfersModel->getTypes(),
         'depositOptions' => $transfersModel->getStatuses()
     ));
     
     $mpdf = new mPDF(null, 'A4', null, null, 8, 8, 40, 20, 8, 8);
     $pdf  = new App\Utility\Pdf($db);
     
     $mpdf->SetHTMLHeader($pdf->getHeader());
     $mpdf->SetHTMLFooter($pdf->getFooter());
     
     $mpdf->WriteHTML($pdf->getBody('account_summary', $user));
     
     $mpdf->Output($user['user_account_num'] . '.pdf', 'D');
     exit();
     break;
 default	: