forked from tildeverse/tilde.chat
17 lines
641 B
PHP
17 lines
641 B
PHP
<?php $title="stats page";
|
|
$desc="stats about tilde.chat and its channels";
|
|
include "header.php"; ?>
|
|
<h1>stats</h1>
|
|
<?php
|
|
$stats = json_decode(file_get_contents("stats.json"));
|
|
echo "\t<p>There are {$stats->usercount} users across {$stats->channelcount} channels.</p>\n";
|
|
echo "\t<table class='table'>\n\t\t<tr><th>Name</th><th>User count</th><th>Topic</th></tr>\n";
|
|
foreach($stats->channels as $channel) {
|
|
echo "\t<tr><td>{$channel->name}</td><td>{$channel->usercount}</td><td>{$channel->topic}</td></tr>\n";
|
|
}
|
|
echo "\t</table>\n";
|
|
?>
|
|
<hr>
|
|
<p>Available in <a href="stats.json">JSON format</a>.</p>
|
|
<?php include "footer.php"; ?>
|