static public function addTransfer() { $result = TransferCollection::verifyFields(); if(count($result)) return ($result); // if all right, save data. $query = "INSERT INTO `transfers` ( `id` , `id_client` , `name` ) VALUES ( NULL , '".$_POST['client']."', '".$_POST['aname']."');"; //die($query); mysql_query($query); header('location: custody_created.php'); }
include('../classes/securitycollection.class.php'); include('../classes/custodycollection.class.php'); loginAdmin(); if(!loggedAdmin()) header('location: index.php'); $transaction = new TransferCollection(); $clients = ClientCollection::getClients(); $isins = IsinCollection::getIsins(); $collection = new SecurityCollection(); $isinCollection = new IsinCollection; $accounts = CustodyCollection::getAccountsForClientByTransferId(mysql_real_escape_string($_GET['id'])); if(exist($_POST['button'])) $result = TransferCollection::updateTransfer(); else { TransferCollection::loadTransfer(); $result = array(); } include("$templates/menu.php"); $clients = ClientCollection::getClients(); $isins = IsinCollection::getIsins(); include("$templates/transfer_edit.php"); include("$templates/footer.php"); ?>
include('classes/client.class.php'); include('classes/security.class.php'); include('classes/securitycollection.class.php'); include('classes/isin.class.php'); include('classes/isincollection.class.php'); include('classes/transfercollection.class.php'); //check, if client is already logged in. login(); if(!logged()) { include('login_header.php'); } elseif(isset($_POST['button'])) { //process data $transaction = new TransferCollection(); $collection = new SecurityCollection(); $isinCollection = new IsinCollection; $client = new Client; $isins = $isinCollection->getIsins(); $accounts = getAccounts(); $result = $transaction->saveTransfer(); if(empty($result)) { header('location: create_success.php'); } else { include($templates.'menu.html');
loginAdmin(); if(!loggedAdmin()) header('location: index.php'); $transaction = new TransferCollection(); $clients = ClientCollection::getClients(); $isins = IsinCollection::getIsins(); $collection = new SecurityCollection(); $isinCollection = new IsinCollection; $accounts = CustodyCollection::getAccountsForClient(mysql_real_escape_string($_GET['id'])); if(exist($_POST['button'])) { $result = TransferCollection::saveTransfer(); if(empty($result)) header('location: create_success.php'); } else $result=array(); //var_dump($result); include("$templates/menu.php"); include("$templates/transfer_add.php"); include("$templates/footer.php"); ?>
<?php include('../config.php'); include('../functions.php'); include('../classes/transfercollection.class.php'); include('../classes/clientcollection.class.php'); include('../classes/custodycollection.class.php'); loginAdmin(); if(!loggedAdmin()) header('location: index.php'); include("$templates/menu.php"); $transfers = TransferCollection::getTransfers(); $clients = ClientCollection::getClients(); include("$templates/transfer.php"); include("$templates/footer.php"); ?>
public function getTransfers($type) { self::$transfers= TransferCollection::retrieveByClient($type,$this->getId()); return self::$transfers; }