Fixed /account articles not listing
This commit is contained in:
parent
c6ae14314c
commit
726bdad304
@ -1,11 +1,11 @@
|
||||
[root]
|
||||
pageURL = "http://srv1.intra.e59.fr:8088/"
|
||||
pageURL = "https://e59.fr/"
|
||||
filePath = "/var/www/e59/"
|
||||
|
||||
[sql]
|
||||
databaseName = "E59"
|
||||
databaseUser = "root"
|
||||
databasePass = "Broadca@Storm"
|
||||
databasePass = "Broadca@Storm_SQL"
|
||||
databaseHost = "127.0.0.1"
|
||||
|
||||
[main]
|
||||
|
@ -100,13 +100,12 @@ if (isset($_POST['userDisplayName']) && isset($_POST['userBio'])) {
|
||||
}
|
||||
}
|
||||
|
||||
$request = $pdo->prepare("SELECT ID, username, display_name, profile_picture, banner, bio FROM users WHERE ID = :userID");
|
||||
$request = $pdo->prepare("SELECT username, display_name, profile_picture, banner, bio FROM users WHERE ID = :userID");
|
||||
$request->bindParam(":userID", $_SESSION['userID']);
|
||||
$request->execute();
|
||||
$result = $request->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
if($result) {
|
||||
$userID = $result[0]['ID'];
|
||||
$userName = $result[0]['username'];
|
||||
$userDisplayName = $result[0]['display_name'];
|
||||
$userPPURL = $result[0]['profile_picture'] == NULL ? "https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png" : $result[0]['profile_picture'];
|
||||
@ -227,7 +226,7 @@ if($result) {
|
||||
$search = isset($_GET['search']) ? "%" . htmlspecialchars($_GET['search']) . "%" : "%%";
|
||||
$request = $pdo->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->bindParam(":search", $search);
|
||||
$request->bindParam(":userID", $userID);
|
||||
$request->bindParam(":userID", $_SESSION['userID']);
|
||||
$request->execute();
|
||||
$result = $request->fetchAll(PDO::FETCH_ASSOC);
|
||||
echo ('<h1>Vos articles</h1>');
|
||||
@ -238,7 +237,7 @@ if($result) {
|
||||
|
||||
if ($result) {
|
||||
echo('<div class="articles-list">');
|
||||
listArticles($result, $rootPageURL);
|
||||
listArticles($result, $rootPageURL, $badges);
|
||||
echo ('</div>');
|
||||
} else {
|
||||
echo ('Vous n\'avez publié aucun article...');
|
||||
|
0
include/init.php
Normal file → Executable file
0
include/init.php
Normal file → Executable file
0
include/inputs.php
Normal file → Executable file
0
include/inputs.php
Normal file → Executable file
0
include/objects.php
Normal file → Executable file
0
include/objects.php
Normal file → Executable file
2
include/panels.php
Normal file → Executable file
2
include/panels.php
Normal file → Executable file
@ -1,4 +1,4 @@
|
||||
<?
|
||||
<?php
|
||||
|
||||
function fillHead($rootPageURL, $pageTitle, $darkTheme, $lightTheme) {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user