<th class="col-md-1" style="">Online</th> <th class="col-md-1" colspan="2" style="">Actions</th> </tr> </thead> <tbody> <? 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" ] ); $classe_affichage = ( $i % 2 != 0 ) ? "info" : ""; $description = couper_correctement( $value[ "description" ], 50 ); if ( strlen( $value[ "description" ] ) > 50 ) $description .= " ..."; $image_ok = ( !empty( $value[ "image" ] ) && isset( $value[ "image" ] ) ) ? "image OK" : " "; $online = ( $value[ "online" ] == '1' ) ? 'check' : 'vide'; echo "<tr class='" . $classe_affichage . "'>\n"; echo " <td>" . $value[ "nom" ] . "</td>\n"; echo " <td>" . $data[ 0 ][ "nom" ] . "</td>\n"; echo " <td>" . $description . "</td>\n"; echo " <td>" . $image_ok . "</td>\n"; echo " <td><img src='../img/" . $online . ".png' width='30' ></td>\n"; echo " <td><a href='./edition.php?id=" . $value[ "id" ] . "'><img src='../img/modif.png' width='30' alt='Modifier' ></a></td>\n"; echo " <td>\n"; echo " <div style='display: none;' class='supp" . $value[ "id" ] . " alert alert-warning alert-dismissible fade in' role='alert'>\n"; echo " <button type='button' class='close' aria-label='Close' onclick=\"$('.supp" . $value[ "id" ] . "').css('display', 'none');\"><span aria-hidden='true'>×</span></button>\n"; echo " <strong>Voulez vous vraiment supprimer ?</strong>\n";
include_once ( $_SERVER[ "DOCUMENT_ROOT" ] . "/admin/classes/utils.php" ); require( $_SERVER[ "DOCUMENT_ROOT" ] . "/inc/inc.config.php" ); require $_SERVER[ "DOCUMENT_ROOT" ] . "/admin/classes/News.php"; $debug = false; $news = new News(); // ---- Liste des actualités en ligne ---- // if ( 1 == 1 ) { $liste_actualite = $news->newsValidGet( $debug ); $contenu_actualite = ''; $classe_texte = "large-12 medium-12"; if ( !empty( $liste_actualite ) ) { foreach( $liste_actualite as $_actualite ) { $accroche = couper_correctement( $_actualite[ "contenu" ], 45, ' ', false ); if ( strlen( $_actualite[ "contenu" ] ) > 45 ) $accroche .= " ..."; $image = ( $_actualite[ "image1" ] != '' ) ? "/photos/news/thumbs" . $_actualite[ "image1" ] : "/img/favicon.png"; $contenu_actualite = "<div class='large-4 medium-4 small-12 columns'>\n"; $contenu_actualite .= " <div class='actualite' onclick=\"location.href='actualites.php'\">\n"; $contenu_actualite .= " <h3>(Actualité)</h3>\n"; $contenu_actualite .= " <img src='" . $image . "' alt='' />\n"; $contenu_actualite .= " <p>" . $accroche . "</p>\n"; $contenu_actualite .= " </div>\n"; $contenu_actualite .= "</div>\n"; $classe_texte = "large-8 medium-8"; break;
unset( $recherche ); $recherche[ "num_type_bien" ] = 3; $result = $offre->getListeAvecTypeBien( $recherche, $debug ); echo "<section role='tabpanel' aria-hidden='true' class='nos-offres content' id='panel-investisseur'>\n"; if ( !empty( $result ) ) { foreach ( $result as $value ) { // ---- Image par défaut ----- // $image_defaut = $offre_image->getImageDefaut( $value[ "num_offre" ], $debug ); echo " <a class='bien' href='offre.php?id=" . $value[ "num_offre" ] . "'>\n"; echo " <img src='/photos/offre/vignette" . $image_defaut[ "fichier" ] . "' alt='' />\n"; echo " <h2>" . $value[ "titre" ] . "</h2>\n"; echo " <p>" . couper_correctement( $value[ "description" ], 200, ' ', false ) . " ...</p>\n"; echo " <div class='prix'>" . number_format( $value[ "prix" ], 0, '', ' ' ) . " € FAI</div>\n"; echo " </a>\n"; } } echo "</section>\n"; } // -------------------------------------------------------------- // ?> <!-- <section role="tabpanel" aria-hidden="true" class="nos-offres content" id="panel-vente"> <div class="bien"> <img src="img/photo-01.jpg" alt="" /> <h2>Bordeaux Nord</h2> <p>Etiam blandit justo est, eget sollicitudin velit commodo non. Vestibulum eu velit enim. Morbi vulputate venenatis ante a commodo...</p>
if ($i % 2 != 0) { echo 'info'; } ?> "> <td><?php echo $value["titre"]; ?> </td> <td><?php echo $value["surface"]; ?> </td> <td><?php echo couper_correctement($value["description"], 200, ' ', false); ?> ...</td> <td><?php echo number_format($value["prix"], 0, '', ' '); ?> €</td> <td><img src="../img/<?php echo $a_la_une; ?> .png" width="30" ></td> <td><img src="../img/<?php echo $online; ?> .png" width="30" ></td> <td><a href="./edition.php?id=<?php
if ( $num_type_bien == 1 ) $type_bien = "<div class='type'>Location</div>\n"; else if ( $num_type_bien == 2 ) $type_bien = "<div class='type'>Vente</div>\n"; else if ( $num_type_bien == 3 ) $type_bien = "<div class='type'>Investisseur</div>\n"; else $type_bien = ''; } // ---- Image par défaut ----- // $image_defaut = $offre_image->getImageDefaut( $_offre[ "num_offre" ], $debug ); //print_pre( $image_defaut ); echo "<div id='" . $_offre[ "num_offre" ] . "' class='swiper-slide pointer'>\n"; echo $type_bien; echo " <img src='/photos/offre/vignette" . $image_defaut[ "fichier" ] . "' alt='' />\n"; echo " <h2>" . $_offre[ "titre" ] . "</h2>\n"; echo " <p>" . couper_correctement( $_offre[ "description" ], 100, ' ', false ) . " ...</p>\n"; if ( $num_type_bien == 1 ){ echo " <div class='prix'>" . number_format( $_offre[ "prix" ], 0, '', ' ' ) . " € </div>\n"; } else { echo " <div class='prix'>" . number_format( $_offre[ "prix" ], 0, '', ' ' ) . " € FAI</div>\n"; } echo "</div>\n"; } } // ----------------------------------------------------- // ?> </div> </div> <div class="swiper-button-next"></div> <div class="swiper-button-prev"></div>