Update 2 files
- /html/admin.php - /html/editpage.php
This commit is contained in:
parent
020b330238
commit
98b910b54f
@ -2,7 +2,7 @@
|
|||||||
require "../include/variables.php";
|
require "../include/variables.php";
|
||||||
require "../include/functions.php";
|
require "../include/functions.php";
|
||||||
|
|
||||||
if($_SESSION['role'] < 3) {
|
if($_SESSION['role'] < 1) {
|
||||||
header("Location: index.php");
|
header("Location: index.php");
|
||||||
http_response_code(404);
|
http_response_code(404);
|
||||||
die();
|
die();
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
require "../include/variables.php";
|
require "../include/variables.php";
|
||||||
require "../include/functions.php";
|
require "../include/functions.php";
|
||||||
|
|
||||||
if($_SESSION['role'] < 2) {
|
if($_SESSION['role'] < 1) {
|
||||||
header("Location: index.php");
|
header("Location: index.php");
|
||||||
http_response_code(404);
|
http_response_code(404);
|
||||||
die();
|
die();
|
||||||
@ -225,8 +225,8 @@ if(isset($fichier)) {
|
|||||||
$search = "%" . htmlspecialchars($_GET['search']) . "%";
|
$search = "%" . htmlspecialchars($_GET['search']) . "%";
|
||||||
$condition = "AND (titre LIKE '" . $search . "' OR ID LIKE '" . $search . "' OR auteur LIKE '" . $search . "') ";
|
$condition = "AND (titre LIKE '" . $search . "' OR ID LIKE '" . $search . "' OR auteur LIKE '" . $search . "') ";
|
||||||
}
|
}
|
||||||
$req = $bdd->prepare("SELECT ID, titre, date, image, resume FROM articles WHERE classification <= :accreditation " . $condition . "ORDER BY date DESC LIMIT 10");
|
$req = $bdd->prepare("SELECT ID, titre, date, image, resume FROM articles WHERE auteur = :user_id AND IORDER BY date DESC LIMIT 10");
|
||||||
$req->bindParam(":accreditation", $_SESSION['accreditation']);
|
$req->bindParam(":user_id", $_SESSION['userid']);
|
||||||
$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