diff --git a/config/global.ini b/config/global.ini index 2184a306..687913c2 100755 --- a/config/global.ini +++ b/config/global.ini @@ -12,7 +12,7 @@ databaseHost = "127.0.0.1" pageTitle = "Club Réseaux - E59" headerTitle = "E59" headerSubtitle = "Club Réseaux" -footerText = "© Jan BELLON - E59 v1.2" +footerText = "© Jan BELLON - E59 v1.3" [confidentialLevels] 0 = "E59i-P (Public)" diff --git a/html/users/index.php b/html/users/index.php index c390ddbc..f825104e 100755 --- a/html/users/index.php +++ b/html/users/index.php @@ -117,9 +117,10 @@ if(isset($_GET['u']) && empty($_GET['u']) == false) {
prepare("SELECT ID, title, date, miniature, resume FROM articles WHERE (title LIKE :search OR ID LIKE :search) AND author = :userID ORDER BY date DESC"); + $request = $pdo->prepare("SELECT ID, title, date, miniature, resume FROM articles WHERE (title LIKE :search OR ID LIKE :search) AND author = :userID AND classification <= :userLevel ORDER BY date DESC"); $request->bindParam(":search", $search); $request->bindParam(":userID", $userID); + $request->bindParam(":userLevel", $_SESSION['userLevel']); $request->execute(); $result = $request->fetchAll(PDO::FETCH_ASSOC); echo ('

Articles de ' . $userDisplayName . '

');