<?php
/*===================================================+ 
|| # HoloCMS - Website and Content Management System
|+===================================================+ 
|| # Copyright © 2012 DnT [Tutti i diritti riservati]
|| # http://dnt.webnet32.com/
|+===================================================+ 
|| # DnT HoloCMS v2.1 - Created By Donatello (DnT)
|| # http://code.google.com/p/dnt-project/downloads/list
|+===================================================*/ 

$allow_guests = false;

include('core.php');
include('includes/session.php');

$pagename = "Impostazioni account";
$body_id = "profile";
$pageid = "2";

include('templates/community/subheader.php');
include('templates/community/header.php');

if(!session_is_registered(username))
	{
		Redirect("".$url."/index.php");
	}
	
 $do = Securise($_GET['do']);
 $tab = Securise($_GET['tab']);
	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head> 
<meta http-equiv="content-type" content="text/html; charset=ISO 5589-1" /> 
<title><?PHP echo $sitename; ?>: <?PHP echo $pagename; ?></title> 
 
<script type="text/javascript"> 
var andSoItBegins = (new Date()).getTime();
var ad_keywords = "";
document.habboLoggedIn = true;
var habboName = "<?PHP echo $myrow['username']; ?>";
var habboReqPath = "<?PHP echo $url; ?>";
var habboStaticFilePath = "<?PHP echo $imagepath; ?>";
var habboImagerUrl = "http://www.habbo.it/habbo-imaging/";
var habboPartner = "";
var habboDefaultClientPopupUrl = "<?PHP echo $url; ?>/client";
window.name = "habboMain";
if (typeof HabboClient != "undefined") { HabboClient.windowName = "uberClientWnd"; }
</script> 



<link rel="shortcut icon" href="<?PHP echo $imagepath; ?>favicon.ico" type="image/vnd.microsoft.icon" /> 
<script src="<?PHP echo $imagepath; ?>static/js/libs2.js" type="text/javascript"></script>
<script src="<?PHP echo $imagepath; ?>static/js/visual.js" type="text/javascript"></script>
<script src="<?PHP echo $imagepath; ?>static/js/libs.js" type="text/javascript"></script>
<script src="<?PHP echo $imagepath; ?>static/js/common.js" type="text/javascript"></script>

<script src="<?PHP echo $imagepath; ?>static/js/fullcontent.js" type="text/javascript"></script>
<link rel="stylesheet" href="<?PHP echo $imagepath; ?>v2/styles/style.css" type="text/css" />
<link rel="stylesheet" href="<?PHP echo $imagepath; ?>v2/styles/buttons.css" type="text/css" />
<link rel="stylesheet" href="<?PHP echo $imagepath; ?>v2/styles/boxes.css" type="text/css" />
<link rel="stylesheet" href="<?PHP echo $imagepath; ?>v2/styles/tooltips.css" type="text/css" />
<link rel="stylesheet" href="<?PHP echo $imagepath; ?>v2/styles/personal.css" type="text/css" />
<script src="<?PHP echo $imagepath; ?>static/js/habboclub.js" type="text/javascript"></script>
<link rel="stylesheet" href="<?PHP echo $imagepath; ?>v2/styles/minimail.css" type="text/css" />
<link rel="stylesheet" href="<?PHP echo $imagepath; ?>v2/styles/myhabbo/control.textarea.css" type="text/css" />
<script src="<?PHP echo $imagepath; ?>static/js/minimail.js" type="text/javascript"></script>
<script src="<?PHP echo $imagepath; ?>static/js/settings.js" type="text/javascript"></script>
<link rel="stylesheet" href="<?PHP echo $imagepath; ?>v2/styles/settings.css" type="text/css" /> 
 

<meta name="description" content="<?PHP echo $description; ?>" /> 
<meta name="keywords" content="<?PHP echo $keyword; ?>" />  
<!--[if IE 8]>
<link rel="stylesheet" href="<?PHP echo $imagepath; ?>v2/styles/ie8.css" type="text/css" />
<![endif]--> 
<!--[if lt IE 8]>
<link rel="stylesheet" href="<?PHP echo $imagepath; ?>v2/styles/ie.css" type="text/css" />
<![endif]--> 
<!--[if lt IE 7]>
<link rel="stylesheet" href="<?PHP echo $imagepath; ?>v2/styles/ie6.css" type="text/css" />
<script src="<?PHP echo $imagepath; ?>static/js/pngfix.js" type="text/javascript"></script>
<script type="text/javascript">
try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
</script>
 
<style type="text/css">
body { behavior: url(http://www.habbo.it/js/csshover.htc); }
</style>
<![endif]--> 
<meta name="build" content="<?PHP echo $build; ?> >> <?PHP echo $version; ?>" /> 
</head>


	 
<body id="home" class=" "> 
<div id="overlay"></div> 
<!-- MENU -->
<!-- FIN MENU -->

<div id="container"> 
	<div id="content" style="position: relative" class="clearfix"> 
    <div> 
 
<div class="content"> 
<div class="habblet-container" style="float:left; width:210px;"> 
<div class="cbb settings"> 
 
<h2 class="title">Le mie Preferenze</h2> 
<div class="box-content"> 
            <div id="settingsNavigation"> 
            <ul> 
				<li>
				<a href="<?PHP echo $url; ?>/profile.php">Modifiche Generali</a>
                </li>
                <li class="selected">Gestione Amici
                </li>
				<a href="<?PHP echo $url; ?>/account.php">Cambia Password</a>
                </li>	
				
 
                   
            </ul> 
            </div> 
</div></div> 
    
</div> 
<?PHP if($do == "") { ?>
     <div id="friend-management" class="habblet-container"> 
    <div class="cbb clearfix settings"> 
      <h2 class="title">Gestione Amici</h2> 
      <div id="friend-management-container" class="box-content"> 
        <div id="category-view" class="clearfix"> 
          <div id="search-view"> 
            Cerca un Amico qui:
            <div id="friend-search" class="friendlist-search"> 
		      <input type="text"  disabled="disabled" maxlength="32" id="friend_query" class="friend-search-query" /> 
		      <a class="friendlist-search new-button search-icon" id="friend-search-button"><b><span></span></b><i></i></a> 
            </div> 
          </div> 
          <div id="category-list"> 
<div id="friends-category-title"> 
    Categorie di Amici
</div> 
 
<div class="category-default category-item selected-category" id="category-item-0">Amici</div> 
 
    <input type="text" maxlength="32" disabled="disabled" id="category-name" class="create-category" /><div disabled="disabled" id="addcategory-button" class="friendmanagement-small-icons add-category-item add-category"></div> 
          </div> 
        </div> 
        <div id="friend-list" class="clearfix"> 
<div id="friend-list-header-container" class="clearfix"> 
    <div id="friend-list-header"> 
        <div class="page-limit"> 
            <div class="big-icons friend-header-icon">Amici
                <br />Mostra
                ALL
            </div> 
        </div>  
    </div> 
    <div id="friend-list-paging"> 
        </div> 
    </div> 
 
 
<form id="friend-list-form"> 
    <table id="friend-list-table" border="0" cellpadding="0" cellspacing="0"> 
        <thead> 
            <tr class="friend-list-header"> 
                <th class="friend-select" /> 
                <th class="friend-name"> 
                    <a class="sort">Nome</a> 
                </th> 
                <th class="friend-login"> 
                    <a class="sort">Ultimo login</a> 
                </th> 
               
            </tr> 
        </thead> 
        <tbody>
		<?PHP
		$i = 0;
		$sql = mysql_query("SELECT * FROM messenger_friendships WHERE user_one_id = '".$myrow['id']."'");
			while($friend = mysql_fetch_array($sql)) {
					$getfriend = mysql_query("SELECT * FROM users WHERE id = '".$friend['user_two_id']."'");
					$f = mysql_fetch_array($getfriend);
					$i++;
					if(IsEven($i)) {
						$oddeven = "odd";
						} else {
						$oddeven = "even";
						}
						
						printf("   <tr class=\"%s\">
               <td><input type=\"checkbox\" name=\"friendList[]\" value=\"%s\" /></td>
               <td class=\"friend-name\">
                %s
               </td>
               <td class=\"friend-login\" title=\"%s\">%s</td>
              
           </tr>", $oddeven, $f['id'], $f['username'], $f['last_online'], $f['last_online'], $f['id']);
						
					}
					
		?>
           
        </tbody> 
    </table> 
    <a class="select-all" id="friends-select-all" href="#">Scegliere tutti</a> |
    <a class="deselect-all" href=#" id="friends-deselect-all">Rimuovere tutti</a> 
</form> 
 
<div id="category-options" class="clearfix"> 
<select id="category-list-select" name="category-list"> 
    <option value="0">Amici</option> 
</select> 
<div class="friend-del"><a class="new-button red-button cancel-icon" href="#" id="delete-friends"><b><span></span>Elimina amici selezionati</b><i></i></a></div> 
<div class="friend-move"><a class="new-button" href="#" id="move-friend-button"><b><span></span>Sposta</b><i></i></a></div></div> 
 
        </div> 
      </div> 
    </div> 
  </div> 
</div> 
<script type="text/javascript"> 
  L10N.put("friendmanagement.tooltip.deletefriends", "Sei sicuro di voler cancellare?\n<div class=\"friendmanagement-small-icons friendmanagement-save friendmanagement-tip-delete\"\>\n  <a class=\"friends-delete-button\" id=\"delete-friends-button\"\>Accetta</a\>\n</div\>\n<div class=\"friendmanagement-small-icons friendmanagement-remove friendmanagement-tip-cancel\"\>\n    <a id=\"cancel-delete-friends\"\>Annulla</a\>\n</div\>\n\n");
  L10N.put("friendmanagement.tooltip.deletefriend", "Sei sicuro di voler rimuovere questo amico?\n<div class=\"friendmanagement-small-icons friendmanagement-save friendmanagement-tip-delete\"\>\n    <a id=\"delete-friend-%friend_id%\"\>Accetta</a\>\n</div\>\n<div class=\"friendmanagement-small-icons friendmanagement-remove friendmanagement-tip-cancel\"\>\n    <a id=\"remove-friend-can-%friend_id%\"\>Annulla</a\>\n</div\>");
  L10N.put("friendmanagement.tooltip.deletecategory", "Sei sicuro di voler cancellare questa categoria?\n<div class=\"friendmanagement-small-icons friendmanagement-save friendmanagement-tip-delete\"\>\n    <a class=\"delete-category-button\" id=\"delete-category-%category_id%\"\>Accetta</a\>\n</div\>\n<div class=\"friendmanagement-small-icons friendmanagement-remove friendmanagement-tip-cancel\"\>\n    <a id=\"cancel-cat-delete-%category_id%\"\>Annulla</a\>\n</div\>");
  new FriendManagement({ currentCategoryId: 0, pageListLimit: 30, pageNumber: 1});
</script> 
 
</div> 
    </div> 
	<?PHP } ?>
</div> 
</div> 
    </div> 

<!--[if lt IE 7]>
<script type="text/javascript">
Pngfix.doPngImageFix();
</script>
<![endif]--> 
<!-- FOOTER -->
<?PHP include("./templates/community/footer.php"); ?>
<!-- FIN FOOTER -->


<div style="clear: both;"></div>


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

 
<script type="text/javascript"> 
HabboView.run();

</script>


</body> 
</html> 




