97 lines
2.0 KiB
PHP
Executable File
97 lines
2.0 KiB
PHP
Executable File
<?php
|
|
session_start();
|
|
?>
|
|
|
|
<html>
|
|
<head>
|
|
<title>
|
|
Categorie
|
|
</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">
|
|
<div align="center">
|
|
<p> </p>
|
|
<table align="center">
|
|
<div align="center">
|
|
<?php
|
|
if (isset($_SESSION["compt"]))
|
|
{
|
|
?>
|
|
<a href="panier.php?page=index.php&idcateg=<?php print $idcateg?>"><br>Votre Panier<br></a> <br>
|
|
<?php
|
|
}
|
|
?>
|
|
</div>
|
|
|
|
<?php
|
|
require("../connexion.php");
|
|
$conn = mysql_connect($host, $user, $password);
|
|
mysql_select_db($bdd) or die("Impossible d'ouvrir la base de donnee $bdd");
|
|
|
|
$requete = "select idcateg, nomcateg, descriptioncateg,photocateg from categorie";
|
|
$result=mysql_query($requete) or die ("Erreur SQL :$requete<br>".mysql_error()."...");
|
|
$i=0;
|
|
while ($ligne=mysql_fetch_row($result))
|
|
{
|
|
$i++;
|
|
$idcateg=$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||$i=21||$i=23)
|
|
{
|
|
?>
|
|
<tr>
|
|
<td>
|
|
<a href="famille.php?idcateg=<?php print $idcateg?>"><img src="../images/<?php print $photo?>" height=75 width=75/></a>
|
|
</td>
|
|
<td>
|
|
<a href="famille.php?idcateg=<?php print $idcateg?>"><?php print $nom?></a>
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
} else {
|
|
?>
|
|
<tr>
|
|
<td>
|
|
<a href="famille.php?idcateg=<?php print $idcateg?>"><?php print $nom?></a>
|
|
</td>
|
|
<td>
|
|
<a href="famille.php?idcateg=<?php print $idcateg?>"><img src="../images/<?php print $photo?>" height=75 width=75/></a>
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
}
|
|
?>
|
|
</table>
|
|
<p> </p>
|
|
<p align="center"> </p>
|
|
</body>
|
|
</html>
|
|
|