<?php
/*================================================================+\
|| # PHPRetro - An extendable virtual hotel site and management
|+==================================================================
|| # Copyright (C) 2009 Yifan Lu. All rights reserved.
|| # http://www.yifanlu.com
|| # Parts Copyright (C) 2009 Meth0d. All rights reserved.
|| # http://www.meth0d.org
|| # All images, scripts, and layouts
|| # Copyright (C) 2009 Sulake Ltd. All rights reserved.
|+==================================================================
|| # PHPRetro is provided "as is" and comes without
|| # warrenty of any kind. PHPRetro is free software!
|| # License: GNU Public License 3.0
|| # http://opensource.org/licenses/gpl-license.php
\+================================================================*/

$page['allow_guests'] = true;
require_once('./includes/core.php');
require_once('./includes/session.php');
$data = new community_sql;
$lang->addLocale("community.community");

$page['id'] = "staffs";
$page['name'] = "Staffs";
$page['bodyid'] = "home";
$page['cat'] = "community";

require_once('./templates/community_header.php');
?>

<div id="container">
	<div id="content">
    <div id="column1" class="column">
				<div class="habblet-container ">
						<div class="cbb clearfix green ">

							<h2 class="title">Staffs
							</h2>
						<div class="habblet box-content">
						<?php
    $sql = "SELECT
                name,mission,rank,lastvisit,figure,sex,id
            FROM
                users
			WHERE 
				rank > 4 
			ORDER BY 
				rank DESC";
    $result = mysql_query($sql) OR die(mysql_error());
    if(mysql_num_rows($result)) {
        while($row = mysql_fetch_assoc($result)) {
		
		$userid = $row['id'];
		
		if($row['rank'] == "7")
		{
		$rank="Administrador";
		}
		if($row['rank'] == "6")
		{
		$rank="Moderador";
		}
		if($row['rank'] == "5")
		{
		$rank="".SITENAME." Gold";
		}
		if($row['rank'] == "4")
		{
		$rank="".SITENAME." Silver";
		}
	
	
echo "<p><img src='http://www.habbo.co.uk/habbo-imaging/avatarimage?figure=".$row['figure']."&size=b&direction=2&head_direction=3&gesture=sml&size=s' alt='".$row['name']."' align='left' />
<b><a href='home/".$row['name']."'>".$row['name']."</a></b>&nbsp;<br />
<br />
Rango: ".$rank."<br />
Ultima Visita: ".$row['lastvisit']."<br /><br/><br/><br/><br/><br/><br/></p>";
        }
}
?>
						</div>
						</div>
				</div>
				<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>


</div>
</div>
</div>
<?php require_once('./templates/community_footer.php'); ?>
