<?php
$_SESSION['fully'] = @$_POST['fullyear'];
if(!isset($_POST['fullyear'])) {
	$_POST['fullyear'] = $_SESSION['fully'];
}

if(isset(${$codepays.'_all_'.$_POST['fullyear'].'_cles'}[0])) {
	$_SESSION['datepickstats1']=date('d/m/Y', strtotime(str_replace("/","-",${$codepays.'_all_'.$_POST['fullyear'].'_cles'}[0])));
	$_SESSION['datepickstats2']=date('d/m/Y', strtotime(str_replace("/","-",${$codepays.'_all_'.$_POST['fullyear'].'_cles'}[2])));
}
else {
	if($acadexist=="La Réunion") {
		$_SESSION['datepickstats1']='15/08/'.substr($_POST['fullyear'],0,4); 
		$_SESSION['datepickstats2']='07/07/'.substr($_POST['fullyear'],4,4);
	}
	else if($acadexist=="swi") {
		$_SESSION['datepickstats1']='19/08/'.substr($_POST['fullyear'],0,4); 
		$_SESSION['datepickstats2']='29/06/'.substr($_POST['fullyear'],4,4);
	}
	else { 
		$_SESSION['datepickstats1']='01/09/'.substr($_POST['fullyear'],0,4); 
		$_SESSION['datepickstats2']='07/07/'.substr($_POST['fullyear'],4,4); 
	}
}
?>