Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
trash
/
vhost_www.taxisvsl.fr_1718269442
/
htdocs
/
pages
/
/srv/data/trash/vhost_www.taxisvsl.fr_1718269442/htdocs/pages/news-single.php
<?php ?> <?php $temp = explode("-",$slug); $idNews = $temp[1]; $stmt=$db_client->prepare("SELECT * FROM news WHERE id=? and id_company =?"); // on prépare notre requête $stmt->execute(array($idNews,$conf_id_company)); $news = $stmt->fetch(); if(empty($news)) header("Location: $routes[news]"); $text = strip_tags($news->content);//Suppression des balises $text = substr($text,0,50);//Longueur du texte $position_espace = strrpos($text, " ");//Position du dernier espace //start_block('title','keywords','description') start_block($news->title,'',substr($text, 0, $position_espace)); ?> <div style="overflow:hidden;"> <?php if (!is_null($news->image)): ?> <div class="pull-right" style='max-width:50%'> <img src="<?=$news->image?>" alt="<?=$news->image?>" class="img-responsive thumbnail"> </div> <?php endif ?> <h1><?=$news->title?></h1> <p class="text-muted"> Ajouté le <?=date("d/m/Y",strtotime($news->update_at))?> <?php if(!empty($news->author)){ if(!empty($news->email)) echo "par <a href='mailto:$news->email'>$news->author</a>"; else echo "par $news->author"; } ?> </p> <br> <?=$news->content?> </div> <hr> <?php require "news-comment.php"; ?> <?php end_block(); ?>