Update 2 files
- /html/editpage.php - /html/journal.php
This commit is contained in:
parent
ce88b209f2
commit
0f636ef360
@ -119,7 +119,7 @@ if(isset($fichier)) {
|
|||||||
echo "</div></div><div>";
|
echo "</div></div><div>";
|
||||||
echo "<div><h2>Articles</h2></div>";
|
echo "<div><h2>Articles</h2></div>";
|
||||||
$bdd = connect($dbhost, $dbname, $dbuser, $dbpass);
|
$bdd = connect($dbhost, $dbname, $dbuser, $dbpass);
|
||||||
$req = $bdd->prepare("SELECT ID, titre, auteur, date FROM articles WHERE role <= :role ORDER BY date DESC LIMIT 10");
|
$req = $bdd->prepare("SELECT ID, titre, auteur, date FROM articles WHERE classification <= :role ORDER BY date DESC LIMIT 10");
|
||||||
$req->bindParam(":role", $_SESSION['role']);
|
$req->bindParam(":role", $_SESSION['role']);
|
||||||
$req->execute();
|
$req->execute();
|
||||||
$resultat = $req->fetchAll(PDO::FETCH_ASSOC);
|
$resultat = $req->fetchAll(PDO::FETCH_ASSOC);
|
||||||
|
@ -55,7 +55,7 @@ if (filter_var($_GET['article'], FILTER_VALIDATE_INT)) {
|
|||||||
echo "</div></div>";
|
echo "</div></div>";
|
||||||
} else {
|
} else {
|
||||||
$bdd = connect($dbhost, $dbname, $dbuser, $dbpass);
|
$bdd = connect($dbhost, $dbname, $dbuser, $dbpass);
|
||||||
$req = $bdd->prepare("SELECT ID, titre, date, auteur FROM articles WHERE role <= :role ORDER BY date DESC");
|
$req = $bdd->prepare("SELECT ID, titre, date, auteur FROM articles WHERE classification <= :role ORDER BY date DESC");
|
||||||
$req->bindParam(":role", $_SESSION['role']);
|
$req->bindParam(":role", $_SESSION['role']);
|
||||||
$req->execute();
|
$req->execute();
|
||||||
$resultat = $req->fetchAll(PDO::FETCH_ASSOC);
|
$resultat = $req->fetchAll(PDO::FETCH_ASSOC);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user