1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
| <?php
require_once "fonctions.php";
include_once "constantes.php";
if(isset($_SESSION['login']))
{
$session = $_SESSION['login'];
connect_db();
echo "Bonjour ".$_SESSION['login']."<br/>";
echo "<h1>Catégorie photos </h1> ";
echo '<br/><form action="recherche.php" method="post">
<input type="text" name="recherche" size="15" value="Recherche"/>
<input type="submit" name="ok" value="ok"/>
</form>';
$id_user = "SELECT id_user from user WHERE login='$session'";
$requete_user = mysql_query($id_user) or die("erreur requete user");
$tableau_user = mysql_fetch_array($requete_user);
$photo = "SELECT * from photo WHERE id_user=$tableau_user[id_user]";
$requete_photo = mysql_query($photo)or die ("Erreur Photo");
$photo2 = "SELECT * from photo WHERE id_user=$tableau_user[id_user] AND categorie =''";
$requete_photo2 = mysql_query($photo2)or die ("Erreur Photo");
$ligne = mysql_num_rows($requete_photo);
if ($ligne==0)
{
echo " Aucune Photo"."<br/>";
}
else
{
echo " Photo non classé : "."<br/>";
while ($tableau_photo2 = mysql_fetch_array($requete_photo2))
{
echo "<a href='detail.php?id=$tableau_photo2[id_photo]'><img src=\"IMG/".$_SESSION['login']."/mini/".$tableau_photo2['nom_fic']."\"/></a>"." ";
}
echo "<br/>";
while ($tableau_photo = mysql_fetch_array($requete_photo))
{
echo "<a href='membre.php?id=$tableau_photo[id_photo]&categorie=$tableau_photo[categorie]'> $tableau_photo[categorie]"."</a>"."<br/>";
}
}
}
else
{
identification();
}
?>
<html>
<head>
</head>
<body>
<br/>
<br/>
<a href="accueil.php">Accueil</a>
<a href="categorie.php"> Mes photos</a>
<a href="add.php">Ajouter Photo</a>
<a href="profil.php">Mon profil</a>
<a href="logout.php">Deconnexion</a>
</body>
</html> |
Partager