本文整理汇总了PHP中Account::getAccount方法的典型用法代码示例。如果您正苦于以下问题:PHP Account::getAccount方法的具体用法?PHP Account::getAccount怎么用?PHP Account::getAccount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Account
的用法示例。
在下文中一共展示了Account::getAccount方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
public function init()
{
$account = new Account();
$account->accountID = $_SESSION['payAccountID'];
$account->getAccount();
$_SESSION['payAccount'] = $account->accountName;
}
示例2: searchResults
public function searchResults($search)
{
$accounts = new Accounts();
$accounts->userID = $_SESSION['userID'];
$_SESSION['accounts'] = $accounts->getAccounts();
$_SESSION['accountID'] = $search['accountID'];
$this->setAccountSelected($_SESSION['accountID']);
$account = new Account();
$account->accountID = $_SESSION['accountID'];
$account->getAccount();
$_SESSION['searchDetails'] = $search['searchDetails'];
$_SESSION['fromAmount'] = $search['fromAmount'];
$_SESSION['toAmount'] = $search['toAmount'];
if (strlen($search['toDate']) != 0) {
$_SESSION['toDate'] = $search['toDate'];
} else {
$_SESSION['toDate'] = date('Y-m-d');
}
if (strlen($search['fromDate']) != 0) {
$_SESSION['fromDate'] = $search['fromDate'];
} else {
$_SESSION['fromDate'] = date("Y-m-d", strtotime("-1 months"));
}
$_SESSION['period'] = date('d/m/Y', strtotime($_SESSION['fromDate'])) . ' to ' . date('d/m/Y', strtotime($_SESSION['toDate']));
$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);
}
示例3: init
public function init()
{
$account = new Account();
$account->accountID = $_SESSION['transferAccountID'];
$account->getAccount();
$_SESSION['transferAccount'] = $account->accountName;
$accountPayees = new AccountPayees();
$accountPayees->accountPayeeID = $_SESSION['transferAccountPayeeID'];
$accountPayees->userID = $_SESSION['userID'];
$accountPayees->getAccountPayee();
$_SESSION['transferAccountPayee'] = $accountPayees->accountName;
$_SESSION['transferType'] = $accountPayees->accountType;
$this->setAccountSelected($_SESSION['transferAccountID']);
$this->setAccountPayeeSelected($_SESSION['transferAccountPayeeID']);
}
示例4: getDetails
public function getDetails($accountID)
{
$accounts = new Accounts();
$accounts->userID = $_SESSION['userID'];
$_SESSION['accounts'] = $accounts->getAccounts();
$_SESSION['detAccountID'] = $accountID;
$this->setAccountSelected($_SESSION['detAccountID']);
$account = new Account();
$account->accountID = $accountID;
$account->getAccount();
$_SESSION['detAccountNickname'] = $account->accountNickname;
$_SESSION['detAccountNumber'] = $account->accountNumber;
$_SESSION['detProductName'] = $account->productName;
$_SESSION['detRecordedLimit'] = $account->recordedLimit;
if (!isset($_SESSION['detAccruedDebitInterest'])) {
if (strlen($account->accruedDebitInterest()) == 0) {
$_SESSION['detAccruedDebitInterest'] = '$0.00';
} else {
$_SESSION['detAccruedDebitInterest'] = '$' . number_format($account->accruedDebitInterest(), 2);
}
}
if (!isset($_SESSION['detAccruedCreditInterest'])) {
if (strlen($account->accruedCreditInterest()) == 0) {
$_SESSION['detAccruedCreditInterest'] = '$0.00';
} else {
$_SESSION['detAccruedCreditInterest'] = '$' . number_format($account->accruedCreditInterest(), 2);
}
}
if (!isset($_SESSION['detInterestEarned'])) {
if (strlen($account->creditInterestLFY()) == 0) {
$_SESSION['detInterestEarned'] = '$0.00';
} else {
$_SESSION['detInterestEarned'] = '$' . number_format($account->creditInterestLFY(), 2);
}
}
}
示例5: operation_fail
operation_fail("登陆失败");
}
$weixinAPI = new WeixinAPI();
$json = $weixinAPI->getOpenid($code);
session_start();
// 记录用户信息
$_SESSION['openid'] = $json['openid'];
$_SESSION['access_token'] = $json;
$openid = $json['openid'];
$home_url = '../index.php';
$account = Account::getAccount($json['openid']);
if ($account != null) {
$_SESSION['account'] = $account;
$extra = AccountExtra::getInfo($json['openid']);
if ($extra != null) {
$_SESSION['account_extra'] = $extra;
}
} else {
$weixinAPI = new WeixinAPI();
$userInfo = $weixinAPI->getUserInfo($json['access_token'], $openid);
Account::createAccount($openid, $userInfo['nickname']);
$account = Account::getAccount($json['openid']);
$_SESSION['account'] = $account;
}
//$home_url = '../h5/publish_task_page.php';
header('Location: ' . $home_url);
json_put("session", $_SESSION['access_token']);
json_output();
?>
示例6: WeixinAPI
<?php
// 申请快递员资格
require_once '../common/common.php';
$openid = $_SESSION['openid'];
$account = Account::getAccount($openid);
$access_token = $_SESSION['access_token'];
if ($account == null) {
$weixinAPI = new WeixinAPI();
$userInfo = $weixinAPI->getUserInfo($access_token['access_token'], $openid);
Account::createAccount($openid, $userInfo['nickname']);
}
//$icon = uploadFile('icon', "icon");
$icon = param("icon");
if ($icon == null) {
operation_fail("头像不能为空");
}
$address = param("address");
$fullname = param("fullname");
$idcard = param('idcard');
$contact = param('contact');
if ($contact == null) {
$contact = $fullname;
}
$contact_phone = param("contactPhone");
/*
$card_pic1 = uploadFile('cardPic1', 'cardPic1');
$card_pic2 = uploadFile('cardPic2', 'cardPic2');
$card_pic3 = uploadFile('cardPic', 'cardPic3');
$card_pic = $card_pic1 . "," . $card_pic2 . "," . $card_pic3;*/
$card_pic1 = param("cardPic1");
示例7: processTransferAccount
public function processTransferAccount()
{
// Transfer funds from the account.
$this->getAccount();
$transaction = new Transactions();
$transaction->accountID = $this->_accountID;
$transaction->transactionDate = $_SESSION['transferDate'];
$transaction->transactionDescription = 'Description: ' . $_SESSION['transferDescription'];
$transaction->transactee = $_SESSION['transferAccountPayee'];
if (isset($_SESSION['transferDate'])) {
$date = date_create($_SESSION['transferDate']);
$transferDate = date_format($date, 'zY');
$transferDate = intval($transferDate);
$currentDate = date_create(date('m/d/Y h:i:s a', time()));
$currentDate = date_format($currentDate, 'zY');
$currentDate = intval($currentDate);
if ($transferDate == $currentDate) {
$_SESSION['transferStatus'] = 'Paid';
} elseif ($transferDate > $currentDate) {
$_SESSION['transferStatus'] = 'Future Payment';
} else {
return false;
}
}
$transaction->transactionStatus = $_SESSION['transferStatus'];
$transaction->debits = $_SESSION['transferAmount'];
$transaction->transactionType = 'Payee';
$transaction->transactionID = $transaction->set();
// Transfer funds to the selected account
if ($transaction->transactionID > 0) {
$transaction->getTransaction();
$conf = 'B' . $transferDate . $transaction->transactionID;
$_SESSION['transferConf'] = $conf;
$_SESSION['transferCreated'] = $transaction->transactionDate;
// Reverse Transaction
$id = explode('-', $_SESSION['transferAccountPayeeID']);
$account2 = new Account();
$account2->accountID = $transaction->accountID;
$account2->getAccount();
$transaction2 = new Transactions();
$transaction2->accountID = $id[1];
$transaction2->transactionDate = $transaction->transactionDate;
$transaction2->transactionDescription = $transaction->transactionDescription;
$transaction2->transactee = $account2->accountName;
$transaction2->transactionStatus = 'Deposit';
$transaction2->transactionType = $transaction->transactionType;
$transaction2->credits = $transaction->debits;
$transaction2->debits = '0.00';
$transaction2->transactionID = $transaction2->set();
if ($transaction2->transactionID > 0) {
return true;
} else {
return false;
}
} else {
return false;
}
}