From 2535d13d7c7316385dfe53ed237afbba03be0e50 Mon Sep 17 00:00:00 2001 From: "laura.chevillet" Date: Mon, 9 Feb 2026 13:35:44 +0100 Subject: [PATCH 01/22] =?UTF-8?q?r=C3=A9cup=C3=A9ration=20du=20back=20up?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/admin_controller.php | 1 - models/category_model.php | 50 +++- ...af2d8a8255035d91b950_0.file_layout.tpl.php | 50 ++++ ...3f0963ead4008a7bda8fb_0.file_admin.tpl.php | 230 +++++++++++++++ ...809f87f59bd19d86da99_0.file_footer.tpl.php | 63 +++++ ...531347290b4e4994470b_0.file_header.tpl.php | 115 ++++++++ ...7634a5658ae38c7b520_0.file_preview.tpl.php | 69 +++++ ...f497c64277110a78bc40_0.file_search.tpl.php | 261 ++++++++++++++++++ views/admin.tpl | 9 +- views/home.tpl | 12 + 10 files changed, 852 insertions(+), 8 deletions(-) create mode 100644 templates_c/947d9aa54bf412a952e2af2d8a8255035d91b950_0.file_layout.tpl.php create mode 100644 templates_c/ac77f39f91cdf26a0eb3f0963ead4008a7bda8fb_0.file_admin.tpl.php create mode 100644 templates_c/b1b065356827f03a32a2809f87f59bd19d86da99_0.file_footer.tpl.php create mode 100644 templates_c/b3c0a235f975d8741b25531347290b4e4994470b_0.file_header.tpl.php create mode 100644 templates_c/b70ee0d22061ca6100f647634a5658ae38c7b520_0.file_preview.tpl.php create mode 100644 templates_c/ebfd968608976813e893f497c64277110a78bc40_0.file_search.tpl.php diff --git a/controllers/admin_controller.php b/controllers/admin_controller.php index 63e92a1..ea4ee7b 100644 --- a/controllers/admin_controller.php +++ b/controllers/admin_controller.php @@ -54,7 +54,6 @@ $arrCategoryToDisplay[] = $objCategory; } - // Il faudra donner à maman et gérer l'affichage quand Smarty sera prêt $this->_arrData['arrCategoryToDisplay'] = $arrCategoryToDisplay; //$this->_arrData['intCategory'] = $objCategoryModel->; $this->_display("admin"); diff --git a/models/category_model.php b/models/category_model.php index 6432a9a..a23907e 100644 --- a/models/category_model.php +++ b/models/category_model.php @@ -27,21 +27,59 @@ /** * fonction d'insertion d'une nouvelle catégorie dans la bdd - * @param object $objUser L'objet utilisateur + * @param object $objCategory l'objet catégorie * @return bool Est-ce que la requête s'est bien passée (true/false) */ - public function insert(object $objCategory):bool{ + public function insertCategory(object $objCategory):bool{ - $strRq = "INSERT INTO category (category_name, category_parent) - VALUES (:name, :parent)"; + $strRq = "INSERT INTO category (category_name) + VALUES (:name)"; $rqPrep = $this->_db->prepare($strRq); $rqPrep->bindValue(":name", $objCategory->getName(), PDO::PARAM_STR); - $rqPrep->bindValue(":parent", $objCategory->getParent(), PDO::PARAM_STR); return $rqPrep->execute(); } - } \ No newline at end of file + + /** + * fonction de suppression d'une catégorie dans la bdd + * @param object $objCategory l'objet catégorie + * @return bool Est-ce que la requête s'est bien passée (true/false) + */ + + public function deleteCategory(object $objCategory):bool{ + + $strRq = "DELETE FROM category + WHERE category_id= :id"; + + $rqPrep = $this->_db->prepare($strRq); + + $rqPrep->bindValue(":id", $objCategory->getId(), PDO::PARAM_INT); + + return $rqPrep->execute(); + } + + /** + * fonction de modification d'une catégorie dans la bdd + * @param object $objCategory l'objet catégorie + * @return bool Est-ce que la requête s'est bien passée (true/false) + */ + + public function editCategory(object $objCategory):bool{ + + $strRq = "UPDATE category + SET category_name = :name + WHERE category_id = :id"; + + $rqPrep = $this->_db->prepare($strRq); + + $rqPrep->bindValue(":id", $objCategory->getId(), PDO::PARAM_INT); + $rqPrep->bindValue(":name", $objCategory->getName(), PDO::PARAM_STR); + + return $rqPrep->execute(); + } + } + \ No newline at end of file diff --git a/templates_c/947d9aa54bf412a952e2af2d8a8255035d91b950_0.file_layout.tpl.php b/templates_c/947d9aa54bf412a952e2af2d8a8255035d91b950_0.file_layout.tpl.php new file mode 100644 index 0000000..90efc5c --- /dev/null +++ b/templates_c/947d9aa54bf412a952e2af2d8a8255035d91b950_0.file_layout.tpl.php @@ -0,0 +1,50 @@ +getCompiled()->isFresh($_smarty_tpl, array ( + 'version' => '5.7.0', + 'unifunc' => 'content_6989d31d7d28c9_01506908', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + '947d9aa54bf412a952e2af2d8a8255035d91b950' => + array ( + 0 => 'views/layout.tpl', + 1 => 1770634036, + 2 => 'file', + ), + ), + 'includes' => + array ( + 'file:views/_partial/header.tpl' => 1, + 'file:views/_partial/footer.tpl' => 1, + ), +))) { +function content_6989d31d7d28c9_01506908 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; +$_smarty_tpl->getInheritance()->init($_smarty_tpl, false); +$_smarty_tpl->renderSubTemplate("file:views/_partial/header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir); +?> + +getInheritance()->instanceBlock($_smarty_tpl, 'Block_8131712286989d31d7cfb58_06071603', "content"); +?> + + +renderSubTemplate("file:views/_partial/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir); +} +/* {block "content"} */ +class Block_8131712286989d31d7cfb58_06071603 extends \Smarty\Runtime\Block +{ +public function callBlock(\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; +?> + + +getCompiled()->isFresh($_smarty_tpl, array ( + 'version' => '5.7.0', + 'unifunc' => 'content_6989d31d65c3a2_79771570', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + 'ac77f39f91cdf26a0eb3f0963ead4008a7bda8fb' => + array ( + 0 => 'views/admin.tpl', + 1 => 1770640156, + 2 => 'file', + ), + ), + 'includes' => + array ( + ), +))) { +function content_6989d31d65c3a2_79771570 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; +$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); +?> + + +getInheritance()->instanceBlock($_smarty_tpl, 'Block_20302301596989d31d64f310_54306383', "content"); +$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); +} +/* {block "content"} */ +class Block_20302301596989d31d64f310_54306383 extends \Smarty\Runtime\Block +{ +public function callBlock(\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; +?> + + +
+ + + +
+
+ +
+ +
+
+
+

Dashboard

+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+
+ +
+ +
+
+ +
+
+ +
+
+
+
+
+
+ +
+ +
+ + +
+
+
+ +
+
+
+
+
+
+
+
+
+ +getCompiled()->isFresh($_smarty_tpl, array ( + 'version' => '5.7.0', + 'unifunc' => 'content_6989d1dc7c08f9_74223007', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + 'b1b065356827f03a32a2809f87f59bd19d86da99' => + array ( + 0 => 'views/_partial/footer.tpl', + 1 => 1770634036, + 2 => 'file', + ), + ), + 'includes' => + array ( + ), +))) { +function content_6989d1dc7c08f9_74223007 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views\\_partial'; +?> + + + src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"> +> + + src="js/scripts.js"> +> + +getCompiled()->isFresh($_smarty_tpl, array ( + 'version' => '5.7.0', + 'unifunc' => 'content_6989d31d88f180_59508135', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + 'b3c0a235f975d8741b25531347290b4e4994470b' => + array ( + 0 => 'views/_partial/header.tpl', + 1 => 1770634036, + 2 => 'file', + ), + ), + 'includes' => + array ( + ), +))) { +function content_6989d31d88f180_59508135 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views\\_partial'; +?> + + + + + + + + + src="https://use.fontawesome.com/releases/v6.3.0/js/all.js" crossorigin="anonymous"> +> + Folliow + + + + +getCompiled()->isFresh($_smarty_tpl, array ( + 'version' => '5.7.0', + 'unifunc' => 'content_6989d1dc613786_88061115', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + 'b70ee0d22061ca6100f647634a5658ae38c7b520' => + array ( + 0 => 'views/_partial/preview.tpl', + 1 => 1770634036, + 2 => 'file', + ), + ), + 'includes' => + array ( + ), +))) { +function content_6989d1dc613786_88061115 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views\\_partial'; +?> + + +
+
+ +
+ +
+ +
+ + Photo de profil + +
+

getValue('objProject')->getTitle();?> +

+ + + + – getValue('objProject')->getCreatorname();?> + + + + + Lire la suite → + +
+ +
+ +
+
getCompiled()->isFresh($_smarty_tpl, array ( + 'version' => '5.7.0', + 'unifunc' => 'content_6989d1dc059b91_90143315', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + 'ebfd968608976813e893f497c64277110a78bc40' => + array ( + 0 => 'views/search.tpl', + 1 => 1770634036, + 2 => 'file', + ), + ), + 'includes' => + array ( + 'file:views/_partial/preview.tpl' => 1, + ), +))) { +function content_6989d1dc059b91_90143315 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; +$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); +?> + + +getInheritance()->instanceBlock($_smarty_tpl, 'Block_10870486496989d1dbe65e81_99494215', "content"); +$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); +} +/* {block "content"} */ +class Block_10870486496989d1dbe65e81_99494215 extends \Smarty\Runtime\Block +{ +public function callBlock(\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; +?> + +
+

Rechercher parmi les articles

+
+
+
+

+ + Rechercher des articles +

+ +
+
+ + + + Recherchez dans les titres et contenus + +
+ +
+ + +
+ + +
+
+ Type de recherche par date +
+ getValue('intPeriod') == 0) {?>checked + aria-controls="date-exact date-range"> + +
+
+ getValue('intPeriod') == 1) {?>checked + aria-controls="date-exact date-range"> + +
+
+
+ +
+
+ Type de recherche par catégories +
+ + +
+
+
+ +
+ + + + Format: JJ/MM/AAAA + +
+ + + +
+ + +
+
+
+
+ + +
+

Liste des projets

+
+ getSmarty()->getModifierCallback('count')($_smarty_tpl->getValue('arrProject')) == 0) {?> +
+

Pas de résultats

+
+ + getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrProjectToDisplay'), 'objProject'); +$foreach2DoElse = true; +foreach ($_from ?? [] as $_smarty_tpl->getVariable('objProject')->value) { +$foreach2DoElse = false; +?> + renderSubTemplate("file:views/_partial/preview.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir); +?> + getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?> +
+
+
+
+ +> + // Gestion de l'affichage des champs de date + const periodRadios = document.querySelectorAll('input[name="period"]'); + const dateExact = document.getElementById('date-exact'); + const dateRange = document.getElementById('date-range'); + + function toggleDateFields() { + const selectedPeriod = document.querySelector('input[name="period"]:checked').value; + + if (selectedPeriod === '0') { + dateExact.style.display = 'block'; + dateRange.style.display = 'none'; + } else { + dateExact.style.display = 'none'; + dateRange.style.display = 'block'; + } + } + + periodRadios.forEach(radio => { + radio.addEventListener('change', toggleDateFields); + }); + + // Initialisation au chargement + toggleDateFields(); + +> + - +
+
+ + +
+ + +
+ + +
+
+ + +
+
+ + +
+ +
+ + +
+ + Pas encore de compte ? + Créer un compte + +
+ + + + +
+ + +
+ +
+ + + +getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989d31d7d28c9_01506908', + 'unifunc' => 'content_6989e0891f99a9_84268185', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -22,21 +22,21 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( 'file:views/_partial/footer.tpl' => 1, ), ))) { -function content_6989d31d7d28c9_01506908 (\Smarty\Template $_smarty_tpl) { +function content_6989e0891f99a9_84268185 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, false); $_smarty_tpl->renderSubTemplate("file:views/_partial/header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_8131712286989d31d7cfb58_06071603', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_1226719426989e0891f66b5_10703637', "content"); ?> renderSubTemplate("file:views/_partial/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir); } /* {block "content"} */ -class Block_8131712286989d31d7cfb58_06071603 extends \Smarty\Runtime\Block +class Block_1226719426989e0891f66b5_10703637 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; diff --git a/templates_c/ac77f39f91cdf26a0eb3f0963ead4008a7bda8fb_0.file_admin.tpl.php b/templates_c/ac77f39f91cdf26a0eb3f0963ead4008a7bda8fb_0.file_admin.tpl.php index f674aeb..d200d8c 100644 --- a/templates_c/ac77f39f91cdf26a0eb3f0963ead4008a7bda8fb_0.file_admin.tpl.php +++ b/templates_c/ac77f39f91cdf26a0eb3f0963ead4008a7bda8fb_0.file_admin.tpl.php @@ -1,18 +1,18 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989d31d65c3a2_79771570', + 'unifunc' => 'content_6989e088f38338_64666135', 'has_nocache_code' => false, 'file_dependency' => array ( 'ac77f39f91cdf26a0eb3f0963ead4008a7bda8fb' => array ( 0 => 'views/admin.tpl', - 1 => 1770640156, + 1 => 1770643565, 2 => 'file', ), ), @@ -20,18 +20,18 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_6989d31d65c3a2_79771570 (\Smarty\Template $_smarty_tpl) { +function content_6989e088f38338_64666135 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, true); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_20302301596989d31d64f310_54306383', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_19184882506989e088f2e080_15773704', "content"); $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); } /* {block "content"} */ -class Block_20302301596989d31d64f310_54306383 extends \Smarty\Runtime\Block +class Block_19184882506989e088f2e080_15773704 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; @@ -108,9 +108,9 @@ $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; @@ -152,52 +152,30 @@ $_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
-
- + + getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrCategoryToDisplay'), 'category'); $foreach1DoElse = true; -foreach ($_from ?? [] as $_smarty_tpl->getVariable('arrDetCategory')->value) { +foreach ($_from ?? [] as $_smarty_tpl->getVariable('category')->value) { $foreach1DoElse = false; ?> - - + getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?> - - getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrCategoryToDisplay'), 'arrDetCategory'); -$foreach2DoElse = true; -foreach ($_from ?? [] as $_smarty_tpl->getVariable('arrDetCategory')->value) { -$foreach2DoElse = false; -?> - - getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?> - -
- -
-
+ +
+ -
-
- -
+ +


@@ -205,14 +183,16 @@ $_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
- -
- - -
-
-
- +
+ +
+ + +
+
+ +
+
diff --git a/templates_c/b1b065356827f03a32a2809f87f59bd19d86da99_0.file_footer.tpl.php b/templates_c/b1b065356827f03a32a2809f87f59bd19d86da99_0.file_footer.tpl.php index bde3315..7788209 100644 --- a/templates_c/b1b065356827f03a32a2809f87f59bd19d86da99_0.file_footer.tpl.php +++ b/templates_c/b1b065356827f03a32a2809f87f59bd19d86da99_0.file_footer.tpl.php @@ -1,11 +1,11 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989d1dc7c08f9_74223007', + 'unifunc' => 'content_6989e0893afd86_56926620', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_6989d1dc7c08f9_74223007 (\Smarty\Template $_smarty_tpl) { +function content_6989e0893afd86_56926620 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views\\_partial'; ?>
diff --git a/templates_c/b3c0a235f975d8741b25531347290b4e4994470b_0.file_header.tpl.php b/templates_c/b3c0a235f975d8741b25531347290b4e4994470b_0.file_header.tpl.php index 2037e59..ea41c4f 100644 --- a/templates_c/b3c0a235f975d8741b25531347290b4e4994470b_0.file_header.tpl.php +++ b/templates_c/b3c0a235f975d8741b25531347290b4e4994470b_0.file_header.tpl.php @@ -1,11 +1,11 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989d31d88f180_59508135', + 'unifunc' => 'content_6989e0892c1ac1_16523199', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_6989d31d88f180_59508135 (\Smarty\Template $_smarty_tpl) { +function content_6989e0892c1ac1_16523199 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views\\_partial'; ?> diff --git a/templates_c/b70ee0d22061ca6100f647634a5658ae38c7b520_0.file_preview.tpl.php b/templates_c/b70ee0d22061ca6100f647634a5658ae38c7b520_0.file_preview.tpl.php index fa77fa8..a805224 100644 --- a/templates_c/b70ee0d22061ca6100f647634a5658ae38c7b520_0.file_preview.tpl.php +++ b/templates_c/b70ee0d22061ca6100f647634a5658ae38c7b520_0.file_preview.tpl.php @@ -1,11 +1,11 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989d1dc613786_88061115', + 'unifunc' => 'content_6989e02ebdb495_34139226', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_6989d1dc613786_88061115 (\Smarty\Template $_smarty_tpl) { +function content_6989e02ebdb495_34139226 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views\\_partial'; ?> diff --git a/templates_c/ca790de9f8d5a4fc03b03b8d137ec1edb99bdd92_0.file_home.tpl.php b/templates_c/ca790de9f8d5a4fc03b03b8d137ec1edb99bdd92_0.file_home.tpl.php new file mode 100644 index 0000000..d2cd1e7 --- /dev/null +++ b/templates_c/ca790de9f8d5a4fc03b03b8d137ec1edb99bdd92_0.file_home.tpl.php @@ -0,0 +1,83 @@ +getCompiled()->isFresh($_smarty_tpl, array ( + 'version' => '5.7.0', + 'unifunc' => 'content_6989e02e94a704_31389377', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + 'ca790de9f8d5a4fc03b03b8d137ec1edb99bdd92' => + array ( + 0 => 'views/home.tpl', + 1 => 1770639710, + 2 => 'file', + ), + ), + 'includes' => + array ( + 'file:views/_partial/preview.tpl' => 1, + ), +))) { +function content_6989e02e94a704_31389377 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; +$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); +?> + + +getInheritance()->instanceBlock($_smarty_tpl, 'Block_6558155986989e02e945ff4_36336799', "content"); +?> + +getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); +} +/* {block "content"} */ +class Block_6558155986989e02e945ff4_36336799 extends \Smarty\Runtime\Block +{ +public function callBlock(\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; +?> + +
+

Folliow

+

Là où les talents rencontrent leur avenir

+

Une plateforme de portfolio adapté à vos besoins et aux besoins des entreprises. + Créer un portfolio réellement pertinent aux exigences du marché et rentrez + directement en contact avec les entreprises.

+
+ + +
+
+
+ + + + +
+
+
+ +
+

Les 4 derniers articles

+
+ + getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrProjectToDisplay'), 'objProject'); +$foreach0DoElse = true; +foreach ($_from ?? [] as $_smarty_tpl->getVariable('objProject')->value) { +$foreach0DoElse = false; +?> + renderSubTemplate("file:views/_partial/preview.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir); +?> + getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?> +
+getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989d1dc059b91_90143315', + 'unifunc' => 'content_6989e01e399336_22269044', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -21,18 +21,18 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( 'file:views/_partial/preview.tpl' => 1, ), ))) { -function content_6989d1dc059b91_90143315 (\Smarty\Template $_smarty_tpl) { +function content_6989e01e399336_22269044 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, true); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_10870486496989d1dbe65e81_99494215', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_17525989336989e01e3837e7_64042990', "content"); $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); } /* {block "content"} */ -class Block_10870486496989d1dbe65e81_99494215 extends \Smarty\Runtime\Block +class Block_17525989336989e01e3837e7_64042990 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; diff --git a/views/admin.tpl b/views/admin.tpl index b4c18f9..30d2697 100644 --- a/views/admin.tpl +++ b/views/admin.tpl @@ -72,8 +72,7 @@
@@ -106,34 +105,21 @@
-
- + + {foreach from=$arrCategoryToDisplay item=category} + {/foreach} - - {foreach from=$arrCategoryToDisplay item=arrDetCategory} - - {/foreach} - -
- -
-
+ +
+ -
-
- -
+ +


@@ -141,14 +127,16 @@
- -
- - -
-
-
- +
+ +
+ + +
+
+ +
+
From 3af2e8a0567221eccbf15e0eac5fa3854db1039b Mon Sep 17 00:00:00 2001 From: "laura.chevillet" Date: Mon, 9 Feb 2026 16:03:51 +0100 Subject: [PATCH 03/22] =?UTF-8?q?Cr=C3=A9ation=20entity=20et=20model=20d'a?= =?UTF-8?q?uthorisation.=20Cr=C3=A9ation=20de=20toute=20la=20fonctionnalit?= =?UTF-8?q?=C3=A9=20de=20modifier=20le=20statut=20et=20supprimer=20un=20us?= =?UTF-8?q?er=20ok=20fonction=20et=20verif=20bdd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/admin_controller.php | 54 ++++- entities/authorisation_entity.php | 24 ++ models/authorisation_model.php | 29 +++ models/user_model.php | 45 +++- ...429efee0d6437582d377e_0.file_login.tpl.php | 10 +- ...af2d8a8255035d91b950_0.file_layout.tpl.php | 10 +- ...3f0963ead4008a7bda8fb_0.file_admin.tpl.php | 68 ++++-- ...809f87f59bd19d86da99_0.file_footer.tpl.php | 6 +- ...531347290b4e4994470b_0.file_header.tpl.php | 6 +- ...7634a5658ae38c7b520_0.file_preview.tpl.php | 6 +- ...b03b8d137ec1edb99bdd92_0.file_home.tpl.php | 10 +- ...f497c64277110a78bc40_0.file_search.tpl.php | 10 +- ...66afa34a71b920e_0.file_inscription.tpl.php | 218 ++++++++++++++++++ views/admin.tpl | 36 +-- 14 files changed, 456 insertions(+), 76 deletions(-) create mode 100644 entities/authorisation_entity.php create mode 100644 models/authorisation_model.php create mode 100644 templates_c/ee86afd5d4dff200944f3436866afa34a71b920e_0.file_inscription.tpl.php diff --git a/controllers/admin_controller.php b/controllers/admin_controller.php index 9b38286..8e4a509 100644 --- a/controllers/admin_controller.php +++ b/controllers/admin_controller.php @@ -8,6 +8,8 @@ require("./entities/image_entity.php"); require("./models/user_model.php"); require("./entities/user_entity.php"); + require("./models/authorisation_model.php"); + require("./entities/authorisation_entity.php"); require("mother_controller.php"); /** @@ -23,6 +25,8 @@ header("Location:index.php?ctrl=error&action=error_403"); exit; } + + //gestion de l'user $objCategoryModel = new CategoryModel; if (!empty($_POST['new_category'])) { @@ -42,6 +46,7 @@ exit; } + //affichage select des catégories $arrCategory = $objCategoryModel->findAllCategory(); $arrCategoryToDisplay = array(); @@ -50,9 +55,56 @@ $objCategory->hydrate($arrDetCategory); $arrCategoryToDisplay[] = $objCategory; } + + //gestion de l'user + $objUserModel = new UserModel; + + if (!empty($_POST['action'])) { + $intUserId = (int)$_POST['user_id']; + + if ($intUserId > 0) { + if ($_POST['action'] === 'update_status' && !empty($_POST['new_status'])) { + $objUser = new User(); + $objUser->setId($intUserId); + $objUser->setStatus((int)$_POST['new_status']); + if ($objUserModel->editStatus($objUser)) { + $_SESSION['message_success'] = "Le statut a bien été modifié !"; + } + } + elseif ($_POST['action'] === 'delete_user') { + $objUserModel->delete_soft($intUserId); + $_SESSION['message_success'] = "L'utilisateur a été supprimé."; + } + header("Location: index.php?ctrl=admin&action=admin"); + exit; + } + } + + //affichage select des users + $arrUser = $objUserModel->findAllUsers(); + $arrUserToDisplay = array(); + + foreach($arrUser as $arrDetUser){ + $objUser = new User; + $objUser->hydrate($arrDetUser); + $arrUserToDisplay[] = $objUser; + } + + //affichage select des authorisations + $objAuthorisationModel = new AuthorisationModel; + $arrAuthorisation = $objAuthorisationModel->findAllAuthorisation(); + $arrAuthorisationToDisplay = array(); + + foreach($arrAuthorisation as $arrDetAuthorisation){ + $objAuthorisation = new Authorisation; + $objAuthorisation->hydrate($arrDetAuthorisation); + $arrAuthorisationToDisplay[] = $objAuthorisation; + } //gérer l'affichage - $this->_arrData['arrCategoryToDisplay'] = $arrCategoryToDisplay; + $this->_arrData['arrCategoryToDisplay'] = $arrCategoryToDisplay; + $this->_arrData['arrUserToDisplay'] = $arrUserToDisplay; + $this->_arrData['arrAuthorisationToDisplay'] = $arrAuthorisationToDisplay; $this->_display("admin"); } } diff --git a/entities/authorisation_entity.php b/entities/authorisation_entity.php new file mode 100644 index 0000000..1cb600b --- /dev/null +++ b/entities/authorisation_entity.php @@ -0,0 +1,24 @@ +_prefix = 'authorisation_'; + } + + public function getId():int{ + return $this->_id; + } + public function setId(int $id){ + $this->_id = $id; + } + + public function getName():string{ + return $this->_name; + } + + } \ No newline at end of file diff --git a/models/authorisation_model.php b/models/authorisation_model.php new file mode 100644 index 0000000..84a3dd6 --- /dev/null +++ b/models/authorisation_model.php @@ -0,0 +1,29 @@ +_db->query($strRq)->fetchAll(); + } + + } \ No newline at end of file diff --git a/models/user_model.php b/models/user_model.php index 72f1ada..fd682e7 100644 --- a/models/user_model.php +++ b/models/user_model.php @@ -22,7 +22,8 @@ public function findAllUsers():array{ // Ecrire la requête $strRq = "SELECT user_id, user_firstname, user_name, user_image, user_status, authorisation_name - FROM users INNER JOIN authorisation ON authorisation.authorisation_id = users.user_status"; + FROM users INNER JOIN authorisation ON authorisation.authorisation_id = users.user_status + WHERE user_deleted_at IS NULL"; // Lancer la requête et récupérer les résultats return $this->_db->query($strRq)->fetchAll(); } @@ -50,7 +51,6 @@ } } - //public function insert(string $strName, string $strFirstname, string $strMail, string $strPwd):int{ /** * Fonction d'insertion d'un utilisateur en BDD * @param object $objUser L'objet utilisateur @@ -75,13 +75,10 @@ $rqPrep->bindValue(':location', $objUser->getLocation() ?? "", PDO::PARAM_STR); $rqPrep->bindValue(':description', $objUser->getDescription() ?? "", PDO::PARAM_STR); - - - // 3. Executer la requête - //var_dump($strRq);die; - //return $db->exec($strRq); return $rqPrep->execute(); } + + public function mailExists(string $mail): bool { $rq = $this->_db->prepare("SELECT 1 FROM users WHERE user_mail = :mail LIMIT 1"); @@ -90,4 +87,38 @@ return (bool)$rq->fetchColumn(); } + + /** + * Fonction de changement de status d'un utilisateur + * @param object $objUser L'objet utilisateur + * @return bool Est-ce que la requête s'est bien passée (true/false) + */ + + public function editStatus(object $objUser):bool{ + + $strRq = "UPDATE users + SET user_status = :status + WHERE user_id = :id"; + + $rqPrep = $this->_db->prepare($strRq); + $rqPrep->bindValue(":id", $objUser->getId(), PDO::PARAM_INT); + $rqPrep->bindValue(":status", $objUser->getStatus(), PDO::PARAM_INT); + return $rqPrep->execute(); + } + + /** + * Fonction permettant de supprimer un utilisateur avec une date de suppression + * @param int $intId L'identifiant de l'utilisateur + * @return bool Est-ce que la requête s'est bien passée (true/false) + */ + public function delete_soft(int $intId):bool{ + + $strRq = "UPDATE users + SET user_deleted_at = NOW() + WHERE user_id = :id"; + + $rqPrep = $this->_db->prepare($strRq); + $rqPrep->bindValue(":id", $intId, PDO::PARAM_INT); + return $rqPrep->execute(); + } } diff --git a/templates_c/5375cd75c92fd8c801b429efee0d6437582d377e_0.file_login.tpl.php b/templates_c/5375cd75c92fd8c801b429efee0d6437582d377e_0.file_login.tpl.php index c008541..272b1ad 100644 --- a/templates_c/5375cd75c92fd8c801b429efee0d6437582d377e_0.file_login.tpl.php +++ b/templates_c/5375cd75c92fd8c801b429efee0d6437582d377e_0.file_login.tpl.php @@ -1,11 +1,11 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989df814ecac5_82975272', + 'unifunc' => 'content_6989f5152cc653_86103445', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -20,18 +20,18 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_6989df814ecac5_82975272 (\Smarty\Template $_smarty_tpl) { +function content_6989f5152cc653_86103445 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, true); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_10819558166989df814817a5_66837906', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_15010700106989f5152c2920_08155243', "content"); $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); } /* {block "content"} */ -class Block_10819558166989df814817a5_66837906 extends \Smarty\Runtime\Block +class Block_15010700106989f5152c2920_08155243 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; diff --git a/templates_c/947d9aa54bf412a952e2af2d8a8255035d91b950_0.file_layout.tpl.php b/templates_c/947d9aa54bf412a952e2af2d8a8255035d91b950_0.file_layout.tpl.php index 2f9bc08..00e05e0 100644 --- a/templates_c/947d9aa54bf412a952e2af2d8a8255035d91b950_0.file_layout.tpl.php +++ b/templates_c/947d9aa54bf412a952e2af2d8a8255035d91b950_0.file_layout.tpl.php @@ -1,11 +1,11 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989e0891f99a9_84268185', + 'unifunc' => 'content_6989f7051730f9_04925440', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -22,21 +22,21 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( 'file:views/_partial/footer.tpl' => 1, ), ))) { -function content_6989e0891f99a9_84268185 (\Smarty\Template $_smarty_tpl) { +function content_6989f7051730f9_04925440 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, false); $_smarty_tpl->renderSubTemplate("file:views/_partial/header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_1226719426989e0891f66b5_10703637', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_15212756776989f70516f3e1_13586621', "content"); ?> renderSubTemplate("file:views/_partial/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir); } /* {block "content"} */ -class Block_1226719426989e0891f66b5_10703637 extends \Smarty\Runtime\Block +class Block_15212756776989f70516f3e1_13586621 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; diff --git a/templates_c/ac77f39f91cdf26a0eb3f0963ead4008a7bda8fb_0.file_admin.tpl.php b/templates_c/ac77f39f91cdf26a0eb3f0963ead4008a7bda8fb_0.file_admin.tpl.php index d200d8c..515379e 100644 --- a/templates_c/ac77f39f91cdf26a0eb3f0963ead4008a7bda8fb_0.file_admin.tpl.php +++ b/templates_c/ac77f39f91cdf26a0eb3f0963ead4008a7bda8fb_0.file_admin.tpl.php @@ -1,18 +1,18 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989e088f38338_64666135', + 'unifunc' => 'content_6989f704df71e4_04792390', 'has_nocache_code' => false, 'file_dependency' => array ( 'ac77f39f91cdf26a0eb3f0963ead4008a7bda8fb' => array ( 0 => 'views/admin.tpl', - 1 => 1770643565, + 1 => 1770649348, 2 => 'file', ), ), @@ -20,18 +20,18 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_6989e088f38338_64666135 (\Smarty\Template $_smarty_tpl) { +function content_6989f704df71e4_04792390 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, true); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_19184882506989e088f2e080_15773704', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_3881550706989f704ddce33_55904583', "content"); $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); } /* {block "content"} */ -class Block_19184882506989e088f2e080_15773704 extends \Smarty\Runtime\Block +class Block_3881550706989f704ddce33_55904583 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; @@ -124,29 +124,48 @@ $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views';
-
+
-
- + + getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrUserToDisplay'), 'user'); $foreach0DoElse = true; -foreach ($_from ?? [] as $_smarty_tpl->getVariable('arrDetStatus')->value) { +foreach ($_from ?? [] as $_smarty_tpl->getVariable('user')->value) { $foreach0DoElse = false; ?> - - getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?> - -
-
- -
+ + +
+
+ + +
+
@@ -160,9 +179,9 @@ $_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?> getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrCategoryToDisplay'), 'category'); -$foreach1DoElse = true; +$foreach2DoElse = true; foreach ($_from ?? [] as $_smarty_tpl->getVariable('category')->value) { -$foreach1DoElse = false; +$foreach2DoElse = false; ?>


-
- +

Créer une nouvelle catégorie

diff --git a/templates_c/b1b065356827f03a32a2809f87f59bd19d86da99_0.file_footer.tpl.php b/templates_c/b1b065356827f03a32a2809f87f59bd19d86da99_0.file_footer.tpl.php index 7788209..21e1321 100644 --- a/templates_c/b1b065356827f03a32a2809f87f59bd19d86da99_0.file_footer.tpl.php +++ b/templates_c/b1b065356827f03a32a2809f87f59bd19d86da99_0.file_footer.tpl.php @@ -1,11 +1,11 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989e0893afd86_56926620', + 'unifunc' => 'content_6989f705319402_84731853', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_6989e0893afd86_56926620 (\Smarty\Template $_smarty_tpl) { +function content_6989f705319402_84731853 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views\\_partial'; ?>
diff --git a/templates_c/b3c0a235f975d8741b25531347290b4e4994470b_0.file_header.tpl.php b/templates_c/b3c0a235f975d8741b25531347290b4e4994470b_0.file_header.tpl.php index ea41c4f..fac3081 100644 --- a/templates_c/b3c0a235f975d8741b25531347290b4e4994470b_0.file_header.tpl.php +++ b/templates_c/b3c0a235f975d8741b25531347290b4e4994470b_0.file_header.tpl.php @@ -1,11 +1,11 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989e0892c1ac1_16523199', + 'unifunc' => 'content_6989f705231fa9_63622618', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_6989e0892c1ac1_16523199 (\Smarty\Template $_smarty_tpl) { +function content_6989f705231fa9_63622618 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views\\_partial'; ?> diff --git a/templates_c/b70ee0d22061ca6100f647634a5658ae38c7b520_0.file_preview.tpl.php b/templates_c/b70ee0d22061ca6100f647634a5658ae38c7b520_0.file_preview.tpl.php index a805224..27b8b42 100644 --- a/templates_c/b70ee0d22061ca6100f647634a5658ae38c7b520_0.file_preview.tpl.php +++ b/templates_c/b70ee0d22061ca6100f647634a5658ae38c7b520_0.file_preview.tpl.php @@ -1,11 +1,11 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989e02ebdb495_34139226', + 'unifunc' => 'content_6989f51a5fd501_76959549', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_6989e02ebdb495_34139226 (\Smarty\Template $_smarty_tpl) { +function content_6989f51a5fd501_76959549 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views\\_partial'; ?> diff --git a/templates_c/ca790de9f8d5a4fc03b03b8d137ec1edb99bdd92_0.file_home.tpl.php b/templates_c/ca790de9f8d5a4fc03b03b8d137ec1edb99bdd92_0.file_home.tpl.php index d2cd1e7..5350786 100644 --- a/templates_c/ca790de9f8d5a4fc03b03b8d137ec1edb99bdd92_0.file_home.tpl.php +++ b/templates_c/ca790de9f8d5a4fc03b03b8d137ec1edb99bdd92_0.file_home.tpl.php @@ -1,11 +1,11 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989e02e94a704_31389377', + 'unifunc' => 'content_6989f51a3af749_66573336', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -21,20 +21,20 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( 'file:views/_partial/preview.tpl' => 1, ), ))) { -function content_6989e02e94a704_31389377 (\Smarty\Template $_smarty_tpl) { +function content_6989f51a3af749_66573336 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, true); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_6558155986989e02e945ff4_36336799', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_17367792036989f51a3abb88_04857391', "content"); ?> getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); } /* {block "content"} */ -class Block_6558155986989e02e945ff4_36336799 extends \Smarty\Runtime\Block +class Block_17367792036989f51a3abb88_04857391 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; diff --git a/templates_c/ebfd968608976813e893f497c64277110a78bc40_0.file_search.tpl.php b/templates_c/ebfd968608976813e893f497c64277110a78bc40_0.file_search.tpl.php index 2b7bcbe..a00c323 100644 --- a/templates_c/ebfd968608976813e893f497c64277110a78bc40_0.file_search.tpl.php +++ b/templates_c/ebfd968608976813e893f497c64277110a78bc40_0.file_search.tpl.php @@ -1,11 +1,11 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989e01e399336_22269044', + 'unifunc' => 'content_6989f51198b742_67072597', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -21,18 +21,18 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( 'file:views/_partial/preview.tpl' => 1, ), ))) { -function content_6989e01e399336_22269044 (\Smarty\Template $_smarty_tpl) { +function content_6989f51198b742_67072597 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, true); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_17525989336989e01e3837e7_64042990', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_2211957246989f511978f29_13934431', "content"); $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); } /* {block "content"} */ -class Block_17525989336989e01e3837e7_64042990 extends \Smarty\Runtime\Block +class Block_2211957246989f511978f29_13934431 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; diff --git a/templates_c/ee86afd5d4dff200944f3436866afa34a71b920e_0.file_inscription.tpl.php b/templates_c/ee86afd5d4dff200944f3436866afa34a71b920e_0.file_inscription.tpl.php new file mode 100644 index 0000000..8711773 --- /dev/null +++ b/templates_c/ee86afd5d4dff200944f3436866afa34a71b920e_0.file_inscription.tpl.php @@ -0,0 +1,218 @@ +getCompiled()->isFresh($_smarty_tpl, array ( + 'version' => '5.7.0', + 'unifunc' => 'content_6989f3e29dbce4_20550543', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + 'ee86afd5d4dff200944f3436866afa34a71b920e' => + array ( + 0 => 'views/inscription.tpl', + 1 => 1770634036, + 2 => 'file', + ), + ), + 'includes' => + array ( + ), +))) { +function content_6989f3e29dbce4_20550543 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; +$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); +?> + + +getInheritance()->instanceBlock($_smarty_tpl, 'Block_18645663486989f3e29da446_83083224', "content"); +$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); +} +/* {block "content"} */ +class Block_18645663486989f3e29da446_83083224 extends \Smarty\Runtime\Block +{ +public function callBlock(\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; +?> + + + + +
+ + +
+
+ + +
+ + +

Inscription

+ + +

+ Créez votre compte utilisateur. +

+ + + + + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ @ + +
+
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ + +
+ + Déjà un compte ? + Se connecter + +
+ + +
+ + +
+ +
+
+
+
-
+
-
- -
-
- -
+
+
+ + +
+
+ + +
+
@@ -123,12 +132,11 @@


-
- +

Créer une nouvelle catégorie

From f4414d57041f89c9b27173c601af47a24ed56e2f Mon Sep 17 00:00:00 2001 From: Yasder5 <102179445+Yasder5@users.noreply.github.com> Date: Mon, 9 Feb 2026 16:11:04 +0100 Subject: [PATCH 04/22] Ajout de mise a jour auto serv --- .github/workflows/deploy.yml | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..3e6ee9b --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,38 @@ +name: Deploy production (servyass) + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Deploy via SSH + uses: appleboy/ssh-action@v1.0.0 + with: + host: ${{ secrets.SSH_HOST }} + username: yass + key: ${{ secrets.SSH_KEY }} + port: 22 + script: | + set -e + + echo "➡️ Deploy start" + + cd /var/www/projet_php + + echo "➡️ Pull main" + git fetch origin main + git reset --hard origin/main + + echo "➡️ Permissions" + chown -R yass:www-data /var/www/projet_php + chmod -R 775 /var/www/projet_php/templates_c + + echo "➡️ Clear Smarty cache" + rm -rf /var/www/projet_php/templates_c/* + + echo "✅ Deploy finished" From 07d946bd93450175dca6e8ccac8f610515a16563 Mon Sep 17 00:00:00 2001 From: Yasder5 <102179445+Yasder5@users.noreply.github.com> Date: Mon, 9 Feb 2026 16:20:24 +0100 Subject: [PATCH 05/22] test --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3e6ee9b..8d2211f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,9 +13,9 @@ jobs: - name: Deploy via SSH uses: appleboy/ssh-action@v1.0.0 with: - host: ${{ secrets.SSH_HOST }} + host: boulayoune.com username: yass - key: ${{ secrets.SSH_KEY }} + key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIgURSQrA0I59Wr1xhGZ4j0GoZ9G5TkLNupyugNWsYvv yasserboulayoune@outlook.com port: 22 script: | set -e From acdadd92f0feb7c1c2e3f59bb48f46e35be097f8 Mon Sep 17 00:00:00 2001 From: Yasder5 <102179445+Yasder5@users.noreply.github.com> Date: Mon, 9 Feb 2026 16:24:44 +0100 Subject: [PATCH 06/22] Ajout de mise a jour auto serv --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8d2211f..4c6fbae 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,7 +15,7 @@ jobs: with: host: boulayoune.com username: yass - key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIgURSQrA0I59Wr1xhGZ4j0GoZ9G5TkLNupyugNWsYvv yasserboulayoune@outlook.com + key: ${{ secrets.SSH_KEY }} port: 22 script: | set -e From cf4a4e405601ff7c8ee7ae8b406a551d8f404550 Mon Sep 17 00:00:00 2001 From: Yasder5 <102179445+Yasder5@users.noreply.github.com> Date: Mon, 9 Feb 2026 16:27:56 +0100 Subject: [PATCH 07/22] Ajout de mise a jour auto serv encore --- .github/workflows/deploy.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4c6fbae..fac8e98 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,26 +13,27 @@ jobs: - name: Deploy via SSH uses: appleboy/ssh-action@v1.0.0 with: - host: boulayoune.com - username: yass - key: ${{ secrets.SSH_KEY }} - port: 22 + host: boulayoune.com # ton serveur + username: yass # ton utilisateur SSH + key: ${{ secrets.SSH_KEY }} # clé privée SSH sécurisée + port: 22 # port SSH (par défaut 22) script: | set -e - echo "➡️ Deploy start" + echo "➡️ Début du déploiement" + # Aller dans le dossier du projet cd /var/www/projet_php - echo "➡️ Pull main" + echo "➡️ Mise à jour depuis GitHub" git fetch origin main git reset --hard origin/main - echo "➡️ Permissions" + echo "➡️ Correction des permissions Smarty" chown -R yass:www-data /var/www/projet_php chmod -R 775 /var/www/projet_php/templates_c - echo "➡️ Clear Smarty cache" + echo "➡️ Nettoyage du cache Smarty" rm -rf /var/www/projet_php/templates_c/* - echo "✅ Deploy finished" + echo "✅ Déploiement terminé" From 0065d789e36d1d20b37a5cc99d7888203545aa89 Mon Sep 17 00:00:00 2001 From: Yasder5 <102179445+Yasder5@users.noreply.github.com> Date: Mon, 9 Feb 2026 19:36:10 +0100 Subject: [PATCH 08/22] Ajout de mise a jour auto serv encore encore cnore enceojh --- .github/workflows/deploy.yml | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fac8e98..7a0debf 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,10 +13,10 @@ jobs: - name: Deploy via SSH uses: appleboy/ssh-action@v1.0.0 with: - host: boulayoune.com # ton serveur - username: yass # ton utilisateur SSH - key: ${{ secrets.SSH_KEY }} # clé privée SSH sécurisée - port: 22 # port SSH (par défaut 22) + host: boulayoune.com + username: yass + key: ${{ secrets.SSH_KEY }} + port: 22 script: | set -e @@ -26,14 +26,19 @@ jobs: cd /var/www/projet_php echo "➡️ Mise à jour depuis GitHub" - git fetch origin main - git reset --hard origin/main + # On force le nettoyage pour éviter les conflits de fichiers locaux + sudo git fetch origin main + sudo git reset --hard origin/main - echo "➡️ Correction des permissions Smarty" - chown -R yass:www-data /var/www/projet_php - chmod -R 775 /var/www/projet_php/templates_c + echo "➡️ Correction des permissions et nettoyage" + # Utilisation de sudo pour les tâches root + sudo chown -R yass:www-data /var/www/projet_php + + # On s'assure que le dossier templates_c existe avant le chmod + mkdir -p /var/www/projet_php/templates_c + sudo chmod -R 775 /var/www/projet_php/templates_c - echo "➡️ Nettoyage du cache Smarty" - rm -rf /var/www/projet_php/templates_c/* + echo "➡️ Vidage du cache Smarty" + sudo rm -rf /var/www/projet_php/templates_c/* - echo "✅ Déploiement terminé" + echo "✅ Déploiement terminé avec succès !" \ No newline at end of file From e0902db07fec93c71902f92a5955ea42e14a0998 Mon Sep 17 00:00:00 2001 From: Yasder5 <102179445+Yasder5@users.noreply.github.com> Date: Mon, 9 Feb 2026 19:49:26 +0100 Subject: [PATCH 09/22] cette fois c'est la bonne mdrr --- .github/workflows/deploy.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7a0debf..0e21ae3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,34 +11,30 @@ jobs: steps: - name: Deploy via SSH - uses: appleboy/ssh-action@v1.0.0 + uses: appleboy/ssh-action@master # On passe sur la version master with: host: boulayoune.com username: yass key: ${{ secrets.SSH_KEY }} port: 22 + # Cette option aide si le format de clé pose souci au handshake + fingerprint: ${{ secrets.SSH_FINGERPRINT }} # Optionnel + script_stop: true script: | set -e - echo "➡️ Début du déploiement" - - # Aller dans le dossier du projet cd /var/www/projet_php - + echo "➡️ Mise à jour depuis GitHub" - # On force le nettoyage pour éviter les conflits de fichiers locaux sudo git fetch origin main sudo git reset --hard origin/main echo "➡️ Correction des permissions et nettoyage" - # Utilisation de sudo pour les tâches root sudo chown -R yass:www-data /var/www/projet_php - - # On s'assure que le dossier templates_c existe avant le chmod - mkdir -p /var/www/projet_php/templates_c + sudo mkdir -p /var/www/projet_php/templates_c sudo chmod -R 775 /var/www/projet_php/templates_c echo "➡️ Vidage du cache Smarty" sudo rm -rf /var/www/projet_php/templates_c/* - echo "✅ Déploiement terminé avec succès !" \ No newline at end of file + echo "✅ Déploiement terminé" \ No newline at end of file From b7a5e1cbd08f749b54b8d5f60ccaf1195f000041 Mon Sep 17 00:00:00 2001 From: Yasder5 <102179445+Yasder5@users.noreply.github.com> Date: Mon, 9 Feb 2026 19:52:21 +0100 Subject: [PATCH 10/22] cetkzjhfozhgfzekjf --- .github/workflows/deploy.yml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0e21ae3..0678f75 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,30 +11,18 @@ jobs: steps: - name: Deploy via SSH - uses: appleboy/ssh-action@master # On passe sur la version master + uses: appleboy/ssh-action@master with: host: boulayoune.com username: yass key: ${{ secrets.SSH_KEY }} port: 22 - # Cette option aide si le format de clé pose souci au handshake - fingerprint: ${{ secrets.SSH_FINGERPRINT }} # Optionnel - script_stop: true + debug: true script: | - set -e - echo "➡️ Début du déploiement" + echo "➡️ Connexion réussie !" cd /var/www/projet_php - - echo "➡️ Mise à jour depuis GitHub" sudo git fetch origin main sudo git reset --hard origin/main - - echo "➡️ Correction des permissions et nettoyage" sudo chown -R yass:www-data /var/www/projet_php - sudo mkdir -p /var/www/projet_php/templates_c sudo chmod -R 775 /var/www/projet_php/templates_c - - echo "➡️ Vidage du cache Smarty" - sudo rm -rf /var/www/projet_php/templates_c/* - - echo "✅ Déploiement terminé" \ No newline at end of file + sudo rm -rf /var/www/projet_php/templates_c/* \ No newline at end of file From d64f59430e92c7a07d38ca4b30f0e68ab03d9db8 Mon Sep 17 00:00:00 2001 From: Yasder5 <102179445+Yasder5@users.noreply.github.com> Date: Tue, 10 Feb 2026 11:18:51 +0100 Subject: [PATCH 11/22] eee --- .github/workflows/deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0678f75..be3a9a0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,7 +15,8 @@ jobs: with: host: boulayoune.com username: yass - key: ${{ secrets.SSH_KEY }} + key: | + ${{ secrets.SSH_KEY }} port: 22 debug: true script: | From 8ce49943dddb9e34c2805dae29f9bf403f8daa1f Mon Sep 17 00:00:00 2001 From: "laura.chevillet" Date: Tue, 10 Feb 2026 11:23:29 +0100 Subject: [PATCH 12/22] =?UTF-8?q?Fonctionnalit=C3=A9=20tri=20cat=C3=A9gori?= =?UTF-8?q?e=20et=20date=20ok.=20Nettoyage=20du=20code=20et=20des=20commen?= =?UTF-8?q?taires=20de=20tous=20les=20models?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/project_controller.php | 23 ++-- models/authorisation_model.php | 1 - models/category_model.php | 10 +- models/image_model.php | 1 + models/project_model.php | 42 +++--- models/user_model.php | 42 +++--- ...69c67d6dd307aa06ae3_0.file_project.tpl.php | 110 +++++++++++++++ ...ce4a78a4dbca_0.file_projet_display.tpl.php | 128 ++++++++++++++++++ ...429efee0d6437582d377e_0.file_login.tpl.php | 10 +- ...af2d8a8255035d91b950_0.file_layout.tpl.php | 10 +- ...3f0963ead4008a7bda8fb_0.file_admin.tpl.php | 27 ++-- ...809f87f59bd19d86da99_0.file_footer.tpl.php | 6 +- ...531347290b4e4994470b_0.file_header.tpl.php | 6 +- ...7634a5658ae38c7b520_0.file_preview.tpl.php | 6 +- ...b03b8d137ec1edb99bdd92_0.file_home.tpl.php | 31 +++-- ...f497c64277110a78bc40_0.file_search.tpl.php | 10 +- views/admin.tpl | 15 +- views/home.tpl | 19 +-- 18 files changed, 381 insertions(+), 116 deletions(-) create mode 100644 templates_c/3309f8a981537e6cbbf8869c67d6dd307aa06ae3_0.file_project.tpl.php create mode 100644 templates_c/52c011ce77c5dc743b6591550c55ce4a78a4dbca_0.file_projet_display.tpl.php diff --git a/controllers/project_controller.php b/controllers/project_controller.php index af2e9fa..6f469f0 100644 --- a/controllers/project_controller.php +++ b/controllers/project_controller.php @@ -23,9 +23,20 @@ */ public function home(){ + + + $intCategory = 0; + if (!empty($_GET['filter_cat'])) { + $intCategory = (int) $_GET['filter_cat']; + } + + $boolOld = false; + if (!empty($_GET['filter_old']) && $_GET['filter_old'] == 'true') { + $boolOld = true; + } $objProjectModel = new ProjectModel; - $arrProject = $objProjectModel->findAll(); + $arrProject = $objProjectModel->findAll(0,'',0,0,'','','',$intCategory,$boolOld); $arrProjectToDisplay = array(); foreach($arrProject as $arrDetProject){ $objProject = new Project; @@ -34,8 +45,6 @@ } $this->_arrData['arrProjectToDisplay'] = $arrProjectToDisplay; - - $this->_display("home"); } @@ -43,8 +52,8 @@ /** * Fonction d'affichage de la barre de recherche */ - public function search(){ + //Récupérer les informations du formulaire $strKeywords = $_POST['keywords']??''; $intAuthor = $_POST['author']??0; @@ -87,8 +96,6 @@ /** * Fonction d'affichage de la page projet */ - - public function project (){ $objProjectModel = new ProjectModel; @@ -151,9 +158,9 @@ $objProjectModel->insert($objProject); } - //Débuggage + /*Débuggage var_dump($_SESSION); - var_dump($objProject); + var_dump($objProject);*/ $this->_arrData['arrProjectToDiplay'] = $arrProjectToDiplay; $this->_arrData['arrImageToDiplay'] = $arrImageToDiplay; diff --git a/models/authorisation_model.php b/models/authorisation_model.php index 84a3dd6..010660b 100644 --- a/models/authorisation_model.php +++ b/models/authorisation_model.php @@ -17,7 +17,6 @@ * fonction de récupération des infos d'authorisation * @return array */ - public function findAllAuthorisation():array{ $strRq = "SELECT * diff --git a/models/category_model.php b/models/category_model.php index a23907e..6c48379 100644 --- a/models/category_model.php +++ b/models/category_model.php @@ -10,6 +10,7 @@ /** * Fonction de récupération des catégories + * @param int $intLimit * @return array */ @@ -28,9 +29,8 @@ /** * fonction d'insertion d'une nouvelle catégorie dans la bdd * @param object $objCategory l'objet catégorie - * @return bool Est-ce que la requête s'est bien passée (true/false) + * @return bool Est-ce que la requête s'est bien passée */ - public function insertCategory(object $objCategory):bool{ $strRq = "INSERT INTO category (category_name) @@ -47,9 +47,8 @@ /** * fonction de suppression d'une catégorie dans la bdd * @param object $objCategory l'objet catégorie - * @return bool Est-ce que la requête s'est bien passée (true/false) + * @return bool Est-ce que la requête s'est bien passée */ - public function deleteCategory(object $objCategory):bool{ $strRq = "DELETE FROM category @@ -65,9 +64,8 @@ /** * fonction de modification d'une catégorie dans la bdd * @param object $objCategory l'objet catégorie - * @return bool Est-ce que la requête s'est bien passée (true/false) + * @return bool Est-ce que la requête s'est bien passée */ - public function editCategory(object $objCategory):bool{ $strRq = "UPDATE category diff --git a/models/image_model.php b/models/image_model.php index 2511f06..39e8158 100644 --- a/models/image_model.php +++ b/models/image_model.php @@ -11,6 +11,7 @@ /** * Fonction de récupération des images + * @param int $intLimit * @return array */ diff --git a/models/project_model.php b/models/project_model.php index d88e02d..c0ffece 100644 --- a/models/project_model.php +++ b/models/project_model.php @@ -8,12 +8,17 @@ */ class ProjectModel extends Connect{ - + + + /** + * Fonction de recherche des projets + * @param type string, int et bool + * @return array + */ public function findAll(int $intLimit=0, string $strKeywords='', int $intAuthor=0, int $intPeriod=0, string $strDate='', string $strStartDate='', - string $strEndDate='', int $intCategory=0):array{ + string $strEndDate='', int $intCategory=0, bool $bool6Months=false):array{ - // Ecrire la requête $strRq = "SELECT project.*, CONCAT(user_firstname, ' ', user_name) AS 'project_creatorname', user_image @@ -21,6 +26,7 @@ INNER JOIN users ON user_id = project_user"; $strWhere = " WHERE "; + // Recherche par mot clé if ($strKeywords != '') { $strRq .= " WHERE (project_title LIKE '%".$strKeywords."%' @@ -41,23 +47,25 @@ $strRq .= $strWhere." project_category = ".$intCategory; $strWhere = " AND "; } + + //recherche par ancienneté + if ($bool6Months === true) { + $strRq .= $strWhere . " project_creation_date <= DATE_SUB(NOW(), INTERVAL 6 MONTH) "; + $strWhere = " AND "; + } // Recherche par dates if ($intPeriod == 0){ - // Par date exacte if ($strDate != ''){ $strRq .= $strWhere." project_creation_date = '".$strDate."'"; } }else{ - // Par période de dates if ($strStartDate != '' && $strEndDate != ''){ $strRq .= $strWhere." project_creation_date BETWEEN '".$strStartDate."' AND '".$strEndDate."'"; }else{ if ($strStartDate != ''){ - // A partir de $strRq .= $strWhere." project_creation_date >= '".$strStartDate."'"; }else if ($strEndDate != ''){ - // Avant le $strRq .= $strWhere." project_creation_date <= '".$strEndDate."'"; } } @@ -65,37 +73,39 @@ $strRq .= " ORDER BY project_creation_date DESC"; - if ($intLimit > 0){ $strRq .= " LIMIT ".$intLimit; } - // Lancer la requête et récupérer les résultats return $this->_db->query($strRq)->fetchAll(); } - //Fonction d'insertion d'information dans la BDD (Repris de la partie BLOG vu en cours..) + /** + * Fonction d'insertion d'un nouveau projet dans la bdd + * @param object $objProject l'objet projet + * @return bool Est-ce que la requête s'est bien passée + */ public function insert(object $objProject):bool{ - //Construire la requête $strRq = "INSERT INTO project (project_title, project_description, project_thumbnail, project_content, project_status, project_creation_date) VALUES (:title, :description, :thumbnail, :content, :status, DATE(NOW()))"; - // Préparer la requête $rqPrep = $this->_db->prepare($strRq); - // Donne les informations + $rqPrep->bindValue(":title", $objProject->getTitle(), PDO::PARAM_STR); $rqPrep->bindValue(":description", $objProject->getDescription(), PDO::PARAM_STR); $rqPrep->bindValue(":thumbnail", $objProject->getThumbnail(), PDO::PARAM_STR); $rqPrep->bindValue(":content", $objProject->getContent(), PDO::PARAM_STR); $rqPrep->bindValue(":status", $objProject->getStatus(), PDO::PARAM_STR); - //Executer la requête - //var_dump($strRq);die; - //return $db->exec($strRq); return $rqPrep->execute(); } + /** + * Fonction de recherche d'un seul projet + * @param int $intId + * @return + */ public function findOne(int $intId) { $strRq = "SELECT project.*, CONCAT(users.user_firstname, ' ', users.user_name) AS 'project_creatorname', diff --git a/models/user_model.php b/models/user_model.php index fd682e7..d20b743 100644 --- a/models/user_model.php +++ b/models/user_model.php @@ -5,46 +5,40 @@ /** * Traitement des requêtes pour les utilisateurs * @author : meilleurGroup - * @version : V0.5 */ + class UserModel extends Connect{ - // Attributs - - - // Méthodes + public function __construct(){ parent::__construct(); } /** + * Fonction de recherche des utilisateurs et leur niveau d'autorisation * @return array */ public function findAllUsers():array{ - // Ecrire la requête $strRq = "SELECT user_id, user_firstname, user_name, user_image, user_status, authorisation_name FROM users INNER JOIN authorisation ON authorisation.authorisation_id = users.user_status WHERE user_deleted_at IS NULL"; - // Lancer la requête et récupérer les résultats return $this->_db->query($strRq)->fetchAll(); } /** + * Fonction de vérification des utilisateurs * @param string $strMail * @param string $strPwd * @return array|bool */ public function verifUser(string $strMail, string $strPwd):array|bool{ - // 2. Construire la requête + $strRq = "SELECT user_id, user_name, user_firstname, user_password, user_image, user_status, authorisation_name FROM users INNER JOIN authorisation ON authorisation.authorisation_id = users.user_status 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_password'])){ - // Renvoi l'utilisateur - unset($arrUser['user_password']); // on enlève le pwd + unset($arrUser['user_password']); return $arrUser; }else{ return false; @@ -54,17 +48,15 @@ /** * Fonction d'insertion d'un utilisateur en BDD * @param object $objUser L'objet utilisateur - * @return bool Est-ce que la requête s'est bien passée (true/false) + * @return bool Est-ce que la requête s'est bien passée */ public function insert(object $objUser):bool{ - - // 2. Construire la requête $strRq = "INSERT INTO users (user_name, user_firstname, user_pseudo, user_mail, user_password, user_phone, user_work, user_location, user_description) VALUES (:name, :firstname, :pseudo,:mail, :pwd, :phone, :work, :location,:description)"; - // Préparer la requête + $rqPrep = $this->_db->prepare($strRq); - // Donne les informations + $rqPrep->bindValue(":name", $objUser->getName(), PDO::PARAM_STR); $rqPrep->bindValue(":firstname", $objUser->getFirstname(), PDO::PARAM_STR); $rqPrep->bindValue(":pseudo", $objUser->getPseudo(), PDO::PARAM_STR); @@ -78,9 +70,13 @@ return $rqPrep->execute(); } - - public function mailExists(string $mail): bool - { + /** + * Fonction de vérification de mail + * @param string $mail + * @return bool Est-ce que la requête s'est bien passée + */ + public function mailExists(string $mail): bool{ + $rq = $this->_db->prepare("SELECT 1 FROM users WHERE user_mail = :mail LIMIT 1"); $rq->bindValue(":mail", $mail); $rq->execute(); @@ -91,7 +87,7 @@ /** * Fonction de changement de status d'un utilisateur * @param object $objUser L'objet utilisateur - * @return bool Est-ce que la requête s'est bien passée (true/false) + * @return bool Est-ce que la requête s'est bien passée */ public function editStatus(object $objUser):bool{ @@ -109,7 +105,7 @@ /** * Fonction permettant de supprimer un utilisateur avec une date de suppression * @param int $intId L'identifiant de l'utilisateur - * @return bool Est-ce que la requête s'est bien passée (true/false) + * @return bool Est-ce que la requête s'est bien passée */ public function delete_soft(int $intId):bool{ diff --git a/templates_c/3309f8a981537e6cbbf8869c67d6dd307aa06ae3_0.file_project.tpl.php b/templates_c/3309f8a981537e6cbbf8869c67d6dd307aa06ae3_0.file_project.tpl.php new file mode 100644 index 0000000..ecebd4d --- /dev/null +++ b/templates_c/3309f8a981537e6cbbf8869c67d6dd307aa06ae3_0.file_project.tpl.php @@ -0,0 +1,110 @@ +getCompiled()->isFresh($_smarty_tpl, array ( + 'version' => '5.7.0', + 'unifunc' => 'content_698ae9a3ee5104_18468093', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + '3309f8a981537e6cbbf8869c67d6dd307aa06ae3' => + array ( + 0 => 'views/project.tpl', + 1 => 1770634036, + 2 => 'file', + ), + ), + 'includes' => + array ( + 'file:../app/views/partials/preview.tpl' => 1, + ), +))) { +function content_698ae9a3ee5104_18468093 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; +$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); +?> + + +getInheritance()->instanceBlock($_smarty_tpl, 'Block_2126029828698ae9a3edc808_29541958', "content"); +$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); +} +/* {block "content"} */ +class Block_2126029828698ae9a3edc808_29541958 extends \Smarty\Runtime\Block +{ +public function callBlock(\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; +?> + + +
+
+

Alimenter votre projet

+ + + + + + + + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ + +
+ + +
+
+

Description

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. + Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. + Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+
+
+

Photos behind the scene

+
+ +
+
+
+

Other projects

+
+ getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrProjectToDisplay'), 'objProject'); +$foreach0DoElse = true; +foreach ($_from ?? [] as $_smarty_tpl->getVariable('objProject')->value) { +$foreach0DoElse = false; +?> + renderSubTemplate("file:../app/views/partials/preview.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir); +?> + getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?> +
+
+
+
+ +getCompiled()->isFresh($_smarty_tpl, array ( + 'version' => '5.7.0', + 'unifunc' => 'content_698ae9506da109_21542800', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + '52c011ce77c5dc743b6591550c55ce4a78a4dbca' => + array ( + 0 => 'views/projet_display.tpl', + 1 => 1770634036, + 2 => 'file', + ), + ), + 'includes' => + array ( + ), +))) { +function content_698ae9506da109_21542800 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; +$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); +?> + + +getInheritance()->instanceBlock($_smarty_tpl, 'Block_919254056698ae95061e435_82964089', "content"); +$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); +} +/* {block "content"} */ +class Block_919254056698ae95061e435_82964089 extends \Smarty\Runtime\Block +{ +public function callBlock(\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; +?> + +
+ + + +
Email envoyé avec succès.
+ +
Erreur lors de l'envoi de l'email.
+ + +
+ + +
+ +

getValue('objProject')->getTitle();?> +

+ +

+ getValue('arrProject')['category_name'] ?? 'Général';?> + +

+ +
+ +
+ +
+

Description

+

getValue('objProject')->getDescription();?> +

+ +
+ getValue('objProject')->getContent();?> + +
+
+ + +
+
+ + + + + + + +
+
+ +
+ + +
+
+ + + +
getValue('objProject')->getCreatorName();?> +
+ +

+ Publié le getValue('objProject')->getCreation_date();?> + +

+ + + +
+
+ +
+
+getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989f5152cc653_86103445', + 'unifunc' => 'content_698ae969a7db02_27363144', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -20,18 +20,18 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_6989f5152cc653_86103445 (\Smarty\Template $_smarty_tpl) { +function content_698ae969a7db02_27363144 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, true); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_15010700106989f5152c2920_08155243', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_342031104698ae969942f96_18698715', "content"); $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); } /* {block "content"} */ -class Block_15010700106989f5152c2920_08155243 extends \Smarty\Runtime\Block +class Block_342031104698ae969942f96_18698715 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; diff --git a/templates_c/947d9aa54bf412a952e2af2d8a8255035d91b950_0.file_layout.tpl.php b/templates_c/947d9aa54bf412a952e2af2d8a8255035d91b950_0.file_layout.tpl.php index 00e05e0..781b34d 100644 --- a/templates_c/947d9aa54bf412a952e2af2d8a8255035d91b950_0.file_layout.tpl.php +++ b/templates_c/947d9aa54bf412a952e2af2d8a8255035d91b950_0.file_layout.tpl.php @@ -1,11 +1,11 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989f7051730f9_04925440', + 'unifunc' => 'content_698aed2fd402f7_78850375', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -22,21 +22,21 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( 'file:views/_partial/footer.tpl' => 1, ), ))) { -function content_6989f7051730f9_04925440 (\Smarty\Template $_smarty_tpl) { +function content_698aed2fd402f7_78850375 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, false); $_smarty_tpl->renderSubTemplate("file:views/_partial/header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_15212756776989f70516f3e1_13586621', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_691069574698aed2fd3d8f8_28027733', "content"); ?> renderSubTemplate("file:views/_partial/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir); } /* {block "content"} */ -class Block_15212756776989f70516f3e1_13586621 extends \Smarty\Runtime\Block +class Block_691069574698aed2fd3d8f8_28027733 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; diff --git a/templates_c/ac77f39f91cdf26a0eb3f0963ead4008a7bda8fb_0.file_admin.tpl.php b/templates_c/ac77f39f91cdf26a0eb3f0963ead4008a7bda8fb_0.file_admin.tpl.php index 515379e..d4498ba 100644 --- a/templates_c/ac77f39f91cdf26a0eb3f0963ead4008a7bda8fb_0.file_admin.tpl.php +++ b/templates_c/ac77f39f91cdf26a0eb3f0963ead4008a7bda8fb_0.file_admin.tpl.php @@ -1,18 +1,18 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989f704df71e4_04792390', + 'unifunc' => 'content_698aed2fac7079_66630300', 'has_nocache_code' => false, 'file_dependency' => array ( 'ac77f39f91cdf26a0eb3f0963ead4008a7bda8fb' => array ( 0 => 'views/admin.tpl', - 1 => 1770649348, + 1 => 1770712365, 2 => 'file', ), ), @@ -20,18 +20,18 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_6989f704df71e4_04792390 (\Smarty\Template $_smarty_tpl) { +function content_698aed2fac7079_66630300 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, true); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_3881550706989f704ddce33_55904583', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_701047722698aed2faa98f9_91663021', "content"); $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); } /* {block "content"} */ -class Block_3881550706989f704ddce33_55904583 extends \Smarty\Runtime\Block +class Block_701047722698aed2faa98f9_91663021 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; @@ -123,12 +123,14 @@ $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views';
+

Gestion de l'utilsateur

+

Changer le statut ou supprimer un utilisateur

-
+
- + getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrCategoryToDisplay'), 'category'); $foreach2DoElse = true; @@ -191,7 +195,10 @@ $foreach2DoElse = false; $_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
- +
+ + +
@@ -205,7 +212,7 @@ $_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>

Créer une nouvelle catégorie

- +
diff --git a/templates_c/b1b065356827f03a32a2809f87f59bd19d86da99_0.file_footer.tpl.php b/templates_c/b1b065356827f03a32a2809f87f59bd19d86da99_0.file_footer.tpl.php index 21e1321..5bc79c5 100644 --- a/templates_c/b1b065356827f03a32a2809f87f59bd19d86da99_0.file_footer.tpl.php +++ b/templates_c/b1b065356827f03a32a2809f87f59bd19d86da99_0.file_footer.tpl.php @@ -1,11 +1,11 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989f705319402_84731853', + 'unifunc' => 'content_698aed2fea7fd1_77495932', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_6989f705319402_84731853 (\Smarty\Template $_smarty_tpl) { +function content_698aed2fea7fd1_77495932 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views\\_partial'; ?>
diff --git a/templates_c/b3c0a235f975d8741b25531347290b4e4994470b_0.file_header.tpl.php b/templates_c/b3c0a235f975d8741b25531347290b4e4994470b_0.file_header.tpl.php index fac3081..83c7e19 100644 --- a/templates_c/b3c0a235f975d8741b25531347290b4e4994470b_0.file_header.tpl.php +++ b/templates_c/b3c0a235f975d8741b25531347290b4e4994470b_0.file_header.tpl.php @@ -1,11 +1,11 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989f705231fa9_63622618', + 'unifunc' => 'content_698aed2fe0e338_92194390', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_6989f705231fa9_63622618 (\Smarty\Template $_smarty_tpl) { +function content_698aed2fe0e338_92194390 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views\\_partial'; ?> diff --git a/templates_c/b70ee0d22061ca6100f647634a5658ae38c7b520_0.file_preview.tpl.php b/templates_c/b70ee0d22061ca6100f647634a5658ae38c7b520_0.file_preview.tpl.php index 27b8b42..7655780 100644 --- a/templates_c/b70ee0d22061ca6100f647634a5658ae38c7b520_0.file_preview.tpl.php +++ b/templates_c/b70ee0d22061ca6100f647634a5658ae38c7b520_0.file_preview.tpl.php @@ -1,11 +1,11 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989f51a5fd501_76959549', + 'unifunc' => 'content_698ae96d52fa95_22666517', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_6989f51a5fd501_76959549 (\Smarty\Template $_smarty_tpl) { +function content_698ae96d52fa95_22666517 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views\\_partial'; ?> diff --git a/templates_c/ca790de9f8d5a4fc03b03b8d137ec1edb99bdd92_0.file_home.tpl.php b/templates_c/ca790de9f8d5a4fc03b03b8d137ec1edb99bdd92_0.file_home.tpl.php index 5350786..e74f2cb 100644 --- a/templates_c/ca790de9f8d5a4fc03b03b8d137ec1edb99bdd92_0.file_home.tpl.php +++ b/templates_c/ca790de9f8d5a4fc03b03b8d137ec1edb99bdd92_0.file_home.tpl.php @@ -1,18 +1,18 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989f51a3af749_66573336', + 'unifunc' => 'content_698ae96d2e58d9_91616548', 'has_nocache_code' => false, 'file_dependency' => array ( 'ca790de9f8d5a4fc03b03b8d137ec1edb99bdd92' => array ( 0 => 'views/home.tpl', - 1 => 1770639710, + 1 => 1770711346, 2 => 'file', ), ), @@ -21,20 +21,20 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( 'file:views/_partial/preview.tpl' => 1, ), ))) { -function content_6989f51a3af749_66573336 (\Smarty\Template $_smarty_tpl) { +function content_698ae96d2e58d9_91616548 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, true); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_17367792036989f51a3abb88_04857391', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_826938963698ae96d2e14b1_12340515', "content"); ?> getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); } /* {block "content"} */ -class Block_17367792036989f51a3abb88_04857391 extends \Smarty\Runtime\Block +class Block_826938963698ae96d2e14b1_12340515 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; @@ -48,16 +48,17 @@ $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; directement en contact avec les entreprises.

-
-
-
- - - - -
-
+
+
+ + + + + + Tout +
+
diff --git a/templates_c/ebfd968608976813e893f497c64277110a78bc40_0.file_search.tpl.php b/templates_c/ebfd968608976813e893f497c64277110a78bc40_0.file_search.tpl.php index a00c323..fa5dbc1 100644 --- a/templates_c/ebfd968608976813e893f497c64277110a78bc40_0.file_search.tpl.php +++ b/templates_c/ebfd968608976813e893f497c64277110a78bc40_0.file_search.tpl.php @@ -1,11 +1,11 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989f51198b742_67072597', + 'unifunc' => 'content_698ada80e47fc8_23614044', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -21,18 +21,18 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( 'file:views/_partial/preview.tpl' => 1, ), ))) { -function content_6989f51198b742_67072597 (\Smarty\Template $_smarty_tpl) { +function content_698ada80e47fc8_23614044 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, true); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_2211957246989f511978f29_13934431', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_1614324265698ada80a61e02_00521357', "content"); $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); } /* {block "content"} */ -class Block_2211957246989f511978f29_13934431 extends \Smarty\Runtime\Block +class Block_1614324265698ada80a61e02_00521357 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; diff --git a/views/admin.tpl b/views/admin.tpl index d8c1208..af91005 100644 --- a/views/admin.tpl +++ b/views/admin.tpl @@ -85,12 +85,14 @@
+

Gestion de l'utilsateur

+

Changer le statut ou supprimer un utilisateur

-
+
- + {foreach from=$arrCategoryToDisplay item=category} {/foreach}
- +
+ + +
@@ -139,7 +146,7 @@

Créer une nouvelle catégorie

- +
diff --git a/views/home.tpl b/views/home.tpl index d83342d..49c9c0f 100644 --- a/views/home.tpl +++ b/views/home.tpl @@ -9,16 +9,17 @@ directement en contact avec les entreprises.

-
-
-
- - - - -
-
+
+
+ + + + + + Tout +
+
From 48108f717fe8a363af8a60e21556de1526f3e569 Mon Sep 17 00:00:00 2001 From: Yasder5 <102179445+Yasder5@users.noreply.github.com> Date: Tue, 10 Feb 2026 12:05:44 +0100 Subject: [PATCH 13/22] =?UTF-8?q?=C3=A7a=20commence=20a=20bien=20me=20cass?= =?UTF-8?q?er=20la=20tete=20=C3=A7a?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 19 +++++++++++++------ models/mother_model.php | 6 +++--- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index be3a9a0..db60a95 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,15 +15,22 @@ jobs: with: host: boulayoune.com username: yass - key: | - ${{ secrets.SSH_KEY }} + key: ${{ secrets.SSH_KEY }} port: 22 - debug: true script: | + set -e echo "➡️ Connexion réussie !" cd /var/www/projet_php - sudo git fetch origin main - sudo git reset --hard origin/main + + echo "➡️ Mise à jour du code..." + # On enlève le SUDO ici pour que Git utilise la clé de l'utilisateur yass + git fetch origin main + git reset --hard origin/main + + echo "➡️ Correction des permissions et nettoyage..." + # On garde le SUDO ici car ces commandes touchent au système sudo chown -R yass:www-data /var/www/projet_php sudo chmod -R 775 /var/www/projet_php/templates_c - sudo rm -rf /var/www/projet_php/templates_c/* \ No newline at end of file + sudo rm -rf /var/www/projet_php/templates_c/* + + echo "✅ Déploiement terminé ! (Shin-en no Egotisu)" \ No newline at end of file diff --git a/models/mother_model.php b/models/mother_model.php index 9bc3881..b7b106d 100644 --- a/models/mother_model.php +++ b/models/mother_model.php @@ -7,9 +7,9 @@ try{ // Connexion à la base de données $this->_db = new PDO( - "mysql:host=localhost;dbname=projet_folliow", // Serveur et BDD mysql:host=boulayoune.com;dbname=projet_folliow - "root", //Nom d'utilisateur de la base de données projet_user - "",// Mot de passe de la base de données F0lliowRules! + "mysql:host=boulayoune.com;dbname=projet_folliow", // Serveur et BDD "mysql:host=localhost;dbname=projet_folliow", + "projet_user", //Nom d'utilisateur de la base de données root + "F0lliowRules!",// Mot de passe de la base de données array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC) // Mode de renvoi ); // Pour résoudre les problèmes d’encodage From f4d5669e444b26ac2c5f83b1a0d3c87353323794 Mon Sep 17 00:00:00 2001 From: "laura.chevillet" Date: Tue, 10 Feb 2026 14:55:34 +0100 Subject: [PATCH 14/22] =?UTF-8?q?Ajout=20de=20la=20page=20user=20fonctionn?= =?UTF-8?q?elle=20(ctrl,=20model=20associ=C3=A9=20etc)=20update=20des=20li?= =?UTF-8?q?ens=20en=20display=20pour=20fonctionnement.=20Correction=20nom?= =?UTF-8?q?=20fichier=20project=5Fdisplay?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/project_controller.php | 2 +- controllers/user_controller.php | 41 +++ models/project_model.php | 26 +- models/user_model.php | 18 +- ...16434b0dddc13d6ee22b4c_0.file_user.tpl.php | 99 +++++++ ...69c67d6dd307aa06ae3_0.file_project.tpl.php | 10 +- ...af2d8a8255035d91b950_0.file_layout.tpl.php | 10 +- ...3f0963ead4008a7bda8fb_0.file_admin.tpl.php | 245 ++++++------------ ...809f87f59bd19d86da99_0.file_footer.tpl.php | 6 +- ...531347290b4e4994470b_0.file_header.tpl.php | 6 +- ...7634a5658ae38c7b520_0.file_preview.tpl.php | 65 +++-- ...f497c64277110a78bc40_0.file_search.tpl.php | 10 +- views/_partial/preview.tpl | 17 +- views/admin.tpl | 227 ++++++---------- ...projet_display.tpl => project_display.tpl} | 10 +- views/user.tpl | 43 +++ 16 files changed, 471 insertions(+), 364 deletions(-) create mode 100644 templates_c/32d027bc6f198a0e3016434b0dddc13d6ee22b4c_0.file_user.tpl.php rename views/{projet_display.tpl => project_display.tpl} (87%) create mode 100644 views/user.tpl diff --git a/controllers/project_controller.php b/controllers/project_controller.php index e5eecb1..7395647 100644 --- a/controllers/project_controller.php +++ b/controllers/project_controller.php @@ -181,7 +181,7 @@ $objProject->hydrate($arrProject); $this->_arrData["objProject"] = $objProject; - $this->_display("projet_display"); + $this->_display("project_display"); } else { header("Location: index.php?ctrl=project&action=home"); exit; diff --git a/controllers/user_controller.php b/controllers/user_controller.php index b6938e1..be15ddc 100644 --- a/controllers/user_controller.php +++ b/controllers/user_controller.php @@ -3,6 +3,8 @@ require("models/user_model.php"); require("entities/user_entity.php"); require("mother_controller.php"); + require("./models/project_model.php"); + require("./entities/project_entity.php"); class UserCtrl extends MotherCtrl { @@ -147,4 +149,43 @@ class UserCtrl extends MotherCtrl { // Affichage de la vue inscription $this->_display("inscription"); } + + /** + * le controlleur affichage de la page user + */ + public function user(){ + + $intId = isset($_GET['id']) ? (int)$_GET['id'] : 0; + + if ($intId <= 0) { + header("Location: index.php"); + exit; + } + + //affichage info utilisateur + $objUserModel = new UserModel; + $arrUserData = $objUserModel->findUserById($intId); + + if ($arrUserData === false) { + header("Location: index.php"); + exit; + } + $objUser = new User; + $objUser->hydrate($arrUserData); + + //affichage projet de l'utilisateur + $objProjectModel = new ProjectModel; + $arrProjects = $objProjectModel->findAll(0,'',$intId); + + $arrProjectToDisplay = array(); + foreach($arrProjects as $projectData) { + $objProject = new Project(); + $objProject->hydrate($projectData); + $arrProjectToDisplay[] = $objProject; + } + + $this->_arrData['user'] = $objUser; + $this->_arrData['arrProjectToDisplay'] = $arrProjectToDisplay; + $this->_display("user"); + } } diff --git a/models/project_model.php b/models/project_model.php index 058788a..d6bce18 100644 --- a/models/project_model.php +++ b/models/project_model.php @@ -104,9 +104,9 @@ /** * Fonction de recherche d'un seul projet * @param int $intId - * @return + * @return array */ - public function findOne(int $intId) { + public function findOne(int $intId) :array{ $strRq = "SELECT project.*, CONCAT(users.user_firstname, ' ', users.user_name) AS 'project_creatorname', users.user_image, @@ -150,4 +150,26 @@ return $this->_db->query($strRq); } + + /** + * Fonction de mise à jour d'un projet en BDD + * @param object $objProject L'objet utilisateur + * @return bool Est-ce que la requête s'est bien passée + */ + public function updateProject(object $objProject):bool{ + + $strRq = "UPDATE project + SET project_title = :title, project_description = :description, project_content = :content + WHERE project_id = :id"; + + $rqPrep = $this->_db->prepare($strRq); + + $rqPrep->bindValue(":title", $objProject->getTitle(), PDO::PARAM_STR); + $rqPrep->bindValue(":description", $objProject->getDescription(), PDO::PARAM_STR); + $rqPrep->bindValue(":content", $objProject->getContent(), PDO::PARAM_STR); + + + // Executer la requête + return $rqPrep->execute(); + } } \ No newline at end of file diff --git a/models/user_model.php b/models/user_model.php index d20b743..baa46dd 100644 --- a/models/user_model.php +++ b/models/user_model.php @@ -116,5 +116,21 @@ $rqPrep = $this->_db->prepare($strRq); $rqPrep->bindValue(":id", $intId, PDO::PARAM_INT); return $rqPrep->execute(); - } + } + + /** + * Récupère les informations d'un utilisateur par son ID + * @param int $intId L'identifiant de l'utilisateur + * @return array Tableau associatif (ou false si pas trouvé) + */ + public function findUserById(int $intId): array|bool { + + $strRq = "SELECT * FROM users WHERE user_id = :id"; + + $prep = $this->_db->prepare($strRq); + $prep->bindValue(':id', $intId, PDO::PARAM_INT); + $prep->execute(); + + return $prep->fetch(); + } } diff --git a/templates_c/32d027bc6f198a0e3016434b0dddc13d6ee22b4c_0.file_user.tpl.php b/templates_c/32d027bc6f198a0e3016434b0dddc13d6ee22b4c_0.file_user.tpl.php new file mode 100644 index 0000000..d919b98 --- /dev/null +++ b/templates_c/32d027bc6f198a0e3016434b0dddc13d6ee22b4c_0.file_user.tpl.php @@ -0,0 +1,99 @@ +getCompiled()->isFresh($_smarty_tpl, array ( + 'version' => '5.7.0', + 'unifunc' => 'content_698b36e931d9d8_07796633', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + '32d027bc6f198a0e3016434b0dddc13d6ee22b4c' => + array ( + 0 => 'views/user.tpl', + 1 => 1770729421, + 2 => 'file', + ), + ), + 'includes' => + array ( + 'file:views/_partial/preview.tpl' => 1, + ), +))) { +function content_698b36e931d9d8_07796633 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; +$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); +?> + + +getInheritance()->instanceBlock($_smarty_tpl, 'Block_2035018945698b36e930efe0_69529586', "content"); +$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); +} +/* {block "content"} */ +class Block_2035018945698b36e930efe0_69529586 extends \Smarty\Runtime\Block +{ +public function callBlock(\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; +?> + + + + +
+

Les projets de getValue('user')->getPseudo();?> +

+ +
+ getSmarty()->getModifierCallback('count')($_smarty_tpl->getValue('arrProjectToDisplay')) > 0) {?> + getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrProjectToDisplay'), 'objProject'); +$foreach0DoElse = true; +foreach ($_from ?? [] as $_smarty_tpl->getVariable('objProject')->value) { +$foreach0DoElse = false; +?> +
+ renderSubTemplate("file:views/_partial/preview.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir); +?> +
+ getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?> + +

Cet utilisateur n'a pas encore publié de projets.

+ +
+
+ +getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_698ae9a3ee5104_18468093', + 'unifunc' => 'content_698b26e1f18ff9_58457550', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -21,18 +21,18 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( 'file:../app/views/partials/preview.tpl' => 1, ), ))) { -function content_698ae9a3ee5104_18468093 (\Smarty\Template $_smarty_tpl) { +function content_698b26e1f18ff9_58457550 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, true); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_2126029828698ae9a3edc808_29541958', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_1455455414698b26e1f12061_00705481', "content"); $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); } /* {block "content"} */ -class Block_2126029828698ae9a3edc808_29541958 extends \Smarty\Runtime\Block +class Block_1455455414698b26e1f12061_00705481 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; diff --git a/templates_c/947d9aa54bf412a952e2af2d8a8255035d91b950_0.file_layout.tpl.php b/templates_c/947d9aa54bf412a952e2af2d8a8255035d91b950_0.file_layout.tpl.php index 781b34d..f131330 100644 --- a/templates_c/947d9aa54bf412a952e2af2d8a8255035d91b950_0.file_layout.tpl.php +++ b/templates_c/947d9aa54bf412a952e2af2d8a8255035d91b950_0.file_layout.tpl.php @@ -1,11 +1,11 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_698aed2fd402f7_78850375', + 'unifunc' => 'content_698b36e945e8a9_68963664', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -22,21 +22,21 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( 'file:views/_partial/footer.tpl' => 1, ), ))) { -function content_698aed2fd402f7_78850375 (\Smarty\Template $_smarty_tpl) { +function content_698b36e945e8a9_68963664 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, false); $_smarty_tpl->renderSubTemplate("file:views/_partial/header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_691069574698aed2fd3d8f8_28027733', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_1250254212698b36e945d469_86185066', "content"); ?> renderSubTemplate("file:views/_partial/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir); } /* {block "content"} */ -class Block_691069574698aed2fd3d8f8_28027733 extends \Smarty\Runtime\Block +class Block_1250254212698b36e945d469_86185066 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; diff --git a/templates_c/ac77f39f91cdf26a0eb3f0963ead4008a7bda8fb_0.file_admin.tpl.php b/templates_c/ac77f39f91cdf26a0eb3f0963ead4008a7bda8fb_0.file_admin.tpl.php index d4498ba..80215d3 100644 --- a/templates_c/ac77f39f91cdf26a0eb3f0963ead4008a7bda8fb_0.file_admin.tpl.php +++ b/templates_c/ac77f39f91cdf26a0eb3f0963ead4008a7bda8fb_0.file_admin.tpl.php @@ -1,18 +1,18 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_698aed2fac7079_66630300', + 'unifunc' => 'content_698b2a791a5267_98917235', 'has_nocache_code' => false, 'file_dependency' => array ( 'ac77f39f91cdf26a0eb3f0963ead4008a7bda8fb' => array ( 0 => 'views/admin.tpl', - 1 => 1770712365, + 1 => 1770728055, 2 => 'file', ), ), @@ -20,213 +20,138 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_698aed2fac7079_66630300 (\Smarty\Template $_smarty_tpl) { +function content_698b2a791a5267_98917235 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, true); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_701047722698aed2faa98f9_91663021', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_510378351698b2a7919aa53_66812766', "content"); $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); } /* {block "content"} */ -class Block_701047722698aed2faa98f9_91663021 extends \Smarty\Runtime\Block +class Block_510378351698b2a7919aa53_66812766 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; ?> -
- - - -
-
- -
- -
-
-
-

Dashboard

-
- -
-
-

Gestion de l'utilsateur

-

Changer le statut ou supprimer un utilisateur

-
-
- -
-
-
- + + getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrUserToDisplay'), 'user'); $foreach0DoElse = true; foreach ($_from ?? [] as $_smarty_tpl->getVariable('user')->value) { $foreach0DoElse = false; ?> - - getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?> - - + + getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrAuthorisationToDisplay'), 'arrDetAuthorisation'); $foreach1DoElse = true; foreach ($_from ?? [] as $_smarty_tpl->getVariable('arrDetAuthorisation')->value) { $foreach1DoElse = false; ?> - - getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?> - -
-
- - -
-
-
+
-
- -
-
-

Gestion des catégories

-
-
-
-

Modifier une catégorie existante

- + + getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrCategoryToDisplay'), 'category'); $foreach2DoElse = true; foreach ($_from ?? [] as $_smarty_tpl->getVariable('category')->value) { $foreach2DoElse = false; ?> - - getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?> - -
-
- - -
- -
-
-
+
-
-
- -
-
-

Créer une nouvelle catégorie

-
- - -
-
- -
-
-
+
+ +
-
- + + +
+
+
+
+
+ +
+
+

Créer une nouvelle catégorie

+
+ + +
+
+ +
+
+
-
+
-
+
+
+
Connecté avec le compte : + + + getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_698aed2fea7fd1_77495932', + 'unifunc' => 'content_698b36e981e641_42574835', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_698aed2fea7fd1_77495932 (\Smarty\Template $_smarty_tpl) { +function content_698b36e981e641_42574835 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views\\_partial'; ?>
diff --git a/templates_c/b3c0a235f975d8741b25531347290b4e4994470b_0.file_header.tpl.php b/templates_c/b3c0a235f975d8741b25531347290b4e4994470b_0.file_header.tpl.php index 83c7e19..326f02a 100644 --- a/templates_c/b3c0a235f975d8741b25531347290b4e4994470b_0.file_header.tpl.php +++ b/templates_c/b3c0a235f975d8741b25531347290b4e4994470b_0.file_header.tpl.php @@ -1,11 +1,11 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_698aed2fe0e338_92194390', + 'unifunc' => 'content_698b36e9514ec8_80997361', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_698aed2fe0e338_92194390 (\Smarty\Template $_smarty_tpl) { +function content_698b36e9514ec8_80997361 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views\\_partial'; ?> diff --git a/templates_c/b70ee0d22061ca6100f647634a5658ae38c7b520_0.file_preview.tpl.php b/templates_c/b70ee0d22061ca6100f647634a5658ae38c7b520_0.file_preview.tpl.php index 7655780..00d165e 100644 --- a/templates_c/b70ee0d22061ca6100f647634a5658ae38c7b520_0.file_preview.tpl.php +++ b/templates_c/b70ee0d22061ca6100f647634a5658ae38c7b520_0.file_preview.tpl.php @@ -1,18 +1,18 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_698ae96d52fa95_22666517', + 'unifunc' => 'content_698b36e9636399_70389179', 'has_nocache_code' => false, 'file_dependency' => array ( 'b70ee0d22061ca6100f647634a5658ae38c7b520' => array ( 0 => 'views/_partial/preview.tpl', - 1 => 1770634036, + 1 => 1770730137, 2 => 'file', ), ), @@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_698ae96d52fa95_22666517 (\Smarty\Template $_smarty_tpl) { +function content_698b36e9636399_70389179 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views\\_partial'; ?> @@ -38,32 +38,57 @@ $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views\\_partial';
- getValue('objProject')->getUser_image();?> " - class="rounded-circle flex-shrink-0 mt-2 ml-5" - style="width: 48px; height: 48px; object-fit: cover;" - alt="Photo de profil"> + class="rounded-circle flex-shrink-0 mt-2 ml-5" + style="width: 48px; height: 48px; object-fit: cover;" + alt="Photo de profil"> -
-

getValue('objProject')->getTitle();?> +
+

getValue('objProject')->getTitle();?>

- - - getValue('objProject')->getId();?> " - class="stretched-link small"> - Lire la suite → - -
+ class="stretched-link small"> + Lire la suite → + + getValue('objProject')->getUser()) {?> + + Editer + + +

-
+
+ getValue('objProject')->getStatus() == "en_attente") {?> + + getValue('projectStatus') == "refusé") {?> +

Portfolio refusé

+ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_698ada80e47fc8_23614044', + 'unifunc' => 'content_698b32a2af19c0_80830560', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -21,18 +21,18 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( 'file:views/_partial/preview.tpl' => 1, ), ))) { -function content_698ada80e47fc8_23614044 (\Smarty\Template $_smarty_tpl) { +function content_698b32a2af19c0_80830560 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, true); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_1614324265698ada80a61e02_00521357', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_1683455369698b32a2adef91_98812453', "content"); $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); } /* {block "content"} */ -class Block_1614324265698ada80a61e02_00521357 extends \Smarty\Runtime\Block +class Block_1683455369698b32a2adef91_98812453 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; diff --git a/views/_partial/preview.tpl b/views/_partial/preview.tpl index 3ed2470..e247ef4 100644 --- a/views/_partial/preview.tpl +++ b/views/_partial/preview.tpl @@ -26,13 +26,24 @@ - – {$objProject->getCreatorname()} + – + + {$objProject->getCreatorname()} + - Lire la suite → + class="stretched-link small"> + Lire la suite → + {if $smarty.session.user.user_id == $objProject->getUser()} + + Editer + + {/if}
diff --git a/views/admin.tpl b/views/admin.tpl index af91005..7b0fefe 100644 --- a/views/admin.tpl +++ b/views/admin.tpl @@ -2,164 +2,89 @@ {block name="content"} -
- - - -
-
-
- -
-
-
-

Dashboard

-
- -
-
-

Gestion de l'utilsateur

-

Changer le statut ou supprimer un utilisateur

-
+ +
+
+

Gestion des catégories

+
+
+
+

Modifier une catégorie existante

+ +
+
+ + +
+ +
+
+
+
+
+
+ +
+
+

Créer une nouvelle catégorie

+
+ + +
- +
- -
- - -
-
- - -
-
-
+
- -
-
-

Gestion des catégories

-
-
-
-

Modifier une catégorie existante

- -
-
- - -
- -
-
-
-
-
-
- -
-
-

Créer une nouvelle catégorie

-
- - -
-
- -
-
-
-
-
- -
-
+
-
+ + +
Connecté avec le compte : {$smarty.session.user.user_name} {$smarty.session.user.user_firstname} + {/block} \ No newline at end of file diff --git a/views/projet_display.tpl b/views/project_display.tpl similarity index 87% rename from views/projet_display.tpl rename to views/project_display.tpl index 21301dc..181802c 100644 --- a/views/projet_display.tpl +++ b/views/project_display.tpl @@ -58,11 +58,11 @@
- - - + + +
{$objProject->getCreatorName()}

diff --git a/views/user.tpl b/views/user.tpl new file mode 100644 index 0000000..f295280 --- /dev/null +++ b/views/user.tpl @@ -0,0 +1,43 @@ +{extends file="views/layout.tpl"} + +{block name="content"} + +

+ +
+

Les projets de {$user->getPseudo()}

+ +
+ {if count($arrProjectToDisplay) > 0} + {foreach $arrProjectToDisplay as $objProject} +
+ {include file="views/_partial/preview.tpl"} +
+ {/foreach} + {else} +

Cet utilisateur n'a pas encore publié de projets.

+ {/if} +
+
+ +{/block} \ No newline at end of file From 028c106e7322c78995f9189b0557cd930916f068 Mon Sep 17 00:00:00 2001 From: Yass <102179445+Yasder5@users.noreply.github.com> Date: Wed, 11 Feb 2026 16:11:43 +0100 Subject: [PATCH 15/22] Update navbar brand link to point to index.php --- views/_partial/header.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/_partial/header.tpl b/views/_partial/header.tpl index d7da06d..628dafc 100644 --- a/views/_partial/header.tpl +++ b/views/_partial/header.tpl @@ -13,7 +13,7 @@ - \ No newline at end of file + From a8d3762b1956bcb0ab7bf1d6c5f038394f2ef6a6 Mon Sep 17 00:00:00 2001 From: Yass <102179445+Yasder5@users.noreply.github.com> Date: Wed, 11 Feb 2026 16:14:14 +0100 Subject: [PATCH 16/22] Rename Logo.png to logo.png --- assests/img/{Logo.png => logo.png} | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename assests/img/{Logo.png => logo.png} (100%) diff --git a/assests/img/Logo.png b/assests/img/logo.png similarity index 100% rename from assests/img/Logo.png rename to assests/img/logo.png From d319e5ef986b68c46e9b0b21ff25758bb31be917 Mon Sep 17 00:00:00 2001 From: Yass <102179445+Yasder5@users.noreply.github.com> Date: Wed, 11 Feb 2026 16:20:57 +0100 Subject: [PATCH 17/22] Fix image tag indentation in preview template --- views/_partial/preview.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/_partial/preview.tpl b/views/_partial/preview.tpl index 3ed2470..2358163 100644 --- a/views/_partial/preview.tpl +++ b/views/_partial/preview.tpl @@ -15,7 +15,7 @@
{* PHOTO DE PROFIL *} - Photo de profil @@ -50,4 +50,4 @@ {elseif $projectStatus eq "refusé"}

Portfolio refusé

{/if} - \ No newline at end of file + From 395772e2a9e32e9678f641135fe8469a60a27d61 Mon Sep 17 00:00:00 2001 From: Yass <102179445+Yasder5@users.noreply.github.com> Date: Wed, 11 Feb 2026 16:21:24 +0100 Subject: [PATCH 18/22] Fix image source syntax in header template --- views/_partial/header.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/_partial/header.tpl b/views/_partial/header.tpl index 628dafc..a333052 100644 --- a/views/_partial/header.tpl +++ b/views/_partial/header.tpl @@ -71,7 +71,7 @@
-getValue('objProject')->getStatus() == "en_attente") {?> + + getValue('projectStatus') == "refusé") {?> +

Portfolio refusé

+ + +getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989b4162cc7a7_31054147', + 'unifunc' => 'content_698b1fd2698769_42709444', 'has_nocache_code' => false, 'file_dependency' => array ( '72e5e5c0ee2729980deadb1687a6d7b7b3c501bb' => array ( 0 => 'views/search.tpl', - 1 => 1770580115, + 1 => 1770649781, 2 => 'file', ), ), @@ -21,18 +21,18 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( 'file:views/_partial/preview.tpl' => 1, ), ))) { -function content_6989b4162cc7a7_31054147 (\Smarty\Template $_smarty_tpl) { +function content_698b1fd2698769_42709444 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'D:\\projetphp\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, true); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_1139012436989b4162bac57_95455595', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_1250328584698b1fd263a267_71319682', "content"); $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); } /* {block "content"} */ -class Block_1139012436989b4162bac57_95455595 extends \Smarty\Runtime\Block +class Block_1250328584698b1fd263a267_71319682 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'D:\\projetphp\\views'; diff --git a/templates_c/8056b95e7f6b28be5e36947735d13c8d176ec944_0.file_header.tpl.php b/templates_c/8056b95e7f6b28be5e36947735d13c8d176ec944_0.file_header.tpl.php index bdde77a..478541c 100644 --- a/templates_c/8056b95e7f6b28be5e36947735d13c8d176ec944_0.file_header.tpl.php +++ b/templates_c/8056b95e7f6b28be5e36947735d13c8d176ec944_0.file_header.tpl.php @@ -1,18 +1,18 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989b4164decf6_40046278', + 'unifunc' => 'content_698cb22c174be6_98238317', 'has_nocache_code' => false, 'file_dependency' => array ( '8056b95e7f6b28be5e36947735d13c8d176ec944' => array ( 0 => 'views/_partial/header.tpl', - 1 => 1770631509, + 1 => 1770827564, 2 => 'file', ), ), @@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_6989b4164decf6_40046278 (\Smarty\Template $_smarty_tpl) { +function content_698cb22c174be6_98238317 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'D:\\projetphp\\views\\_partial'; ?> @@ -38,7 +38,7 @@ $_smarty_current_dir = 'D:\\projetphp\\views\\_partial'; - +getCompiled()->isFresh($_smarty_tpl, array ( + 'version' => '5.7.0', + 'unifunc' => 'content_698cb22bf10520_97303160', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + 'ac38676c030d472426b3bc83bc530b255f98de05' => + array ( + 0 => 'views/user.tpl', + 1 => 1770828319, + 2 => 'file', + ), + ), + 'includes' => + array ( + 'file:views/_partial/preview.tpl' => 1, + ), +))) { +function content_698cb22bf10520_97303160 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'D:\\projetphp\\views'; +$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); +?> + + +getInheritance()->instanceBlock($_smarty_tpl, 'Block_1767111791698cb22bf02113_69556474', "content"); +$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); +} +/* {block "content"} */ +class Block_1767111791698cb22bf02113_69556474 extends \Smarty\Runtime\Block +{ +public function callBlock(\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'D:\\projetphp\\views'; +?> + + + + +
+

Les projets de getValue('user')->getPseudo();?> +

+ +
+ getSmarty()->getModifierCallback('count')($_smarty_tpl->getValue('arrProjectToDisplay')) > 0) {?> + getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrProjectToDisplay'), 'objProject'); +$foreach0DoElse = true; +foreach ($_from ?? [] as $_smarty_tpl->getVariable('objProject')->value) { +$foreach0DoElse = false; +?> + renderSubTemplate("file:views/_partial/preview.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir); +?> + getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?> + +

Cet utilisateur n'a pas encore publié de projets.

+ +
+
+ +getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989b40d157c69_73022561', + 'unifunc' => 'content_698cb184850a13_72728685', 'has_nocache_code' => false, 'file_dependency' => array ( 'b44ab733c93381dbf5dbbeae871506874cefd9d6' => array ( 0 => 'views/login.tpl', - 1 => 1770632188, + 1 => 1770649781, 2 => 'file', ), ), @@ -20,18 +20,18 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_6989b40d157c69_73022561 (\Smarty\Template $_smarty_tpl) { +function content_698cb184850a13_72728685 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'D:\\projetphp\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, true); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_3583856956989b40d14e663_91083378', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_1715533627698cb184847324_20686696', "content"); $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); } /* {block "content"} */ -class Block_3583856956989b40d14e663_91083378 extends \Smarty\Runtime\Block +class Block_1715533627698cb184847324_20686696 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'D:\\projetphp\\views'; diff --git a/views/_partial/preview.tpl b/views/_partial/preview.tpl index d0dbe2f..7ce59f0 100644 --- a/views/_partial/preview.tpl +++ b/views/_partial/preview.tpl @@ -38,11 +38,13 @@ class="stretched-link small"> Lire la suite →
- {if $smarty.session.user.user_id == $objProject->getUser()} - - Editer - + {if isset($smarty.session.user)} + {if $smarty.session.user.user_id == $objProject->getUser()} + + Editer + + {/if} {/if}
diff --git a/views/project_display.tpl b/views/project_display.tpl index 181802c..9500283 100644 --- a/views/project_display.tpl +++ b/views/project_display.tpl @@ -59,7 +59,7 @@
- diff --git a/views/user.tpl b/views/user.tpl index f295280..1a6ba54 100644 --- a/views/user.tpl +++ b/views/user.tpl @@ -5,7 +5,7 @@ + Date: Wed, 11 Feb 2026 18:21:19 +0100 Subject: [PATCH 21/22] ajouter affichage erreur inscription --- controllers/user_controller.php | 2 +- ...5df178eaf9a1be4_0.file_inscription.tpl.php | 43 +++++++++++++++---- ...82584009ce981aa35e0b_0.file_layout.tpl.php | 10 ++--- ...56e3cf6837f9df55d7fb_0.file_footer.tpl.php | 6 +-- ...2993687bad91a1cf0f6_0.file_preview.tpl.php | 6 +-- ...db1687a6d7b7b3c501bb_0.file_search.tpl.php | 10 ++--- ...947735d13c8d176ec944_0.file_header.tpl.php | 6 +-- ...bbeae871506874cefd9d6_0.file_login.tpl.php | 10 ++--- views/inscription.tpl | 23 +++++++++- 9 files changed, 81 insertions(+), 35 deletions(-) diff --git a/controllers/user_controller.php b/controllers/user_controller.php index 0d760eb..24b8c11 100644 --- a/controllers/user_controller.php +++ b/controllers/user_controller.php @@ -127,7 +127,6 @@ class UserCtrl extends MotherCtrl { // Si pas d'erreurs => insertion if (count($arrError) === 0) { $objUserModel = new UserModel(); - $boolInsert = $objUserModel->insert($objUser); if ($objUserModel->mailExists($objUser->getMail())) { @@ -147,6 +146,7 @@ class UserCtrl extends MotherCtrl { } // Affichage de la vue inscription + var_dump($arrError); $this->_arrData["arrError"] = $arrError; $this->_display("inscription"); } diff --git a/templates_c/184f81453f2b8e9c87b8f61bf5df178eaf9a1be4_0.file_inscription.tpl.php b/templates_c/184f81453f2b8e9c87b8f61bf5df178eaf9a1be4_0.file_inscription.tpl.php index b0fbf5b..89d19a3 100644 --- a/templates_c/184f81453f2b8e9c87b8f61bf5df178eaf9a1be4_0.file_inscription.tpl.php +++ b/templates_c/184f81453f2b8e9c87b8f61bf5df178eaf9a1be4_0.file_inscription.tpl.php @@ -1,18 +1,18 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_698cb0f3a8c260_72571411', + 'unifunc' => 'content_698cba62a72df8_61715147', 'has_nocache_code' => false, 'file_dependency' => array ( '184f81453f2b8e9c87b8f61bf5df178eaf9a1be4' => array ( 0 => 'views/inscription.tpl', - 1 => 1770649781, + 1 => 1770830431, 2 => 'file', ), ), @@ -20,18 +20,18 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_698cb0f3a8c260_72571411 (\Smarty\Template $_smarty_tpl) { +function content_698cba62a72df8_61715147 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'D:\\projetphp\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, true); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_268185928698cb0f3a8a4d2_62245512', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_1012653795698cba62a6b7c0_71138616', "content"); $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); } /* {block "content"} */ -class Block_268185928698cb0f3a8a4d2_62245512 extends \Smarty\Runtime\Block +class Block_1012653795698cba62a6b7c0_71138616 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'D:\\projetphp\\views'; @@ -43,7 +43,7 @@ $_smarty_current_dir = 'D:\\projetphp\\views';
-
+
@@ -56,7 +56,21 @@ $_smarty_current_dir = 'D:\\projetphp\\views';

Créez votre compte utilisateur.

- + hasVariable('arrError') && null !== ($_smarty_tpl->getValue('arrError') ?? null))) && $_smarty_tpl->getSmarty()->getModifierCallback('count')($_smarty_tpl->getValue('arrError')) > 0)) {?> +
+ getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrError'), 'strError'); +$foreach0DoElse = true; +foreach ($_from ?? [] as $_smarty_tpl->getVariable('strError')->value) { +$foreach0DoElse = false; +?> +

getValue('strError');?> +

+ getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?> +
+
@@ -134,6 +148,19 @@ $_smarty_current_dir = 'D:\\projetphp\\views'; required >
+ +
+ + +
diff --git a/templates_c/1c51ad9f5c349145220f82584009ce981aa35e0b_0.file_layout.tpl.php b/templates_c/1c51ad9f5c349145220f82584009ce981aa35e0b_0.file_layout.tpl.php index f9e8c93..b2af63a 100644 --- a/templates_c/1c51ad9f5c349145220f82584009ce981aa35e0b_0.file_layout.tpl.php +++ b/templates_c/1c51ad9f5c349145220f82584009ce981aa35e0b_0.file_layout.tpl.php @@ -1,11 +1,11 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_698cb4496b9cb3_04936871', + 'unifunc' => 'content_698cba62b4e137_64473486', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -22,21 +22,21 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( 'file:views/_partial/footer.tpl' => 1, ), ))) { -function content_698cb4496b9cb3_04936871 (\Smarty\Template $_smarty_tpl) { +function content_698cba62b4e137_64473486 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'D:\\projetphp\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, false); $_smarty_tpl->renderSubTemplate("file:views/_partial/header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_382193566698cb4496b8402_05526599', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_1102964570698cba62b4c8c6_53649331', "content"); ?> renderSubTemplate("file:views/_partial/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir); } /* {block "content"} */ -class Block_382193566698cb4496b8402_05526599 extends \Smarty\Runtime\Block +class Block_1102964570698cba62b4c8c6_53649331 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'D:\\projetphp\\views'; diff --git a/templates_c/264314e384c04e79c5fa56e3cf6837f9df55d7fb_0.file_footer.tpl.php b/templates_c/264314e384c04e79c5fa56e3cf6837f9df55d7fb_0.file_footer.tpl.php index 010a944..1eabb22 100644 --- a/templates_c/264314e384c04e79c5fa56e3cf6837f9df55d7fb_0.file_footer.tpl.php +++ b/templates_c/264314e384c04e79c5fa56e3cf6837f9df55d7fb_0.file_footer.tpl.php @@ -1,11 +1,11 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_698cb4497a9957_69792336', + 'unifunc' => 'content_698cba62c7aed8_62552440', 'has_nocache_code' => false, 'file_dependency' => array ( @@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_698cb4497a9957_69792336 (\Smarty\Template $_smarty_tpl) { +function content_698cba62c7aed8_62552440 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'D:\\projetphp\\views\\_partial'; ?>