<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js"></script>

<div class="col-lg-12 my">
<div class="card mb15 brd" style="width: 100%;">
<div class="card-body">
  <div class="row my">
<div class="col-md-6 my"><canvas id="polarArea-chart" width="800" height="450"></canvas></div>
<div class="col-md-6 my">
<ul class="list-unstyled lts">
  <li><i class="fa fa-circle" aria-hidden="true" style="color:#3e95cd; "></i> Всего новостей:<span>{news_num}</span></li>
  <li><i class="fa fa-circle" aria-hidden="true" style="color:#8e5ea2; "></i> Опубликовано:<span>{news_allow}</span></li>
  <li><i class="fa fa-circle" aria-hidden="true" style="color:#3cba9f; "></i> На главной:<span>{news_main}</span></li>
  <li><i class="fa fa-circle" aria-hidden="true" style="color:#e8c3b9; "></i> В модерации:<span>{news_moder}</span></li>
  <li><i class="fa fa-circle" aria-hidden="true" style="color:#EC87C0; "></i> За месяц:<span>{news_month}</span></li>
  <li><i class="fa fa-circle" aria-hidden="true" style="color:#AAB2BD; "></i> За неденлю:<span>{news_week}</span></li>
  <li><i class="fa fa-circle" aria-hidden="true" style="color:#967ADC; "></i> За сутки:<span>{news_day}</span></li>
</ul>
</div>
  </div>
<br><hr class="hr1"><br>
  <div class="row my">
<div class="col-md-6 my"><canvas id="doughnut-chart" width="800" height="450"></canvas></div>
<div class="col-md-6 my">
<ul class="list-unstyled lts">
  <li><i class="fa fa-circle" aria-hidden="true" style="color:#4A89DC; "></i> Всего Пользователей:<span>{user_num}</span></li>
  <li><i class="fa fa-circle" aria-hidden="true" style="color:#E9573F; "></i> Забанено:<span>{user_banned}</span></li>
  <li><i class="fa fa-circle" aria-hidden="true" style="color:#FFCE54; "></i> За месяц:<span>{user_month}</span></li>
  <li><i class="fa fa-circle" aria-hidden="true" style="color:#F6BB42; "></i> За неделю:<span>{user_week}</span></li>
  <li><i class="fa fa-circle" aria-hidden="true" style="color:#A0D468; "></i> За сутки:<span>{user_day}</span></li>
</ul>
</div>
  </div>
  <br><hr class="hr1"><br>
  <div class="row my">
    <div class="col-md-6 my"><canvas id="pie-chart" width="800" height="450"></canvas></div>
<div class="col-md-6 my">
<ul class="list-unstyled lts">
  <li><i class="fa fa-circle" aria-hidden="true" style="color:#37BC9B; "></i> Всего Комментариев:<span>{user_num}</span></li>
  <li><i class="fa fa-circle" aria-hidden="true" style="color:#434A54; "></i> За месяц:<span>{user_month}</span></li>
  <li><i class="fa fa-circle" aria-hidden="true" style="color:#D770AD; "></i> За неделю:<span>{user_week}</span></li>
  <li><i class="fa fa-circle" aria-hidden="true" style="color:#48CFAD; "></i> За сутки:<span>{user_day}</span></li>
  <li><a href="/?do=lastcomments" class="badge badge-secondary">Посмотреть последние</a></li>
</ul>
</div>
  </div>

<script>
new Chart(document.getElementById("polarArea-chart"), {
    type: 'polarArea',
    data: {
      
      datasets: [{
        label: "Population (millions)",
        backgroundColor: ["#3e95cd", "#8e5ea2","#3cba9f","#e8c3b9","#EC87C0","#AAB2BD","#967ADC"],
        data: [{news_num},{news_allow},{news_main},{news_moder},{news_month},{news_week},{news_day}]
      }]
    },
    options: {
      title: {
        display: true,
        text: 'Статистика новостей'
      }
    }
});

new Chart(document.getElementById("doughnut-chart"), {
    type: 'doughnut',
    data: {
      
      datasets: [
        {
          label: "Population (millions)",
          backgroundColor: ["#4A89DC", "#E9573F","#FFCE54","#F6BB42","#A0D468"],
          data: [{user_num},{user_banned},{user_month},{user_week},{user_day}]
        }
      ]
    },
    options: {
      title: {
        display: true,
        text: 'Статистика пользователей'
      }
    }
});

new Chart(document.getElementById("pie-chart"), {
    type: 'pie',
    data: {
      
      datasets: [{
        label: "Population (millions)",
        backgroundColor: ["#37BC9B", "#434A54","#D770AD","#48CFAD"],
        data: [{news_num},{news_allow},{news_main},{news_moder}]
      }]
    },
    options: {
      title: {
        display: true,
        text: 'Комментарии'
      }
    }
});
</script>

</div>
</div>
</div>

<div class="col-lg-12 my">

  <div class="card mb15 brd" style="width: 100%;">
  <div class="card-header"><i class="icon-badge" aria-hidden="true"></i> Лучшие пользователи</div>
  <div class="card-body" style="padding: 0;width: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;">
    <table class="table table-striped" style="width: 100%;margin-bottom:0px;overflow: auto;">{topusers}</table>
  </div>
</div>

</div>