<?php

if(isset($_GET["s"])){
	$_SESSION['bctabs']='';
	if($_GET["s"]=="nbperyearperniv"||$_GET["s"]=="all") {
		include('freq_stats_evolchart_nbperyearperniv.php');
	}
	if($_GET["s"]=="nbperyearperdiv"||$_GET["s"]=="all") {
		include('freq_stats_evolchart_nbperyearperdiv.php');
	}
	if($_GET["s"]=="propperyearperniv"||$_GET["s"]=="all") {
		include('freq_stats_evolchart_propperyearperniv.php');
	}
	if($_GET["s"]=="propperyearperdiv"||$_GET["s"]=="all") {
		include('freq_stats_evolchart_propperyearperdiv.php');
	}
	if($_GET["s"]=="nbperweekperyear"||$_GET["s"]=="all") {
		include('freq_stats_evolchart_nbperweekperyear.php');
	}
	if($_GET["s"]=="evolpercren"||$_GET["s"]=="all") {
		include('freq_stats_evolchart_evolpercren.php');
	}
	if($_GET["s"]=="evolexclus"||$_GET["s"]=="all") {
		if($excluopt_info['valeur']==1) {
			echo '<br><h3>Exclusions et limitations :</h3>';
			include('db/proc/freq_stats_annees_exclus.php');
		}
	}
	echo '<br> <a onclick="submitods();" id="preview-ods"><i class="fa-solid fa-file-export" style="font-size:1.5em;"></i> '.STATS_DL1.'</a>';
	if(isset($_POST['haveods'])) {
		include('stats_ods_loader.php');
	}
    echo '<form id="loadods" action="db/proc/stats/stats_ods_loader.php" method="post"><input type="hidden" name="haveods" value="1" /></form>';

    echo '<script type="text/javascript">
	function submitods(){
		$("#loadods").submit()
	}
	</script>';
}
?>
