• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_exchange_name函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_exchange_name函数的典型用法代码示例。如果您正苦于以下问题:PHP get_exchange_name函数的具体用法?PHP get_exchange_name怎么用?PHP get_exchange_name使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: get_knowledge_base

function get_knowledge_base()
{
    $kb = array(t('Concepts') => array('cryptocurrencies' => array('title' => t("What are cryptocurrencies?"), 'inline' => 'inline_cryptocurrencies'), 'versions' => array('title' => t(":site_name Version History"), 'inline' => 'inline_versions', 'new' => true)), t('Interface') => array('bitcoin_csv' => t("How do I upload a Bitcoin-Qt CSV file?"), 'litecoin_csv' => t("How do I upload a Litecoin-Qt CSV file?"), 'notifications' => array('title' => t("How do automated notifications work?"), 'inline' => 'inline_notifications'), 'managed_graphs' => array('title' => t("How are graphs automatically managed?"), 'inline' => 'inline_managed_graphs'), 'graph_refresh' => array('title' => t("Do graphs live update?"), 'inline' => 'inline_graph_refresh'), 'finance' => array('title' => t("What is :site_name Finance?"), 'inline' => 'inline_finance', 'new' => true)), t('Accounts') => array('add_currency' => array('title' => t("Can you add support for another cryptocurrency?"), 'inline' => 'inline_add_currency'), 'add_fiat' => array('title' => t("Can you add support for another fiat currency?"), 'inline' => 'inline_add_fiat'), 'add_service' => array('title' => t("Can you add support for another exchange/mining pool?"), 'inline' => 'inline_add_service')), t('Notifications') => array('notifications_ticker' => array('title' => t("How do I get notified of exchange rate changes?"), 'inline' => 'inline_notifications_ticker'), 'notifications_reports' => array('title' => t("How do I get notified of changes in my reports?"), 'inline' => 'inline_notifications_reports'), 'notifications_hashrates' => array('title' => t("How do I get notified of changes in my hashrates?"), 'inline' => 'inline_notifications_hashrates')), t('Finance') => array('transaction_creation' => array('title' => t("How are transactions automatically created?"), 'inline' => 'inline_transaction_creation', 'new' => true)));
    // automatically construct KB for adding accounts through the wizards
    $wizards = array("Mining pools" => 'mining pool account', "Exchanges" => 'exchange account', "Securities" => 'securities exchange account', "Individual Securities" => 'securities', "Other" => '');
    foreach (account_data_grouped() as $label => $group) {
        if (isset($wizards[$label])) {
            foreach ($group as $key => $data) {
                if ($data['disabled']) {
                    continue;
                }
                if ($label == 'Individual Securities') {
                    $title = 'How do I add individual ' . get_exchange_name($data['exchange']) . (isset($data['suffix']) ? $data['suffix'] : '') . ($wizards[$label] ? ' ' . $wizards[$label] : '') . '?';
                } else {
                    $title = 'How do I add a ' . get_exchange_name($key) . (isset($data['suffix']) ? $data['suffix'] : '') . ($wizards[$label] ? ' ' . $wizards[$label] : '') . '?';
                }
                $kb[t('Accounts')][$key] = array('title' => $title, 'inline' => 'inline_accounts_' . $key, 'new' => in_array($key, get_new_supported_wallets()) || in_array($key, get_new_exchanges()) || in_array($key, get_new_security_exchanges()) || isset($data['exchange']) && in_array($data['exchange'], get_new_security_exchanges()));
            }
        }
    }
    // sort each section by title
    foreach ($kb as $label => $group) {
        uasort($kb[$label], '_sort_get_knowledge_base');
    }
    return $kb;
}
开发者ID:phpsource,项目名称:openclerk,代码行数:26,代码来源:kb.php


示例2: testGenerate

 function testGenerate()
 {
     $templates = array('currencies_list' => array(), 'currencies_inline' => array(), 'fiat_currencies_list' => array(), 'fiat_currencies_inline' => array(), 'crypto_currencies_list' => array(), 'crypto_currencies_inline' => array(), 'commodity_currencies_list' => array(), 'commodity_currencies_inline' => array(), 'exchange_wallets_list' => array(), 'mining_pools_list' => array(), 'securities_list' => array(), 'exchange_list' => array());
     foreach (get_all_currencies() as $cur) {
         $templates['currencies_list'][] = "  * " . get_currency_name($cur);
         $templates['currencies_inline'][] = get_currency_abbr($cur);
     }
     foreach (get_all_fiat_currencies() as $cur) {
         $templates['fiat_currencies_list'][] = "  * " . get_currency_name($cur);
         $templates['fiat_currencies_inline'][] = get_currency_abbr($cur);
     }
     foreach (get_all_cryptocurrencies() as $cur) {
         $templates['crypto_currencies_list'][] = "  * " . get_currency_name($cur);
         $templates['crypto_currencies_inline'][] = get_currency_abbr($cur);
     }
     foreach (get_all_commodity_currencies() as $cur) {
         $templates['commodity_currencies_list'][] = "  * " . get_currency_name($cur);
         $templates['commodity_currencies_inline'][] = get_currency_abbr($cur);
     }
     $grouped = account_data_grouped();
     foreach ($grouped['Exchanges'] as $key => $data) {
         if (!$data['disabled']) {
             $templates['exchange_wallets_list'][] = "  * " . get_exchange_name($key);
         }
     }
     foreach ($grouped['Mining pools'] as $key => $data) {
         if (!$data['disabled']) {
             $templates['mining_pools_list'][] = "  * " . get_exchange_name($key);
         }
     }
     foreach ($grouped['Securities'] as $key => $data) {
         if (!$data['disabled']) {
             $templates['securities_list'][] = "  * " . get_exchange_name($key);
         }
     }
     foreach (get_exchange_pairs() as $key => $pairs) {
         $templates['exchange_list'][] = "  * " . get_exchange_name($key);
     }
     $templates['currencies_list'] = implode("\n", array_unique($templates['currencies_list']));
     $templates['fiat_currencies_list'] = implode("\n", array_unique($templates['fiat_currencies_list']));
     $templates['crypto_currencies_list'] = implode("\n", array_unique($templates['crypto_currencies_list']));
     $templates['commodity_currencies_list'] = implode("\n", array_unique($templates['commodity_currencies_list']));
     $templates['exchange_wallets_list'] = implode("\n", array_unique($templates['exchange_wallets_list']));
     $templates['mining_pools_list'] = implode("\n", array_unique($templates['mining_pools_list']));
     $templates['securities_list'] = implode("\n", array_unique($templates['securities_list']));
     $templates['exchange_list'] = implode("\n", array_unique($templates['exchange_list']));
     $templates['currencies_inline'] = implode(", ", array_unique($templates['currencies_inline']));
     $templates['fiat_currencies_inline'] = implode(", ", array_unique($templates['fiat_currencies_inline']));
     $templates['crypto_currencies_inline'] = implode(", ", array_unique($templates['crypto_currencies_inline']));
     $templates['commodity_currencies_inline'] = implode(", ", array_unique($templates['commodity_currencies_inline']));
     // load the template
     $input = file_get_contents(__DIR__ . "/../README.template.md");
     foreach ($templates as $key => $value) {
         $input = str_replace('{$' . $key . '}', $value, $input);
     }
     // write it out
     file_put_contents(__DIR__ . "/../README.md", $input);
 }
开发者ID:phpsource,项目名称:openclerk,代码行数:58,代码来源:GenerateReadmeTest.php


示例3: get_exchange_or_currency_name

function get_exchange_or_currency_name($exchange)
{
    $account_data_grouped = account_data_grouped();
    if (isset($account_data_grouped['Addresses'][$exchange])) {
        return $account_data_grouped['Addresses'][$exchange]['title'];
    } else {
        return get_exchange_name($exchange);
    }
}
开发者ID:phpsource,项目名称:openclerk,代码行数:9,代码来源:your_transactions.php


示例4: testDogecoin

 /**
  * Test a BTC/DOGE exchange increase notification, particularly the precision.
  * Issue #257
  */
 function testDogecoin()
 {
     // create a notification
     $id = $this->createNotificationTicker($this->user, array('exchange' => get_default_currency_exchange('dog'), 'currency1' => 'btc', 'currency2' => 'dog'));
     $arg_id = $this->createNotification($this->user, array('last_value' => 2.0E-7, 'notification_type' => 'ticker', 'type_id' => $id, 'trigger_condition' => 'increases', 'trigger_value' => 1, 'is_percent' => 0));
     // execute the job
     $this->executeJob($this->user, $arg_id);
     $mails = $this->getMails();
     $this->assertEquals(1, count($mails));
     $exchange_name = get_exchange_name(get_default_currency_exchange('dog'));
     $this->assertHasLine("The exchange rate on {$exchange_name} for BTC/DOGE has increased, from 0.00000020 BTC/DOGE to 0.00000030 BTC/DOGE (50%), in the last hour.", $mails[0]);
 }
开发者ID:phpsource,项目名称:openclerk,代码行数:16,代码来源:NotificationJobTest.php


示例5: getData

 public function getData($days)
 {
     $key_column = array('type' => 'string', 'title' => get_exchange_name($this->exchange));
     $columns = array();
     $columns[] = array('type' => 'string', 'title' => ct("Price"), 'heading' => true);
     $columns[] = array('type' => 'string', 'title' => ct("Value"));
     $data = array();
     $q = db()->prepare("SELECT * FROM ticker_recent WHERE exchange=:exchange AND currency1=:currency1 AND currency2=:currency2");
     $q->execute(array('exchange' => $this->exchange, 'currency1' => $this->currency1, 'currency2' => $this->currency2));
     if ($ticker = $q->fetch()) {
         $last_updated = $ticker['created_at'];
         $data[] = array('Bid', currency_format($this->currency1, $ticker['bid'], 4));
         $data[] = array('Ask', currency_format($this->currency1, $ticker['ask'], 4));
     } else {
         throw new GraphException(t("No recent rates found for :exchange :pair", $this->getTitleArgs()));
     }
     return array('key' => $key_column, 'columns' => $columns, 'data' => $data, 'last_updated' => $last_updated, 'no_header' => true);
 }
开发者ID:phpsource,项目名称:openclerk,代码行数:18,代码来源:ExchangePair.php


示例6: getData

 public function getData($days)
 {
     $key_column = array('type' => 'string', 'title' => ct("Currency"));
     $columns = array();
     // get data
     // TODO could probably cache this
     $q = db()->prepare("SELECT SUM(balance) AS balance, exchange, MAX(created_at) AS created_at FROM balances WHERE user_id=? AND is_recent=1 AND currency=? GROUP BY exchange");
     $q->execute(array($this->getUser(), $this->currency));
     $balances = $q->fetchAll();
     // need to also get address balances
     $summary_balances = get_all_summary_instances($this->getUser());
     // get additional balances
     $data = array();
     if (isset($summary_balances['blockchain' . $this->currency]) && $summary_balances['blockchain' . $this->currency]['balance'] != 0) {
         $balances[] = array("balance" => $summary_balances['blockchain' . $this->currency]['balance'], "exchange" => "blockchain", "created_at" => $summary_balances['blockchain' . $this->currency]['created_at']);
     }
     if (isset($summary_balances['offsets' . $this->currency]) && $summary_balances['offsets' . $this->currency]['balance'] != 0) {
         $balances[] = array("balance" => $summary_balances['offsets' . $this->currency]['balance'], "exchange" => "offsets", "created_at" => $summary_balances['offsets' . $this->currency]['created_at']);
     }
     // sort by balance
     usort($balances, array($this, 'sort_by_balance_desc'));
     $last_updated = find_latest_created_at($balances);
     // apply demo_scale and calculate total summary
     $data = array();
     $total = 0;
     foreach ($balances as $b) {
         if ($b['balance'] != 0) {
             $columns[] = array('type' => 'number', 'title' => get_exchange_name($b['exchange']));
             $data[] = demo_scale($b['balance']);
             $total += demo_scale($b['balance']);
         }
     }
     // return a more helpful message if there is no data
     if (!$data) {
         throw new NoDataGraphException_AddAccountsAddresses();
     }
     // sort data by balance
     $data = array(get_currency_abbr($this->currency) => $data);
     return array('key' => $key_column, 'columns' => $columns, 'data' => $data, 'last_updated' => $last_updated);
 }
开发者ID:phpsource,项目名称:openclerk,代码行数:40,代码来源:CompositionPie.php


示例7: getData

 public function getData($days)
 {
     $columns = array();
     $key_column = array('type' => 'string', 'title' => ct("Key"));
     $columns[] = array('type' => 'string', 'title' => ct("Exchange"), 'heading' => true);
     $columns[] = array('type' => 'string', 'title' => ct("Price"));
     $columns[] = array('type' => 'string', 'title' => ct("Volume"));
     $q = db()->prepare("SELECT * FROM ticker_recent WHERE currency1=? AND currency2=? ORDER BY volume DESC");
     $q->execute(array($this->currency1, $this->currency2));
     $tickers = $q->fetchAll();
     $q = db()->prepare("SELECT * FROM average_market_count WHERE currency1=? AND currency2=?");
     $q->execute(array($this->currency1, $this->currency2));
     $market_count = $q->fetch();
     $average = false;
     foreach ($tickers as $ticker) {
         if ($ticker['exchange'] == 'average') {
             $average = $ticker;
         }
     }
     if (!$average) {
         throw new RenderGraphException(t("Could not find any average data"));
     }
     $volume_currency = $average['currency2'];
     // generate the table of data
     $data = array();
     foreach ($tickers as $ticker) {
         if ($ticker['exchange'] == "average") {
             continue;
         }
         if ($ticker['volume'] == 0) {
             continue;
         }
         $id = $ticker['exchange'] . "_" . $ticker['currency1'] . $ticker['currency2'] . "_daily";
         $data[$ticker['exchange']] = array("<a href=\"" . htmlspecialchars(url_for('historical', array('id' => $id, 'days' => 180))) . "\">" . get_exchange_name($ticker['exchange']) . "</a>", $this->average_currency_format_html($ticker['last_trade'], $ticker['last_trade']), currency_format($volume_currency, $ticker['volume'], 0) . " (" . ($average['volume'] == 0 ? "-" : number_format($ticker['volume'] * 100 / $average['volume']) . "%") . ")");
     }
     $last_updated = $average['created_at'];
     return array('key' => $key_column, 'columns' => $columns, 'data' => $data, 'last_updated' => $last_updated, 'h1' => get_currency_abbr($average['currency1']) . "/" . get_currency_abbr($average['currency2']) . ": " . currency_format($average['currency1'], $average['last_trade']), 'h2' => "(" . number_format($average['volume']) . " " . get_currency_abbr($volume_currency) . " total volume)");
 }
开发者ID:phpsource,项目名称:openclerk,代码行数:38,代码来源:AverageMarketData.php


示例8: array

<?php

$account_data = array('exchange_name' => get_exchange_name('cryptopools_dgc'));
?>

<div class="instructions_add">
<h2>Adding a <?php 
echo $account_data['exchange_name'];
?>
 account</h2>

<ol class="steps">
	<li>Log into your <?php 
echo $account_data['exchange_name'];
?>
 account
		and visit your <a href="http://dgc.cryptopools.com/index.php?page=account&amp;action=edit">Edit Account page</a>.<br>
		<img src="<?php 
echo htmlspecialchars(url_for('img/accounts/cryptopools_dgc1.png'));
?>
"></li>

	<li>Copy and paste your <i>API Key</i> into the <a class="wizard_link" href="<?php 
echo htmlspecialchars(url_for('wizard_accounts_pools'));
?>
">"Add new Mining Pool" form</a>, and click "Add account".<br>
		<img src="<?php 
echo htmlspecialchars(url_for('img/accounts/cryptopools_dgc2.png'));
?>
"></li>
</ol>
开发者ID:phpsource,项目名称:openclerk,代码行数:31,代码来源:inline_accounts_cryptopools_dgc.php


示例9: array

<?php

$account_data = array('exchange_name' => get_exchange_name('havelock'));
?>

<div class="instructions_add">
<h2>Adding a Havelock Investments account</h2>

<ol class="steps">
	<li>Log into your <a href="https://www.havelockinvestments.com/api.php">Havelock Investments account</a> and visit your <i>API Setup</i>.<br>
		<img src="<?php 
echo htmlspecialchars(url_for('img/accounts/havelock1.png'));
?>
"></li>

	<li>Create a new API key by entering in a <i>Key Name</i> and clicking "Create Key".<br>
		<img src="<?php 
echo htmlspecialchars(url_for('img/accounts/havelock2.png'));
?>
"></li>

	<li>For this new key, select the <i>Portfolio</i> and <i>Balance</i> permissions, and click "Save Key Permissions".<br>
		<img src="<?php 
echo htmlspecialchars(url_for('img/accounts/havelock3.png'));
?>
"></li>

	<li>Copy and paste this long <i>API Key</i> into the <a class="wizard_link" href="<?php 
echo htmlspecialchars(url_for('wizard_accounts_securities'));
?>
">"Add new Securities Exchange" form</a>, and click "Add account".<br>
开发者ID:phpsource,项目名称:openclerk,代码行数:31,代码来源:inline_accounts_havelock.php


示例10: get_user

require __DIR__ . "/../layout/templates.php";
$user = get_user(user_id());
require_user($user);
$exchange = require_get('exchange');
$id = require_get('id');
// make sure that we actually have a valid account
$account_data = false;
$accounts = array();
foreach (account_data_grouped() as $label => $data) {
    foreach ($data as $key => $value) {
        if ($key == $exchange) {
            // we've found a valid account type
            $account_data = get_accounts_wizard_config($key);
            $account_type = get_wizard_account_type($value['wizard']);
            $add_types[] = $key;
            $add_type_names[$key] = get_exchange_name($key) . (isset($value['suffix']) ? $value['suffix'] : "");
            $q = db()->prepare("SELECT * FROM " . $account_data['table'] . "\n        WHERE user_id=? AND id=? ORDER BY title ASC");
            $q->execute(array(user_id(), $id));
            while ($r = $q->fetch()) {
                $r['exchange'] = $key;
                $r['khash'] = $account_data['khash'];
                $accounts[] = $r;
            }
        }
    }
}
if (!$account_data) {
    throw new Exception("No account data found for exchange '" . htmlspecialchars($exchange) . "'");
}
// no header or footer; we just output straight HTML
// uses $accounts to generate rows;
开发者ID:phpsource,项目名称:openclerk,代码行数:31,代码来源:wizard_accounts_callback.php


示例11: htmlspecialchars

<dt>7 November</dt>
<dd>
  Added currency support for <a href="https://www.reddcoin.com/" class="currency_name_rdd">Reddcoin</a>
  and <a href="http://viacoin.org/" class="currency_name_via">Viacoin</a>;

  added <a href="https://www.nicehash.com/">NiceHash</a>,
  <a href="https://westhash.com/">WestHash</a>,
  <a href="https://hash-to-coins.com/">Hash-to-coins</a> and
  <a href="https://www.eobot.com/">Eobot</a> mining pools;

  added <a href="https://btclevels.com/">BTClevels</a> accounts;

  disabled <a href="https://www.scryptguild.com/">ScryptGuild</a>,
  <a href="http://ltcmine.ru/">LTCMine.ru</a>,
  <a href="http://beeeeer.org/"><?php 
echo htmlspecialchars(get_exchange_name('beeeeer'));
?>
</a> and
  <a href="https://doge.rapidhash.net/">RapidHash</a> mining pools;

  fixed <span class="currency_name_xpm">XPM</span> addresses and
  <a href="https://nvc.khore.org">nvc.khore.org</a> accounts not updating;

  updated example graph images.
</dd>

<dt>10 September</dt>
<dd>
  Added currency support for <a href="https://www.darkcoin.io/" class="currency_name_drk">Darkcoin</a>,
  <a href="http://www.vericoin.info/" class="currency_name_vrc">Vericoin</a>,
  <a href="http://nxt.org/" class="currency_name_nxt">Nxt</a>,
开发者ID:phpsource,项目名称:openclerk,代码行数:31,代码来源:versions.php


示例12: array

<?php

$account_data = array('exchange_name' => get_exchange_name('ozcoin_btc'));
?>

<div class="instructions_add">
<h2>Adding a <?php 
echo $account_data['exchange_name'];
?>
 account</h2>

<ol class="steps">
  <li>Log into your <?php 
echo $account_data['exchange_name'];
?>
 account
    and visit your <a href="http://ozco.in/content/api-key">API Key page</a>.<br>
    <img src="<?php 
echo htmlspecialchars(url_for('img/accounts/ozcoin_btc1.png'));
?>
"></li>

  <li>Copy and paste your <i>API Key</i> into the <a class="wizard_link" href="<?php 
echo htmlspecialchars(url_for('wizard_accounts_pools'));
?>
">"Add new Mining Pool" form</a>, and click "Add account".<br>
    <img src="<?php 
echo htmlspecialchars(url_for('img/accounts/ozcoin_btc2.png'));
?>
"></li>
</ol>
开发者ID:phpsource,项目名称:openclerk,代码行数:31,代码来源:inline_accounts_ozcoin_btc.php


示例13: array

<?php

$account_data = array('exchange_name' => get_exchange_name('d2_wdc'));
?>

<div class="instructions_add">
<h2>Adding a <?php 
echo $account_data['exchange_name'];
?>
 account</h2>

<ol class="steps">
  <li>Log into your <a href="https://wdc.d2.cc/accountdetails.php"><?php 
echo $account_data['exchange_name'];
?>
 account details</a>.<br>
    <img src="<?php 
echo htmlspecialchars(url_for('img/accounts/d2_wdc1.png'));
?>
"></li>

  <li>Find your <i>API Key</i>, as illustrated below: <br>
    <img src="<?php 
echo htmlspecialchars(url_for('img/accounts/d2_wdc2.png'));
?>
"></li>

  <li>Copy and paste this <i>API Key</i> into the <a class="wizard_link" href="<?php 
echo htmlspecialchars(url_for('wizard_accounts_pools'));
?>
">"Add new Mining Pool" form</a>, and click "Add account".</li>
开发者ID:phpsource,项目名称:openclerk,代码行数:31,代码来源:inline_accounts_d2_wdc.php


示例14: get_exchange_name

<?php

$exchange = get_exchange_name("crypto-trade");
$example = "ESB";
?>

<div class="instructions_add">
<h2>Adding individual <?php 
echo htmlspecialchars($exchange);
?>
 securities</h2>

<ol class="steps">
	<li>As of Openclerk 0.10, you can manually add quantities of privately-owned securities
		to your portfolio, and estimate their value against those traded on <?php 
echo htmlspecialchars($exchange);
?>
,
		by visiting your <a class="wizard_link" href="<?php 
echo htmlspecialchars(url_for('wizard_accounts_individual_securities'));
?>
">"Individual Securities" wizard page</a>
		through your <a href="<?php 
echo htmlspecialchars(url_for('wizard_accounts_securities'));
?>
">"Securities" wizard page</a>.<br>
		<img src="<?php 
echo htmlspecialchars(url_for('img/accounts/individual_securities.png'));
?>
"></li>
	</li>
开发者ID:phpsource,项目名称:openclerk,代码行数:31,代码来源:inline_accounts_individual_crypto-trade.php


示例15: get_exchange_name

<?php

$exchange = get_exchange_name("litecoinglobal");
$example = "ASICMINER1K-PT";
$url = url_for('historical', array('id' => 'securities_litecoininvest_ltc', 'days' => 180, 'name' => $example));
?>

<div class="instructions_add">
<h2>Adding individual <?php 
echo htmlspecialchars($exchange);
?>
 securities</h2>

<ol class="steps">
	<li>As of Openclerk 0.10, you can manually add quantities of privately-owned securities
		to your portfolio, and estimate their value against those traded on <?php 
echo htmlspecialchars($exchange);
?>
,
		by visiting your <a class="wizard_link" href="<?php 
echo htmlspecialchars(url_for('wizard_accounts_individual_securities'));
?>
">"Individual Securities" wizard page</a>
		through your <a href="<?php 
echo htmlspecialchars(url_for('wizard_accounts_securities'));
?>
">"Securities" wizard page</a>.<br>
		<img src="<?php 
echo htmlspecialchars(url_for('img/accounts/individual_securities.png'));
?>
"></li>
开发者ID:phpsource,项目名称:openclerk,代码行数:31,代码来源:inline_accounts_individual_litecoininvest.php


示例16: number_format_human

     case "decreases_by":
         $change_text = "decreased by at least " . number_format_human($notification['trigger_value']) . ($notification['is_percent'] ? '%' : " " . $value_label);
         break;
     case "below":
         $change_text = "decreased below " . number_format_human($notification['trigger_value']) . " " . $value_label;
         break;
     default:
         throw new JobException("Unknown trigger condition for change text: '" . $notification['trigger_condition'] . "'");
 }
 // send the email
 if ($user['email']) {
     $args = array("name" => $user['name'] ? $user['name'] : $user['email'], "url" => absolute_url(url_for('wizard_notifications')), "profile" => absolute_url(url_for('profile')), "last_value" => number_format_human($notification['last_value']), "current_value" => number_format_human($current_value), "value_label" => $value_label, "value_delta" => number_format_human($value_delta), "percent" => $percent === null ? "infinite%" : number_format_human($percent * 100, -1), "change_text" => $change_text, "period" => $notification['period']);
     switch ($notification['notification_type']) {
         case "ticker":
             $email_template = 'notification_ticker';
             $args += array("exchange" => get_exchange_name($account['exchange']), "currency1" => get_currency_abbr($account['currency1']), "currency2" => get_currency_abbr($account['currency2']));
             break;
         case "summary_instance":
             $email_template = 'notification_summary_instance';
             if (substr($account['summary_type'], 0, strlen('totalmh_')) == 'totalmh_') {
                 $currency = substr($account['summary_type'], strlen('totalmh_'));
                 $args += array("label" => "total " . get_currency_abbr($currency) . " hashrate");
             } else {
                 if (substr($account['summary_type'], 0, strlen('total')) == 'total') {
                     $currency = substr($account['summary_type'], strlen('total'));
                     $args += array("label" => "total " . get_currency_abbr($currency));
                 } else {
                     if (substr($account['summary_type'], 0, strlen('all2')) == 'all2') {
                         $summary_type = substr($account['summary_type'], strlen('all2'));
                         $summary_types = get_total_conversion_summary_types();
                         $args += array("label" => "converted " . $summary_types[$summary_type]['short_title']);
开发者ID:phpsource,项目名称:openclerk,代码行数:31,代码来源:notification.php


示例17: array

<?php

$account_data = array('exchange_name' => get_exchange_name('liteguardian'));
?>

<div class="instructions_add">
<h2>Adding a LiteGuardian account</h2>

<ol class="steps">
	<li>Log into your <a href="https://www.liteguardian.com/secure/user/manageAccount">LiteGuardian account details</a>.<br>
		<img src="<?php 
echo htmlspecialchars(url_for('img/accounts/liteguardian1.png'));
?>
"></li>

	<li>Find your <i>Api Key</i>, as illustrated below: <br>
		<img src="<?php 
echo htmlspecialchars(url_for('img/accounts/liteguardian2.png'));
?>
"></li>

	<li>Copy and paste this <i>Api Key</i> into the <a class="wizard_link" href="<?php 
echo htmlspecialchars(url_for('wizard_accounts_pools'));
?>
">"Add new Mining Pool" form</a>, and click "Add account".</li>
</ol>
</div>

<div class="instructions_safe">
<h2>Is it safe to provide <?php 
echo htmlspecialchars(get_site_config('site_name'));
开发者ID:phpsource,项目名称:openclerk,代码行数:31,代码来源:inline_accounts_liteguardian.php


示例18: get_default_exchange_text

/**
 * Return some text describing the default exchanges used for the given currencies.
 * For example:
 *  array('ltc', 'ftc', 'usd', 'ghs') => 'BTC-e for LTC/FTC, Mt.Gox for USD, CEX.io for GHS'
 * @see get_default_currency_exchange()
 */
function get_default_exchange_text($currencies)
{
    $result = array();
    foreach ($currencies as $c) {
        $default = get_default_currency_exchange($c);
        if (!isset($result[$default])) {
            $result[$default] = array();
        }
        $result[$default][] = get_currency_abbr($c);
    }
    $result2 = array();
    foreach ($result as $exchange => $currencies) {
        $result2[] = get_exchange_name($exchange) . " for " . implode("/", $currencies);
    }
    return implode(", ", $result2);
}
开发者ID:phpsource,项目名称:openclerk,代码行数:22,代码来源:types.php


示例19: array

<?php

$account_data = array('exchange_name' => get_exchange_name('bitmarket_pl'));
?>

<div class="instructions_add">
<h2>Adding a <?php 
echo $account_data['exchange_name'];
?>
 account</h2>

<ol class="steps">
	<li>Log into your <a href="https://www.bitmarket.pl/account.php"><?php 
echo $account_data['exchange_name'];
?>
 account ("Konto")</a> and visit the
		<a href="https://www.bitmarket.pl/apikeys.php"><i>API Keys</i> section</a> (<i>Dostęp API</i>).<br>
		<img src="<?php 
echo htmlspecialchars(url_for('img/accounts/bitmarket_pl1.png'));
?>
"></li>

	<li>Click on the "Generate new API key" button (<i>"Wygeneruj nowy klucz API"</i>).<br>
		<img src="<?php 
echo htmlspecialchars(url_for('img/accounts/bitmarket_pl2.png'));
?>
"></li>

	<li>Make sure that <i>only</i> the "account balances" (<i>"Pobranie informacji o koncie"</i>) permission is selected,
		and click "generate new key" (<i>"wygeneruj nowy klucz"</i>).<br>
		<img src="<?php 
开发者ID:phpsource,项目名称:openclerk,代码行数:31,代码来源:inline_accounts_bitmarket_pl.php


示例20: array

<?php

$account_data = array('exchange_name' => get_exchange_name('westhash'));
?>

<div class="instructions_add">
<h2>Adding a <?php 
echo $account_data['exchange_name'];
?>
 account</h2>

<ol class="steps">
	<li>Log into your <?php 
echo $account_data['exchange_name'];
?>
 account
		and visit your <a href="https://www.westhash.com/index.jsp?p=account">Account page</a>.<br>
		<img src="<?php 
echo htmlspecialchars(url_for('img/accounts/westhash1.png'));
?>
"></li>

	<li>Copy and paste your <i>API ID</i> and <i>ReadOnly API Key</i> into the <a class="wizard_link" href="<?php 
echo htmlspecialchars(url_for('wizard_accounts_pools'));
?>
">"Add new Mining Pool" form</a>, and click "Add account".<br>
		<img src="<?php 
echo htmlspecialchars(url_for('img/accounts/westhash2.png'));
?>
"></li>
</ol>
开发者ID:phpsource,项目名称:openclerk,代码行数:31,代码来源:inline_accounts_westhash.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_exdir函数代码示例发布时间:2022-05-15
下一篇:
PHP get_excerpt函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap