117 lines
2.6 KiB
PHP
Executable File
117 lines
2.6 KiB
PHP
Executable File
<?php
|
|
session_start();
|
|
$idcateg=$HTTP_GET_VARS["idcateg"];
|
|
?>
|
|
|
|
<html>
|
|
<head>
|
|
<title>
|
|
Famille
|
|
</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
|
|
<!--
|
|
a:link {
|
|
color: #FFFFFF;
|
|
text-decoration: none;
|
|
}
|
|
a:visited {
|
|
text-decoration: none;
|
|
color: #FFFFFF;
|
|
}
|
|
a:hover {
|
|
text-decoration: underline;
|
|
color: #FFFFFF;
|
|
}
|
|
a:active {
|
|
text-decoration: none;
|
|
color: #FFFFFF;
|
|
}
|
|
-->
|
|
</style>
|
|
<link href="../style.css" rel="stylesheet" type="text/css">
|
|
</head>
|
|
|
|
<body class="bgcolor">
|
|
<p><a href="index.php">Accueil Produits</a><br>
|
|
       <br>
|
|
<br>
|
|
<div align="center">
|
|
<strong>
|
|
<?php
|
|
if (isset($_SESSION["compt"]))
|
|
{
|
|
?>
|
|
</strong><a href="panier.php?page=famille.php&idcateg=<?php print $idcateg?>"><br>
|
|
Votre Panier<br>
|
|
</a> <br>
|
|
<?php
|
|
}
|
|
?>
|
|
<?php
|
|
require("../connexion.php");
|
|
$conn = mysql_connect($host, $user, $password);
|
|
mysql_select_db($bdd) or die("Impossible d'ouvrir la base de donnee $bdd");
|
|
|
|
$requete1 = "select nomcateg from categorie where idcateg='$idcateg'";
|
|
$result1=mysql_query($requete1) or die ("Erreur SQL :$requete1<br>".mysql_error()."...");
|
|
|
|
while ($ligne1=mysql_fetch_row($result1))
|
|
{
|
|
$nomcateg=$ligne1[0];
|
|
}
|
|
|
|
?>
|
|
<?php print $nomcateg?><br>
|
|
<br>
|
|
  </p>
|
|
<p> </p>
|
|
<table>
|
|
|
|
<?php
|
|
|
|
$requete = "select idfamille, nomfamille, descriptionfamille, photofamille from famille where idcateg='$idcateg'";
|
|
$result=mysql_query($requete) or die ("Erreur SQL :$requete<br>".mysql_error()."...");
|
|
$i=0;
|
|
while ($ligne=mysql_fetch_row($result))
|
|
{
|
|
$i++;
|
|
$idfamille=$ligne[0];
|
|
$nom=$ligne[1];
|
|
$desc=$ligne[2];
|
|
$photo=$ligne[3];
|
|
|
|
if ($i==1||$i==3||$i==5||$i==7||$i==9||$i==11||$i==13||$i==15||$i==17||$i==19)
|
|
{
|
|
?>
|
|
<tr>
|
|
<td>
|
|
<a href="produit.php?idcateg=<?php print $idcateg?>&idfamille=<?php print $idfamille?>"><img src="../images/<?php print $photo?>" height=75 width=75/></a>
|
|
</td>
|
|
<td>
|
|
<a href="produit.php?idcateg=<?php print $idcateg?>&idfamille=<?php print $idfamille ?>"><?php print $nom?></a>
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
} else {
|
|
?>
|
|
<tr>
|
|
<td>
|
|
<a href="produit.php?idcateg=<?php print $idcateg?>&idfamille=<?php print $idfamille ?>"><?php print $nom?></a>
|
|
</td>
|
|
<td>
|
|
<a href="produit.php?idcateg=<?php print $idcateg?>&idfamille=<?php print $idfamille?>"><img src="../images/<?php print $photo?>" width=75 height=75 border="0"/></a>
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<?php
|
|
}
|
|
}
|
|
?>
|
|
</table>
|
|
<p> </p>
|
|
<p><a href="index.php"><strong>Retour</strong></a>
|
|
</p>
|
|
</body>
|
|
</html>
|