Beispiel #1
0
/**
 * Return a HTML link for inspecting a given cryptocurrency address.
 */
function crypto_address($currency, $address)
{
    foreach (\DiscoveredComponents\Currencies::getAddressCurrencies() as $cur) {
        if ($cur === $currency) {
            $instance = \DiscoveredComponents\Currencies::getInstance($cur);
            return "<span class=\"address " . $currency . "_address\"><code>" . htmlspecialchars($address) . "</code>\n        <a class=\"inspect\" href=\"" . htmlspecialchars($instance->getBalanceURL($address)) . "\" title=\"Inspect with " . htmlspecialchars($instance->getExplorerName()) . "\">?</a>\n      </span>";
        }
    }
    foreach (get_blockchain_currencies() as $explorer => $currencies) {
        foreach ($currencies as $cur) {
            if ($cur == $currency) {
                return "<span class=\"address " . $currency . "_address\"><code>" . htmlspecialchars($address) . "</code>\n          <a class=\"inspect\" href=\"" . htmlspecialchars(sprintf(get_site_config($currency . "_address_url"), $address)) . "\" title=\"Inspect with " . htmlspecialchars($explorer) . "\">?</a>\n        </span>";
            }
        }
    }
    return htmlspecialchars($address);
}
Beispiel #2
0
function get_explorer_address($currency, $address)
{
    foreach (\DiscoveredComponents\Currencies::getAddressCurrencies() as $cur) {
        if ($cur === $currency) {
            $instance = \DiscoveredComponents\Currencies::getInstance($cur);
            return $instance->getBalanceURL($address);
        }
    }
    foreach (get_blockchain_currencies() as $explorer => $currencies) {
        foreach ($currencies as $cur) {
            if ($cur == $currency) {
                return sprintf(get_site_config($currency . "_address_url"), $address);
            }
        }
    }
}
echo t("Feature");
?>
</th>
    <th><?php 
echo t("Free account");
?>
</th>
    <th class="premium"><?php 
echo t("Premium account");
?>
</th>
  </tr>
</thead>
<tbody>
  <?php 
$blockchain = get_blockchain_currencies();
$currencies = array();
foreach ($blockchain as $currency_list) {
    foreach ($currency_list as $c) {
        $currencies[$c] = $c;
    }
}
$premium_technical_types = 0;
$free_types = array();
$premium_types = array();
foreach (graph_technical_types() as $key => $data) {
    $title = "<abbr title=\"" . htmlspecialchars($data['title']) . "\">" . htmlspecialchars($data['title_short']) . "</abbr>";
    $premium_types[] = $title;
    if ($data['premium']) {
        $premium_technical_types++;
    } else {