<?php
require_once('./global.php');
require_once('./INC/class.session.php');

$pagename = "Parrainage";
$pageid = "13a";

require_once('./templates/community_subheader.php');
require_once('./templates/community_header.php');
?>
<link href="<?php echo $path; ?>/web-gallery/v2/styles/refer.css" rel="stylesheet" type="text/css" />
<div id="container">
    <div id="content"> 
        <div id="column1" class="column">
            <div class="habblet-container ">        


                <div class="cbb clearfix pixellightblue ">
                    <h2 class="title">Parrainage</h2>
                    <div class="refer">
               <p class="refer">Bla bla......</p>
               <h4>Votre lien de parrainage :</h4>
               <input type="text" class="par" value="http://monhabbo.net/refer?r=<?php echo $name; ?>" />
                </div>

             </div>  
            </div>
            

        </div>
        

        <div id="column2" class="column">

            <div class="habblet-container">        
                <div class="cbb clearfix green">
                    <h2 class="title">Mes parrainages</h2>


                    <div class="habblet box-content">
                        
Tu as ramené un total de :</center>
                        
                              
<?php
if (!isset($_GET['n'])) {
    $usuario = $name;
} else {
    $usuario = mysql_real_escape_string($_GET['n']);
}
$query = mysql_query("SELECT COUNT(id) AS aantalleden FROM users_referidos WHERE usuario ='" . $usuario . "' ORDER BY ID") or die(mysql_error());
$data = mysql_fetch_assoc($query);
echo '<b>' .$data['aantalleden'] . ' </b>Habbos';
?>
                                    </div>
                                    </div>
                                    </div>
                                    </div>
                                    </div>
                                    </div>
                                    
                                   

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