<?php 
header('Content-type: text/html; charset=UTF-8');
	include('headeracceuil.php');			/*	Appel de l'entête du site	*/	
?>
	
	<body>
   	
		<!-- Chargement des bandeaux -->
		<?php include('mainheaderacceuil.php'); ?>
		
		
		<div id="schema_acceuil">
			    <div id="PC">
				<?php
				if ($i==6) { echo ('<img id="PC2" src="image/design/acceuil/clinimetre_accueil_vide2.jpg" usemap="#map_acceuil" />');}
				else { echo ('<img id="PC2" src="image/design/acceuil/clinimetre_accueil_vide.jpg" usemap="#map_acceuil" />');} 
				?>
				</div>
				<div id="text1" >
						<?php
							$req = $bdd->query("SELECT * FROM `a_schema` WHERE id = '1'");
							while($data = $req->fetch()) {
							echo $data['contenu_1'];
							echo $data['contenu_2'];
							}
							$req->closecursor();
						?>
				
				</div>	
				<div id="text2" >
					<?php
							$req = $bdd->query("SELECT * FROM `a_schema` WHERE id = '2'");
							while($data = $req->fetch()) {
							echo $data['contenu_1'];
							echo $data['contenu_2'];
							}
							$req->closecursor();
						?>
					
				</div>	
				<div id="text3" >
						<?php
										$req = $bdd->query("SELECT * FROM `a_schema` WHERE id = '3'");
										while($data = $req->fetch()) {
										echo $data['contenu_1'];
										echo $data['contenu_2'];
										}
										$req->closecursor();
									?>
					
				</div>	
				<div id="text4" >
					<?php
							$req = $bdd->query("SELECT * FROM `a_schema` WHERE id = '4'");
							while($data = $req->fetch()) {
							echo $data['contenu_1'];
							echo $data['contenu_2'];
							}
							$req->closecursor();
						?>
					
				</div>	
				<div id="text5" >
					<?php
							$req = $bdd->query("SELECT * FROM `a_schema` WHERE id = '5'");
							while($data = $req->fetch()) {
							echo $data['contenu_1'];
							echo $data['contenu_2'];
							}
							$req->closecursor();
						?>
					
				</div>	
				<div id="text6" >
					<?php
							$req = $bdd->query("SELECT * FROM `a_schema` WHERE id = '6'");
							while($data = $req->fetch()) {
							echo $data['contenu_1'];
							echo $data['contenu_2'];
							}
							$req->closecursor();
						?>
				
				</div>
				<div id="text7">
				<a href="identification.php">Clinimeter</a>
				</div>
				<div id="text_hidden_1">
					<h3> &nbsp;&nbsp;&nbsp;Choisi une grille </h3>
					<?php
						$d1=1;
						$d2=1;
						$req->closecursor();
						$req = $bdd->query("SELECT * FROM `a_grilles_boutons` WHERE id_type = '1'");
						while($data = $req->fetch()) {
							if ($data['dispo']==1) { ?>
							<div class="list"><a href="test/identification.php?variable1=<?php echo $d1?>&variable2=<?php echo $d2?> "> &nbsp; <?php echo $data['contenu']; ?> </a></div> <?php
							$d2 = $d2+1;
						}
							else {?>
							<div class="list"> &nbsp; <?php echo $data['contenu']; ?> (soon..) </div> <?php
						}}
						$req->closecursor();
					?>
				</div>
				<div id="text_hidden_2">
					<h3> &nbsp;&nbsp;&nbsp;Choisi une grille </h3>
					<?php
						$d1=2;
						$d2=1;
						$req = $bdd->query("SELECT * FROM `a_grilles_boutons` WHERE id_type = '2'");
						while($data = $req->fetch()) {
							if ($data['dispo']==1) { ?>
							<div class="list"><a href="test/identification.php?variable1=<?php echo $d1?>&variable2=<?php echo $d2?> "> &nbsp; <?php echo $data['contenu']; ?> </a></div> <?php
							$d2 = $d2+1;
						}
							else {?>
							<div class="list"> &nbsp; <?php echo $data['contenu']; ?> (soon..)</div> <?php
						}}
						$req->closecursor();
					?>
				</div>
				<div id="text_hidden_3">
					<h3> &nbsp;&nbsp;&nbsp;Choisi une grille </h3>
					<?php
						$d1=3;
						$d2=1;					
						$req = $bdd->query("SELECT * FROM `a_grilles_boutons` WHERE id_type = '3'");
						while($data = $req->fetch()) {
							if ($data['dispo']==1) { ?>
							<div class="list"><a href="test/identification.php?variable1=<?php echo $d1?>&variable2=<?php echo $d2?> "> &nbsp; <?php echo $data['contenu']; ?> </a></div> <?php
							$d2 = $d2+1;
						}
							else {?>
							<div class="list"> &nbsp; <?php echo $data['contenu']; ?> (soon..)</div> <?php
						}}
						$req->closecursor();
					?>
				</div>
				<div id="text_hidden_4">
					<h3> &nbsp;&nbsp;&nbsp;Choisi une grille </h3>
					<?php
						$d1=4;
						$d2=1;					
						$req = $bdd->query("SELECT * FROM `a_grilles_boutons` WHERE id_type ='4'");
						while($data = $req->fetch()) {
							if ($data['dispo']==1) { ?>
							<div class="list"><a href="test/identification.php?variable1=<?php echo $d1?>&variable2=<?php echo $d2?> "> &nbsp; <?php echo $data['contenu']; ?> </a></div> <?php
							$d2 = $d2+1;
						}
							else {?>
							<div class="list"> &nbsp; <?php echo $data['contenu']; ?> (soon..)</div> <?php
						}}
						$req->closecursor();
					?>
				</div>
				<div id="text_hidden_5">
					<h3> &nbsp;&nbsp;&nbsp;Choisi une grille </h3>
					<?php
						$d1=5;
						$d2=1;					
						$req = $bdd->query("SELECT * FROM `a_grilles_boutons` WHERE id_type ='5'");
						while($data = $req->fetch()) {
							if ($data['dispo']==1) { ?>
							<div class="list"><a href="test/identification.php?variable1=<?php echo $d1?>&variable2=<?php echo $d2?> "> &nbsp; <?php echo $data['contenu']; ?> </a></div> <?php
							$d2 = $d2+1;
						}
							else {?>
							<div class="list"> &nbsp; <?php echo $data['contenu']; ?> (soon..)</div> <?php
						}}
						$req->closecursor();
					?>
				</div>
				<div id="text_hidden_6">
					<h3> &nbsp;&nbsp;&nbsp;Choisi une grille </h3>
					<?php
						$d1=6;
						$d2=1;					
						if ($i==6){
							$req = $bdd->query("SELECT * FROM `a_grilles_boutons` WHERE id_type ='6'");
							while($data = $req->fetch()) {
								if ($data['dispo']==1) { ?>
								<div class="list"><a href="test/identification.php?variable1=<?php echo $d1?>&variable2=<?php echo $d2?> "> &nbsp; <?php echo $data['contenu']; ?> </a></div> <?php
								$d2 = $d2+1;
							}
								else {?>
								<div class="list"> &nbsp; <?php echo $data['contenu']; ?> (soon..)</div> <?php
							}}
							$req->closecursor();
						}
					?>
				</div>
		</div>
		
<script>
		var open=0;
		var id='0';
		$( "html" ).click(function( event ) {
		var x = event.target.id;

			if (x=="text1") {
				hide_text();
				var elemen = document.getElementById('text_hidden_1');
				elemen.style.display='inline-block';
				open=1;
			}
			else if (x=="text2") {
				hide_text();
				var elemen = document.getElementById('text_hidden_2');
				elemen.style.display='inline-block';
				open=1;
			}
			else if (x=="text3") {
				hide_text();
				var elemen = document.getElementById('text_hidden_3');
				elemen.style.display='inline-block';
				open=1;
			}
			else if (x=="text4") {
				hide_text();
				var elemen = document.getElementById('text_hidden_4');
				elemen.style.display='inline-block';
				open=1;
			}
			else if (x=="text5") {
				hide_text();
				var elemen = document.getElementById('text_hidden_5');
				elemen.style.display='inline-block';
				open=1;
			}
			else if (x=="text6") {
				hide_text();
				var elemen = document.getElementById('text_hidden_6');
				elemen.style.display='inline-block';
				open=1;
			}
			else if (open===1) {
				hide_text();
				open=0;
				}
			
		});
		function hide_text() {
			var elemen = document.getElementById('text_hidden_1');
			elemen.style.display='none';
			var elemen = document.getElementById('text_hidden_2');
			elemen.style.display='none';
			var elemen = document.getElementById('text_hidden_3');
			elemen.style.display='none';
			var elemen = document.getElementById('text_hidden_4');
			elemen.style.display='none';
			var elemen = document.getElementById('text_hidden_5');
			elemen.style.display='none';
			var elemen = document.getElementById('text_hidden_6');
			elemen.style.display='none';
		}
</script>



	
		
		<!-- Chargement des bandeaux du bas de page -->
		<?php include('mainfooteracceuil.php');	?>
		
        <!-- Chargement des fonctions JS  -->
		