<?php include('partie1_admin.php');?>
<div id="coverer" align="center">
<h2><img src="img/fleche.gif" style="margin-bottom:-10px;" height="40" width="40">&nbsp;Ajoutez des photos</h2>
<a href="liste_galerie.php"><p class="bouton_design" style="display:inline-block; color:#fff;">Retour</p></a>

<?php
include('connexion_mysql.php');


if (isset($_GET['photos'])) // Si on demande de modifier une news

{


?>
<form action="liste_galerie.php" method="post" enctype="multipart/form-data">

image :&nbsp;
<input type="file" name="image" /><br />
</p>
<input type="hidden" name="id_news" value="<?php echo $_GET['photos'];
?>" />
<br /><input type="hidden" name="date" value="<?php echo date("d/m/Y"); 
?>" />
<input type="submit" value="Envoyer" name="ajouter_photos" />
</p>
</form>


<table style="margin-top:100px;"><tr>
<th>Photo</th>
<th>Supprimer</th>
<th>Date</th>
</tr>
<?php
$retour = 'SELECT * FROM photosplus WHERE id_galerie="'.$_GET['photos'].'" ORDER BY id DESC';
$res = $conn->query($retour);
while ($donnees = mysqli_fetch_array($res)) // On fait une boucle
{?>
<tr align="center">
<td><?php echo '<a style="text-decoration:none; color:green; font-weight:bold;" href="#">'; ?><img style="width:80px; height:70px;" title="cliquez pour modifier la photo" src="../uploads/<?php echo $donnees['photo']; ?>" /></a></td>
<td><?php echo '<a style="text-decoration:none; color:green; font-weight:bold;" href="liste_galerie.php?supprimer_photo=' .
$donnees['id'] . '">'; ?>Supprimer</a></td>
<td><?php echo ($donnees['date']); ?></td>

</tr>
<?php
} // Fin de la boucle clients liste les news.
?>
</table>





<?php 
} ?>



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