Пример #1
0
<?php

require_once 'template.php';
// menu bar
page_header(3);
if ($_SESSION['user']['is_logged'] == 1) {
    $db = new DBConnection();
    echo '
        <div class="flat_area grid_16" style="opacity: 1;">
            <h2>' . getLang('charts_head') . '<small> 	- ' . getLang('charts_subhead') . '</small></h2>
        </div>
	';
    $watchlist = new App\Model\Watchlist($db);
    $stocks = $watchlist->getList('id', 'stock_name', "user_account_num = '{$_SESSION['user']['user_account_num']}'");
    $stocksWidget = $watchlist->getWidgetStocks("user_account_num = '{$_SESSION['user']['user_account_num']}'");
    echo '
<div class="grid_16 block box">

    <!-- TradingView Widget BEGIN -->
    <script type="text/javascript" src="https://d33t3vvu2t2yu5.cloudfront.net/tv.js"></script>
    <script type="text/javascript">
        new TradingView.widget({
            "width": 900,
            "height": 500,
            "symbol": "FX:SPX500",
            "interval": "D",
            "timezone": "exchange",
            "theme": "White",
            "toolbar_bg": "#f1f3f6",
            "hide_top_toolbar": false,
            "allow_symbol_change": true,