<?php
// Calendrier
// voir http://api.jqueryui.com/datepicker/
// gérer Emploi du temps avec beforeshowdays, et onselect pour les créneaux
echo '<script>
	$( function() {
	$( ".datepick" ).datepicker({';
		$verif_select = "SELECT * FROM ".$prefix."_hordemis";
		$verif = mysqli_query($bdd,$verif_select);
		while($verif_info = mysqli_fetch_assoc($verif)) {
			if($verif_info['id']==6||$verif_info['id']==7||$verif_info['id']==13||$verif_info['id']==14) {
				if($verif_info['statut']==0) { $nowe = 1; }
				else { $nowe = 0; break; }
			}
		}
		if($nowe==1) {
			echo 'beforeShowDay: $.datepicker.noWeekends, ';
		}
		echo 'minDate: "-365", 
		maxDate: "0"
	});
	$( ".datepick" ).datepicker();
	} );

</script>';
?>
