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.

-
- -
-
-
- - - - - - Tout -
-
-
- -
-

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\\_