echo getPourcent($nbAdhCsp, $nbTotal);
            ?>
</div></div>
    </div><div class="clear"></div>
	
<?php 
        }
    }
    ?>
</div></div>


<!--repartition des inscrits par mois et par annee --->
<div class="box box-primary">
          <div class="box-header"><i class="fa fa-bar-chart-o"></i><h3 class="box-title">Nouveaux inscrits par mois (<?php 
    echo getCyberName($epn);
    ?>
)</h3></div>
<div class="box-body"><table class="table"> 
				<thead><tr>
					<th></th>
					<th>Nouveaux inscrits</th>
					<th>Dont actifs</th></td></tr></thead></tbody>
<?php 
    for ($i = 1; $i <= $month; ++$i) {
        $nbNewAdhActifs = statInscription($i, 1, $epn);
        $nbNewAdhInactifs = statInscription($i, 2, $epn);
        //debug($nbNewAdhInactifs);
        $totalNewadh = $nbNewAdhActifs + $nbNewAdhInactifs;
        //debug($nbNewAdh);
        echo '<tr><td >' . getMonth($i) . '</td>
if (TRUE == isset($_GET['month']) and TRUE == is_numeric($_GET['month']) and $_GET['month'] > 0 and $_GET['month'] < 13) {
    $month = $_GET['month'];
    $year = $_GET['year'];
} else {
    $month = date('m');
    $year = date('Y');
}
// chargement des valeurs pour l'epn par défaut
$epn = $_SESSION['idepn'];
//si changment d'epn
if (TRUE == isset($_POST['modifepn'])) {
    $epn = $_POST['pepn'];
}
// Choix de l'epn   -------------------------------------
$espaces = getAllEPN();
$namepn = getCyberName($epn);
$salles = getAllSallesbyepn($epn);
//debug($salles);
//verification que le dossier images des stats existe.
$dossierimg = "img/chart/" . $year;
if (!is_dir($dossierimg)) {
    mkdir($dossierimg);
}
?>

 <div class="row"><div class="col-md-6">
                     
 <div class="box box-primary">
        <div class="box-header"><i class="fa fa-bar-chart-o"></i><h3 class="box-title">Paramètres</h3></div>
	<div class="box-body">
	<form method="post" role="form">