当前位置: 首页>>代码示例>>PHP>>正文


PHP Accounts::getFirstAccount方法代码示例

本文整理汇总了PHP中Accounts::getFirstAccount方法的典型用法代码示例。如果您正苦于以下问题:PHP Accounts::getFirstAccount方法的具体用法?PHP Accounts::getFirstAccount怎么用?PHP Accounts::getFirstAccount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Accounts的用法示例。


在下文中一共展示了Accounts::getFirstAccount方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 public function init()
 {
     $accounts = new Accounts();
     $accounts->userID = $_SESSION['userID'];
     $_SESSION['accounts'] = $accounts->getAccounts();
     if (!isset($_SESSION['detAccountID'])) {
         $firstAccount = $accounts->getFirstAccount();
         $_SESSION['detAccountID'] = $firstAccount['accountID'];
     }
     $this->setAccountSelected($_SESSION['detAccountID']);
     $account = new Account();
     $account->accountID = $_SESSION['detAccountID'];
     $account->getAccount();
     $_SESSION['detAccountNickname'] = $account->accountNickname;
     $_SESSION['detAccountNumber'] = $account->accountNumber;
     $_SESSION['detProductName'] = $account->productName;
     $_SESSION['detRecordedLimit'] = $account->recordedLimit;
     if (strlen($account->accruedDebitInterest()) == 0) {
         $_SESSION['detAccruedDebitInterest'] = '$0.00';
     } else {
         $_SESSION['detAccruedDebitInterest'] = '$' . number_format($account->accruedDebitInterest(), 2);
     }
     if (strlen($account->accruedCreditInterest()) == 0) {
         $_SESSION['detAccruedCreditInterest'] = '$0.00';
     } else {
         $_SESSION['detAccruedCreditInterest'] = '$' . number_format($account->accruedCreditInterest(), 2);
     }
     if (strlen($account->creditInterestLFY()) == 0) {
         $_SESSION['detInterestEarned'] = '$0.00';
     } else {
         $_SESSION['detInterestEarned'] = '$' . number_format($account->creditInterestLFY(), 2);
     }
 }
开发者ID:s3444261,项目名称:assignment2,代码行数:33,代码来源:Details.php

示例2: init

 public function init()
 {
     $payment = new Payment();
     $payment->cancelSessions();
     $accounts = new Accounts();
     $accounts->userID = $_SESSION['userID'];
     $_SESSION['accounts'] = $accounts->getAccounts();
     $firstAccount = $accounts->getFirstAccount();
     $_SESSION['accountID'] = $firstAccount['accountID'];
     $this->setAccountSelected($_SESSION['accountID']);
     $billerPayees = new BillerPayees();
     $billerPayees->userID = $_SESSION['userID'];
     if (isset($_SESSION['billPayment'])) {
         unset($_SESSION['allPaymentList']);
         $_SESSION['billPaymentList'] = 'selected="selected"';
         $_SESSION['payees'] = $billerPayees->getBillers();
         unset($_SESSION['fundsTransferPaymentList']);
         unset($_SESSION['fundsTransferPayment']);
     } elseif (isset($_SESSION['fundsTransferPayment'])) {
         unset($_SESSION['allPaymentList']);
         unset($_SESSION['billPaymentList']);
         unset($_SESSION['billPayment']);
         $_SESSION['fundsTransferPaymentList'] = 'selected="selected"';
         $_SESSION['payees'] = $billerPayees->getPayees();
     }
     $this->getPayments();
 }
开发者ID:s3444261,项目名称:assignment2,代码行数:27,代码来源:Paymentlist.php

示例3: init

 public function init()
 {
     // Retrieves the initial values to be displayed in the Account History Page.
     $accounts = new Accounts();
     $accounts->userID = $_SESSION['userID'];
     if (!isset($_SESSION['accounts'])) {
         $_SESSION['accounts'] = $accounts->getAccounts();
     }
     if (!isset($_SESSION['accountID'])) {
         $account = $accounts->getFirstAccount();
         $_SESSION['accountID'] = $firstAccount['accountID'];
     } else {
         $acct = new Account();
         $acct->accountID = $_SESSION['accountID'];
         $acct->getAccount();
         $openBalance = $acct->openBalance;
         $account = array('openBalance' => $openBalance);
     }
     $this->setAccountSelected($_SESSION['accountID']);
     $_SESSION['toDate'] = date('Y-m-d');
     $_SESSION['fromDate'] = date("Y-m-d", strtotime("-1 months"));
     $transactions = new Transactions();
     $transactions->accountID = $_SESSION['accountID'];
     $arr = array('openBalance' => $account['openBalance']);
     $_SESSION['history'] = $transactions->getTransactions($arr);
     $_SESSION['found'] = $transactions->countTransactions($arr);
     $_SESSION['historyDebit'] = $transactions->getDebits($arr);
     $_SESSION['historyCredit'] = $transactions->getCredits($arr);
     $_SESSION['historyFee'] = $transactions->getFees($arr);
     $_SESSION['historyNet'] = $transactions->getNet($arr);
     $_SESSION['period'] = date('d/m/Y', strtotime($_SESSION['fromDate'])) . ' to ' . date('d/m/Y', strtotime($_SESSION['toDate']));
 }
开发者ID:s3444261,项目名称:assignment2,代码行数:32,代码来源:History.php


注:本文中的Accounts::getFirstAccount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。