$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)); if ($d[2] == '1') {
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'; }