<th class="col-md-1" style="">Photo</th> <th class="col-md-1" style="">Accueil</th> <th class="col-md-1" style="">Online</th> <th class="col-md-1" colspan="2" style="">Actions</th> </tr> </thead> <tbody> <?php if (!empty($liste_produit)) { $i = 0; foreach ($liste_produit as $value) { $i++; // ---- Chargement de la catégorie associée $data = $categorie->load($value["id_categorie"]); // ---- Chargement de l'image par défaut $image_defaut = $produit_image->getImageDefaut($value["id"], $debug); $classe_affichage = $i % 2 != 0 ? "info" : ""; $description = couper_correctement($value["description"], 50); if (strlen($value["description"]) > 50) { $description .= " ..."; } $image_ok = $image_defaut["fichier"] != '' ? 'check' : 'vide'; $accueil = $value["accueil"] == '1' ? 'check' : 'vide'; $online = $value["online"] == '1' ? 'check' : 'vide'; echo "<tr class='" . $classe_affichage . "'>\n"; echo "\t<td>" . $value["nom"] . "</td>\n"; echo "\t<td>" . $data[0]["nom"] . "</td>\n"; echo "\t<td>" . $description . "</td>\n"; echo "\t<td align='center'><img src='../img/" . $image_ok . ".png' width='30' ></td>\n"; echo "\t<td align='center'><img src='../img/" . $accueil . ".png' width='30' ></td>\n"; echo "\t<td align='center'><img src='../img/" . $online . ".png' width='30' ></td>\n";
// ---------------------------------------- // echo "<div class='content " . $actif . "' id='panel" . $_categorie["id"] . "'>\n"; if (!empty($liste_sous_categorie)) { foreach ($liste_sous_categorie as $_sous_categorie) { echo "<h3>" . $_sous_categorie["nom"] . "</h3><br>\n"; // ---- Recherche & affichage des produits disponibles pour cette sous catégorie ---- // if (1 == 1) { unset($recherche); $recherche["id_categorie"] = $_sous_categorie["id"]; $recherche["online"] = '1'; $liste_produit = $produit->getListe($recherche, $debug); if (!empty($liste_produit)) { foreach ($liste_produit as $_produit) { $id_produit = $_produit["id"]; $nom = $_produit["nom"]; $image_defaut = $produit_image->getImageDefaut($id_produit, $debug); echo "\t<div class='large-4 medium-4 small-12 columns'>\n"; echo "\t\t<a href='/amenagement-detail.php?id=" . $id_produit . "' data-fancybox-group='amenagementbois' title=''><img src='/photos/produit/accueil" . $image_defaut["fichier"] . "' title='" . $nom . "' /></a>\n"; echo "\t</div>\n"; } echo "\t<div style='clear:both;'></div>\n"; } } // ---------------------------------------------------------------------------------- // } } echo "</div>\n"; $i++; } echo "</div>\n"; }
} if (!$debug) { header("Location: /amenagements.php"); } exit; } } // --------------------------------------------------------------- // // ---- Informations à afficher ---------------------------------- // if (1 == 1) { // ---- Données de l'annonce ------------- // $nom = $result[0]["nom"]; $description = nl2br($result[0]["description"]); $fichier_pdf = $result[0]["fichier_pdf"]; // ---- Image par défaut ----- // $image_defaut = $produit_image->getImageDefaut($result[0]["id"], $debug); // ---- Liste des images ----- // if (1 == 1) { unset($recherche); $recherche["num_produit"] = $result[0]["id"]; $liste_image = $produit_image->getListe($recherche, $debug); } } // --------------------------------------------------------------- // ?> <!doctype html> <html class="no-js" lang="fr"> <head> <title>Les différents aménagements de Modul-Ouest</title> <?php