109 lines
3.0 KiB
PHP
Executable File
109 lines
3.0 KiB
PHP
Executable File
<?php
|
|
session_start();
|
|
$idcateg=$HTTP_GET_VARS["idcateg"];
|
|
$idfamille=$HTTP_GET_VARS["idfamille"];
|
|
?>
|
|
|
|
<html>
|
|
<head>
|
|
<title>
|
|
Produit
|
|
</title>
|
|
<link href="../style.css" rel="stylesheet" type="text/css">
|
|
<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 {
|
|
color: #FFFFFF;
|
|
text-decoration: none;
|
|
}
|
|
a:hover {
|
|
color: #FFFFFF;
|
|
text-decoration: underline;
|
|
}
|
|
a:active {
|
|
color: #FFFFFF;
|
|
text-decoration: none;
|
|
}
|
|
.style7 {font-family: Arial, Helvetica, sans-serif}
|
|
-->
|
|
</style>
|
|
<script language="JavaScript" type="text/JavaScript">
|
|
<!--
|
|
function MM_openBrWindow(theURL,winName,features) { //v2.0
|
|
window.open(theURL,winName,features);
|
|
}
|
|
//-->
|
|
</script>
|
|
<link href="../style.css" rel="stylesheet" type="text/css">
|
|
</head>
|
|
<body class="bgcolor">
|
|
<?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 nomfamille from famille where idfamille='$idfamille'";
|
|
$result1=mysql_query($requete1) or die ("Erreur SQL :$requete1<br>".mysql_error()."...");
|
|
|
|
while ($ligne1=mysql_fetch_row($result1))
|
|
{
|
|
$famille=$ligne1[0];
|
|
}
|
|
|
|
$requete2 = "select nomcateg from categorie where idcateg='$idcateg'";
|
|
$result2=mysql_query($requete2) or die ("Erreur SQL :$requete2<br>".mysql_error()."...");
|
|
|
|
while ($ligne2=mysql_fetch_row($result2))
|
|
{
|
|
$categ=$ligne2[0];
|
|
}
|
|
?>
|
|
<a href="index.php">Accueil produits</a><br>
|
|
        <a href="famille.php?idcateg=<?php print $idcateg?>"><?php print $categ?></a><br>
|
|
<div align="center">
|
|
<table>
|
|
<tr align= center>
|
|
<td colspan=2> <?php print $famille?><br> <br>  </td>
|
|
</tr>
|
|
<div align=center>
|
|
<?php
|
|
if (isset($_SESSION["compt"]))
|
|
{
|
|
?>
|
|
<a href="panier.php?page=produit.php&idfamille=<?php print $idfamille?>&idcateg=<?php print $idcateg?>"><br>
|
|
Votre Panier<br>
|
|
</a> <br>
|
|
<?php
|
|
}
|
|
?>
|
|
</div>
|
|
<?php
|
|
$requete = "select idprod,denomination,pathphotobassedef,prixht1 from produit where idfamille='$idfamille'";
|
|
$result=mysql_query($requete) or die ("Erreur SQL :$requete<br>".mysql_error()."...");
|
|
|
|
while ($ligne=mysql_fetch_row($result))
|
|
{
|
|
$i++;
|
|
$idprod=$ligne[0];
|
|
$nom=$ligne[1];
|
|
$photo=$ligne[2];
|
|
?>
|
|
<tr>
|
|
<td> <a href="detailprod.php?idprod=<?php print $idprod?>&idcateg=<?php print $idcateg?>&idfamille=<?php print $idfamille ?>"><?php print $nom?></a> </td>
|
|
<td> <a href="#" onClick="MM_openBrWindow('zoomprod.php?idprod=<?php print $idprod?>idfamille=<?php print $idfamille?>','Zoom','width=270,height=350')"><img src="../images/<?php print $photo?>" alt="Zoom" width=75 height=75 border="0"/></a> </td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
?>
|
|
</table>
|
|
<p> </p>
|
|
<p><a href="famille.php?idcateg=<?php print $idcateg?>">Retour</a></p>
|
|
|
|
</body>
|
|
</html>
|