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

<?php 
if(isset($_GET['mark']))
{ $_GET['mark'] = htmlspecialchars($_GET['mark']);
include('connexion_mysql.php');
	$retour = 'SELECT * FROM grpe_article,type_article WHERE grpe_article.id_grpe = type_article.id_grpe AND id_type = "'.$_GET['mark'].'"';
$res = $conn->query($retour);

while($donnees = mysqli_fetch_array($res))// On fait une boucle
{$id_type = stripslashes($donnees['id_type']);
	?>
<h2><img src="img/fleche.gif" style="margin-bottom:-10px;" height="40" width="40">&nbsp<?php echo '<span style="text-transform:uppercase;">'.stripslashes($donnees['libelle_grpe']).'</span> &raquo;&nbsp;'.stripslashes($donnees['libelle_type']); }?></h2>

<a href="<?php echo'rediger_article.php?mark='.$id_type.'';?>"><p class="bouton_design" style="display:inline-block; color:#fff;">Ajouter</p></a>






<table style="margin-top:100px;"><tr>
<th>image</th>
<th>ttitre</th>
<th>modifier</th>
<th>supprimer</th>
<th>date</th>
</tr>

<?php
include('connexion_mysql.php');
$retour1 = 'SELECT * FROM artcle WHERE id_type = "'.$_GET['mark'].'" ORDER BY id_article DESC';
$res = $conn->query($retour1);
while ($donnees = mysqli_fetch_array($res)) // On fait une boucle
{?>
<tr align="center">
<td><img src="../uploads/<?php echo stripslashes($donnees['image']); ?>" style="width:100px;" /></td>
<td><?php echo stripslashes($donnees['titre']); ?></td>
<td><?php echo '<a style="text-decoration:none; color:green; font-weight:bold;" href="rediger_article.php?modifier_news=' .
$donnees['id_article'] . '">'; ?><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_article'] . '">'; ?><img title="supprimer" src="img/ferm1.jpg" style="width:20px;" /></a></td>
<td><?php echo stripslashes($donnees['date']); ?></td>

</tr>
<?php
}

} // Fin de la boucle clients liste les news.

?>
</table>

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