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 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
| <?php require_once('../Connections/ConnexionBoutique.php'); ?>
<?php
mysql_select_db($database_ConnexionBoutique, $ConnexionBoutique);
$query_rsTheme = "SELECT * FROM rubriques ORDER BY categorie ASC";
$rsTheme = mysql_query($query_rsTheme, $ConnexionBoutique) or die(mysql_error());
$row_rsTheme = mysql_fetch_assoc($rsTheme);
$totalRows_rsTheme = mysql_num_rows($rsTheme);
$coltitre_rsCatalogue = "1";
if (isset(&_GET['VARtitre'])) {
$coltitre_rsCatalogue = (get_magic_quotes_gpc()) ? &_GET['VARtitre'] : addslashes(&_GET['VARtitre']);
}
$coltheme_rsCatalogue = "1";
if (isset(&_GET['VARtheme'])) {
$coltheme_rsCatalogue = (get_magic_quotes_gpc()) ? &_GET['VARtheme'] : addslashes(&_GET['VARtheme']);
}
mysql_select_db($database_ConnexionBoutique, $ConnexionBoutique);
$query_rsCatalogue = sprintf("SELECT articles.nom, articles.reference, articles.prix, rubriques.categorie FROM articles, rubriques WHERE articles.rubriqueID=%s AND rubriques.ID=articles.rubriqueID AND articles.nom like '%%%s%%'", $coltheme_rsCatalogue,$coltitre_rsCatalogue);
$rsCatalogue = mysql_query($query_rsCatalogue, $ConnexionBoutique) or die(mysql_error());
$row_rsCatalogue = mysql_fetch_assoc($rsCatalogue);
$totalRows_rsCatalogue = mysql_num_rows($rsCatalogue);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/Modele Public.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Document sans titre</title>
</head>
<body>
<div align="center"><img src="../images/bandeauapublic.GIF" width="650" height="156" border="0" usemap="#Map" />
<map name="Map" id="Map">
<area shape="rect" coords="6,114,156,157" href="catalogue.php" />
<area shape="rect" coords="187,115,299,155" href="panier.php" />
<area shape="rect" coords="316,114,495,159" href="commande.php" /><area shape="rect" coords="529,114,642,160" href="../Administrateur/index.php" />
</map></div>
<table width="912" height="94" border="0" align="center">
<tr><!-- InstanceBeginEditable name="regionPublicModifiable" -->
<th scope="col"><form action="catalogue.php" method="get" enctype="multipart/form-data" name="formCatalogue" id="formCatalogue">
<label>Sélectionnez une catégorie:
<select name="VARtheme" id="VARtheme">
<?php
do {
?>
<option value="<?php echo $row_rsTheme['ID']?>"<?php if (!(strcmp($row_rsTheme['ID'], $_GET['VARtheme']))) {echo "selected=\"selected\"";} ?>><?php echo $row_rsTheme['categorie']?></option>
<?php
} while ($row_rsTheme = mysql_fetch_assoc($rsTheme));
$rows = mysql_num_rows($rsTheme);
if($rows > 0) {
mysql_data_seek($rsTheme, 0);
$row_rsTheme = mysql_fetch_assoc($rsTheme);
}
?>
</select>
</label>
ou saisissez le nom d'un produit:
<label>
<input name="VARtitre" type="text" id="VARtitre" />
</label>
<label></label>
<label>
<input type="submit" name="Submit" value="Afficher" />
</label>
<label></label>
</form>
<table width="857" border="2">
<tr>
<th bgcolor="#CCCC33" scope="col">Nom</th>
<th bgcolor="#CCCC33" scope="col">sRéférence</th>
<th bgcolor="#CCCC33" scope="col">Prix</th>
<th bgcolor="#CCCC33" scope="col">Catégorie</th>
</tr>
<tr>
<?php do { ?>
<td><a href="fiche.php?reference=<?php echo $row_rsCatalogue['reference']; ?>"><?php echo $row_rsCatalogue['nom']; ?></a></td>
<td><?php echo $row_rsCatalogue['reference']; ?></td>
<td><?php echo $row_rsCatalogue['prix']; ?></td>
<td><?php echo $row_rsCatalogue['categorie']; ?></td>
<?php } while ($row_rsCatalogue = mysql_fetch_assoc($rsCatalogue)); ?></tr>
<tr>
<td colspan="4"><div align="center">
<p>Sélectionnez une catégorie et éventuellement la marque d'un article et cliquez sur <span style="font-style: italic">Afficher.</span></p>
<p>Pour consulter la fiche d'un article, cliquez sur son Nom. </p>
</div></td>
</tr>
</table></th>
<!-- InstanceEndEditable --></tr>
</table>
<div align="center"><img src="../images/BarreBasPublic.GIF" width="649" height="18" />
</div>
</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result($rsTheme);
mysql_free_result($rsCatalogue);
?> |
Partager