function display_account_setup($auth_user) { //add new account display_account_form($auth_user); $list = get_accounts($auth_user); // $accounts = sizeof($list); //display all accounts foreach ($list as $key => $account) { display_account_form($auth_user, $account['accountid'], $account['server'], $account['remoteuser'], $account['remotepassword'], $account['type'], $account['port']); } }
</div> </div> </div> </div> <?php break; case 'expense_by_category': $expenses_only = filter_input(INPUT_GET, 'expenses_only', FILTER_SANITIZE_STRING); ?> <div> <form action="dosh.php" method="GET"> <div> Select group: <?php $accounts = get_accounts($db); array_unshift($accounts, array('account_name' => 'All Accounts')); echo generate_select('account', $accounts, '', 'account_name', 'account_name'); ?> Select category: <?php $categories = get_categories($db); array_unshift($categories, array('category' => 'All Categories')); echo generate_select('category', $categories, '', 'category', 'category'); ?> Select Time Period: <select id='select_date_modifier' name='date_modifier'> <option value="All Transactions">All Transactions</option> <option value="-7 days">1 week</option> <option value="-14 days">2 weeks</option> <option value="start of month">This month</option>
</div> </ul> </div> <div class="wrapper"> <div class="center"> <?php require 'functions/get_uploaded_transaction_function.php'; require_once 'functions/open_file_function.php'; require 'functions/get_accounts_function.php'; require 'functions/get_customers_function.php'; require 'functions/get_transactions_function.php'; /* --------------------------------------------------------------------------- Getting all the customers, accounts and transactions and puts them in arrays ----------------------------------------------------------------------------*/ $customersArray = get_customers(); $accountsArray = get_accounts(); $transactionsArray = get_transactions(); /* --------------------------------------------------------------------------- Counting the arrays ----------------------------------------------------------------------------*/ $customersArrayLength = count($customersArray); $accountsArrayLength = count($accountsArray); $transactionsArrayLength = count($transactionsArray); $target_dir = "uploads/"; $target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]); $uploadOk = 1; $FileType = pathinfo($target_file, PATHINFO_EXTENSION); $fileName = basename($_FILES["fileToUpload"]["name"]); // Only account.csv files allowed if ($fileName == "transaction_deposit.csv" or $fileName == "transaction_withdrawal.csv") { } else {
function display_account_setup($auth_user) { //display empty 'new account' form display_account_form($auth_user); $list = get_accounts($auth_user); $accounts = sizeof($list); // display each stored account foreach ($list as $key => $account) { // display form for each accounts details. // note that we are going to send the password for all accounts in the HTML // this is not really a very good idea display_account_form($auth_user, $account['accountid'], $account['server'], $account['remoteuser'], $account['remotepassword'], $account['type'], $account['port']); } }
$body->set('yesno', $yesno); $body->set('acctname', getAccountName($acctid)); $vars = account_info(); if ($vars) { foreach ($vars as $key => $value) { $body->set($key, $value); } } } else { $curr_page = isset($_GET['page']) ? $_GET['page'] : $default_page; $curr_size = isset($_GET['size']) ? $_GET['size'] : $default_size; $curr_sort = isset($_GET['sort']) ? $columns[$_GET['sort']] : $columns[$default_sort]; $body = new Template("templates/account/account.default.tmpl.php"); $page_stats = getPageInfo("account", $curr_page, $curr_size, $_GET['sort']); if ($page_stats['page']) { $accounts = get_accounts($page_stats['page'], $curr_size, $curr_sort); } if ($accounts) { $body->set('accounts', $accounts); foreach ($page_stats as $key => $value) { $body->set($key, $value); } } else { $body->set('page', 0); $body->set('pages', 0); } } break; case 1: // Edit Account Details check_admin_authorization();
function get_all_accounts($binding) { return get_accounts($binding, null); }
function get_autointercept_platform($sku, $ebay_platform) { global $dbcon; $totalnums = 0; $combineskus = get_combinesku($sku); $skus = empty($combineskus) ? array() : array_keys($combineskus); array_push($skus, $sku); $skus_str = implode("','", $skus); $skus_str = "'" . $skus_str . "'"; $accounts = get_accounts($ebay_platform); $accounts_str = implode("','", $accounts); $sql = "SELECT b.ebay_amount , b.sku \n\t\t\t\tFROM ebay_order AS a \n\t\t\t\tLEFT JOIN ebay_orderdetail AS b ON a.ebay_ordersn = b.ebay_ordersn \n\t\t\t\tWHERE a.ebay_status in (658,661)\n\t\t\t\tAND b.sku in ({$skus_str})\n\t\t\t\tand a.ebay_account in ('{$accounts_str}')\n\t\t\t\tAND a.ebay_combine!='1'"; //echo "{$sql}\n"; $sql = $dbcon->execute($sql); $skunums = $dbcon->getResultArray($sql); foreach ($skunums as $sku_info) { $realtimes = get_realtime($sku_info["sku"]); $totalnums += $sku_info["ebay_amount"] * $realtimes; } //echo "{$ebay_platform} 数量为{$totalnums}\n"; return $totalnums; }