<!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.html">Site</a>
						</li>
					</div>
				</ul>
			</div>	

	<div class="administration">
		<form method="post" action="administration2_ajout.php">
			<h1>L'article</h1>		
			<label>id</label>
			<br />
			<input type="text" name="idArticle"/>
			<br />				
			<label>Titre</label>
			<br />
			<input type="text" name="Titre" placeholder="le titre" />
			<br />	
			<label>L'article</label>
			<br />
			<textarea name="Contenu"></textarea>
			<br />	
			<label>Résumé</label>
			<br />
			<textarea name="Resume"></textarea>
			<br />	
			<label>Catégorie</label>
			<br />
			<br />
			<?php	
				$bdd = new PDO('mysql:host=localhost;dbname=bibliotheque;charset=utf8','root','');
				$req = $bdd->query('SELECT idCategorie, Categorie FROM categorie');				
				foreach($req->fetchAll() as $donnees){
					echo '<label>'.$donnees['Categorie'].' : </label><input type="checkbox" value="'.$donnees['idCategorie'].'" name="Categorie"><br />';
				}
			?>

			<h1>Mise en page</h1>
			<label>Image vignette</label>
			<br />
			<input type="text" name="Image4" value="images/"/>
			<br />
			<label>Image vignette hover</label>
			<br />
			<input type="text" name="Image5" value="images/"/>
			<br />		
			<label>Image fond</label>
			<br />
			<input type="text" name="Image6" value="images/"/>
			<br />
			
			<br />
			<input type="submit" value="valider" name="valider2"/>			
		</form>
	</div>


	</body>
</html>