Exemple #1
0
			
			$query='DELETE FROM transfers WHERE tr_ref="'.$_GET['wtrid'].'"';
			$db->rq($query);
			
			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());
        
Exemple #2
0
				
		        $vars = $userModel->getTemplateFields();
				break;
			case 'Stock trade':
				$tradeModel = new App\Model\StockTrades(new DBConnection());
        
		        $vars = $tradeModel->getTemplateFields();
				break;
			case 'Options trade':
				$tradeModel = new App\Model\Trades(new DBConnection());
        
		        $vars = $tradeModel->getTemplateFields();
				break;
			case 'Transfer (deposit)':
			case 'Transfer (withdraw)':
				$transferModel = new App\Model\Transfer(new DBConnection());
        
		        $vars = $transferModel->getTemplateFields();
				break;
			default:
				break;
		}
        
        $view = new App\View\View('pdf_templates/edit');
        $view->template = $local_template;
        $view->selectTemplateHtml = $selectTemplateHtml;
        $view->templateVariables = $vars;
        break;
    default:
        $view = new App\View\View('pdf_templates/list');
        break;
Exemple #3
0
            
            $query='DELETE FROM users WHERE user_uid="'.$_GET['uid'].'"';
            $db->rq($query);
            
            addLog('Back-end','Accounts',''.$uDetails['user_firstname'].' '.$uDetails['user_lastname'].' ('.$uDetails['user_account_num'].')',''.$_SESSION['admin']['name'].' ('.$_SESSION['admin']['refnum'].')','User deleted');

            $db->close();
            header('Location: users.php');
            exit();
        }
        break;
    case 'pdf':
        $db = new DBConnection();
        $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()
        ));