<?php

	//---------------------------------------------------------------------------------------------
	include("../M0/session_start.php") ;

	if ( $_SESSION['level'] < 8 ) {
		header('Location: ' . $root_dir . '/M1/index_2.php');
		exit();
	}
	
	//---------------------------------------------------------------------------------------------
	// utilisateurs autorisés : "super_users" et "users" avec niveau > 8
	//---------------------------------------------------------------------------------------------
	if ( ( $_SESSION['user_type'] != "super_user" ) and ( $_SESSION['level'] < 9 ) ) {
		
		header('Location: ' . $root_dir . '/M1/index_2.php');
		exit();
		
	}
	
	//---------------------------------------------------------------------------------------------
	include("../M0/communs_en_tete_HTML.html") ;
	$back_link = "../M1/index_2.php";
	include('../M0/communs_en_tete_home_back.html');

	$return_path = "../M3_2/AQCM_setup_seuils.php" ;
	include('../M0/display_user_site_only_with_option.php'); 

	include('../M0/AQCM_get_seuils.php'); 

	if ( ( $_SESSION['level'] >= 9 ) && ( $_SESSION['SITE_ID'] != "00001_001" ) ) {
		include "./AQCM_setup_seuils_a.php" ;
	}
	
?>

<script>
function SetDefaultsValues() {

document.getElementById("aqcm_CO2_TRIG_0").value = "500";
document.getElementById("aqcm_CO2_TRIG_1").value = "750";
document.getElementById("aqcm_CO2_TRIG_2").value = "1000";
document.getElementById("aqcm_CO2_TRIG_3").value = "1300";
document.getElementById("aqcm_CO2_TRIG_4").value = "1700";
document.getElementById("aqcm_CO2_TRIG_5").value = "2100";

document.getElementById("aqcm_T_TRIG_0").value = "15.0";
document.getElementById("aqcm_T_TRIG_1").value = "17.0";
document.getElementById("aqcm_T_TRIG_2").value = "19.0";
document.getElementById("aqcm_T_TRIG_3").value = "23.0";
document.getElementById("aqcm_T_TRIG_4").value = "25.0";
document.getElementById("aqcm_T_TRIG_5").value = "27.0";

document.getElementById("aqcm_HR_TRIG_0").value = "20";
document.getElementById("aqcm_HR_TRIG_1").value = "30";
document.getElementById("aqcm_HR_TRIG_2").value = "40";
document.getElementById("aqcm_HR_TRIG_3").value = "60";
document.getElementById("aqcm_HR_TRIG_4").value = "70";
document.getElementById("aqcm_HR_TRIG_5").value = "80";

document.getElementById("aqcm_COV_TRIG_0").value = "50";
document.getElementById("aqcm_COV_TRIG_1").value = "100";
document.getElementById("aqcm_COV_TRIG_2").value = "150";
document.getElementById("aqcm_COV_TRIG_3").value = "200";
document.getElementById("aqcm_COV_TRIG_4").value = "300";
document.getElementById("aqcm_COV_TRIG_5").value = "400";

document.getElementById("aqcm_PM25_TRIG_0").value = "10";
document.getElementById("aqcm_PM25_TRIG_1").value = "30";
document.getElementById("aqcm_PM25_TRIG_2").value = "50";
document.getElementById("aqcm_PM25_TRIG_3").value = "100";
document.getElementById("aqcm_PM25_TRIG_4").value = "200";
document.getElementById("aqcm_PM25_TRIG_5").value = "300";

document.getElementById("aqcm_PM10_TRIG_0").value = "10";
document.getElementById("aqcm_PM10_TRIG_1").value = "30";
document.getElementById("aqcm_PM10_TRIG_2").value = "50";
document.getElementById("aqcm_PM10_TRIG_3").value = "100";
document.getElementById("aqcm_PM10_TRIG_4").value = "200";
document.getElementById("aqcm_PM10_TRIG_5").value = "300";

document.getElementById("aqcm_HCHO_TRIG_0").value = "10";
document.getElementById("aqcm_HCHO_TRIG_1").value = "30";
document.getElementById("aqcm_HCHO_TRIG_2").value = "50";
document.getElementById("aqcm_HCHO_TRIG_3").value = "100";
document.getElementById("aqcm_HCHO_TRIG_4").value = "200";
document.getElementById("aqcm_HCHO_TRIG_5").value = "300";

document.getElementById("aqcm_SPL_TRIG_0").value = "35";
document.getElementById("aqcm_SPL_TRIG_1").value = "65";
document.getElementById("aqcm_SPL_TRIG_2").value = "75";
document.getElementById("aqcm_SPL_TRIG_3").value = "90";
document.getElementById("aqcm_SPL_TRIG_4").value = "105";
document.getElementById("aqcm_SPL_TRIG_5").value = "120";

}
</script>

</body>

</html>