From b6ca8980696f78f6df2449b99e5cb38d0b277258 Mon Sep 17 00:00:00 2001 From: GuillaumeH-Cci Date: Tue, 17 Feb 2026 19:07:16 +0100 Subject: [PATCH] =?UTF-8?q?D=C3=A9bug,=20acc=C3=A8s=20de=20la=20view=20add?= =?UTF-8?q?edit=5Fproject=20via=20le=20header=20et=20formulaire=20pr=C3=AA?= =?UTF-8?q?t=20=C3=A0=20l'emplois?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/project_controller.php | 36 ++- controllers/user_controller.php | 18 +- ...149077158460_0.file_projet_display.tpl.php | 128 --------- ...94486bfa02ee91c2c5fe68_0.file_home.tpl.php | 84 ------ ...263fe8f31fee7c6055e56_0.file_login.tpl.php | 164 ----------- ...5df178eaf9a1be4_0.file_inscription.tpl.php | 245 ---------------- ...82584009ce981aa35e0b_0.file_layout.tpl.php | 50 ---- ...519973f0177a783a4561_0.file_header.tpl.php | 10 +- ...26123a0c3ef155eae59b_0.file_footer.tpl.php | 63 ----- ...56e3cf6837f9df55d7fb_0.file_footer.tpl.php | 63 ----- ...16434b0dddc13d6ee22b4c_0.file_user.tpl.php | 99 ------- ...69c67d6dd307aa06ae3_0.file_project.tpl.php | 110 -------- ...803dc4119c46e490c52_0.file_preview.tpl.php | 6 +- ...a455c22b1bd_0.file_project_display.tpl.php | 129 --------- ...dd21546b63477a6bc296_0.file_layout.tpl.php | 50 ---- ...ce4a78a4dbca_0.file_projet_display.tpl.php | 128 --------- ...429efee0d6437582d377e_0.file_login.tpl.php | 164 ----------- ...12628e44c1dff2d9365b_0.file_search.tpl.php | 261 ------------------ ...2993687bad91a1cf0f6_0.file_preview.tpl.php | 97 ------- ...da665dc59ccdf89588f2_0.file_search.tpl.php | 261 ------------------ ...8ed73fcd1924b1bda41b_0.file_layout.tpl.php | 10 +- ...db1687a6d7b7b3c501bb_0.file_search.tpl.php | 261 ------------------ ...f5b7b444b7670474263f88_0.file_home.tpl.php | 10 +- ...947735d13c8d176ec944_0.file_header.tpl.php | 111 -------- ...67988eba5ded_0.file_projet_display.tpl.php | 128 --------- ...af2d8a8255035d91b950_0.file_layout.tpl.php | 50 ---- ...b3bc83bc530b255f98de05_0.file_user.tpl.php | 98 ------- ...3f0963ead4008a7bda8fb_0.file_admin.tpl.php | 235 ---------------- ...809f87f59bd19d86da99_0.file_footer.tpl.php | 63 ----- ...531347290b4e4994470b_0.file_header.tpl.php | 115 -------- ...bbeae871506874cefd9d6_0.file_login.tpl.php | 164 ----------- ...7634a5658ae38c7b520_0.file_preview.tpl.php | 69 ----- ...b03b8d137ec1edb99bdd92_0.file_home.tpl.php | 84 ------ ...6938ec13f0fa_0.file_projet_display.tpl.php | 128 --------- ...9dcacc6c7b4e161e98a2_0.file_footer.tpl.php | 6 +- ...533821a89d7d735c5727_0.file_header.tpl.php | 111 -------- ...22152a4d410b20abede_0.file_preview.tpl.php | 99 ------- ...f203d582a8cc367e0bd265_0.file_home.tpl.php | 84 ------ ...c0e3f74733796438d51_0.file_project.tpl.php | 10 +- ...f497c64277110a78bc40_0.file_search.tpl.php | 261 ------------------ ...6d4c74f4917d3685101_0.file_project.tpl.php | 150 ---------- ...66afa34a71b920e_0.file_inscription.tpl.php | 218 --------------- ...ad4f73c431db5dba4722b_0.file_admin.tpl.php | 214 -------------- views/addedit_project.tpl | 79 ++++-- views/project.tpl | 2 +- views/projet_display.tpl | 79 ------ 46 files changed, 109 insertions(+), 4896 deletions(-) delete mode 100644 templates_c/061ec8f4caa90f6cac9dd0d1f101149077158460_0.file_projet_display.tpl.php delete mode 100644 templates_c/0f54e8b5c9bcafd01d94486bfa02ee91c2c5fe68_0.file_home.tpl.php delete mode 100644 templates_c/10875d611111c4d51c8263fe8f31fee7c6055e56_0.file_login.tpl.php delete mode 100644 templates_c/184f81453f2b8e9c87b8f61bf5df178eaf9a1be4_0.file_inscription.tpl.php delete mode 100644 templates_c/1c51ad9f5c349145220f82584009ce981aa35e0b_0.file_layout.tpl.php delete mode 100644 templates_c/233722999fd7fbe3307e26123a0c3ef155eae59b_0.file_footer.tpl.php delete mode 100644 templates_c/264314e384c04e79c5fa56e3cf6837f9df55d7fb_0.file_footer.tpl.php delete mode 100644 templates_c/32d027bc6f198a0e3016434b0dddc13d6ee22b4c_0.file_user.tpl.php delete mode 100644 templates_c/3309f8a981537e6cbbf8869c67d6dd307aa06ae3_0.file_project.tpl.php delete mode 100644 templates_c/4c2b74d2d77abca5363ffd92e8bc3a455c22b1bd_0.file_project_display.tpl.php delete mode 100644 templates_c/50db0f04b5a0bd45d280dd21546b63477a6bc296_0.file_layout.tpl.php delete mode 100644 templates_c/52c011ce77c5dc743b6591550c55ce4a78a4dbca_0.file_projet_display.tpl.php delete mode 100644 templates_c/5375cd75c92fd8c801b429efee0d6437582d377e_0.file_login.tpl.php delete mode 100644 templates_c/55cbb497c7dde2dae3a712628e44c1dff2d9365b_0.file_search.tpl.php delete mode 100644 templates_c/67e1ae3a210fc2d1bf8782993687bad91a1cf0f6_0.file_preview.tpl.php delete mode 100644 templates_c/6d89f62fd107a769c92bda665dc59ccdf89588f2_0.file_search.tpl.php delete mode 100644 templates_c/72e5e5c0ee2729980deadb1687a6d7b7b3c501bb_0.file_search.tpl.php delete mode 100644 templates_c/8056b95e7f6b28be5e36947735d13c8d176ec944_0.file_header.tpl.php delete mode 100644 templates_c/858273afeea443d46db5cb9b3c1c67988eba5ded_0.file_projet_display.tpl.php delete mode 100644 templates_c/947d9aa54bf412a952e2af2d8a8255035d91b950_0.file_layout.tpl.php delete mode 100644 templates_c/ac38676c030d472426b3bc83bc530b255f98de05_0.file_user.tpl.php delete mode 100644 templates_c/ac77f39f91cdf26a0eb3f0963ead4008a7bda8fb_0.file_admin.tpl.php delete mode 100644 templates_c/b1b065356827f03a32a2809f87f59bd19d86da99_0.file_footer.tpl.php delete mode 100644 templates_c/b3c0a235f975d8741b25531347290b4e4994470b_0.file_header.tpl.php delete mode 100644 templates_c/b44ab733c93381dbf5dbbeae871506874cefd9d6_0.file_login.tpl.php delete mode 100644 templates_c/b70ee0d22061ca6100f647634a5658ae38c7b520_0.file_preview.tpl.php delete mode 100644 templates_c/ca790de9f8d5a4fc03b03b8d137ec1edb99bdd92_0.file_home.tpl.php delete mode 100644 templates_c/ccb74eb5d50d5c45223723021f206938ec13f0fa_0.file_projet_display.tpl.php delete mode 100644 templates_c/d1ce76cd275b7aacbc06533821a89d7d735c5727_0.file_header.tpl.php delete mode 100644 templates_c/d60fb02b58bc4794052e022152a4d410b20abede_0.file_preview.tpl.php delete mode 100644 templates_c/dec070599de91da0c8f203d582a8cc367e0bd265_0.file_home.tpl.php delete mode 100644 templates_c/ebfd968608976813e893f497c64277110a78bc40_0.file_search.tpl.php delete mode 100644 templates_c/eda0e4559a4ddfacbd33a6d4c74f4917d3685101_0.file_project.tpl.php delete mode 100644 templates_c/ee86afd5d4dff200944f3436866afa34a71b920e_0.file_inscription.tpl.php delete mode 100644 templates_c/f80694cc4829becd656ad4f73c431db5dba4722b_0.file_admin.tpl.php delete mode 100644 views/projet_display.tpl diff --git a/controllers/project_controller.php b/controllers/project_controller.php index 6d57fd3..5dd98dc 100644 --- a/controllers/project_controller.php +++ b/controllers/project_controller.php @@ -88,9 +88,6 @@ $this->_arrData['arrProject'] = $arrProject; $this->_arrData['arrUser'] = $arrUser; - - - $this->_display("search"); } @@ -154,12 +151,17 @@ $objProject->hydrate($_SESSION); $objProject->setThumbnail($strDest); $objProjectModel->insert($objProject); + header("Location: index.php"); + exit; + } - } else if (isset($_POST['toContinue'])) { - $objProject->hydrate($_SESSION); - $objProject->setThumbnail($strDest); + // } else if (isset($_POST['toContinue'])) { + // $objProject->hydrate($_SESSION); + // $objProject->setThumbnail($strDest); //$objProjectModel->insert($objProject); - } + // header("Location: index.php"); + // exit; + // } var_dump($_SESSION); var_dump($objProject); @@ -168,10 +170,8 @@ $this->_arrData['arrProjectToDiplay'] = $arrProjectToDisplay; $this->_arrData['arrImageToDiplay'] = $arrImageToDisplay; - $this->_display("project"); - - header("Location: index.php"); - exit; + $this->_display("project"); // _display('addedit_project'); // findAllCategory(); + + $_SESSION['category']= $_POST['category']??0; + + $this->_arrData['arrCategory'] = $arrCategory; + + $this->_display('addedit_project'); + } + } \ No newline at end of file diff --git a/controllers/user_controller.php b/controllers/user_controller.php index e2cebfa..ccba625 100644 --- a/controllers/user_controller.php +++ b/controllers/user_controller.php @@ -154,7 +154,7 @@ class UserCtrl extends MotherCtrl { $intId = isset($_GET['id']) ? (int)$_GET['id'] : 0; if ($intId <= 0) { - header("Location: index.php"); + header("Location:index.php"); exit; } @@ -163,7 +163,7 @@ class UserCtrl extends MotherCtrl { $arrUserData = $objUserModel->findUserById($intId); if ($arrUserData === false) { - header("Location: index.php"); + header("Location:index.php"); exit; } $objUser = new User; @@ -184,19 +184,5 @@ class UserCtrl extends MotherCtrl { $this->_arrData['arrProjectToDisplay'] = $arrProjectToDisplay; $this->_display("user"); } - - public function addedit_project(){ - - // Voir si l'utilisateur est connecté ? Retour sur l'index sinon - $intId = isset($_GET['id']) ? (int)$_GET['id'] : 0; - - if ($intId <= 0){ - header("Location: index.php"); - exit; - } - - header("Location: index.php?ctrl=project&action=addedit_project"); - exit; - } } diff --git a/templates_c/061ec8f4caa90f6cac9dd0d1f101149077158460_0.file_projet_display.tpl.php b/templates_c/061ec8f4caa90f6cac9dd0d1f101149077158460_0.file_projet_display.tpl.php deleted file mode 100644 index 825c29f..0000000 --- a/templates_c/061ec8f4caa90f6cac9dd0d1f101149077158460_0.file_projet_display.tpl.php +++ /dev/null @@ -1,128 +0,0 @@ -getCompiled()->isFresh($_smarty_tpl, array ( - 'version' => '5.7.0', - 'unifunc' => 'content_6989e58c411304_60305191', - 'has_nocache_code' => false, - 'file_dependency' => - array ( - '061ec8f4caa90f6cac9dd0d1f101149077158460' => - array ( - 0 => 'views/projet_display.tpl', - 1 => 1770639154, - 2 => 'file', - ), - ), - 'includes' => - array ( - ), -))) { -function content_6989e58c411304_60305191 (\Smarty\Template $_smarty_tpl) { -$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\projet_php-guillaume\\views'; -$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); -?> - - -getInheritance()->instanceBlock($_smarty_tpl, 'Block_13978244256989e58c406518_61332798', "content"); -$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); -} -/* {block "content"} */ -class Block_13978244256989e58c406518_61332798 extends \Smarty\Runtime\Block -{ -public function callBlock(\Smarty\Template $_smarty_tpl) { -$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\projet_php-guillaume\\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_698ce8475ca6c5_70769879', - 'has_nocache_code' => false, - 'file_dependency' => - array ( - '0f54e8b5c9bcafd01d94486bfa02ee91c2c5fe68' => - array ( - 0 => 'views/home.tpl', - 1 => 1770721453, - 2 => 'file', - ), - ), - 'includes' => - array ( - 'file:views/_partial/preview.tpl' => 1, - ), -))) { -function content_698ce8475ca6c5_70769879 (\Smarty\Template $_smarty_tpl) { -$_smarty_current_dir = 'D:\\projetphp\\views'; -$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); -?> - - -getInheritance()->instanceBlock($_smarty_tpl, 'Block_1240817329698ce8475c5f82_37934128', "content"); -?> - -getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); -} -/* {block "content"} */ -class Block_1240817329698ce8475c5f82_37934128 extends \Smarty\Runtime\Block -{ -public function callBlock(\Smarty\Template $_smarty_tpl) { -$_smarty_current_dir = 'D:\\projetphp\\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_699485bdc8dc40_80399906', - 'has_nocache_code' => false, - 'file_dependency' => - array ( - '10875d611111c4d51c8263fe8f31fee7c6055e56' => - array ( - 0 => 'views/login.tpl', - 1 => 1770795606, - 2 => 'file', - ), - ), - 'includes' => - array ( - ), -))) { -function content_699485bdc8dc40_80399906 (\Smarty\Template $_smarty_tpl) { -$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views'; -$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); -?> - - -getInheritance()->instanceBlock($_smarty_tpl, 'Block_1446317869699485bdc3a914_83043646', "content"); -$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); -} -/* {block "content"} */ -class Block_1446317869699485bdc3a914_83043646 extends \Smarty\Runtime\Block -{ -public function callBlock(\Smarty\Template $_smarty_tpl) { -$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views'; -?> - -
- 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);?> -
- - -
- - -
- -
- - -
-
- - -
- - -

Connexion

- - -

- Connectez-vous à votre compte. -

- - - -
- -
- - -
- - -
- - -
- - -
- - -
-
- - -
-
- - -
- -
- - -
- - Pas encore de compte ? - Créer un compte - -
- - - - -
-
- -
- -
-
-
-
-getCompiled()->isFresh($_smarty_tpl, array ( - 'version' => '5.7.0', - 'unifunc' => 'content_698cba62a72df8_61715147', - 'has_nocache_code' => false, - 'file_dependency' => - array ( - '184f81453f2b8e9c87b8f61bf5df178eaf9a1be4' => - array ( - 0 => 'views/inscription.tpl', - 1 => 1770830431, - 2 => 'file', - ), - ), - 'includes' => - array ( - ), -))) { -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_1012653795698cba62a6b7c0_71138616', "content"); -$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); -} -/* {block "content"} */ -class Block_1012653795698cba62a6b7c0_71138616 extends \Smarty\Runtime\Block -{ -public function callBlock(\Smarty\Template $_smarty_tpl) { -$_smarty_current_dir = 'D:\\projetphp\\views'; -?> - - - - -
- - -
-
- - -
- - -

Inscription

- - -

- 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);?> -
- - - -
- -
- - -
- - -
- - -
- - -
- - -
- -
- @ - -
-
- - -
- - -
- - -
- - -
- -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- -
- - -
- - Déjà un compte ? - Se connecter - -
- - -
- - -
- -
-
-
-getCompiled()->isFresh($_smarty_tpl, array ( - 'version' => '5.7.0', - 'unifunc' => 'content_698ce84e84dcc1_11117501', - 'has_nocache_code' => false, - 'file_dependency' => - array ( - '1c51ad9f5c349145220f82584009ce981aa35e0b' => - array ( - 0 => 'views/layout.tpl', - 1 => 1770649781, - 2 => 'file', - ), - ), - 'includes' => - array ( - 'file:views/_partial/header.tpl' => 1, - 'file:views/_partial/footer.tpl' => 1, - ), -))) { -function content_698ce84e84dcc1_11117501 (\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_2114043754698ce84e84c177_54195501', "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_2114043754698ce84e84c177_54195501 extends \Smarty\Runtime\Block -{ -public function callBlock(\Smarty\Template $_smarty_tpl) { -$_smarty_current_dir = 'D:\\projetphp\\views'; -?> - - -getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_69949cd5a907e4_36611222', + 'unifunc' => 'content_69949df5dbc684_52022028', 'has_nocache_code' => false, 'file_dependency' => array ( '20a11b6ecdc7e0959bdb519973f0177a783a4561' => array ( 0 => 'views/_partial/header.tpl', - 1 => 1771345389, + 1 => 1771347290, 2 => 'file', ), ), @@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_69949cd5a907e4_36611222 (\Smarty\Template $_smarty_tpl) { +function content_69949df5dbc684_52022028 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\projet_php-guillaume\\views\\_partial'; ?> @@ -58,7 +58,7 @@ $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\projet_php-guillaume\\views\\_