20 lines
803 B
PHP
20 lines
803 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"));
|
|
?>
|
|
<p>There are <?=$stats->usercount?> users across <?=$stats->channelcount?> channels.</p>
|
|
<table class='table table-striped table-bordered table-hover'>
|
|
<thead><tr><th>Name</th><th>Users</th><th>Topic</th></tr></thead>
|
|
<tbody data-link="row" class="rowlink">
|
|
<?php foreach($stats->channels as $channel): ?>
|
|
<tr><td><a href="//web.tilde.chat/?join=<?=ltrim($channel->name,"#")?>"><?=$channel->name?></a></td><td><?=$channel->usercount?></td><td><?=$channel->topic?></td></tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
<hr>
|
|
<p>Available in <a href="stats.json">JSON format</a>.</p>
|
|
<?php include "footer.php"; ?>
|