diff --git a/html/editpage.php b/html/editpage.php index ca5baeb6..ec0a9ba3 100644 --- a/html/editpage.php +++ b/html/editpage.php @@ -119,7 +119,7 @@ if(isset($fichier)) { echo "
"; echo "

Articles

"; $bdd = connect($dbhost, $dbname, $dbuser, $dbpass); - $req = $bdd->prepare("SELECT ID, titre, auteur, date FROM articles WHERE classification <= :role ORDER BY date DESC LIMIT 10"); + $req = $bdd->prepare("SELECT ID, titre, auteur, date, classification FROM articles WHERE classification <= :role ORDER BY date DESC LIMIT 10"); $req->bindParam(":role", $_SESSION['role']); $req->execute(); $resultat = $req->fetchAll(PDO::FETCH_ASSOC); @@ -128,7 +128,7 @@ if(isset($fichier)) { if ($resultat) { foreach($resultat as $row) { - echo "

" . $row['titre'] . "

" . $row['auteur'] . "

" . $date->format('d/m/Y') . "
"; + echo "

" . $row['titre'] . "

Classification : " . $classifications[$row['classificaation']] . "

" . $row['auteur'] . "

" . $date->format('d/m/Y') . "
"; } } echo "
"; diff --git a/html/journal.php b/html/journal.php index e8412b6e..7d7505b0 100644 --- a/html/journal.php +++ b/html/journal.php @@ -64,7 +64,7 @@ if (filter_var($_GET['article'], FILTER_VALIDATE_INT)) { if ($resultat) { foreach($resultat as $row) { - echo "

" . $row['titre'] . "

" . $row['auteur'] . "

" . $date->format('d/m/Y') . "
"; + echo "

" . $row['titre'] . "

Classification : " . $classifications[$row['classificaation']] . "

" . $row['auteur'] . "

" . $date->format('d/m/Y') . "
"; } } } diff --git a/html/upload.php b/html/upload.php index 5b0ae6a0..73ac1fa1 100644 --- a/html/upload.php +++ b/html/upload.php @@ -79,7 +79,7 @@ if(isset($_POST['page-content'])) {
- $nom) { echo ''; }?>
diff --git a/html/users.php b/html/users.php new file mode 100644 index 00000000..f175f84e --- /dev/null +++ b/html/users.php @@ -0,0 +1,80 @@ + + + + + + + + + <?=$title?> + + +
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+ prepare("SELECT display_name, username, email, role FROM users ORDER BY creation_date DESC"); + $req->execute(); + $resultat = $req->fetchAll(PDO::FETCH_ASSOC); + + if ($resultat) { + foreach($resultat as $row) { + echo "
" . $row['display_name'] . "
" . $row['username'] . "
" . $row['email'] . "
"; + } + } + ?> +
+
+
+
+ + + \ No newline at end of file