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
| <?php
// Connexion à la base de données
try
{
$bdd = new PDO('mysql:host=localhost;dbname=Lloret;charset=utf8', 'root', '');
}
catch(Exception $e)
{
die('Erreur : '.$e->getMessage());
}
// On récupère les 5 derniers NEWS_TAB_ARTICLES
$req = $bdd->query('SELECT news_id, news_titre, news_contenu, DATE_FORMAT(news_date, \'%d/%m/%Y à %Hh%imin%ss\') AS news_date_fr FROM NEWS_TAB_ARTICLES ORDER BY news_date DESC LIMIT 0, 5');
while ($donnees = $req->fetch())
{
?>
<section class="quote-olw bg-wrapper q-h-1">
<div class="wrapper">
<div class="row-1">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="section-title-box wow rollIn center ">
<h2>La satisfaction de nos clients: une priorité</h2>
</div>
</div>
</div>
<div class="row-1">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div id="quote-olw-h1">
<div class="quote-box">
<quote class="quote-block-2">
<div class="quote-wrap">
<div class="quote-photo">
<img class="#" alt="image" src="media/76x76/image2.jpg">
</div>
<div class="text-quote">
<?php echo nl2br(htmlspecialchars($donnees['news_contenu']));?>
</div>
</div>
<span class="ef arrow_triangle-down"></span>
</quote>
<div class="q-signature">
<h4><?php echo htmlspecialchars($donnees['news_titre']); ?></h4>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="image-folw"></div>
</div>
</section>
<?php
} // Fin de la boucle des NEWS_TAB_ARTICLES
$req->closeCursor();
?> |
Partager