<?php require "includes/navigation.php"; ?> <!-- Page Content --> <div class="container"> <div class="row"> <!-- Blog Entries Column --> <div class="col-md-8"> <!-- Blog posts --> <?php $posts = getPublishedPosts(); if (count($posts) == 0) { echo "<h3>There aren't any published posts</h3>"; } else { foreach ($posts as $post) { require "includes/post_data.php"; echo "<br><br><br>"; } } ?> <hr> <!-- Pager --> <ul class="pager">
require "includes/dashboard_widget.php"; ?> </div> <!-- Chart --> <div class="container row col-xs-12"> <script type="text/javascript"> google.charts.load('current', {'packages':['bar']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = new google.visualization.arrayToDataTable([ ['Metric', 'Count'], <?php $metrics = ['Published posts', 'Draft posts', 'Approved comments', 'Unapproved comments', 'Admin users', 'Other users', 'Categories']; $counts = [count(getPublishedPosts()), count(getDraftPosts()), count(getApprovedComments()), count(getUnapprovedComments()), count(getAdminUsers()), count(getNoAdminUsers()), count(getAllCategories())]; for ($i = 0; $i < 7; $i++) { echo "['{$metrics[$i]}', {$counts[$i]}],"; } ?> ]); var options = { title: '', width: '100%', height: '100%', legend: { position: 'none' }, chart: { subtitle: '' }, axes: { x: { 0: { side: 'top', label: '' } // Top x-axis.