public function display() { $payee = new Payees(); $payee->payeeID = $_SESSION['payeeDeleteID']; $payee->getPayee(); $_SESSION['accountName'] = $payee->accountName; $_SESSION['accountNickname'] = $payee->accountNickname; $_SESSION['bsb'] = $payee->bsb; $_SESSION['accountNumber'] = $payee->accountNumber; include 'view/layout/payeedelete.php'; }
public function clearFilter() { $payees = new Payees(); $payeeIDs = $payees->getPayeeIDs(); foreach ($payeeIDs as $pID) { unset($_SESSION['payListSelectedPayee' . $pID]); } unset($_SESSION['payListName']); unset($_SESSION['payListStatus']); unset($_SESSION['payListFromAmount']); unset($_SESSION['payListToAmount']); unset($_SESSION['payListFromDate']); unset($_SESSION['payListToDate']); }
$args[] = array('userID' => $userID, 'billerCode' => '216291', 'billerName' => 'VICROADS REGO', 'billerNickname' => 'VICROADS HILUX', 'customerReference' => '5654289374', 'billerStatus' => ''); $args[] = array('userID' => $userID, 'billerCode' => '216291', 'billerName' => 'VICROADS REGO', 'billerNickname' => 'VICROADS PRIUS', 'customerReference' => '8854289491', 'billerStatus' => ''); $args[] = array('userID' => $userID, 'billerCode' => '254865', 'billerName' => 'NELSON ALEXANDER', 'billerNickname' => 'RENT PAYMENT', 'customerReference' => '8547289491', 'billerStatus' => ''); $args[] = array('userID' => $userID, 'billerCode' => '4587', 'billerName' => 'G.M. FINANCE', 'billerNickname' => 'CAR REPAYMENT', 'customerReference' => '55412298', 'billerStatus' => ''); foreach ($args as $arg) { $biller = new Billers($arg); $biller->set(); } $args = array(); $args[] = array('userID' => $userID, 'bsb' => '261-452', 'accountNumber' => '32-455-2133', 'accountName' => 'M Peterson', 'accountNickname' => 'Michael Petersons Acct', 'payeeStatus' => ''); $args[] = array('userID' => $userID, 'bsb' => '334-544', 'accountNumber' => '98-332-3454', 'accountName' => 'L Johnson', 'accountNickname' => 'Lynda Johnsons Acct', 'payeeStatus' => ''); $args[] = array('userID' => $userID, 'bsb' => '243-987', 'accountNumber' => '31-354-9987', 'accountName' => 'B Murphy', 'accountNickname' => 'Brett Murphys Acct', 'payeeStatus' => ''); $args[] = array('userID' => $userID, 'bsb' => '276-873', 'accountNumber' => '89-987-2765', 'accountName' => 'D A Ingles', 'accountNickname' => 'Darrn Ingles Acct', 'payeeStatus' => ''); $args[] = array('userID' => $userID, 'bsb' => '365-986', 'accountNumber' => '23-354-8954', 'accountName' => 'P Jones', 'accountNickname' => 'Paul Jones Acct', 'payeeStatus' => ''); foreach ($args as $arg) { $payee = new Payees($arg); $payee->set(); } date_default_timezone_set('Australia/Melbourne'); $startDate = '2011-07-01'; $currentDate = $startDate; $oneDay = new DateInterval('P1D'); $int1 = 0; $int2 = 0; $int3 = 0; while (strtotime($currentDate) < time()) { $currentDate = new DateTime($currentDate); $currentDate->add($oneDay); $currentDate = $currentDate->format('Y-m-d'); $d = explode('-', $currentDate); $lastDayOfMonth = date('t', strtotime($currentDate));
<?php /* * Author: Grant Kinkead * Student Number: s3444261 * Student Email: s3444261@student.rmit.edu.au * * CPT375 Web Database Applications * 2015 - Study Period 2 */ $payee = new Payees(); $payee->payeeID = $_SESSION['payeeModifyID']; $payee->userID = $_SESSION['userID']; $payee->getPayee(); $_SESSION['bsb'] = $payee->bsb; $_SESSION['accountName'] = $payee->accountName; $_SESSION['accountNickname'] = $payee->accountNickname; $_SESSION['accountNumber'] = $payee->accountNumber; ?> <h1>Modify Payee Details</h1> <div class="row"> <div class="bluestripe"></div> </div> <div class="row"> <div class="col-lg-10 col-lg-offset-1 col-md-10 col-md-offset-1 col-sm-10 col-sm-offset-1 col-xs-10 col-xs-offset-1 details pupdateing20"> <form class="form-inline" method="post" action="Payee-List"> <div class="row marginTop20"> <div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">Account Name:</div> <div class="col-xs-9 col-sm-9 col-md-9 col-lg-9">
public function display() { // Process an update request if submitted. if (isset($_POST['updateBiller'])) { unset($_POST['updateBiller']); $validate = new Validation(); $biller = new Billers(); $biller->billerID = $_SESSION['billerModifyID']; // Validate the nickname. try { $validate->billerNickname($_POST['updateBillerNickname']); } catch (ValidationException $e) { $_SESSION['error'] = $e->getError(); } if (isset($_SESSION['error'])) { unset($_POST['updateBillerNickname']); header('Location: Biller-Modify'); } else { $biller->billerNickname = strtoupper($_POST['updateBillerNickname']); unset($_POST['updateBillerNickname']); // Validate the customer reference. try { $validate->billerCustomerRef($_POST['updateBillerCustomerRef']); } catch (ValidationException $e) { $_SESSION['error'] = $e->getError(); } if (isset($_SESSION['error'])) { unset($_POST['updateBillerCustomerRef']); header('Location: Biller-Modify'); } else { $biller->customerReference = $_POST['updateBillerCustomerRef']; unset($_POST['updateBillerCustomerRef']); // If all is ok, make the update. $biller->update(); unset($_SESSION['billerModifyID']); unset($_SESSION['billerCode']); unset($_SESSION['billerName']); unset($_SESSION['billerNickname']); unset($_SESSION['customerReference']); } } } // Delete the Biller if a request is submitted. if (isset($_POST['deleteBiller'])) { unset($_POST['deleteBiller']); $biller = new Billers(); $biller->billerID = $_SESSION['billerDeleteID']; $biller->delete(); unset($_SESSION['billerDeleteID']); unset($_SESSION['billerCode']); unset($_SESSION['billerName']); unset($_SESSION['billerNickname']); unset($_SESSION['customerReference']); } // Update a payee if a request is submitted. if (isset($_POST['updatePayee'])) { unset($_POST['updatePayee']); $payee = new Payees(); $payee->payeeID = $_SESSION['payeeModifyID']; $validate = new Validation(); // Validate the account name. try { $validate->accountName($_POST['updatePayeeAccountName']); } catch (ValidationException $e) { $_SESSION['error'] = $e->getError(); } if (isset($_SESSION['error'])) { unset($_POST['updatePayeeAccountName']); header('Location: Payee-Modify'); } else { $payee->accountName = $_POST['updatePayeeAccountName']; unset($_POST['updatePayeeAccountName']); // Validate the account nickname try { $validate->accountNickname($_POST['updatePayeeAccountNickname']); } catch (ValidationException $e) { $_SESSION['error'] = $e->getError(); } if (isset($_SESSION['error'])) { unset($_POST['updatePayeeAccountNickname']); header('Location: Payee-Modify'); } else { $payee->accountNickname = $_POST['updatePayeeAccountNickname']; unset($_POST['updatePayeeAccountNickname']); // Validate the BSB. try { $validate->accountBSB($_POST['updatePayeeBSB']); } catch (ValidationException $e) { $_SESSION['error'] = $e->getError(); } if (isset($_SESSION['error'])) { unset($_POST['updatePayeeBSB']); header('Location: Payee-Modify'); } else { $payee->bsb = $_POST['updatePayeeBSB']; unset($_POST['updatePayeeBSB']); // Validate the account number. try { $validate->accountNumber($_POST['updatePayeeAccountNumber']); } catch (ValidationException $e) { $_SESSION['error'] = $e->getError(); } if (isset($_SESSION['error'])) { unset($_POST['updatePayeeAccountNumber']); header('Location: Payee-Modify'); } else { $payee->accountNumber = $_POST['updatePayeeAccountNumber']; unset($_POST['updatePayeeAccountNumber']); // If all is OK, update the payee. $payee->update(); unset($_SESSION['payeeModifyID']); } } } } } // Delete the payee if the request is submitted. if (isset($_POST['deletePayee'])) { unset($_POST['deletePayee']); $payee = new Payees(); $payee->payeeID = $_SESSION['payeeDeleteID']; $payee->delete(); unset($_SESSION['payeeDeleteID']); unset($_SESSION['accountName']); unset($_SESSION['accountNickname']); unset($_SESSION['bsb']); unset($_SESSION['accountNumber']); } // Set the payee type as selected in the drop down list. if (isset($_POST['payeeType'])) { if ($_POST['payeeType'] == 'All Payment Types') { $_SESSION['allPayeeList'] = 'selected = "selected"'; unset($_SESSION['billPayeeList']); unset($_SESSION['fundsTransferPayeeList']); unset($_SESSION['billPayee']); unset($_SESSION['fundsTransferPayee']); unset($_POST['payeeType']); } elseif ($_POST['payeeType'] == 'Bill Payment') { unset($_SESSION['allPayeeList']); $_SESSION['billPayeeList'] = 'selected = "selected"'; unset($_SESSION['fundsTransferPayeeList']); unset($_POST['payeeType']); unset($_SESSION['billPayee']); unset($_SESSION['fundsTransferPayee']); } elseif ($_POST['payeeType'] == 'Funds Transfer') { unset($_SESSION['allPayeeList']); unset($_SESSION['billPayeeList']); $_SESSION['fundsTransferPayeeList'] = 'selected = "selected"'; unset($_POST['payeeType']); unset($_SESSION['billPayee']); unset($_SESSION['fundsTransferPayee']); } } elseif (isset($_SESSION['billPayee'])) { unset($_SESSION['allPayeeList']); $_SESSION['billPayeeList'] = 'selected = "selected"'; unset($_SESSION['fundsTransferPayeeList']); unset($_SESSION['fundsTransferPayee']); } elseif (isset($_SESSION['fundsTransferPayee'])) { unset($_SESSION['allPayeeList']); unset($_SESSION['billPayeeList']); $_SESSION['fundsTransferPayeeList'] = 'selected = "selected"'; unset($_SESSION['billPayee']); } else { $_SESSION['allPayeeList'] = 'selected = "selected"'; unset($_SESSION['billPayeeList']); unset($_SESSION['fundsTransferPayeeList']); unset($_SESSION['billPayee']); unset($_SESSION['fundsTransferPayee']); } // Display the payee list. $payeelist = new Payeelist(); $payeelist->init(); include 'view/layout/payeelist.php'; }
public function display() { // Add a new payee if a request is submitted. if (isset($_POST['addPayee'])) { $payee = new Payees(); $payee->userID = $_SESSION['userID']; $validate = new Validation(); // Validate the account name. try { $validate->accountName($_POST['addPayeeAccountName']); } catch (ValidationException $e) { $_SESSION['error'] = $e->getError(); } if (isset($_SESSION['error'])) { unset($_POST['addPayeeAccountName']); header('Location: Payee-Add'); } else { $payee->accountName = $_POST['addPayeeAccountName']; unset($_POST['addPayeeAccountName']); // Validate the nickname. try { $validate->accountNickname($_POST['addPayeeAccountNickname']); } catch (ValidationException $e) { $_SESSION['error'] = $e->getError(); } if (isset($_SESSION['error'])) { unset($_POST['addPayeeAccountNickname']); header('Location: Payee-Add'); } else { $payee->accountNickname = $_POST['addPayeeAccountNickname']; unset($_POST['addPayeeAccountNickname']); // Validate the BSB. try { $validate->accountBSB($_POST['addPayeeBSB']); } catch (ValidationException $e) { $_SESSION['error'] = $e->getError(); } if (isset($_SESSION['error'])) { unset($_POST['addPayeeBSB']); header('Location: Payee-Add'); } else { $payee->bsb = $_POST['addPayeeBSB']; unset($_POST['addPayeeBSB']); // Validate the account number. try { $validate->accountNumber($_POST['addPayeeAccountNumber']); } catch (ValidationException $e) { $_SESSION['error'] = $e->getError(); } if (isset($_SESSION['error'])) { unset($_POST['addPayeeAccountNumber']); header('Location: Payee-Add'); } else { $payee->accountNumber = $_POST['addPayeeAccountNumber']; unset($_POST['addPayeeAccountNumber']); // If all is ok, add the payee. $payee->set(); } } } } } // Display the New Funds Transfer Page. $transfer = new Transfer(); $transfer->init(); include 'view/layout/transfer.php'; }