<?php

if (!defined('IN_HK') || !IN_HK)
{
	exit;
}

if (!HK_LOGGED_IN)
{
	exit;
}

require_once "top.php";

?>		

<div class="wrap"> 
	<div id="icon-index" class="icon32"><br /></div> 
<h2>Housekeeping</h2> 
 

<div id="dashboard-widgets-wrap"> 
 
<div id='dashboard-widgets' class='metabox-holder'>
	
<div class='postbox-container' style='width:49%;'>
<div id='normal-sortables' class='meta-box-sortables'>

<div id="dashboard_right_now" class="postbox " >
<h3 class='hndle'><span>Hotel Statistics</span></h3>

<div class="inside">
 
	<div class="table"> 
	<table> 
	
<tr class="first"><td class="first b b-posts"><a href='index.php?_cmd=getuser'>	
<?php $query = mysql_query("SELECT * FROM users"); $users = mysql_num_rows($query); echo $users; ?></a></td>
<td class="t posts"><a href='index.php?_cmd=getuser'>Users</a></td><td class="b b-comments"><a>
<?php $roomsget = mysql_query("SELECT * FROM rooms"); $rooms = mysql_num_rows($roomsget); echo $rooms;?></a></td>
<td class="last t comments"><a>Rooms</a></td></tr><td class="b b_approved"><a>
<?php $furniture = mysql_query("SELECT * FROM furniture"); $furni = mysql_num_rows($furniture); echo $furni; ?></a>
</td><td class="last t"><a class='approved'>Furnis</a></td></tr> 
	<tr><td class="first b b-cats">
<a href='index.php?_cmd=newspublish'>
<?php $news = mysql_query("SELECT * FROM site_news"); $newsg = mysql_num_rows($news); echo $newsg; ?></a>
</td><td class="t cats"><a href='index.php?_cmd=news'>News</a></td><td class="b b-waiting">
<a href='index.php?_cmd=bans'><span class='pending-count'>
<?php $banget = mysql_query("SELECT * FROM users_bans"); $bans = mysql_num_rows($banget); echo $bans;?></span>
</a></td><td class="last t"><a class='waiting'>Bans</a></td></tr> 
	
<tr><td class="first b b-tags"><a href='<?php echo WWW; ?>tag'>
<?php $querytags = mysql_query("SELECT * FROM user_tags");  $tags = mysql_num_rows($querytags); echo $tags; ?> 
</a></td><td class="t tags"><a href='<?php echo WWW; ?>tag'>Tags</a></td><td class="b b-spam"><a>
<span class='spam-count'>
<?php $user_badge = mysql_query("SELECT * FROM user_badges"); $badge = mysql_num_rows($user_badge); echo $badge;?>
</span></a></td><td class="last t"><a class='spam'>Badges</a></td></tr> 
	
</table> 
	</div> 
	<div class="versions"> 
	<p>You are using the housekeeping <span class="b"><a>panel</a>
</span> of <span class="b"><a href="<?php echo WWW; ?>">iHabbo Hotel.</a></span></p></span> 
	<br class="clear" />
 
</div> 
</div>	</div>
	<div id='dashboard-widgets' class='metabox-holder'>
	
<div class='postbox-container' style='width:100%;'>
<div id='normal-sortables' class='meta-box-sortables'>

<div id="dashboard_right_now" class="postbox " >
<h3 class='hndle'><span>Hotel Status</span></h3>

<div class="inside">

 
	<div class="table"> 
	
<table> 
		<?php
		
		$sysData = mysql_fetch_assoc(dbquery("SELECT * FROM server_status"));	
		echo '<tr class="first">
<td> '.$sysData['server_ver'] . ' </td></tr>';
		
		switch ($sysData['status'])
		{
			case 0:
			
				echo '<td>The hotel is currently 
<b style="color: red;">Offline</b>.';
				
				break;
				
			case 1:
			
				echo '<tr>
<td>The hotel is currently <b style="color: darkgreen;">Online</b>.</td>
</tr>';
				echo '<tr><td>Users online: <a style="text-decoration: underline; " href="/onlineusers.html">' . $sysData['users_online'] . '</a>
</td></tr>';
				echo '<tr><td>Rooms Loaded: ' . $sysData['rooms_loaded'] . '</td>
</tr>';
								
			 
break;
			 
		    default:
			
				echo '<td class="first b b-posts">
The hotel is currently <b style="color: red;">Offline</b> (The Server is closed/offline).
</td>';
				
				
break;
		}
		
		unset($sysData);
		
		?>
	
</table> 
	</div> 
	<div class="versions"> 
	<p>This information is not for
<a>current</a>, to see if it change the informations, refresh the page!</p></span> 
	
<br class="clear" /></div></div> 
 
</div> 
</div> 



</div>	</div>
<div class='postbox-container' style='display:none;width:49%;'> 

<div id='column3-sortables' class='meta-box-sortables'> 
</div>	
</div><div class='postbox-container' style='display:none;width:49%;'> 

<div id='column4-sortables' class='meta-box-sortables'> 
</div></div></div> 
 

<form style='display: none' method='get' action=''> 
	<p> 

<input type="hidden" id="closedpostboxesnonce" name="closedpostboxesnonce" value="228eef848a" />
<input type="hidden" id="meta-box-order-nonce" name="meta-box-order-nonce" value="8abace1939" />	
</p> 
</form> 
 
 
<div class="clear"></div> 
</div><!-- dashboard-widgets-wrap --> 
	<div id='dashboard-widgets' class='metabox-holder' style="float:right; width:250px;">
	
<div class='postbox-container' style='width:100%;'>
<div id='normal-sortables' class='meta-box-sortables'>

<div id="dashboard_right_now" class="postbox " >
<h3 class='hndle'><span>Spenden</span></h3>

<div class="inside">
 Unterst&uuml;tze das Ultimate Project um weitere coole Updates zu erm&ouml;glichen.</br></br></br>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="3CHHA734Q6DMA">
<input type="image" src="https://www.paypalobjects.com/de_DE/DE/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="Jetzt einfach, schnell und sicher online bezahlen – mit PayPal.">
<img alt="" border="0" src="https://www.paypalobjects.com/de_DE/i/scr/pixel.gif" width="1" height="1">
</form>
</div></div>
</div>
</div>
</div></div></div>
</div>

<?php
require_once "bottom.php";
?>