<?php
include('../core.php');
$id = FilterText($_POST['anAccountId']);
$ownerid = FilterText($_POST['ownerAccountId']);
$sql = mysql_query("SELECT * FROM users WHERE id = '".$id."' LIMIT 1");
$row = mysql_fetch_assoc($sql);
$sql = mysql_query("SELECT * FROM user_badges WHERE user_id = '".$id."' AND badge_slot = '1' LIMIT 1");
$count = mysql_num_rows($sql);
if($count != 0){
$badgerow = mysql_fetch_assoc($sql);
$badge = FilterText($badgerow['badgeid']);
}else{
$badge = "";
}
if(IsUserOnline($id) == true){
$online = "habbo_online_anim_big.gif";
}else{
$online = "habbo_offline_big.gif";
}
?>
<div class="avatar-list-info-container">
	<div class="avatar-info-basic clearfix">
		<div class="avatar-list-info-close-container"><a href="#" class="avatar-list-info-close" id="avatar-list-info-close-<?php echo $row['id']; ?>"></a></div>
		<div class="avatar-info-image">
		<?php
		if($badge != ""){
			echo "<img src=\"".$cimagesurl.$badgesurl.$badge."\">";
		}
		?>
			<img src="http://www.habbo.it/habbo-imaging/avatarimage?figure=<?php echo $row['look']; ?>&size=l&direction=4&head_direction=4" alt="<?php echo $row['username']; ?>" />
		</div>
<h4><a href="./user_profile.php?name=<?php echo $row['username']; ?>"><?php echo $row['username']; ?></a></h4>
<p>
<img src="./web-gallery/images/myhabbo/<?php echo $online; ?>" />
</p>
<p><?php echo $shortname; ?> creato il: <b><?php echo edit_date(date('d-m-Y',$userdata['account_created']), false); ?></b></p>
<p><a href="./user_profile.php?name=<?php echo $row['username']; ?>" class="arrow"><?php echo $shortname; ?> Home page.</a></p>
<p class="avatar-info-motto"><?php echo $row['motto']; ?></p>
	</div>
</div>