<?php $zara->factory->startSection("content"); ?>
<div class="container">
    
    <?php foreach($shops as $item): ?>
    <div class="col-md-4 col-sm-6" onclick="ajax_url('/project/<?php echo e($item['shop_id']); ?>')" style="cursor: pointer;">
        <div id="best-selling" class="dash-widget-item">
            <div class="dash-widget-header">
                <div class="dash-widget-title"><?php echo e($item['shop_name']); ?></div>
                <img src="http://mini.s-shot.ru/?http://<?php echo e($item['shop_domain']); ?>" alt="">
                <div class="main-item">
                    <small><?php echo e($item['shop_domain']); ?></small>
                    <h2><?php echo e((float)$item['shop_balance']); ?> <i class="fa fa-rub"></i></h2>
                </div>
            </div>
        </div>
    </div>
    <?php endforeach; ?>

    <div class="col-sm-4">
        <div class="card">
            <div class="listview">
                <div class="lv-header">
                    Последние новости
                </div>
                <div class="lv-body">
                    <?php foreach($wall as $item): ?>
                    <?php if($item['id'] != ""): ?>
                    <a class="lv-item" href="https://vk.com/wall-60115896_<?=$item['id']?>" target="_blank" id="news-<?=$item['id']?>">
                        <div class="media">
                            <div class="pull-left">
                                <img class="lv-img-sm" src="https://pp.vk.me/c633227/v633227489/1c092/3jKbsrCCRmg.jpg" alt="">
                            </div>
                            <div class="media-body">
                                <div class="lv-title">Группа ВКонтакте</div>
                                <small class="lv-small"><?=preg_replace("#\\\n#is",  "<br />", $item['text'])?></small>
                            </div>
                        </div>
                    </a>
                    <?php endif; ?>
                    <?php endforeach; ?>
                </div>
                <a class="lv-footer" href="https://vk.com/wall-60115896">Посмотреть все</a>
            </div>
        </div>
    </div>
</div>
<script src="/assets/js/flot-charts/line-chart.js"></script>
<script src="/assets/js/charts.js"></script>
<script>
    var options = {
        series: {
            shadowSize: 0,
            lines: {
                show: false,
                lineWidth: 0,
            },
        },
        grid: {
            borderWidth: 0,
            labelMargin:10,
            hoverable: true,
            clickable: true,
            mouseActiveRadius:6,
            
        },
        xaxis: {
            tickDecimals: 0,
            ticks: false
        },
        
        yaxis: {
            tickDecimals: 0,
            ticks: false
        },
        
        legend: {
            show: false
        }
    };

    <?php $id = 0; ?>

    var d1 = [];
    var d2 = [];

    <?php $__empty_1 = true; foreach($stats as $item): $__empty_1 = false; ?>
        d1.push([<?php echo e($id++); ?>, <?php echo e((int)$item['stat']); ?>]);
    <?php endforeach; if ($__empty_1): ?>
        d1.push([1, 0]); 
    <?php endif; ?>

    <?php $__empty_1 = true; foreach($stats as $item): $__empty_1 = false; ?>
        d2.push([<?php echo e($id++); ?>, <?php echo e((float)$item['sum']); ?>]);
    <?php endforeach; if ($__empty_1): ?>
        d2.push([1, 0]);
    <?php endif; ?>

    $.plot($("#projects_stats"), [
        {data: d1, lines: { show: true, fill: 0.98 }, label: 'Платежей', stack: true, color: '#f1dd2c' },
        {data: d2, lines: { show: true, fill: 0.98 }, label: 'Доход', stack: true, color: '#e3e3e3' }
    ], options);
</script>
<?php $zara->factory->stopSection(); ?>
<?php echo $zara->compile("main", get_defined_vars(), $this->factory)->getCompiled(); ?>