37 lines
1.1 KiB
PHP
37 lines
1.1 KiB
PHP
<?php
|
|
$title="stats page";
|
|
$desc="stats about tilde.chat and its channels";
|
|
$stats = json_decode(file_get_contents("../stats.json"));
|
|
include __DIR__."/../header.php";
|
|
?>
|
|
|
|
<h1>stats</h1>
|
|
<hr>
|
|
<p>there are <?=$stats->usercount?> users across <?=$stats->channelcount?> channels.</p>
|
|
<p>if the channel is set with <a href="https://wiki.inspircd.org/Channel_Modes">chanmode +s</a> it will be omitted from this list.</p>
|
|
<div class="table-responsive">
|
|
<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="<?=$channel->webchatlink?>"><?=$channel->name?></a></td>
|
|
<td><?=$channel->usercount?></td>
|
|
<td style="word-wrap: break-word; white-space: pre-wrap; max-width:700px"><?=$channel->topic?></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<hr>
|
|
<p>Available in <a href="/stats.json">JSON format</a>.</p>
|
|
|
|
<?php include __DIR__."/../footer.php"; ?>
|