mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-04-30 11:19:22 +02:00
28 lines
798 B
PHP
28 lines
798 B
PHP
<?php
|
|
$cache = new Cache('engine/cache/asideServerInfo');
|
|
if ($cache->hasExpired()) {
|
|
$asideServerInfo = mysql_select_single("
|
|
SELECT
|
|
(SELECT COUNT(`id`) FROM `accounts`) as `accounts`,
|
|
(SELECT COUNT(`id`) FROM `players`) as `players`,
|
|
(SELECT COUNT(`player_id`) FROM `players_online`) as `online`
|
|
");
|
|
$cache->setContent($asideServerInfo);
|
|
$cache->save();
|
|
} else {
|
|
$asideServerInfo = $cache->load();
|
|
}
|
|
?>
|
|
<div class="well widget">
|
|
<div class="header">
|
|
Server Information
|
|
</div>
|
|
<div class="body">
|
|
<ul>
|
|
<li><a href="onlinelist.php">Players online: <?php echo $asideServerInfo['online']; ?></a></li>
|
|
<li>Registered accounts: <?php echo $asideServerInfo['accounts'];?></li>
|
|
<li>Registered players: <?php echo $asideServerInfo['players'];?></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|