<?php include('partie1_admin.php');?>
<div id="coverer" align="center">



<?php
if(isset($_GET['id_categorie']))

{$id_categorie = $_GET['id_categorie'];
include('connexion_mysql.php');
$retour0 = mysql_query('SELECT * FROM categorie WHERE id= '.$id_categorie.'  ORDER BY id DESC');
$donnees = mysql_fetch_array($retour0);?>

<h2><img src="img/fleche.gif" style="margin-bottom:-10px;" height="40" width="40">&nbspListe des produits &nbsp;de :&nbsp;<?php echo $donnees['libelle'];?></h2>


<?php $retour1 = mysql_query('SELECT * FROM produit WHERE id_categorie= '.$id_categorie.'  ORDER BY id DESC');
while ($donnees = mysql_fetch_array($retour1)) // On fait une boucle
{$id_grande = stripslashes($donnees['id_grande']);}?>
<a href="<?php echo 'rediger_article.php?mark=produit';?>"><p class="bouton_design" style="display:inline-block; color:#fff;">Ajouter</p></a>
<table style="margin-top:100px;"><tr>
<th>Image</th>
<th>Libelle</th>
<th>modifier</th>
<th>Supprimer</th>
<th>date</th>
</tr>

<?php
include('connexion_mysql.php');
$retour1 = mysql_query('SELECT * FROM produit  WHERE id_categorie= '.$id_categorie.'  ORDER BY id DESC');
while ($donnees = mysql_fetch_array($retour1)) // On fait une boucle
{?>
<tr align="center">
<td><img src="../../uploads/<?php echo stripslashes($donnees['img_produit']); ?>" width="100" alt="" /></td>
<td><?php echo stripslashes($donnees['libelle']); ?></td>
<td><?php echo '<a style="text-decoration:none; color:green; font-weight:bold;" href="rediger_article.php?mark=categorie&amp;modifier_news=' .
$donnees['id'] . '&amp;id_grande=' .
$donnees['id_grande'] . '">'; ?><img title="modifier" src="img/modif.png" style="width:30px;" /></a></td>

<td><?php echo '<a style="text-decoration:none; color:green; font-weight:bold;" href="traitement_article.php?supprimer_news=' .
$donnees['id'] . '&amp;mark=categorie" onclick="return(confirm(\'Etes-vous s&ucirc;r de vouloir supprimer cette entr&eacute;e?\'))">';?><img title="supprimer" src="img/ferm1.jpg" style="width:20px;" /></a></td>
<td><?php echo stripslashes($donnees['date']); ?></td>


</tr>

<?php } }?>

</table>
<?php include('partie3_admin.php'); ?>