Hello Ragezone, a bit of an issue here, if anyone knows the fix or if I'm doing it wrong please let me know! Trying to figure out how to display 'Amount' Players Online. Indicating Green!
PHP:
<?php
$plyonline = $mysqli->query("SELECT * FROM accounts where loggedin = 2")->fetch_row();
$url = $_SERVER['REQUEST_URI'];
?><div class="container">
<div class="sixteen columns">
<div id="logo"></div>
<nav>
<ul>
<li <?php if ($url == '/?p=home') { ?>class="nhome" <?php } ?>><a href="?p=home">Home</a></li>
<li <?php if ($url == '/?p=register') { ?>class="nhome" <?php } ?>><a href="?p=register">Register</a></li>
<li <?php if ($url == '/?p=download') { ?>class="nhome" <?php } ?>><a href="?p=download">Download</a></li>
<li <?php if ($url == '/?p=vote') { ?>class="nhome" <?php } ?>><a href="?p=vote">Vote</a></li>
<li <?php if ($url == '/?p=donate') { ?>class="nhome" <?php } ?>><a href="?p=donate">Donate</a></li>
<li <?php if ($url == '/?p=rankings') { ?>class="nhome" <?php } ?>><a href="?p=rankings">Rankings</a></li>
<li><a href="<?php echo $forum; ?>" target="_blank">Forums</a></li>
</ul>
</nav>
<div id="scroller_box">
<div id="scroller_inside">
<marquee scrollamount="10"> Welcome to Knighty</marquee>
</div>
</div>
</div>
<!-- Three Columns =================================== -->
<!-- first --> <div class="one-third column">
<div class="top_contents">
<div class="c_spacing">
<div class="left">
<?php
if($plyonline > 0) {
echo "<img src=\"./images/tools/online.png\">";
} else {
echo "<img src=\"./images/tools/offline.png\">";
}
?>
</div>
<div class="top_right">
<?php
if($plyonline > 1) {
echo "<h5><span class=\"green\"{$plyonline}</span> Players Online</h5>";
} else {
echo "<h5><span class=\"red\"> Server Offline</h5>";
}
?>
<img src="./images/rate/image.php" style="position: absolute;top: 30px;left: -32px;"/>
</div>
</div>
</div>
</div>