?> </th> <th><?php echo Lang::string('orders-value'); ?> </th> </tr> <?php if ($asks) { foreach ($asks as $ask) { $mine = !empty(User::$info['user']) && $ask['user_id'] == User::$info['user'] && $ask['btc_price'] == $ask['fiat_price'] ? '<a class="fa fa-user" href="open-orders.php?id=' . $ask['id'] . '" title="' . Lang::string('home-your-order') . '"></a>' : ''; echo ' <tr id="ask_' . $ask['id'] . '" class="ask_tr"> <td>' . $mine . '<span class="buy_currency_char">' . $currency_info['fa_symbol'] . '</span><a class="order_price click" title="' . Lang::string('orders-click-price-buy') . '" href="#">' . String::currency($ask['btc_price'], $currency_info['is_crypto'] == 'Y') . '</a> ' . ($ask['btc_price'] != $ask['fiat_price'] ? '<a title="' . str_replace('[currency]', $CFG->currencies[$ask['currency']]['currency'], Lang::string('orders-converted-from')) . '" class="fa fa-exchange" href="" onclick="return false;"></a>' : '') . '</td> <td><a class="order_amount click" title="' . Lang::string('orders-click-amount-buy') . '" href="#">' . String::currency($ask['btc'], true) . '</a> ' . $c_currency_info['currency'] . '</td> <td><span class="buy_currency_char">' . $currency_info['fa_symbol'] . '</span><span class="order_value">' . String::currency($ask['btc_price'] * $ask['btc'], $currency_info['is_crypto'] == 'Y') . '</span></td> </tr>'; } } echo '<tr id="no_asks" style="' . (is_array($asks) ? 'display:none;' : '') . '"><td colspan="4">' . Lang::string('orders-no-ask') . '</td></tr>'; ?> </table> </div> <div class="clear"></div> </div> <?php if (!$bypass) { ?> </div> <div class="mar_top5"></div> </div>
} } API::add('Orders', 'get', array(false, false, $limit, $c_currency1, $currency1, $user, false, 1, false, false, $user)); API::add('Orders', 'get', array(false, false, $limit, $c_currency1, $currency1, $user, false, false, false, 1, $user)); $query = API::send(); $return['asks'][] = $query['Orders']['get']['results'][1]; $return['bids'][] = $query['Orders']['get']['results'][0]; if (!$notrades) { $return['transactions'][] = $query['Transactions']['get']['results'][0]; $return['btc_traded'] = $query['Stats']['getBTCTraded']['results'][0][0]['total_btc_traded']; } if (!empty($_REQUEST['last_price'])) { $return['last_price'] = $query['Transactions']['get']['results'][0][0]['btc_price']; $return['last_price_curr'] = $query['Transactions']['get']['results'][0][0]['currency'] == $currency_info['id'] ? '' : ($query['Transactions']['get']['results'][0][0]['currency1'] == $currency_info['id'] ? '' : ' (' . $CFG->currencies[$query['Transactions']['get']['results'][0][0]['currency1']]['currency'] . ')'); $return['fa_symbol'] = $currency_info['fa_symbol']; $return['last_trans_color'] = $query['Transactions']['get']['results'][0][0]['maker_type'] == 'sell' ? 'price-green' : 'price-red'; if ($currency1) { $return['available_fiat'] = !empty($query['User']['getAvailable']['results'][0][$currency_info['currency']]) ? String::currency($query['User']['getAvailable']['results'][0][$currency_info['currency']], $currency_info['is_crypto'] == 'Y') : '0'; $return['available_btc'] = !empty($query['User']['getAvailable']['results'][0][$c_currency_info['currency']]) ? String::currency($query['User']['getAvailable']['results'][0][$c_currency_info['currency']], true) : '0'; } if ($CFG->currencies) { foreach ($CFG->currencies as $key => $currency) { if (is_numeric($key)) { continue; } $last_price = String::currency($return['last_price'] * (empty($currency_info) || $currency_info['currency'] == 'USD' ? 1 / $currency[$usd_field] : $currency_info[$usd_field] / $currency[$usd_field]), $currency_info['is_crypto'] == 'Y'); $return['last_price_cnv'][$currency['currency']] = $last_price; } } } echo json_encode($return);
?> </th> <th><?php echo Lang::string('deposit-status'); ?> </th> </tr> <?php if ($requests) { foreach ($requests as $request) { echo ' <tr> <td>' . $request['id'] . '</td> <td><input type="hidden" class="localdate" value="' . strtotime($request['date']) . '" /></td> <td>' . $request['description'] . '</td> <td>' . ($CFG->currencies[$request['currency']]['is_crypto'] == 'Y' ? String::currency($request['amount'], true) . ' ' . $request['fa_symbol'] : $request['fa_symbol'] . String::currency($request['amount'])) . '</td> <td>' . $request['status'] . '</td> </tr>'; } } else { echo '<tr><td colspan="5">' . Lang::string('deposit-no') . '</td></tr>'; } ?> </table> </div> <?php echo $pagination; if (empty($_REQUEST['bypass'])) { ?> </div> <div class="mar_top5"></div>
<?php include '../lib/common.php'; if (User::$info['locked'] == 'Y' || User::$info['deactivated'] == 'Y') { Link::redirect('settings.php'); } elseif (User::$awaiting_token) { Link::redirect('verify-token.php'); } elseif (!User::isLoggedIn()) { Link::redirect('login.php'); } header('Content-Type: text/csv; charset=utf-8'); header('Content-Disposition: attachment; filename=transactions_' . date('Y-m-d') . '.csv'); API::add('Transactions', 'get', array(false, false, false, false, false, 1, false, false, false, false, false, 1)); $query = API::send(); $transactions = $query['Transactions']['get']['results'][0]; if ($transactions) { $output = fopen('php://output', 'w'); fputcsv($output, array(' ' . Lang::string('transactions-type') . ' ', ' ' . Lang::string('transactions-time') . ' ', ' ' . Lang::string('market') . ' ', ' ' . Lang::string('currency') . ' ', ' ' . Lang::string('orders-amount') . ' ', ' ' . Lang::string('transactions-fiat') . ' ', ' ' . Lang::string('orders-price') . ' ', ' ' . Lang::string('transactions-fee') . ' ')); foreach ($transactions as $transaction) { fputcsv($output, array(' ' . $transaction['type'] . ' ', ' ' . date('M j, Y, H:i', strtotime($transaction['date']) + $CFG->timezone_offset) . ' UTC ', ' ' . $CFG->currencies[$transaction['c_currency']]['currency'] . ' ', ' ' . $CFG->currencies[$transaction['currency']]['currency'] . ' ', ' ' . String::currency($transaction['btc'], true) . ' ', ' ' . String::currency($transaction['btc_net'] * $transaction['fiat_price'], $transaction['is_crypto'] == 'Y') . ' ', ' ' . String::currency($transaction['fiat_price'], $transaction['is_crypto'] == 'Y') . ' ', ' ' . String::currency($transaction['fee'] * $transaction['fiat_price'], $transaction['is_crypto'] == 'Y') . ' ')); } }
<div class="table-style"> <table class="table-list trades" id="asks_list"> <tr> <th colspan="2"><?php echo Lang::string('orders-ask'); ?> </th> </tr> <?php if ($asks) { foreach ($asks as $ask) { $mine = !empty(User::$info['user']) && $ask['user_id'] == User::$info['user'] && $ask['btc_price'] == $ask['fiat_price'] ? '<a class="fa fa-user" href="open-orders.php?id=' . $ask['id'] . '" title="' . Lang::string('home-your-order') . '"></a>' : ''; echo ' <tr id="ask_' . $ask['id'] . '" class="ask_tr"> <td>' . $mine . '<span class="order_amount">' . String::currency($ask['btc'], true) . '</span> ' . $c_currency_info['currency'] . '<input type="hidden" id="order_id" value="' . $ask['id'] . '" /></td> <td><span class="buy_currency_char">' . $currency_info['fa_symbol'] . '</span><span class="order_price">' . String::currency($ask['btc_price'], $currency_info['is_crypto'] == 'Y') . '</span> ' . ($ask['btc_price'] != $ask['fiat_price'] ? '<a title="' . str_replace('[currency]', $CFG->currencies[$ask['currency']]['currency'], Lang::string('orders-converted-from')) . '" class="fa fa-exchange" href="" onclick="return false;"></a>' : '') . '</td> </tr>'; } } echo '<tr id="no_asks" style="' . (is_array($asks) && count($asks) > 0 ? 'display:none;' : '') . '"><td colspan="2">' . Lang::string('orders-no-ask') . '</td></tr>'; ?> </table> </div> </div> </div> </div> <div class="clearfix mar_top3"></div> </div><!-- end fresh projects -->
:</div> <div class="amount"><?php echo $fee_bracket['fee']; ?> % <a title="<?php echo Lang::string('account-view-fee-schedule'); ?> " href="fee-schedule.php"><i class="fa fa-question-circle"></i></a></div> </div> <div class="one_half"> <div class="label"><?php echo str_replace('[currency]', $CFG->currencies[$main['fiat']]['currency'], Lang::string('account-30-day-vol')); ?> :</div> <div class="amount"><?php echo $CFG->currencies[$main['fiat']]['fa_symbol'] . String::currency($volume / $CFG->currencies[$main['fiat']]['usd_ask']); ?> </div> </div> <div class="clear"></div> </div> <div class="clear"></div> </div> <div class="mar_top8"></div> </div> </div> <?php include 'includes/sidebar_account.php'; ?> </div> <?php
echo Lang::string('orders-value'); ?> </th> </tr> <?php if ($asks) { $i = 0; foreach ($asks as $ask) { $min_ask = empty($min_ask) || $ask['btc_price'] < $min_ask ? $ask['btc_price'] : $min_ask; $max_ask = empty($max_ask) || $ask['btc_price'] > $max_ask ? $ask['btc_price'] : $max_ask; $mine = !empty(User::$info['user']) && $ask['user_id'] == User::$info['user'] && $ask['btc_price'] == $ask['fiat_price'] ? '<a class="fa fa-user" href="open-orders.php?id=' . $ask['id'] . '" title="' . Lang::string('home-your-order') . '"></a>' : ''; echo ' <tr id="ask_' . $ask['id'] . '" class="ask_tr"> <td>' . $mine . $currency_info['fa_symbol'] . '<span class="order_price">' . String::currency($ask['btc_price']) . '</span> ' . ($ask['btc_price'] != $ask['fiat_price'] ? '<a title="' . str_replace('[currency]', $CFG->currencies[$ask['currency']]['currency'], Lang::string('orders-converted-from')) . '" class="fa fa-exchange" href="" onclick="return false;"></a>' : '') . '</td> <td><span class="order_amount">' . String::currency($ask['btc'], true) . '</span> ' . $c_currency_info['currency'] . '</td> <td>' . $currency_info['fa_symbol'] . '<span class="order_value">' . String::currency($ask['btc_price'] * $ask['btc']) . '</span></td> </tr>'; $i++; } } echo '<tr id="no_asks" style="' . (is_array($asks) && count($asks) > 0 ? 'display:none;' : '') . '"><td colspan="4">' . Lang::string('orders-no-ask') . '</td></tr>'; ?> </table> </div> </div> <div class="mar_top5"></div> </div> </div> <script type="text/javascript"> <?php $bid_range = $max_bid - $min_bid;
echo Lang::string('transactions-fee'); ?> </th> </tr> <?php if ($transactions) { foreach ($transactions as $transaction) { $trans_symbol = $CFG->currencies[$transaction['currency']]['fa_symbol']; echo ' <tr id="transaction_' . $transaction['id'] . '"> <input type="hidden" class="is_crypto" value="' . $transaction['is_crypto'] . '" /> <td><input type="hidden" class="localdate" value="' . strtotime($transaction['date']) . '" /></td> <td>' . String::currency($transaction['btc'], true) . ' ' . $CFG->currencies[$transaction['c_currency']]['fa_symbol'] . '</td> <td><span class="currency_char">' . $trans_symbol . '</span><span>' . String::currency($transaction['btc_net'] * $transaction['fiat_price'], $transaction['is_crypto'] == 'Y') . '</span></td> <td><span class="currency_char">' . $trans_symbol . '</span><span>' . String::currency($transaction['fiat_price'], $transaction['is_crypto'] == 'Y') . '</span></td> <td><span class="currency_char">' . $trans_symbol . '</span><span>' . String::currency($transaction['fee'] * $transaction['fiat_price'], $transaction['is_crypto'] == 'Y') . '</span></td> </tr>'; } } echo '<tr id="no_transactions" style="' . (is_array($transactions) ? 'display:none;' : '') . '"><td colspan="6">' . Lang::string('transactions-no') . '</td></tr>'; ?> </table> <?php echo $pagination; ?> </div> <div class="clear"></div> </div> <?php if (!$bypass) { ?>
<?php chdir('..'); $ajax = true; include '../lib/common.php'; API::add('User', 'getAvailable'); API::add('BankAccounts', 'getRecord', array($_REQUEST['account'])); $query = API::send(); $bank_account = $query['BankAccounts']['getRecord']['results'][0]; $user_available = $query['User']['getAvailable']['results'][0]; $bank_account_currency = $CFG->currencies[$bank_account['currency']]; $return['client_account'] = $bank_account['account_number']; $return['escrow_account'] = $bank_account_currency['account_number']; $return['escrow_name'] = $bank_account_currency['account_name']; if (!empty($_REQUEST['avail'])) { $return['currency'] = $bank_account_currency['currency']; $return['currency_char'] = $bank_account_currency['fa_symbol']; $return['available'] = String::currency($user_available[$bank_account_currency['currency']]); } echo json_encode($return);
</select> </span> </span> </th> <!--th><?php echo Lang::string('fee-schedule-flc'); ?> </th --> </tr> <?php if ($fee_schedule) { $last_fee1 = false; $last_btc = false; foreach ($fee_schedule as $fee) { $symbol = $fee['to_usd'] > 0 ? '<' : '>'; $from = $fee['to_usd'] > 0 ? String::currency($fee['to_usd'] * $main_usd_ask / $this_usd_ask, 0) : String::currency($fee['from_usd'] * $main_usd_ask / $this_usd_ask, 0); ?> <tr> <?php echo $fee['fee1'] != $last_fee1 ? '<td>' . $fee['fee1'] . '%</td>' : '<td class="inactive"></td>'; ?> <td><?php echo $fee['fee']; ?> %</td> <td><?php echo $symbol . ' ' . $currency_info['fa_symbol'] . $from; ?> </td> <?php $fee['global_btc'] != $last_btc ? '<td>' . number_format($fee['global_btc'], 1) . ' BTC</td>' : '<td class="inactive"></td>';
<div class="clear"></div> <div class="balances"> <?php foreach ($available as $currency => $balance) { if (count($allowed_currencies) > 0 && !in_array($CFG->currencies[$currency]['id'], $allowed_currencies)) { continue; } $is_crypto = $CFG->currencies[$currency]['is_crypto'] == 'Y'; ?> <div class="one_half"> <div class="label"><?php echo $currency . ' ' . Lang::string('account-available'); ?> :</div> <div class="amount"><?php echo (!$is_crypto ? $CFG->currencies[$currency]['fa_symbol'] . ' ' : '') . String::currency($balance, $is_crypto); ?> </div> </div> <?php } ?> <div class="clear"></div> </div> <form method="POST" action="merchant-deposit.php" name="user-payment" id="merchant-user-payment" class="buyform"> <div class="param"> <label for="merchant-user-pay-currency"><?php echo Lang::string('gateway-currency-pay'); ?> </label> <select id="merchant-user-pay-currency" name="user_pay_currency">
</tr> <?php if ($transactions) { foreach ($transactions as $transaction) { echo ' <tr id="user_' . $transaction['user'] . '"> <td>' . $transaction['user'] . '</td> <td> ' . String::currency($transaction['30_day_volume'], true) . ' ' . $CFG->currencies[$transaction['default_c_currency']]['fa_symbol'] . '</td> <td> ' . $CFG->currencies[$transaction['default_currency']]['fa_symbol'] . '</td> <td> ' . $CFG->currencies[$transaction['default_c_currency']]['fa_symbol'] . '</td> <td> ' . String::currency($transaction['affiliates_fee'], true) . '</td> <td> ' . String::currency($transaction['affiliates_fee1'], true) . '</td> </tr>'; } } echo '<tr id="no_transactions" style="' . (is_array($transactions) ? 'display:none;' : '') . '"><td colspan="6">' . Lang::string('transactions-no') . '</td></tr>'; ?> </table> <?php echo $pagination; ?> </div> <div class="clear"></div> </div>
API::add('Stats', 'getCurrent', array($currency['id'], $currency1)); } API::add('Orders', 'getBidAsk', array($c_currency1, $currency1)); API::add('Stats', 'getCurrent', array($c_currency1, $currency1)); API::add('User', 'getAvailable'); $query = API::send(); $current_bid = $query['Orders']['getBidAsk']['results'][0]['bid']; $current_ask = $query['Orders']['getBidAsk']['results'][0]['ask']; $user_available = $query['User']['getAvailable']['results'][0]; $i = 0; $stats = array(); $market_stats = array(); foreach ($CFG->currencies as $key => $currency) { if (is_numeric($key) || $currency['is_crypto'] != 'Y') { continue; } $k = $query['Stats']['getCurrent']['results'][$i]['market']; if ($CFG->currencies[$k]['id'] == $c_currency1) { $stats = $query['Stats']['getCurrent']['results'][$i]; } $market_stats[$k] = $query['Stats']['getCurrent']['results'][$i]; $i++; } $return['currency_info'] = $CFG->currencies[strtoupper($currency1)]; $return['current_bid'] = $current_bid; $return['current_ask'] = $current_ask; $return['available_btc'] = !empty($user_available[$CFG->currencies[$c_currency1]['currency']]) ? String::currency($user_available[$CFG->currencies[$c_currency1]['currency']], true) : 0; $return['available_fiat'] = !empty($user_available[$CFG->currencies[$currency1]['currency']]) ? String::currency($user_available[$CFG->currencies[$currency1]['currency']], $CFG->currencies[$currency1]['is_crypto'] == 'Y') : 0; $return['stats'] = $stats; $return['market_stats'] = $market_stats; echo json_encode($return);
<input type="hidden" class="order_date" value="' . $ask['date'] . '" /> <input type="hidden" class="is_crypto" value="' . $ask['is_crypto'] . '" /> <td>' . $type . '</td> <td><span class="currency_char">' . $CFG->currencies[$ask['currency']]['fa_symbol'] . '</span><span class="order_price">' . String::currency($ask['fiat_price'] > 0 ? $ask['fiat_price'] : $ask['stop_price'], $CFG->currencies[$ask['currency']]['is_crypto'] == 'Y') . '</span></td> <td><span class="order_amount">' . String::currency($ask['btc'], true) . '</span> ' . $CFG->currencies[$ask['c_currency']]['currency'] . '</td> <td><span class="currency_char">' . $CFG->currencies[$ask['currency']]['fa_symbol'] . '</span><span class="order_value">' . String::currency($ask['btc'] * ($ask['fiat_price'] > 0 ? $ask['fiat_price'] : $ask['stop_price']), $CFG->currencies[$ask['currency']]['is_crypto'] == 'Y') . '</span></td> <td><a href="edit-order.php?order_id=' . $ask['id'] . '" title="' . Lang::string('orders-edit') . '"><i class="fa fa-pencil"></i></a> <a href="open-orders.php?delete_id=' . $ask['id'] . '&uniq=' . $_SESSION["openorders_uniq"] . '" title="' . Lang::string('orders-delete') . '"><i class="fa fa-times"></i></a></td> </tr>'; if ($double) { echo ' <tr id="ask_' . $ask['id'] . '" class="ask_tr double"> <input type="hidden" class="is_crypto" value="' . $ask['is_crypto'] . '" /> <td><div class="identify stop_order">S</div></td> <td><span class="currency_char">' . $CFG->currencies[$ask['currency']]['fa_symbol'] . '</span><span class="order_price">' . String::currency($ask['stop_price'], $CFG->currencies[$ask['currency']]['is_crypto'] == 'Y') . '</span></td> <td><span class="order_amount">' . String::currency($ask['btc'], true) . '</span> ' . $CFG->currencies[$ask['c_currency']]['currency'] . '</td> <td><span class="currency_char">' . $CFG->currencies[$ask['currency']]['fa_symbol'] . '</span><span class="order_value">' . String::currency($ask['stop_price'] * $ask['btc'], $CFG->currencies[$ask['currency']]['is_crypto'] == 'Y') . '</span></td> <td><span class="oco"><i class="fa fa-arrow-up"></i> OCO</span></td> </tr>'; } } } echo '<tr id="no_asks" style="' . (is_array($asks) && count($asks) > 0 ? 'display:none;' : '') . '"><td colspan="5">' . Lang::string('orders-no-ask') . '</td></tr>'; ?> </table> </div> <div class="clear"></div> </div> <div class="clear"></div> </div> <?php if (!$bypass) {