<link rel="import" href="head.html">
<body class="blank c-body">
    <div class="sticky-footer-wrap">
                    <div class="navbar hpanel c-header">
    <div class="panel-heading hbuilt">
        <div class="container">
            <div class="pull-left">
                                                    <h2 class="light-version"><a href="/">Cratus Services Pvt Ltd</a></h2>
                            </div>
            <div class="pull-right">
                                    <ul class="nav no-borders">
                        
                        <li class="dropdown pull-right">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">(2) test@test.com <i class="fa fa-caret-down"></i> </a>
                            <ul class="dropdown-menu hdropdown">
                                                                <li>
                                    <a href="/profile">Profile</a>
                                </li>
                                <li>
                                    <a href="/stats/referrals/list">Referrals</a>
                                </li>
                                                                <li>
                                    <a href="/signout">Sign out</a>
                                </li>
                            </ul>
                        </li>
                        <li class="pull-right">
                            <div class="balance-top">
                                <span class="balance-title">Balance:</span>
                                <span class="balance-value">
                                                                            <span style="" class="js-balances js-balance-currency-USD">
                                        0
                                    </span>
                                                                        <select class="js-choose-balance-currency">
                                                                                    <option value="USD" selected>USD</option>
                                                                            </select>
                                </span>
                            </div>
                        </li>
                    </ul>
                            </div>
        </div>
    </div>
        <div class="panel-body">
        <div class="container">
            <ul class="nav">
                <li class="pull-left"><a href="/dashboard">Dashboard</a></li>
                <li class="pull-left dropdown">
                    <a href="/stats/daily">Statistics</a>
                </li>
                                    <li class="pull-left dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Offers <i class="fa fa-caret-down"></i></a>
                        <ul class="dropdown-menu hdropdown">
                            <li>
                                <a href="/offer/list">All offers</a>
                            </li>
                            <li>
                                <a href="/offer/list/available">Available offers</a>
                            </li>
                            <li>
                                <a href="/offer/list/live">Live offers</a>
                            </li>
                                                    </ul>
                    </li>
                                <li class="pull-left dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Toolbox <i class="fa fa-caret-down"></i></a>
                    <ul class="dropdown-menu hdropdown">
                        <li>
                            <a href="http://api.cratus.affise.com/" target="_blank">API <i class="fa fa-external-link"></i></a>
                        </li>
                    </ul>
                </li>
                <li class="pull-left">
                    <a href="/payment/list">Payments</a>
                </li>
                <li class="pull-left">
                    <a href="/news/list">News</a>
                </li>
                <li class="pull-right">
                    <a href="/tickets/list">Support </a>
                </li>
            </ul>
        </div>
    </div>
    </div>        <div class="main">
        <div class="container">
            <div class="row">
                    <script type="text/plain" id="url-news">/news/ajax_get_news</script>
    <script type="text/plain" id="url-manager">/ajax/get_manager</script>
    <script type="text/plain" id="url-today-stats">/ajax/get_today_stats</script>
    <script type="text/javascript"
            src="/scripts/dashboard.js?v=1534166525"></script>
    <script type="text/javascript">
        window.currencies = {"2":{"_id":2,"code":"USD","active":true,"default":true,"rate":1}};
    </script>

    <div class="row">
                <div class="col-lg-6">
            <div class="hpanel">
                <div class="panel-heading hbuilt">
                    News
                </div>
                <div class="panel-body dashboard-news-block"></div>
            </div>
        </div>
        <div class="col-lg-3">
            <div class="hpanel">
                <div class="panel-body" style="height: 220px; overflow-y: auto;">
                    <table class="table table-striped table-bordered table-condensed dashboard-payment "
                           style="font-size: 11px;">
                        <tr>
                            <th colspan="2">Statistics today</th>
                        </tr>
                        <tr>
                            <td style="width: 70%">Hosts</td>
                            <td class="today-hosts"></td>
                        </tr>
                        <tr>
                            <td style="width: 70%">Conversions</td>
                            <td class="today-conversions"></td>
                        </tr>
                    </table>
                    <table class="table table-striped table-bordered table-condensed dashboard-payment"
                           style="font-size: 11px;">
                        <tr>
                            <th></th>
                                                            <th>Balance</th>
                                <th>Hold</th>
                                                        <th>Available</th>
                        </tr>
                                                    <tr>
                                <td>USD</td>
                                                                    <td>0</td>
                                    <td>0</td>
                                                                <td>0</td>
                            </tr>
                                            </table>
                </div>
            </div>
        </div>
        <div class="col-lg-3">
            <div class="hpanel">
                <div class="panel-body dashboard-manager-block" style="height: 220px">
				<div class="panel-body dashboard-manager-block" style="height: 220px">
				<h4>Your personal manager</h4>
				<p>test1 t</p>
				<p>test1@test.com</p>
				<p>Undefined</p></div>
				</div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <div class="hpanel">
                <div class="panel-heading hbuilt">
                    Statistics for the last 10 days
                </div>
                <div class="panel-body" style="height: 260px">
                    <div class="wrapper-chart"></div>
                    <div id="chart" style="width:100%; height:220px;"></div>

                </div>
            </div>
        </div>
    </div>
            <div class="row offers-block">
            <div class="col-lg-12">
                <div class="hpanel">
                    <div class="panel-heading hbuilt">
                        New offers
                    </div>
                    <div class="panel-body" style="height: 190px; line-height: 150px;">
                        <img src="/img/loading2.gif" class="loading-dashboard"/>
                    </div>
                </div>
            </div>
                        <div class="col-lg-12">
                <div class="hpanel">
                    <div class="panel-heading hbuilt">
                        TOP-5 offers
                    </div>
                    <div class="panel-body" style="height: 190px; line-height: 150px;">
                        <img src="/img/loading2.gif" class="loading-dashboard"/>
                    </div>
                </div>
            </div>
                    </div>
    
    <script type="text/html" id="top_offers_block">
        <div class="col-lg-12">
    <div class="hpanel">
        <div class="panel-heading hbuilt">
            TOP-5 offers
        </div>
        <div class="panel-body" style="height: 190px">
            <div class="dashboard-new-offers top-offers">
            </div>
        </div>
    </div>
</div>    </script>
    <script type="text/html" id="new_offers_block">
        
<div class="col-lg-12">
    <div class="hpanel">
        <div class="panel-heading hbuilt">
            New offers
        </div>
        <div class="panel-body" style="height: 190px">
            <div class="bs-example">
                <% if (count > 5){ %>
                    <div id="myCarousel" class="carousel slide carousel-offer" data-ride="carousel">
                        <!-- Carousel indicators -->
                        <ol class="carousel-indicators">
                            <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
                            <li data-target="#myCarousel" data-slide-to="1"></li>
                        </ol>
                        <!-- Wrapper for carousel items -->
                        <div class="carousel-inner">
                            <div class="item active" style="height: 120px">
                                <div class="dashboard-new-offers new-offers">
                                </div>
                            </div>
                            <div class="item" style="height: 120px">
                                <div class="dashboard-new-offers carusel-new-offers">
                                </div>
                            </div>
                            <!-- Carousel controls -->
                            <a class="carousel-control left btn btn-primary" href="#myCarousel"
                               data-slide="prev">
                                <span class="glyphicon glyphicon-chevron-left"></span>
                            </a>
                            <a class="carousel-control right btn btn-primary" href="#myCarousel"
                               data-slide="next">
                                <span class="glyphicon glyphicon-chevron-right"></span>
                            </a>
                        </div>
                    </div>
                <% }else{ %>
                    <div class="dashboard-new-offers">
                        <div class="row new-offers">
                        </div>
                    </div>
                <% } %>
            </div>
        </div>
    </div>
</div>    </script>
    <script type="text/html" id="offer_item">
        <div class="offer-block">
    <div class="row img-offer">
        <a href="<%= offer.url_view %>" data-ccc="<%= offer.logo_source %>" >
            <% if (offer.logo_source ) { %>
                <img src="/logos/<%= offer.logo_source %>" alt="<%= offer.title %>" />
            <% } %>
        </a>
    </div>
    <div class="row img-under-title" style="overflow: hidden;">
        <a href="<%= offer.url_view %>">
            <%= offer.title %>
        </a>
    </div>
</div>    </script>
    <script type="text/html" id="news_item">
        <div class="offer-block">
    <div class="row img-offer">
        <a href="<%= offer.url_view %>" data-ccc="<%= offer.logo_source %>" >
            <% if (offer.logo_source ) { %>
                <img src="/logos/<%= offer.logo_source %>" alt="<%= offer.title %>" />
            <% } %>
        </a>
    </div>
    <div class="row img-under-title" style="overflow: hidden;">
        <a href="<%= offer.url_view %>">
            <%= offer.title %>
        </a>
    </div>
</div>    </script>
    <script type="text/javascript">
        $(document).ready(function () {
            $.getJSON("/offer/dashboard", {'top': 'on'}, function (data) {
                $('.offers-block').html('');
                $.each(data.data, function(type, values){
                    var html = window.simpleTmpl(type  + '_offers_block')({count : values.length});
                    $(".offers-block").append(html);
                    $.each(values, function(i, val){
                        var html = window.simpleTmpl('offer_item')({offer : val});
                        var itemsBlock = i < 5 ? "." + type  + "-offers" : ".carusel-" + type  + "-offers";
                        $(itemsBlock).append(html);
                    });
                });
            });
        });
    </script>

            </div>
        </div>
    </div>
                
        <div class="sticky-footer-push"></div>
    </div>
        <div class="hpanel sticky-footer c-footer" style="margin-bottom: 0;">
        <div class="panel-body">
            <div class="container">
                <div style="display: inline-block;">
                    Powered by <a target="_blank" class="underline" href="//affise.com">Affise.com</a> 2018
                </div>
                                    <div class="footer-link-block">
                        <a href="/privacy" target="_blank">Privacy policy</a>
                    </div>
                    <div class="footer-link-block">
                        <a href="/terms" target="_blank">Terms and Conditions</a>
                    </div>
                                            </div>
        </div>
    </div>
        
<script type="text/javascript">window.NREUM||(NREUM={});NREUM.info={"beacon":"bam.nr-data.net","licenseKey":"8bc46b1078","applicationID":"125949147","transactionName":"YAQBNhAEWEUDVRFfXVlOIgEWDFlYTWkBV0FfAwwDEAE=","queueTime":0,"applicationTime":264,"atts":"TEMCQFgeS0s=","errorBeacon":"bam.nr-data.net","agent":""}</script></body>
</html>
