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

require_once('./global.php');

if (!defined("IN_HABBO")) { header("Location: ../../index.php"); exit; }

if(empty($body_id)){
$body_id = "home";
}

?>
<body id="<?php echo $body_id; ?>" class="<?php if(!$logged_in){ echo "anonymous"; } ?> ">
    
    <div class="notif_annonce">
        Bienvenue sur Ancestra; Et bon jeux à tous !

    </div>
<div id="overlay"></div>
<?php if($notify_maintenance){ ?>
<div class="notif_maint">NOTE: Habbo est actuellement en maintenance. Le site est inaccessible aux utilisateurs.</div>
<?php } ?>

<div id="header-container">
	<div id="header" class="clearfix">
		<h1 id="LOGOFADE"><a href="<?php echo $path; ?>"></a></h1>
       <div id="subnavi">
			<div id="subnavi-user">
                            <?php if($logged_in){ ?>
				<ul>
					<li id="myfriends"><a href="#"><span>Mes amis</span></a><span class="r"></span></li>
					<li id="mygroups"><a href="#"><span>Mes Groupes</span></a><span class="r"></span></li>
					<li id="myrooms"><a href="#"><span>Mes Apparts</span></a><span class="r"></span></li>
				</ul>
                            <?php } elseif(!$logged_in){ ?>
                                <div class="clearfix">&nbsp;</div>
                                <p>
				    <a href="<?php echo $path; ?>/client" id="enter-hotel-open-medium-link" target="client" onClick="openOrFocusHabbo(this); return false;">Enter <?php echo $sitename; ?></a>
                                </p>
                            <?php } ?>
							</div>
        <?php if(!$logged_in){ ?>
            <div id="subnavi-login">
                <form action="./index.php?process_login" method="post" id="login-form">
            		<input type="hidden" name="page" value="<?php echo $pageid; ?>" />
                    <ul>
                        <li>
                            <label for="login-username" class="login-text"><b>Nom <?php echo $shortname; ?></b></label>
                            <input tabindex="1" type="text" class="login-field" name="username" id="login-username" />
		                    <a href="<?php echo $path; ?>/#" id="login-submit-new-button" class="new-button" style="float: left; display:none"><b>Entrer</b><i></i></a>
                            <input type="submit" id="login-submit-button" value="Entrer" class="submit"/>
                        </li>
                        <li>
                            <label for="login-password" class="login-text"><b>Mot de passe</b></label>
                            <input tabindex="2" type="password" class="login-field" name="password" id="login-password" />
                            <input tabindex="3" type="checkbox" name="_login_remember_me" value="true" id="login-remember-me" />
                            <label for="login-remember-me" class="left">Garder ma session active</label>
                        </li>
                    </ul>
                </form>
                <div id="subnavi-login-help" class="clearfix">
                    <ul>
                        <li class="register"><a href="<?php echo $path; ?>/forgot" id="forgot-password"><span>Mot de passe oubli&eacute; ?</span></a></li>
                    	<li><a href="<?php echo $path; ?>/register"><span>Inscription gratuite</span></a></li>
                    </ul>
                </div>
<div id="remember-me-notification" class="bottom-bubble" style="display:none;">
	<div class="bottom-bubble-t"><div></div></div>
	<div class="bottom-bubble-c">
				En cochant cette case tu resteras connect&eacute; à <?php echo $shortname; ?> jusqu'à ce que tu choisisses de te d&eacute;connecter. 	</div>
	<div class="bottom-bubble-b"><div></div></div>
</div>
            </div>
        </div>
		<script type="text/javascript">
			LoginFormUI.init();
			RememberMeUI.init("right");
		</script>
        <?php } else { ?>
            <div id="subnavi-search">
                <div id="subnavi-search-upper">
                <ul id="subnavi-search-links">
                    <li><a href="help"></a></li>
					<li><a href="<?php echo $path; ?>/logout?reason=site" class="userlink">Quitter</a></li>
				</ul>
                </div>
            </div>
			<?php if($logged_in){ ?>
            <div id="to-hotel"> 
			
			<?php if(HabboCMSTEXT(getContent('hotel-enabled'), true) !== "0"){ ?>
						<div  id="hotel-closed-medium">Hotel en maintenance</div>
			<?php } else { ?>
			<a href="<?php echo $path; ?>/client" class="new-button green-button" target="client" onClick="HabboClient.openOrFocus(this); return false;"><b>Acc&eacute;der &agrave; <?php echo $sitename; ?></b><i></i></a>
			<?php } ?>

	      <?php if($user['rank'] >= 8) { echo '
						<a href="<?php echo $path; ?>/administration/" class="new-button red-button"> <b>Administration</b> <i> </i> </a> ';
						  } ?>
       
			</div>
			
			<?php } ?>

					
        </div>
        <script type="text/javascript">
		L10N.put("purchase.group.title", "Acheter un groupe");
        </script>
        <?php } ?>
<ul id="navi">
        <?php if($pageid > 0 && $pageid < 4 || $pageid == "myprofile" && $logged_in == true){ ?>
        <li class="selected"><strong><?php echo $name; ?>  ( <img src="<?php echo $path; ?>/web-gallery/v2/images/icon_habbo_small.png" style="vertical-align: bottom;"> <?php echo $mail; ?> ) </strong><span></span></li>	
		<?php } elseif($logged_in == true){ ?>
        <li class=" "><a href="<?php echo $path; ?>/index"><?php echo $name; ?></a><span></span></li>
        <?php } elseif($logged_in !== true){ ?>
        <li id="tab-register-now"><a href="<?php echo $path; ?>/register" target="_self">Inscris-toi!</a><span></span></li>
        <?php } ?>

        <?php if($pageid == 4 || $pageid > 3  && $pageid < 6 || $pageid == "profile" || $pageid == "com" || $pageid == "8" || $pageid == "forum"){ ?>
        <li class="selected"><strong>Communaut&eacute;</strong><span></span></li>
        <?php } else { ?>
        <li class=" "><a href="<?php echo $path; ?>/community">Communaut&eacute;</a><span></span></li>
        <?php } ?>
        
       

        <?php if($pageid == 6 || $pageid > 5  && $pageid < 8 || $pageid == "
" || $pageid == "collectables"){ ?>
        <li class="selected"><strong>Cr&eacute;dits <?php echo $shortname; ?></strong><span></span></li>
        <?php } else { ?>
        <li class=" "><a href="<?php echo $path; ?>/credits">Cr&eacute;dits <?php echo $shortname; ?></a><span></span></li>
        <?php } ?>
		
<?php if($pageid == "shop" || $pageid == "boutique" || $pageid == "vip"  || $pageid == "points" && $logged_in == true){ ?>
        <li class="selected"><strong>Boutique (<?php echo $piks; ?>) <img src="<?php echo $path?>/web-gallery/v2/images/vipcoin.gif" style="vertical-align: middle;"></strong><span></span></li>
        <?php } elseif($logged_in == true){ ?>
        <li id="tab-register-now" class="tab-register-now"><a href="<?php echo $path; ?>/shop">Boutique (<?php echo $piks; ?>) <img src="<?php echo $path?>/web-gallery/v2/images/vipcoin.gif" style="vertical-align: middle;"></a><span></span></li>
        <?php } ?> 
        <?php if($myrow['rank'] == "8") { ?>
                 <li class=" "><a href="<?php echo $path; ?>/Administration">Administration</a><span></span></li>
        
          <?php } ?>
         <?php if($myrow['rank'] == "7") { ?>
                 <li class=" "><a href="<?php echo $path; ?>/Administration">Administration</a><span></span></li>
		
          <?php } ?>
</ul>

	<div id="habbos-online"><div class="rounded"><span><b><?php echo $online_count; ?></b> <?php echo $shortname; ?>s connect&eacute;s</span></div></div>
	</div>
</div>

<div id="content-container">

<div id="navi2-container" class="pngbg">
    <div id="navi2" class="pngbg clearfix">



<ul>
        <?php if($pageid > 0 && $pageid < 4 || $pageid == "myprofile"){ ?>
                <?php if($pageid == "1"){ ?>
                <li class="selected">

    				Accueil
                <?php } else { ?>
                <li class="">
    				<a href="<?php echo $path; ?>/index">Accueil</a>
                <?php } ?>
        		</li>

                <?php if($pageid == "myprofile"){ ?>
                <li class="selected">
    				Ma Page Perso
                </li>
                <?php } else { ?>
                <li class="">
    				<a href="<?php echo $path; ?>/user_profile?name=<?php echo $rawname; ?>">Ma Page Perso</a>
                <?php } ?>
        		</li>

                <?php if($pageid == "2" && $logged_in){ ?>
                <li class="selected">
    				Mes Pr&eacute;f&eacute;rences
                </li>
                <?php } elseif($logged_in){ ?>
                <li class="">
	    			<a href="<?php echo $path; ?>/profile">Mes Pr&eacute;f&eacute;rences</a>
                </li>
                 <?php } ?>
                <?php if($pageid == "vipclub" && $logged_in){ ?>
                <li class="selected">
    				VIP CLUB
                </li>
                <?php } elseif($logged_in){ ?>
                <li class="">
	    			<a href="<?php echo $path; ?>/vipclub">VIP CLUB</a>
                </li>
                 <?php } ?>
    	    	



        <?php } else if($pageid == 4 || $pageid > 3  && $pageid < 6 || $pageid == "profile" || $pageid == "com" || $pageid == "8" || $pageid == "forum"){ ?>
                <?php if($pageid == "com"){ ?>
                <li class="selected">
    				Communaut&eacute;
                <?php } else { ?>
                <li class=" ">
	    			<a href="<?php echo $path; ?>/community">Communaut&eacute;</a>
                <?php } ?>
                <?php if($pageid == "4"){ ?>
                <li class="selected">
    				Articles
                <?php } else { ?>
                <li class=" ">
	    			<a href="<?php echo $path; ?>/news">Articles</a>
                <?php } ?>
                <?php if($pageid == "8"){ ?>
                <li class="selected">
    				Habbo Staff
                <?php } else { ?>
                <li class=" ">
	    			<a href="<?php echo $path; ?>/staff">Habbo Staff</a>
                <?php } ?>
                
                <?php if($pageid == "5"){ ?>
                <li class="selected last">
    				Tags
                <?php } else { ?>
                <li class=" last">
	    			<a href="<?php echo $path; ?>/tags">Tags</a>
                    
                    <?php } } else if($pageid == 5 || $pageid == "75" || $pageid == "77" || $pageid == "92"){ ?>
                <?php if($pageid == "75"){ ?>
                <li class="selected">
    				Conseils S&eacute;curit&eacute;
                <?php } else { ?>
                <li class=" ">
	    			<a href="<?php echo $path; ?>/group_profile.php?id=75">Conseils S&eacute;curit&eacute;</a>
                <?php } ?>
                <?php if($pageid == "92"){ ?>
                <li class="selected">
    				HabboAttitude
                <?php } else { ?>
                <li class=" ">
	    			<a href="<?php echo $path; ?>/group_profile.php?id=92">HabboAttitude</a>
                <?php } ?>
                <?php if($pageid == "77"){ ?>
                <li class="selected">
    				Centre de s&eacute;curit&eacute;
                <?php } else { ?>
                <li class=" ">
	    			<a href="<?php echo $path; ?>/staff">Centre de s&eacute;curit&eacute;</a>
                <?php } ?>
                <?php if($pageid == "5"){ ?>
                <li class="selected last">
    				Le cache
                <?php } else { ?>
                <li class=" last">
	    			<a href="<?php echo $path; ?>/tags">Le cache</a>
					
                <?php } }  else if($pageid == "shop" || $pageid == "badges" || $pageid == "boutique"  || $pageid == "vipclub"  || $pageid == "piks"){ ?>
				<?php if($pageid == "shop"){ ?>
                <li class="selected ">
    				Boutique
                <?php } else { ?>
                <li class=" ">
	    			<a href="<?php echo $path; ?>/shop">Boutique</a>
                </li>
                <?php }  ?>
				
				<?php if($pageid == "badges"){ ?>
                <li class="selected ">
					Badges
                </li>
    				
                <?php } else { ?>
                <li class=" ">
	    			<a href="<?php echo $path; ?>/badges">Badges</a>
                </li>
                <?php }  ?>
				
		<?php if($pageid == "piks"){ ?>
                <li class="selected ">
					+ Piks
                </li>
    				
                <?php } else { ?>
                <li class=" ">
	    			<a href="<?php echo $path; ?>/piks">+ Piks</a>
                </li>
                <?php }  ?>
<?php if($pageid == "vipclub"){ ?>
                <li class="selected last">
                                VIP CLUB
                </li>
    				
                <?php } else { ?>
                <li class=" ">
	    			<a href="<?php echo $path; ?>/vipclub">VIP CLUB</a>
                <?php }  ?>
					
				
				
				
        <?php } else if($pageid == "6" || $pageid > 5 && $pageid < 8 ||$pageid == "pixels" || $pageid == "history" ||$pageid = "collectables"){ ?>
                <?php if($pageid == "6"){ ?>
                <li class="selected ">
    				Cr&eacute;dits <?php echo $shortname; ?>
                <?php } else { ?>
                <li class="">
	    			<a href="<?php echo $path; ?>/credits">Cr&eacute;dits <?php echo $shortname; ?></a>
                <?php } ?>
                				
				<?php if($pageid == "pixels"){ ?>
                <li class="selected">
					Pixels
    				
                <?php } else { ?>
                <li class="last">
	    			<a href="<?php echo $path; ?>/pixels">Pixels</a>
                <?php }  ?>
                                
                <?php if($pageid == "history"){ ?>
                <li class="selected last">
    				Historique
                </li>
                <?php } else { ?>
                <li class="">
	    			<a href="<?php echo $path; ?>/history">Historique</a>
                </li>
                <?php } ?>
             
         <?php } ?>
    	    	</li>
</ul>


	</div>
</div>

<script>
var max = 100;
var min = 0;
var opacite=min;
up=true;
var IsIE=!!document.all;
var ThePic=document.getElementById("spaffySpecial");
 
function fadePic(){		
				if (opacite<max && up){opacite+=2;}
				if (opacite>=max){up=false;}
				if (opacite<=min){up=true;}
 
IsIE?ThePic.filters[0].opacity=opacite:document.getElementById("LOGOFADE").style.opacity=opacite/100;
document.getElementById('result').value=opacite+"%"
}
setInterval(function(){fadePic();},25)
 
</script>