Update file news.php
This commit is contained in:
parent
69bca1d889
commit
0efedc6107
@ -55,7 +55,7 @@ if (filter_var($_GET['article'], FILTER_VALIDATE_INT)) {
|
||||
echo "</div></div>";
|
||||
} else {
|
||||
$bdd = connect($dbhost, $dbname, $dbuser, $dbpass);
|
||||
$req = $bdd->prepare("SELECT ID, titre, date, auteur, classification FROM articles WHERE classification <= :accreditation ORDER BY date DESC");
|
||||
$req = $bdd->prepare("SELECT ID, titre, date, classification FROM articles WHERE classification <= :accreditation ORDER BY date DESC");
|
||||
$req->bindParam(":accreditation", $_SESSION['accreditation']);
|
||||
$req->execute();
|
||||
$resultat = $req->fetchAll(PDO::FETCH_ASSOC);
|
||||
@ -68,7 +68,6 @@ if (filter_var($_GET['article'], FILTER_VALIDATE_INT)) {
|
||||
echo "<a href='?article=" . $row['ID'] . "' class='article-link'>";
|
||||
echo "<div class='article-titre'>" . $row['titre'] . "</div></a>";
|
||||
echo "<div class='article-date'>" . $date->format('d/m/Y') . "</div>";
|
||||
echo "<div class='article-auteur'>" . $row['auteur'] . "</div>";
|
||||
echo "<div class='article-classification'>" . $classifications[(int)$row['classification']] . "</div>";
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user