<?php
#######################################################|#
#|                    HabboMCMS - TheRox              
#|                    Powered by HoloCMS            
#|            Copyright 2011-2012 ALL RIGHTS RESERVED 
#######################################################|#

require_once('../global.php');
if($hkzone !== true){ header("Location: index.php?throwBack=true"); exit; }
if(!session_is_registered(acp)){ header("Location: index.php?p=login"); exit; }

$pagename = "";

if(isset($_POST['notes'])){
	$notes = Filter($_POST['notes']);
	mysql_query("UPDATE site_system SET admin_notes = '".$notes."' LIMIT 1") or die(mysql_error());
}

$tmp = mysql_query("SELECT * FROM site_system LIMIT 1") or die(mysql_error());
$system = mysql_fetch_assoc($tmp);

$onlineCutOff = (time() - 601);
$onlineUsers = mysql_evaluate("SELECT COUNT(*) FROM users WHERE online > " . $onlineCutOff);

$on = mysql_query("SELECT * FROM server_status");
$online = mysql_fetch_assoc($on);

@include('subheader.php');
@include('header.php');
?>

<script type="text/javascript">

function Toggle(id)
{
	var List = document.getElementById('list-' + id);
	var Button = document.getElementById('plus-' + id);
	
	if (List.style.display == 'block' || List.style.display == '')
	{
		List.style.display = 'none';
		Button.innerHTML = '+';
	}
	else
	{
		List.style.display = 'block';
		Button.innerHTML = '-';
	}
	
	setCookie('tab-' + id, List.style.display, 9999);	
}

function t(id)
{
	var el = document.getElementById(id);
	
	if (el.style.display == 'block' || el.style.display == '')
	{
		el.style.display = 'none';
	}
	else
	{
		el.style.display = 'block';
	}
}

function setCookie(c_name,value,expiredays)
{
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+expiredays);
	document.cookie=c_name+ "=" +escape(value)+
	((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

function checkCookies()
{
	ca = document.cookie.split(';');

	for (i = 0; i < ca.length; i++)
	{
		bits = ca[i].split('=');
		
		key = trim(bits[0]);
		value = trim(bits[1]);
		
		if (key.substr(0, 3) == 'tab')
		{
			tabName = key.substr(4);
			
			if (value == 'none')
			{
				Toggle(tabName);
			}
		}
	}
}

function trim(value)
{
	value = value.replace(/^\s+/,''); 
	value = value.replace(/\s+$/,'');
	return value;
}

function popClient()
{
	window.open('<?php echo $path; ?>/client', 'Habbo Hotel', 'width=980,height=600,location=no,status=no,menubar=no,directories=no,toolbar=no,resizable=no,scrollbars=no'); return false;
}

function popSsoClient(sso)
{
	window.open('<?php echo $path; ?>/client.php?forceTicket=' + sso, 'Habbo Hotel', 'width=980,height=600,location=no,status=no,menubar=no,directories=no,toolbar=no,resizable=no,scrollbars=no'); return false;
}
</script>

	 <table cellpadding='0' align='left' cellspacing='8' width='20%' id='tablewrap'>
	 
<tr><br/>	<td width='20%' valign='top' id='rightblock'>
	 <div>
	 	 
		<div class='menuouterwrap'>
  <div class='menucatwrap'><img src='./images/menu_title_bullet.gif' style='vertical-align:bottom' border='0' /> Configuration & Gestion</div>

<div class='menulinkwrap'>&nbsp;
<img src='./images/item_bullet.gif' border='0' alt='' valign='absmiddle'>&nbsp;
<a href='./index.php?p=maintenance' style='text-decoration:none'>Maintenance</a>
</div>

<div class='menulinkwrap'>&nbsp;
<img src='./images/item_bullet.gif' border='0' alt='' valign='absmiddle'>&nbsp;
<a href="#" onclick="popClient(); return false">Lancer Client</a>
</div>


</div>
<br />

 <div class='menuouterwrap'>
  <div class='menucatwrap'><img src='./images/menu_title_bullet.gif' style='vertical-align:bottom' border='0' /> Boutique</div>
  
<div class='menulinkwrap'>&nbsp;
<img src='./images/item_bullet.gif' border='0' alt='' valign='absmiddle'>&nbsp;
<a href='./index.php?p=boutique' style='text-decoration:none'>Editer la boutique</a>
</div>

  </div>
  

<br />

 <div class='menuouterwrap'>
  <div class='menucatwrap'><img src='./images/menu_title_bullet.gif' style='vertical-align:bottom' border='0' /> Gestion du site</div>


<div class='menulinkwrap'>&nbsp;
<img src='./images/item_bullet.gif' border='0' alt='' valign='absmiddle'>&nbsp;
<a href='./index.php?p=news_compose' style='text-decoration:none'>Ecrire un article</a>
</div>

<div class='menulinkwrap'>&nbsp;
<img src='./images/item_bullet.gif' border='0' alt='' valign='absmiddle'>&nbsp;
<a href='./index.php?p=news_manage' style='text-decoration:none'>Editer les articles existants</a>
</div>

</div>
<br />

 <div class='menuouterwrap'>
  <div class='menucatwrap'><img src='./images/menu_title_bullet.gif' style='vertical-align:bottom' border='0' /> Ev&egrave;nements
 (A la une)</div>
  
<div class='menulinkwrap'>&nbsp;
<img src='./images/item_bullet.gif' border='0' alt='' valign='absmiddle'>&nbsp;
<a href='./index.php?p=campaigns' style='text-decoration:none'>Ajouter un &eacute;v&egrave;nement
</a>
</div>

<div class='menulinkwrap'>&nbsp;
<img src='./images/item_bullet.gif' border='0' alt='' valign='absmiddle'>&nbsp;
<a href='./index.php?p=campaigns' style='text-decoration:none'>Editer un &eacute;v&egrave;nement
</a>
</div>

</div>

</div>
	 </div></table>
	 
	 

	 <table cellpadding='0' align='right' cellspacing='8' width='20%' id='tablewrap'>
<tr>	<td width='20%' valign='top' id='rightblock'>
	 <div><!-- RIGHT CONTENT BLOCK -->
	 
		<div class='menuouterwrap'>
  <div class='menucatwrap'><img src='./images/menu_title_bullet.gif' style='vertical-align:bottom' border='0' /> Panel d'utilisateurs</div>

<div class='menulinkwrap'>&nbsp;
<img src='./images/item_bullet.gif' border='0' alt='' valign='absmiddle'>&nbsp;
<a href='./index.php?p=users' style='text-decoration:none'>Liste des Habbos</a>
</div>

<div class='menulinkwrap'>&nbsp;
<img src='./images/item_bullet.gif' border='0' alt='' valign='absmiddle'>&nbsp;
<a href='./index.php?p=edituser&do=getUser' style='text-decoration:none'>Editer un Habbo</a>
</div>

<div class='menulinkwrap'>&nbsp;
<img src='./images/item_bullet.gif' border='0' alt='' valign='absmiddle'>&nbsp;
<a href='./index.php?p=ip' style='text-decoration:none'>Chercher une adresse IP</a>
</div>

<div class='menulinkwrap'>&nbsp;
<img src='./images/item_bullet.gif' border='0' alt='' valign='absmiddle'>&nbsp;
<a href='./index.php?p=uid' style='text-decoration:none'>Identifier l'ID d'un Habbo</a>
</div>

<div class='menulinkwrap'>&nbsp;
<img src='./images/item_bullet.gif' border='0' alt='' valign='absmiddle'>&nbsp;
<a href='./index.php?p=clonechecker' style='text-decoration:none'>Multicomptes</a>
</div>

<div class='menulinkwrap'>&nbsp;
<img src='./images/item_bullet.gif' border='0' alt='' valign='absmiddle'>&nbsp;
<a href='./index.php?p=ranktool' style='text-decoration:none'>Gestion des rangs</a>
</div>

<div class='menulinkwrap'>&nbsp;
<img src='./images/item_bullet.gif' border='0' alt='' valign='absmiddle'>&nbsp;
<a href='./index.php?p=badgetool' style='text-decoration:none'>Ajouter un badge</a>
</div>

<div class='menulinkwrap'>&nbsp;
<img src='./images/item_bullet.gif' border='0' alt='' valign='absmiddle'>&nbsp;
<a href='./index.php?p=massa_stuff' style='text-decoration:none'>Gestion multiple</a>
</div>

</div>
<br />


<div class='menuouterwrap'>
  <div class='menucatwrap'><img src='./images/menu_title_bullet.gif' style='vertical-align:bottom' border='0' /> Mod&eacute;ration</div>

<div class='menulinkwrap'>&nbsp;
<img src='./images/item_bullet.gif' border='0' alt='' valign='absmiddle'>&nbsp;
<a href='./index.php?p=ban' style='text-decoration:none'>Bannir un Habbo</a>
</div>

<div class='menulinkwrap'>&nbsp;
<img src='./images/item_bullet.gif' border='0' alt='' valign='absmiddle'>&nbsp;
<a href='./index.php?p=unban' style='text-decoration:none'>D&eacute;bannir un Habbo</a>
</div>

<div class='menulinkwrap'>&nbsp;
<img src='./images/item_bullet.gif' border='0' alt='' valign='absmiddle'>&nbsp;
<a href='./index.php?p=banlist' style='text-decoration:none'>Liste des bannis</a>
</div>

<div class='menulinkwrap'>&nbsp;
<img src='./images/item_bullet.gif' border='0' alt='' valign='absmiddle'>&nbsp;
<a href='./index.php?p=alert' style='text-decoration:none'>Alerte sur le site</a>
</div>

<div class='menulinkwrap'>&nbsp;
<img src='./images/item_bullet.gif' border='0' alt='' valign='absmiddle'>&nbsp;
<a href='./index.php?p=massalert' style='text-decoration:none'>Alerte site & Hotel</a>
</div> 

</div>
<br />


 <div class='menuouterwrap'>
  <div class='menucatwrap'><img src='./images/menu_title_bullet.gif' style='vertical-align:bottom' border='0' /> Logs & Statistiques</div>

<div class='menulinkwrap'>&nbsp;
<img src='./images/item_bullet.gif' border='0' alt='' valign='absmiddle'>&nbsp;
<a href='./index.php?p=logs' style='text-decoration:none'>Stafflogs</a>
</div>

<div class='menulinkwrap'>&nbsp;
<img src='./images/item_bullet.gif' border='0' alt='' valign='absmiddle'>&nbsp;
<a href='./index.php?p=alertlist' style='text-decoration:none'>Liste des alertes</a>
</div>

<div class='menulinkwrap'>&nbsp;
<img src='./images/item_bullet.gif' border='0' alt='' valign='absmiddle'>&nbsp;
<a href='./index.php?p=chatlogs' style='text-decoration:none'>Chatlogs</a>
</div>


</div>

</div>

</div>

	 </div></table>
	 
	
	 
	 
	 <div id='ipb-get-members' style='border:1px solid #000; background:#FFF; padding:2px;position:absolute;width:120px;display:none;z-index:100'></div>
<!--in_dev_notes-->
<!--in_dev_check-->
<table border='0' width='59.5%'  cellpadding='0' cellspacing='4'>
<tr>
 <td valign='top' width='75%'>
	<table border='0' width='100%' cellpadding='0' cellspacing='0'>
	<tr>
	 <td>
             <div class='homepage_pane_border'>
		 <div class='homepage_section'>Bienvenue dans l'administration</div>
                 <img src="images/frank_25.gif" class="image-frank" align="right" />
                 <h3 class="title">Bienvenue <?php echo $name; ?>, dans l'administration de Habbo H&ocirc;tel.</h3>
                 <p class="text">Cette zone est r&eacute;serv&eacute; au personnel de l'&eacute;quipe.</p>
                 <br />
                 <br />
                 <br />
                 <br />
                 <br />
                 <br />
             </div>
             
		<div class='homepage_pane_border'>
		 <div class='homepage_section'>T&acirc;ches et informations</div>
		 <table width='100%' cellspacing='0' cellpadding='4'>
			 <tr>
			  <td width='50%' valign='top'>
			  	<div class='homepage_border'>
 <div class='homepage_sub_header'>Information sur le syst&egrave;me</div>
 <table width='100%' cellpadding='4' cellspacing='0'>

 <tr>
  <td class='homepage_sub_row'><strong>Membres</strong></td>
  <td class='homepage_sub_row'>
  	<?php echo mysql_evaluate("SELECT COUNT(*) FROM users") . " (<b><a href='index.php?p=onlinelist'>" . $online['users_online'] . "</a> connect&eacute;s)</b>"; ?>
  </td>
 </tr>
 <tr>
  <td class='homepage_sub_row'><strong>Apparts</strong></td>
  <td class='homepage_sub_row'>
  	<?php echo mysql_evaluate("SELECT COUNT(*) FROM rooms"); ?>
 <?php echo mysql_evaluate("SELECT COUNT(*) FROM rooms WHERE owner IS NULL"); ?>
  </td>
 </tr>
 <tr>
  <td class='homepage_sub_row'><strong>Mobis</strong></td>
  <td class='homepage_sub_row'>
  	<?php echo mysql_evaluate("SELECT COUNT(*) FROM items"); ?>
  </td>
 </tr>
 <tr>
  <td class='homepage_sub_row'><strong>Clans</strong></td>
  <td class='homepage_sub_row'>
  	<?php echo mysql_evaluate("SELECT COUNT(*) FROM groups_details"); ?>
  </td>
 </tr>
 <tr>
  <td class='homepage_sub_row'><strong>Stafflogs</strong></td>
  <td class='homepage_sub_row'>
  	<?php echo mysql_evaluate("SELECT COUNT(*) FROM system_stafflog"); ?>
  </td>
 </tr>
  <tr>
  <td class='homepage_sub_row'><strong>Bans actifs</strong></td>
  <td class='homepage_sub_row'>
  	<a href='index.php?p=banlist'><?php echo mysql_evaluate("SELECT COUNT(*) FROM bans"); ?></a>
  </td>
 </tr>

 </table>
</div>
			  </td>
<script type="text/javascript" src="./tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
	mode : "exact",
	elements : "story",
	theme : "advanced",
	plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
	theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,",
	theme_advanced_buttons2 : "",
	theme_advanced_buttons3 : "",
	theme_advanced_buttons4 : "",
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
	theme_advanced_resizing : true,
	theme_advanced_statusbar_location : "bottom"
});
</script>			   
		
	<div id='ipb-get-members' style='border:1px solid #000; background:#FFF; padding:2px;position:absolute;width:120px;display:none;z-index:100'></div>
		 <table width='100%' cellspacing='0' cellpadding='4'>
			 <tr>
			  <td valign='top' width='50%'>
			  	<div class='homepage_border'>
					<div class='homepage_section'>Notes des Staff</div>
					<br /><div align='center'>
<form action='index.php?p=dashboard&do=save' method='post'>
<textarea name='notes' style='background-color:#F9FFA2;border:1px solid #CCC;width:95%;font-family:verdana;font-size:10px' rows='8' cols='25'><?php echo HabboCMSTEXT($system['admin_notes']); ?></textarea>
<div><br /><input type='submit' value='Enregistrer' class='realbutton' /></div>
<br>
</form>
</div>
</div>
</div></table></div>
</div>
</div>
</div>