| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?php
- $cache = file_get_contents("index-cache.txt") or die("Cache file not found!");
- $json = json_decode($cache, true);
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title>Stats generated by #pisg @ freenode</title>
- <link rel="stylesheet" type="text/css" href="dark-style.css">
- <style type="text/css">
- table {
- width: 480px;
- margin: 0 auto;
- }
- @media (max-width: 640px) {
- table {
- width: 100%;
- }
- }
- body {
- text-align: center;
- }
- footer {
- position: absolute;
- right: 0;
- bottom: 0;
- left: 0;
- padding: 1rem;
- text-align: center;
- }
- h6 {
- margin: 0;
- }
- </style>
- </head>
- <body>
- <h1>Stats generated by #pisg @ freenode</h1>
- <h4>Last updated: <?php echo $json["refresh_date"] ?></h4>
- <table>
- <tr>
- <th>Channel</th>
- <th>Users</th>
- </tr>
- <?php
- foreach ($json as $channel => $data) {
- if ($channel === "refresh_date")
- continue;
- echo '<tr onclick="document.location = \'' . $data["file"] . '\'">';
- echo '<td>' . $channel . '</td>';
- echo '<td>' . $data["users"] . '</td>';
- echo '</tr>';
- }
- ?>
- </table>
- <footer>
- <h6>pisg!stats@pisg/stats/bot @ freenode | Generated by <a href="https://github.com/PISG/pisg">PISG</a> | All rights reserved | This magic is created by OverCoder</h6>
- </footer>
- </body>
- </html>
|