<?
$tmp = mysql_query("SELECT * FROM cms_system LIMIT 1") or die(mysql_error());
$system = mysql_fetch_assoc($tmp);
$maintenance = $system['site_closed'];

?>
<div class="left_date"><? echo date( "l j F Y | H:i", time() ) ?></div>
<div class="hr"></div>
<div class="loginuser">Welcome, <? echo $_SESSION[hkusername] ?></div>
<div class="hr"></div>
<div class="text">
<b>Todays Statistics</b><br>
Users Signed on Today: <? echo mysql_evaluate("SELECT COUNT(*) FROM users") ?><br>
Rooms: <? echo mysql_evaluate("SELECT COUNT(*) FROM rooms") ?><br>
Furniture: <? echo mysql_evaluate("SELECT COUNT(*) FROM furniture") ?><br>
Groups: <? echo mysql_evaluate("SELECT COUNT(*) FROM groups") ?><br>
Bans Made:  <? echo mysql_evaluate("SELECT COUNT(*) FROM users_bans") ?><br>
</div>
<div class="hr"></div>
<div class="text">
<b>Current Statistics</b><br>
CMS Mode: <? if($maintenance == 1){echo "Maintenance";}else{echo "Current";} ?><br>
Users Online: <? echo mysql_evaluate("SELECT COUNT(*) FROM users_online") ?><br>
Active Rooms: <? echo mysql_evaluate("SELECT COUNT(*) FROM rooms WHERE visitors_now >= 1") ?><br>
</div>
<div class="hr"></div>
