<!DOCTYPE html>
<html>
    <head>
        <title>administration</title>
        <meta charset="utf-8" />
		<link rel="stylesheet" href="bibliotheque.css" />	
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
		<script type="text/javascript" src="administration.js"></script>
	    <script src="jquery.sumoselect.js"></script>
        <link href="sumoselect.css" rel="stylesheet" />
		</head>
    <body>
	
			<div class="barre_nav" id="barre_nav_adm">
				<ul>
					<div>
						<li>
							<a href="administration.php">Ajout HE</a>
						</li>
						<li>
							<a href="administration2.php">Ajout article</a>
						</li>
						<li>
							<a href="page_accueil.php">Site</a>
						</li>
					</div>
				</ul>
			</div>	
	
	<div class="administration">
	<form method="post" action="administration2_ajout.php">
		<h1>Infos huile essentielle</h1>
		<label>id</label>
		<br />
		<input type="text" name="idHE" placeholder="" />
		<br />		
		<label>Nom de l'huile essentielle</label>
		<br />
		<input type="text" name="NomHE" placeholder="le nom..." />
		<br />
		<label>Nom Latin de l'huile essentielle</label>
		<br />
		<input type="text" name="NomLatin" placeholder="le nom latin..." />
		<br />	
		<label>Description</label>
		<br />
		 <textarea name="Description"></textarea>
		<br />		
		<label>Famille</label>
		<br />
		<input type="text" name="Famille" placeholder="nom de la famille..." />
		<br />	
		<label>Origine</label>
		<br />
		<input type="text" name="Origine" placeholder="l'origine..." />
		<br />	
		<label>Partie distillée</label>
		<br />
		<input type="text" name="Partie" />
		<br />			
		<label>Composition</label>
		<br />
		<textarea name="Composition"></textarea>
		<br />	
		<div id="mdr">
		<label>Propriétés</label>
		<br />	

		<select name="propriete[]" multiple="multiple" placeholder="Liste propriétés" onchange="console.log($(this).children(':selected').length)" class="testSelAll">
			<?php	
				$bdd = new PDO('mysql:host=localhost;dbname=bibliotheque;charset=utf8','root','');
				$req = $bdd->query('SELECT idPropriete, NomPropriete FROM proprietes ORDER BY NomPropriete asc');				
				while($donnees = $req->fetch()){
					echo '<option value="'.$donnees['idPropriete'].'">'.$donnees['NomPropriete'].'</option>';
				}
			?>
				
		</select>
		
		</div>
		<a href="proprietes.php" target="_blank">ajouter de nouvelles propriétés</a>
		<br />
		<br />
		<label>Voies administration</label>
		<br />
		<br />
		
		<label>Voie Orale :</label>
		<select name="voie[]">
			<option value="4">-</option>	
			<option value="3">+</option>
			<option value="2">++</option>
			<option value="1">+++</option>
		</select>
		<br />
		<label>Voie Cutannée :</label>
		<select name="voie2[]">
			<option value="8">-</option>	
			<option value="7">+</option>
			<option value="6">++</option>
			<option value="5">+++</option>
		</select>
		<br />		
		<label>Olfaction :</label>
		<select name="voie3[]">
			<option value="12">-</option>	
			<option value="11">+</option>
			<option value="10">++</option>
			<option value="9">+++</option>
		</select>
		<br />
		<label>Diffusion :</label>
		<select name="voie4[]">
			<option value="16">-</option>	
			<option value="15">+</option>
			<option value="14">++</option>
			<option value="13">+++</option>
		</select>
		<br />
		<br />
		
		
		<label>Dangers</label>
		<br />	

		<select multiple="multiple" name="dangers[]" placeholder="Liste dangers" onchange="console.log($(this).children(':selected').length)" class="testSelAll">
			<option value="1">Ostrogen-like </option>
			<option value="2">Cortison-like </option>
			<option value="3">Dermocaustique </option>
			<option value="4">Irritante </option>
			<option value="5">Allergisante </option>	
			<option value="6">Photosensibilisante </option>
			<option value="7">Neurotoxique </option>
			<option value="8">Pas de danger </option>
		</select>			
			
		<h1>Mise en page</h1>	
		<label>Image de fond</label>
		<br />
		<input type="text" name="Image1" placeholder="lien de l'image 1" value="images/HE/image1_"/>
		<br />	  
		<label>Petite image</label>
		<br />
		<input type="text" name="Image2" placeholder="lien de l'image 2" value="images/HE/image2_"/>
		<br />	
		<label>Image recherche</label>
		<br />
		<input type="text" name="Image3" placeholder="lien de l'image 3" value="images/HE/image3_"/>
		<br />			
		<label>Couleur</label>
		<br />
		<input type="text" name="Couleur" placeholder="ffffff" />
		<br />			
		
		<br />
		<input type="submit" value="valider" name="bouton1"/>
	</form>	
	</div>


	</body>
</html>