Пример #1
0
    }
    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);
}
/**
 * Set up page load events
 */
\Openclerk\Events::on('pages_header_start', function ($data) {
    define('PAGE_RENDER_START', microtime(true));
});
/**
 * Set up page load events
 */
\Openclerk\Events::on('pages_footer_end', function ($data) {
    if (defined('PAGE_RENDER_START')) {
        $end_time = microtime(true);
        $time_diff = ($end_time - PAGE_RENDER_START) * 1000;
        echo "<!-- rendered in " . number_format($time_diff, 2) . " ms -->";
    }
    performance_metrics_page_end();
    echo "\n<!--\n" . print_r(Openclerk\MetricsHandler::getInstance()->printResults(), true) . "\n-->";
    if (is_admin()) {
        echo "\n<!-- " . print_r($_SESSION, true) . "\n-->";
    }
});
Пример #2
0
function page_footer_old()
{
    ?>
  </div>
</div>

<?php 
    require_template("templates_footer");
    ?>

<div id="footer_nav">
  <ul class="footer_nav_list">
    <li><span class="title"><?php 
    echo htmlspecialchars(get_site_config('site_name'));
    ?>
</span>
      <ul>
        <li><a href="<?php 
    echo htmlspecialchars(url_for('index'));
    ?>
"><?php 
    echo ht("About");
    ?>
</a></li>
        <li><a href="<?php 
    echo htmlspecialchars(url_for('premium'));
    ?>
"><?php 
    echo ht("Get Premium");
    ?>
</a></li>
        <li><a href="<?php 
    echo htmlspecialchars(get_site_config('version_history_link'));
    ?>
"><?php 
    echo ht("Release History");
    ?>
</a></li>
        <li><a href="http://openclerk.org" target="_blank">Openclerk.org</a></li>
      </ul>
    </li>
    <li><span class="title"><?php 
    echo ht("Your Account");
    ?>
</span>
      <ul>
        <?php 
    if (user_logged_in()) {
        ?>
        <li><a href="<?php 
        echo htmlspecialchars(url_for('user'));
        ?>
"><?php 
        echo ht("User Profile");
        ?>
</a></li>
        <li><a href="<?php 
        echo htmlspecialchars(url_for('wizard_currencies'));
        ?>
"><?php 
        echo ht("Currency Preferences");
        ?>
</a></li>
        <li><a href="<?php 
        echo htmlspecialchars(url_for('wizard_accounts'));
        ?>
"><?php 
        echo ht("Configure Accounts");
        ?>
</a></li>
        <li><a href="<?php 
        echo htmlspecialchars(url_for('profile'));
        ?>
"><?php 
        echo ht("Your Reports");
        ?>
</a></li>
        <?php 
    } else {
        ?>
        <li><a href="<?php 
        echo htmlspecialchars(url_for('signup'));
        ?>
"><?php 
        echo ht("Signup");
        ?>
</a></li>
        <li><a href="<?php 
        echo htmlspecialchars(url_for('login'));
        ?>
"><?php 
        echo ht("Login");
        ?>
</a></li>
        <?php 
    }
    ?>
      </ul>
    </li>
    <li><span class="title"><?php 
    echo ht("Tools");
    ?>
</span>
      <ul>
        <li><a href="<?php 
    echo htmlspecialchars(url_for('historical'));
    ?>
"><?php 
    echo ht("Historical Data");
    ?>
</a></li>
        <li><a href="<?php 
    echo htmlspecialchars(url_for('average'));
    ?>
"><?php 
    echo ht("Market Averages");
    ?>
</a></li>
        <li><a href="<?php 
    echo htmlspecialchars(url_for('calculator'));
    ?>
"><?php 
    echo ht("Calculator");
    ?>
</a></li>
        <li><a href="<?php 
    echo htmlspecialchars(url_for('api'));
    ?>
"><?php 
    echo ht("API");
    ?>
</a></li>
      </ul>
    </li>
    <li><span class="title"><?php 
    echo ht("Support");
    ?>
</span>
      <ul>
        <li><a href="<?php 
    echo htmlspecialchars(url_for('help'));
    ?>
"><?php 
    echo ht("Help Centre");
    ?>
</a></li>
        <li><a href="<?php 
    echo htmlspecialchars(get_site_config('blog_link'));
    ?>
" target="_blank"><?php 
    echo ht("Blog");
    ?>
</a> <span class="new"><?php 
    echo ht("new");
    ?>
</span></li>
        <li><a href="<?php 
    echo htmlspecialchars(url_for('contact'));
    ?>
"><?php 
    echo ht("Contact Us");
    ?>
</a></li>
        <li><a href="<?php 
    echo htmlspecialchars(url_for('external'));
    ?>
"><?php 
    echo ht("External API Status");
    ?>
</a></li>
      </ul>
    </li>
  </ul>

  <div id="copyright">
    <?php 
    require_template("templates_copyright");
    ?>
  </div>

</div>
<?php 
    if (!(has_required_admin() || defined('BATCH_SCRIPT'))) {
        ?>
<script type="text/javascript">
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', '<?php 
        echo get_site_config('google_analytics_account');
        ?>
', 'auto');
  ga('send', 'pageview');
</script>
<?php 
    }
    ?>
</body>
</html>
<?php 
    if (defined('PAGE_RENDER_START')) {
        $end_time = microtime(true);
        $time_diff = ($end_time - PAGE_RENDER_START) * 1000;
        echo "<!-- rendered in " . number_format($time_diff, 2) . " ms -->";
    }
    performance_metrics_page_end();
    echo "\n<!--\n" . print_r(Openclerk\MetricsHandler::getInstance()->printResults(), true) . "\n-->";
    if (is_admin()) {
        echo "\n<!-- " . print_r($_SESSION, true) . "\n-->";
    }
}
Пример #3
0
<?php

/*
require(__DIR__ . (disabled) "/locale.php");
require(__DIR__ . (disabled) "/standard.php");
*/
require __DIR__ . "/../vendor/autoload.php";
require __DIR__ . "/classes.php";
require __DIR__ . "/config.php";
define('LIGHTOPENID_TIMEOUT', get_site_config('get_openid_timeout') * 1000);
// set up (db, page) metrics
// (need to do this before performance_metrics_page_start())
Openclerk\MetricsHandler::init(db());
// before loading sessions
require __DIR__ . "/performance.php";
performance_metrics_page_start();
require __DIR__ . "/security.php";
require __DIR__ . "/email.php";
require __DIR__ . "/crypto.php";
require __DIR__ . "/premium.php";
require __DIR__ . "/heavy.php";
require __DIR__ . "/kb.php";
require __DIR__ . "/countries.php";
require __DIR__ . "/routes.php";
require __DIR__ . "/templates.php";
// issue #152: support i18n
require __DIR__ . "/i18n.php";
$db_instance = null;
function db()
{
    global $db_instance;