mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-10-13 18:04:54 +02:00
New layout (Znote AAC AtomIO)
Layout is primarily changed to this because the old layout had obsolete javascript dependencies. I still want to make another default layout eventually, which is mobile friendly. This layout has a very nice character search widget though that looks for names realtime and displays them in a list beside the search.
This commit is contained in:
34
layout/widgets/serverinfo.php
Normal file
34
layout/widgets/serverinfo.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<div class="well widget">
|
||||
<div class="header">
|
||||
Server Information
|
||||
</div>
|
||||
<div class="body">
|
||||
<ul>
|
||||
<?php
|
||||
$status = true;
|
||||
if ($config['status']['status_check']) {
|
||||
@$sock = fsockopen ($config['status']['status_ip'], $config['status']['status_port'], $errno, $errstr, 1);
|
||||
if(!$sock) {
|
||||
echo "<span style='color:red;font-weight:bold;'><center>Server Offline!</center></span><br/>";
|
||||
$status = false;
|
||||
}
|
||||
else {
|
||||
$info = chr(6).chr(0).chr(255).chr(255).'info';
|
||||
fwrite($sock, $info);
|
||||
$data='';
|
||||
while (!feof($sock))$data .= fgets($sock, 1024);
|
||||
fclose($sock);
|
||||
echo "<span style='color:green;font-weight:bold;'><center>Server Online!</center></span><br />";
|
||||
}
|
||||
}
|
||||
if ($status) {
|
||||
?>
|
||||
<li><a href="onlinelist.php">Players online:
|
||||
<?php echo user_count_online(); ?></a></li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<li>Registered accounts: <?php echo user_count_accounts();?></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user