From 7be3bac167f100342ceeee74624ddbe04c2c0632 Mon Sep 17 00:00:00 2001 From: Guillaume HESS Date: Fri, 13 Feb 2026 11:58:36 +0100 Subject: [PATCH 01/11] =?UTF-8?q?Avancer=20sur=20la=20fonctionnalit=C3=A9?= =?UTF-8?q?=20de=20Cr=C3=A9er/Modifier=20un=20projet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/project_controller.php | 9 +++-- models/project_model.php | 4 +-- ...263fe8f31fee7c6055e56_0.file_login.tpl.php | 10 +++--- ...26123a0c3ef155eae59b_0.file_footer.tpl.php | 6 ++-- ...dd21546b63477a6bc296_0.file_layout.tpl.php | 10 +++--- ...da665dc59ccdf89588f2_0.file_search.tpl.php | 10 +++--- ...533821a89d7d735c5727_0.file_header.tpl.php | 15 ++++---- ...22152a4d410b20abede_0.file_preview.tpl.php | 34 +++++++++++++----- ...f203d582a8cc367e0bd265_0.file_home.tpl.php | 10 +++--- ...6d4c74f4917d3685101_0.file_project.tpl.php | 10 +++--- .../Capture d'écran 2025-11-06 140822.png | Bin 0 -> 239 bytes .../Capture d'écran 2025-11-06 144916.png | Bin 0 -> 54536 bytes 12 files changed, 67 insertions(+), 51 deletions(-) create mode 100644 uploads/projects/Capture d'écran 2025-11-06 140822.png create mode 100644 uploads/projects/Capture d'écran 2025-11-06 144916.png diff --git a/controllers/project_controller.php b/controllers/project_controller.php index 68fca13..9dacb3d 100644 --- a/controllers/project_controller.php +++ b/controllers/project_controller.php @@ -116,6 +116,7 @@ $objImage->hydrate($arrDetImage); $arrImageToDisplay[] = $objImage; } + //Variable data $_SESSION['title'] = $_POST['titleProject']??""; $_SESSION['description'] = $_POST['descProject']??""; @@ -123,11 +124,10 @@ $_SESSION['thumbnail'] = $_FILES['imageThumbnail']['name']??""; $_SESSION['status'] = 'en_attente'; - $objProject = new Project(); /** - * Créer par Besnik le GOAT et l'autre GOAT de Guillaume + * Créer par Besnik le GOAT et Guillaume * * @return bool pour savoir si le fichier existe, * puis déplace vers le fichier uploads avec les images projet des utilisateurs @@ -143,16 +143,14 @@ } /** En cas d'appuis sur le bouton d'envoie ou celui de remettre a plus tard - * 1. Changement de status + * 1. Changement de status ou pas * 2. Hydratation avec les informations récupéré de l'utilisateur * 3. Envoie des données à la BDD */ if (isset($_POST['sendMessage'])) { - $_SESSION['status'] = 'publié'; $objProject->hydrate($_SESSION); $objProject->setThumbnail($strDest); $objProjectModel->insert($objProject); - } else if (isset($_POST['toContinue'])) { $objProject->hydrate($_SESSION); $objProject->setThumbnail($strDest); @@ -161,6 +159,7 @@ var_dump($_SESSION); var_dump($objProject); + $this->_arrData['arrProjectToDiplay'] = $arrProjectToDisplay; $this->_arrData['arrImageToDiplay'] = $arrImageToDisplay; diff --git a/models/project_model.php b/models/project_model.php index d6bce18..53e33aa 100644 --- a/models/project_model.php +++ b/models/project_model.php @@ -23,7 +23,7 @@ CONCAT(user_firstname, ' ', user_name) AS 'project_creatorname', user_image FROM project - INNER JOIN users ON user_id = project_user"; + INNER JOIN users ON user_id = project_user_id"; $strWhere = " WHERE "; @@ -105,7 +105,7 @@ * Fonction de recherche d'un seul projet * @param int $intId * @return array - */ + */ public function findOne(int $intId) :array{ $strRq = "SELECT project.*, CONCAT(users.user_firstname, ' ', users.user_name) AS 'project_creatorname', diff --git a/templates_c/10875d611111c4d51c8263fe8f31fee7c6055e56_0.file_login.tpl.php b/templates_c/10875d611111c4d51c8263fe8f31fee7c6055e56_0.file_login.tpl.php index bfbc150..09c194b 100644 --- a/templates_c/10875d611111c4d51c8263fe8f31fee7c6055e56_0.file_login.tpl.php +++ b/templates_c/10875d611111c4d51c8263fe8f31fee7c6055e56_0.file_login.tpl.php @@ -1,11 +1,11 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_698c9f92453c08_24507694', + 'unifunc' => 'content_698ed4e80d1241_05782427', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -20,18 +20,18 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_698c9f92453c08_24507694 (\Smarty\Template $_smarty_tpl) { +function content_698ed4e80d1241_05782427 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, true); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_2118721076698c9f923fe728_66184593', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_1501214486698ed4e807c474_40846729', "content"); $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); } /* {block "content"} */ -class Block_2118721076698c9f923fe728_66184593 extends \Smarty\Runtime\Block +class Block_1501214486698ed4e807c474_40846729 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views'; diff --git a/templates_c/233722999fd7fbe3307e26123a0c3ef155eae59b_0.file_footer.tpl.php b/templates_c/233722999fd7fbe3307e26123a0c3ef155eae59b_0.file_footer.tpl.php index 75f1c80..0cbe0cf 100644 --- a/templates_c/233722999fd7fbe3307e26123a0c3ef155eae59b_0.file_footer.tpl.php +++ b/templates_c/233722999fd7fbe3307e26123a0c3ef155eae59b_0.file_footer.tpl.php @@ -1,11 +1,11 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_698c9fd53aaff8_74186876', + 'unifunc' => 'content_698ee54027c692_47294813', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_698c9fd53aaff8_74186876 (\Smarty\Template $_smarty_tpl) { +function content_698ee54027c692_47294813 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views\\_partial'; ?>