<?php

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

	if ( $_SESSION['level'] < 8 ) {
		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_without_BAT_NIV.php'); 

?>

<font size="1" face="Arial, Helvetica, sans-serif">&nbsp;</font>

<table align="center" width="<?php echo $tables_width ; ?>"  border="2" cellspacing="2" cellpadding="2" bordercolor="#ffffff" bgcolor="#000033">	

	<tr align="center">
		<td>

			<table align="center" width="400">
			
				<div><label style="display: block;font-size:24px; color:lightblue;padding-top:10px;padding-bottom:10px;" >
				<u>- seuils de qualité de l'air -</u>
				</label></div>

				<tr align="left">
					<td align="left" >

						<label class="txtField_10" >				
							<?php 

								//--------------------------------------------------------------------------------------------------------
								include ("../_identifiants/sql_identification_sans_base.php");
								$mysql_base = 'AQCM05_SITE_' . $_SESSION['SITE_ID'] ;
								
								$link = mysqli_connect($mysql_host,$mysql_user,$mysql_password, $mysql_base);
								
								if (!$link) {
									$code_erreur = 100;
									echo "Connexion impossible à la base de donnée MySQL !" . PHP_EOL; echo '</br>'; flush() ;
									echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL; echo '</br>'; flush() ;
									echo "Debugging error: " . mysqli_connect_error() . PHP_EOL; echo '</br>'; flush() ;
								}
								else {
									
									$_SESSION['aqcm_HYGRO_THERMO']	= isset( $_POST['aqcm_HYGRO_THERMO'] )	? "ON"	: "OFF" ;

									include "./AQCM_set_seuils_T.php" ;
									include "./AQCM_set_seuils_HR.php" ;
									include "./AQCM_set_seuils_CO2.php" ;
									include "./AQCM_set_seuils_COV.php" ;
									include "./AQCM_set_seuils_NOX.php" ;
									include "./AQCM_set_seuils_HCHO.php" ;
									include "./AQCM_set_seuils_PM25.php" ;
									include "./AQCM_set_seuils_PM10.php" ;
									include "./AQCM_set_seuils_LUX.php" ;
									include "./AQCM_set_seuils_SPL.php" ;
									
								}

							?>
						</label>
						</br>
						
					</td>
				</tr>
			</table>

		</td>
	</tr>
	
</table>

</body>
</html>
