diff --git a/app/entities/project_entity.php b/app/entities/project_entity.php index 291bc43..ab9047e 100644 --- a/app/entities/project_entity.php +++ b/app/entities/project_entity.php @@ -17,6 +17,7 @@ class Project extends Entity{ private int $_user; private int $_category; private string $_creatorname; + private string $_user_image; /** @@ -199,5 +200,21 @@ class Project extends Entity{ public function setCreatorName($creatorname){ $this->_creatorname = $creatorname; } + /** + * Récupération du chemin photo profil + * @return string nom du chemin photo profil + */ + public function getUser_image(){ + return $this->_user_image; + } + + /** + * Mise à jour du chemin photo profil + * @param string chemin photo profil + */ + public function setUser_image($user_image){ + $this->_user_image = $user_image; + } + } \ No newline at end of file diff --git a/app/models/project_model.php b/app/models/project_model.php index a01393d..14251fe 100644 --- a/app/models/project_model.php +++ b/app/models/project_model.php @@ -9,7 +9,8 @@ // Ecrire la requête $strRq = "SELECT project.*, - CONCAT(user_firstname, ' ', user_name) AS 'project_creatorname' + CONCAT(user_firstname, ' ', user_name) AS 'project_creatorname', + user_image FROM project INNER JOIN users ON user_id = project_user"; // Pour le where (un seul) diff --git a/app/models/user_model.php b/app/models/user_model.php index 808bd93..1cf56d2 100644 --- a/app/models/user_model.php +++ b/app/models/user_model.php @@ -20,7 +20,7 @@ */ public function findAllUsers():array{ // Ecrire la requête - $strRq = "SELECT user_id, user_firstname, user_name + $strRq = "SELECT user_id, user_firstname, user_name, user_image FROM users "; // Lancer la requête et récupérer les résultats return $this->_db->query($strRq)->fetchAll(); @@ -33,16 +33,16 @@ */ public function verifUser(string $strMail, string $strPwd):array|bool{ // 2. Construire la requête - $strRq = "SELECT user_id, user_name, user_firstname, user_pwd + $strRq = "SELECT user_id, user_name, user_firstname, user_password, user_image FROM users WHERE user_mail = '".$strMail."'"; // Récupère mon utilisateur // Executer la requête et récupérer les résultats $arrUser = $this->_db->query($strRq)->fetch(); // Vérification du mot de passe haché - if (password_verify($strPwd, $arrUser['user_pwd'])){ + if (password_verify($strPwd, $arrUser['user_password'])){ // Renvoi l'utilisateur - unset($arrUser['user_pwd']); // on enlève le pwd + unset($arrUser['user_password']); // on enlève le pwd return $arrUser; }else{ return false; diff --git a/app/views/home.php b/app/views/home.php index b1f4eb7..1f0fff6 100644 --- a/app/views/home.php +++ b/app/views/home.php @@ -13,5 +13,5 @@ foreach($arrProjectToDiplay as $objProject){ include("../app/views/partials/project.php"); } - ?> + ?> \ No newline at end of file diff --git a/app/views/partials/header.php b/app/views/partials/header.php index c4136df..b12aef4 100644 --- a/app/views/partials/header.php +++ b/app/views/partials/header.php @@ -44,17 +44,41 @@ - + \ No newline at end of file diff --git a/app/views/partials/project.php b/app/views/partials/project.php index 1c72d94..1cfefba 100644 --- a/app/views/partials/project.php +++ b/app/views/partials/project.php @@ -1,19 +1,38 @@ -
-
-
-

getTitle(); ?>

-
- - - getCreatorname(); ?> -
-

getDescription(); ?>

- - Lire la suite - - -
-
- +
+
+ + +
+
+ +
+ + + Photo de profil + + +
+

getTitle(); ?>

+ + + + – getCreatorname(); ?> + + + + Lire la suite → + +
+ +
+
diff --git a/public/assests/css/style.css b/public/assests/css/style.css index 7ceaf32..74cb2d6 100644 --- a/public/assests/css/style.css +++ b/public/assests/css/style.css @@ -81,4 +81,18 @@ body { -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; -} \ No newline at end of file +} + +.article-card { + height: 400px; +} + +.article-img { + height: 50px; + width: 100%; + overflow: hidden; +} +.article-content { + height: 20%; + padding: 0.75rem; +} diff --git a/public/uploads/profiles/Logo.png b/public/uploads/profiles/Logo.png new file mode 100644 index 0000000..ba0b4fe Binary files /dev/null and b/public/uploads/profiles/Logo.png differ diff --git a/public/uploads/profiles/marie.jpg b/public/uploads/profiles/marie.jpg new file mode 100644 index 0000000..2dee9e2 Binary files /dev/null and b/public/uploads/profiles/marie.jpg differ diff --git a/public/uploads/profiles/sophie.jpg b/public/uploads/profiles/sophie.jpg new file mode 100644 index 0000000..5ca533e Binary files /dev/null and b/public/uploads/profiles/sophie.jpg differ diff --git a/public/uploads/profiles/thomas.jpg b/public/uploads/profiles/thomas.jpg new file mode 100644 index 0000000..051578c Binary files /dev/null and b/public/uploads/profiles/thomas.jpg differ