static public function checkClientExistance () { $id = mysql_real_escape_string($_POST['client']); if(!$id) return('Should choose client'); if(!count(ClientCollection::getClients($id))) return('Should choose client'); if(!count(CustodyCollection::getAccountsForClient($id))) return('This client has no custody accounts... add custody accounts first!'); return false; }
include('../classes/clientcollection.class.php'); include('../classes/isincollection.class.php'); include('../classes/securitycollection.class.php'); include('../classes/custodycollection.class.php'); loginAdmin(); if(!loggedAdmin()) header('location: index.php'); $transaction = new TransactionCollection(); $clients = ClientCollection::getClients(); $isins = IsinCollection::getIsins(); $collection = new SecurityCollection(); $isinCollection = new IsinCollection; $accounts = CustodyCollection::getAccountsForClientByTransactionId(mysql_real_escape_string($_GET['id'])); if(exist($_POST['button'])) { $result = TransactionCollection::updateTransaction(); } else { TransactionCollection::loadTransaction(); $result = array(); } include("$templates/menu.php"); $clients = ClientCollection::getClients(); $isins = IsinCollection::getIsins(); include("$templates/transaction_edit.php");
<?php include('../config.php'); include('../functions.php'); include('../classes/custodycollection.class.php'); include('../classes/clientcollection.class.php'); loginAdmin(); if(!loggedAdmin()) header('location: index.php'); if(exist($_POST['add'])) $result = CustodyCollection::addAccount(); include("$templates/menu.php"); $clients = ClientCollection::getClients(); include("$templates/custody_add.php"); include("$templates/footer.php"); ?>
static public function updateAccount() { $result = CustodyCollection::verifyFields(); if(count($result)) return ($result); $query = "UPDATE `custody_ac` SET `id_client` = '".$_POST['client']."' , `name` = '".$_POST['aname']."' WHERE id = '".$_POST['id']."';"; mysql_query($query); header('location: custody_updated.php'); }
<?php include('../config.php'); include('../functions.php'); include('../classes/custodycollection.class.php'); loginAdmin(); if(!loggedAdmin()) header('location: index.php'); if(exist($_POST['add'])) header('location: custody_add.php'); if(exist($_POST['delete'])) CustodyCollection::deleteAccounts(); include("$templates/menu.php"); //include appropriate template $accounts = CustodyCollection::getAccounts(); include("$templates/custody.php"); //var_dump($accounts); include("$templates/footer.php"); ?>
<?php include('../config.php'); include('../functions.php'); include('../classes/custodycollection.class.php'); include('../classes/clientcollection.class.php'); loginAdmin(); if(!loggedAdmin()) header('location: index.php'); if(exist($_POST['add'])) $result = CustodyCollection::updateAccount(); else CustodyCollection::loadAccount(); include("$templates/menu.php"); $clients = ClientCollection::getClients(); include("$templates/custody_edit.php"); include("$templates/footer.php"); ?>
//include('../classes/custody.class.php'); include('../classes/custodycollection.class.php'); include('../classes/securitycollection.class.php'); include('../classes/isincollection.class.php'); include('../classes/currencycollection.class.php'); include('../classes/clientcollection.class.php'); loginAdmin(); if(!loggedAdmin()) header('location: index.php'); if(exist($_POST['add'])) { $result = SecurityCollection::addSecurity(maxQuantity); if(!count($result)) header('location: portfolio_created.php'); } include("$templates/menu.php"); $currencies = CurrencyCollection::getCurrencies(); $accounts = CustodyCollection::retrieveByClient($_GET['userid']); if(empty($accounts)) $result[] = 'This client has no preset custody account. Please add custody account before depositing funds.'; $isins = IsinCollection::getIsins(); include("$templates/portfolio_add.php"); include("$templates/footer.php"); ?>