e949/front/pages/stats/page.php

51 lines
1.1 KiB
PHP
Raw Normal View History

<?php
// Approved tags list
// Includes
require_once("api/_config.php");
require_once("api/user/index.php");
require_once("api/tags/index.php");
require_once("api/post/index.php");
require_once("api/comments/index.php");
require_once("front/pages/main_nav.php");
require_once("front/notifications.php");
// Getting stats
$statUsers = User_GetUsersAmount(); // array
$statTags = Tags_GetTagsAmount(); // int
$statPosts = Post_GetPostsAmount(); // int
$statComms = Comments_GetTotalAmount(); // int
NTFY_EchoAllNotices();
?>
<div class="visualbox">
<h1>Instance statistics</h1>
<table>
<tr>
<th><p>Users amount</p></th>
<td><p>Total: <?php echo $statUsers["users"]; ?></p></td>
<td><p>Banned: <?php echo $statUsers["banned"]; ?></p></td>
</tr>
<tr>
<th><p>Tags amount</p></th>
<td><p>Total: <?php echo $statTags; ?></p></td>
</tr>
<tr>
<th><p>Posts amount</p></th>
<td><p>Total: <?php echo $statPosts; ?></p></td>
</tr>
<tr>
<th><p>Comments amount</p></th>
<td><p>Total: <?php echo $statComms; ?></p></td>
</tr>
</table>
</div>