From a7742055942c52c549ab170af519a23b7ca43baf Mon Sep 17 00:00:00 2001 From: Yasder5 <102179445+Yasder5@users.noreply.github.com> Date: Sun, 8 Feb 2026 20:57:52 +0100 Subject: [PATCH] =?UTF-8?q?smarty=20fini=20(pour=20l'instant=20(=E2=95=A5?= =?UTF-8?q?=EF=B9=8F=E2=95=A5)=20)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/database.php | 6 +- controllers/admin_controller.php | 45 +-- controllers/project_controller.php | 58 +++- ...94486bfa02ee91c2c5fe68_0.file_home.tpl.php | 71 +++++ ...5df178eaf9a1be4_0.file_inscription.tpl.php | 218 +++++++++++++++ ...82584009ce981aa35e0b_0.file_layout.tpl.php | 50 ++++ ...56e3cf6837f9df55d7fb_0.file_footer.tpl.php | 35 ++- ...2993687bad91a1cf0f6_0.file_preview.tpl.php | 69 +++++ ...db1687a6d7b7b3c501bb_0.file_search.tpl.php | 261 ++++++++++++++++++ ...947735d13c8d176ec944_0.file_header.tpl.php | 60 ++-- ...bbeae871506874cefd9d6_0.file_login.tpl.php | 83 ++++++ ...c811496cf0ce7d4ac25_0.file_project.tpl.php | 110 ++++++++ ...ad4f73c431db5dba4722b_0.file_admin.tpl.php | 164 +++++++++++ views/{admin.php => admin.tpl} | 0 views/connexion.php | 191 ------------- views/project.php | 115 -------- views/project.tpl | 62 +++++ views/{search.php => search.tpl} | 59 ++-- 18 files changed, 1256 insertions(+), 401 deletions(-) create mode 100644 templates_c/0f54e8b5c9bcafd01d94486bfa02ee91c2c5fe68_0.file_home.tpl.php create mode 100644 templates_c/184f81453f2b8e9c87b8f61bf5df178eaf9a1be4_0.file_inscription.tpl.php create mode 100644 templates_c/1c51ad9f5c349145220f82584009ce981aa35e0b_0.file_layout.tpl.php rename views/footer.tpl => templates_c/264314e384c04e79c5fa56e3cf6837f9df55d7fb_0.file_footer.tpl.php (53%) create mode 100644 templates_c/67e1ae3a210fc2d1bf8782993687bad91a1cf0f6_0.file_preview.tpl.php create mode 100644 templates_c/72e5e5c0ee2729980deadb1687a6d7b7b3c501bb_0.file_search.tpl.php rename views/header.tpl => templates_c/8056b95e7f6b28be5e36947735d13c8d176ec944_0.file_header.tpl.php (65%) create mode 100644 templates_c/b44ab733c93381dbf5dbbeae871506874cefd9d6_0.file_login.tpl.php create mode 100644 templates_c/cf8cd41232f90f60b8532c811496cf0ce7d4ac25_0.file_project.tpl.php create mode 100644 templates_c/f80694cc4829becd656ad4f73c431db5dba4722b_0.file_admin.tpl.php rename views/{admin.php => admin.tpl} (100%) delete mode 100644 views/connexion.php delete mode 100644 views/project.php create mode 100644 views/project.tpl rename views/{search.php => search.tpl} (79%) diff --git a/config/database.php b/config/database.php index e24c28e..c259719 100644 --- a/config/database.php +++ b/config/database.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 - "root", //Nom d'utilisateur de la base de données - "",// Mot de passe de la base de données + "mysql:host=boulayoune.com;dbname=projet_folliow", // Serveur et BDD + "projet_user", //Nom d'utilisateur de la base de données + "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 diff --git a/controllers/admin_controller.php b/controllers/admin_controller.php index de10b7a..dd4c1cf 100644 --- a/controllers/admin_controller.php +++ b/controllers/admin_controller.php @@ -1,14 +1,13 @@ setName($_POST['category_name'] ?? ""); - $objCategory->setParent($_POST['category_parent'] ?? ""); - - $objCategoryModel = new CategoryModel(); - $boolInsert = $objCategoryModel->insert($objCategory); - - EN ATTENTE - if ($boolInsert === true) { - $_SESSION['success'] = "Catégorie ajoutée avec succès"; - header("Location:index.php?ctrl=admin&action=admin"); - exit; - } else { - // Erreur globale - $arrError['global'] = "Erreur lors de l'ajout"; - } - */ - - include('../app/views/admin.php'); + class AdminCtrl extends MotherCtrl{ + public function admin(){ + + $this->_display("admin"); + } } diff --git a/controllers/project_controller.php b/controllers/project_controller.php index 7fdc9c4..216b1b9 100644 --- a/controllers/project_controller.php +++ b/controllers/project_controller.php @@ -5,6 +5,8 @@ require("./entities/category_entity.php"); require("./models/image_model.php"); require("./entities/image_entity.php"); + require("./models/user_model.php"); + require("./entities/user_entity.php"); require("mother_controller.php"); /** @@ -77,7 +79,7 @@ - include('../app/views/search.php'); + $this->_display("search"); } /** @@ -104,16 +106,62 @@ $objImage->hydrate($arrDetImage); $arrImageToDiplay[] = $objImage; } + //Variable data + $_SESSION['title'] = $_POST['titleProject']??""; + $_SESSION['description'] = $_POST['descProject']??""; + $_SESSION['content'] = $_POST['textProject']??""; + $_SESSION['thumbnail'] = $_FILES['imageProject']['name']??""; + $_SESSION['status'] = 'en_attente'; - include("../app/views/partials/header.php"); - include('../app/views/project.php'); - include('../app/views/partials/footer.php'); + + $objProject = new Project(); + + /** + /* Créer par Besnik le GOAT et l'autre GOAT de Guillaume + /* + /* @return bool pour savoir si le fichier existe, + /* puis déplace vers le fichier uploads avec les images projet des utilisateurs + /* Communication avec la BDD + */ + if (($_SESSION['thumbnail'] != null)){ + $strDest = ""; + if ((count($_FILES) > 0) && ($_FILES['imageProject']['error'] != 4)){ + $strDest = '../public/uploads/projects/'.$_FILES['imageProject']['name']; + var_dump($strDest); + move_uploaded_file($_FILES['imageProject']['tmp_name'], $strDest); + } + } + + /** En cas d'appuis sur le bouton d'envoie ou celui de remettre a plus tard + /* 1. Changement de status + /* 2. Hydratation avec les informations récupéré de l'utilisateur + /* 3. Envoie des données à la BDD + */ + if (isset($_POST['sendMessage'])) { + $_SESSION['status'] = 'publié'; + $objProject->hydrate($_SESSION); + $objProject->setThumbnail($strDest); + $objProjectModel->insert($objProject); + + } else if (isset($_POST['toContinue'])) { + $objProject->hydrate($_SESSION); + $objProject->setThumbnail($strDest); + $objProjectModel->insert($objProject); + } + + //Débuggage + var_dump($_SESSION); + var_dump($objProject); + $this->_arrData['arrProjectToDiplay'] = $arrProjectToDiplay; + $this->_arrData['arrImageToDiplay'] = $arrImageToDiplay; + + $this->_display("project"); } public function admin(){ - include('../app/views/admin.php'); + $this->_display("admin"); } } \ No newline at end of file diff --git a/templates_c/0f54e8b5c9bcafd01d94486bfa02ee91c2c5fe68_0.file_home.tpl.php b/templates_c/0f54e8b5c9bcafd01d94486bfa02ee91c2c5fe68_0.file_home.tpl.php new file mode 100644 index 0000000..720dec7 --- /dev/null +++ b/templates_c/0f54e8b5c9bcafd01d94486bfa02ee91c2c5fe68_0.file_home.tpl.php @@ -0,0 +1,71 @@ +getCompiled()->isFresh($_smarty_tpl, array ( + 'version' => '5.7.0', + 'unifunc' => 'content_6988e6e030cfc2_17810205', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + '0f54e8b5c9bcafd01d94486bfa02ee91c2c5fe68' => + array ( + 0 => 'views/home.tpl', + 1 => 1770579251, + 2 => 'file', + ), + ), + 'includes' => + array ( + 'file:views/_partial/preview.tpl' => 1, + ), +))) { +function content_6988e6e030cfc2_17810205 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'D:\\projetphp\\views'; +$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); +?> + + +getInheritance()->instanceBlock($_smarty_tpl, 'Block_14883993436988e6e03087b1_93283416', "content"); +?> + +getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); +} +/* {block "content"} */ +class Block_14883993436988e6e03087b1_93283416 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_6988e6eb196d91_26203411', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + '184f81453f2b8e9c87b8f61bf5df178eaf9a1be4' => + array ( + 0 => 'views/inscription.tpl', + 1 => 1770579251, + 2 => 'file', + ), + ), + 'includes' => + array ( + ), +))) { +function content_6988e6eb196d91_26203411 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'D:\\projetphp\\views'; +$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); +?> + + +getInheritance()->instanceBlock($_smarty_tpl, 'Block_10194680646988e6eb195117_68573569', "content"); +$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); +} +/* {block "content"} */ +class Block_10194680646988e6eb195117_68573569 extends \Smarty\Runtime\Block +{ +public function callBlock(\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'D:\\projetphp\\views'; +?> + + + + +
+ + +
+
+ + +
+ + +

Inscription

+ + +

+ Créez votre compte utilisateur. +

+ + + +
+ +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ @ + +
+
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ + +
+ + Déjà un compte ? + Se connecter + +
+ + +
+ + +
+ +
+
+
+getCompiled()->isFresh($_smarty_tpl, array ( + 'version' => '5.7.0', + 'unifunc' => 'content_6988ea67e6a550_13912228', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + '1c51ad9f5c349145220f82584009ce981aa35e0b' => + array ( + 0 => 'views/layout.tpl', + 1 => 1770579251, + 2 => 'file', + ), + ), + 'includes' => + array ( + 'file:views/_partial/header.tpl' => 1, + 'file:views/_partial/footer.tpl' => 1, + ), +))) { +function content_6988ea67e6a550_13912228 (\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_18224630526988ea67e68748_77607219', "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_18224630526988ea67e68748_77607219 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_6988ea68014670_78914068', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + '264314e384c04e79c5fa56e3cf6837f9df55d7fb' => + array ( + 0 => 'views/_partial/footer.tpl', + 1 => 1770579251, + 2 => 'file', + ), + ), + 'includes' => + array ( + ), +))) { +function content_6988ea68014670_78914068 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'D:\\projetphp\\views\\_partial'; +?> - - + + src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"> +> + + src="js/scripts.js"> +> - \ No newline at end of file +getCompiled()->isFresh($_smarty_tpl, array ( + 'version' => '5.7.0', + 'unifunc' => 'content_6988e8ad1102e5_57320533', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + '67e1ae3a210fc2d1bf8782993687bad91a1cf0f6' => + array ( + 0 => 'views/_partial/preview.tpl', + 1 => 1770579251, + 2 => 'file', + ), + ), + 'includes' => + array ( + ), +))) { +function content_6988e8ad1102e5_57320533 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'D:\\projetphp\\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_6988e8acde7ac8_86925504', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + '72e5e5c0ee2729980deadb1687a6d7b7b3c501bb' => + array ( + 0 => 'views/search.tpl', + 1 => 1770580115, + 2 => 'file', + ), + ), + 'includes' => + array ( + 'file:views/_partial/preview.tpl' => 1, + ), +))) { +function content_6988e8acde7ac8_86925504 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'D:\\projetphp\\views'; +$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); +?> + + +getInheritance()->instanceBlock($_smarty_tpl, 'Block_19885437936988e8acdd5f99_82783540', "content"); +$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); +} +/* {block "content"} */ +class Block_19885437936988e8acdd5f99_82783540 extends \Smarty\Runtime\Block +{ +public function callBlock(\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'D:\\projetphp\\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(); + +> + +getCompiled()->isFresh($_smarty_tpl, array ( + 'version' => '5.7.0', + 'unifunc' => 'content_6988ea67ee8140_01270962', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + '8056b95e7f6b28be5e36947735d13c8d176ec944' => + array ( + 0 => 'views/_partial/header.tpl', + 1 => 1770579251, + 2 => 'file', + ), + ), + 'includes' => + array ( + ), +))) { +function content_6988ea67ee8140_01270962 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'D:\\projetphp\\views\\_partial'; +?> @@ -6,24 +30,23 @@ - + + src="https://use.fontawesome.com/releases/v6.3.0/js/all.js" crossorigin="anonymous"> +> Folliow - \ No newline at end of file +getCompiled()->isFresh($_smarty_tpl, array ( + 'version' => '5.7.0', + 'unifunc' => 'content_6988e684b5ec83_08666834', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + 'b44ab733c93381dbf5dbbeae871506874cefd9d6' => + array ( + 0 => 'views/login.tpl', + 1 => 1770579251, + 2 => 'file', + ), + ), + 'includes' => + array ( + ), +))) { +function content_6988e684b5ec83_08666834 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'D:\\projetphp\\views'; +$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); +?> + + +getInheritance()->instanceBlock($_smarty_tpl, 'Block_8468317156988e684b55163_88320359', "content"); +$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); +} +/* {block "content"} */ +class Block_8468317156988e684b55163_88320359 extends \Smarty\Runtime\Block +{ +public function callBlock(\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'D:\\projetphp\\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);?> +
+ + +
+

+ + +

+ +

+ + +

+ +

+ +

+
+
+getCompiled()->isFresh($_smarty_tpl, array ( + 'version' => '5.7.0', + 'unifunc' => 'content_6988ea67daa639_83777802', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + 'cf8cd41232f90f60b8532c811496cf0ce7d4ac25' => + array ( + 0 => 'views/project.tpl', + 1 => 1770580435, + 2 => 'file', + ), + ), + 'includes' => + array ( + 'file:../app/views/partials/preview.tpl' => 1, + ), +))) { +function content_6988ea67daa639_83777802 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'D:\\projetphp\\views'; +$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); +?> + + +getInheritance()->instanceBlock($_smarty_tpl, 'Block_14142237226988ea67da2403_00733236', "content"); +$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); +} +/* {block "content"} */ +class Block_14142237226988ea67da2403_00733236 extends \Smarty\Runtime\Block +{ +public function callBlock(\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'D:\\projetphp\\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_6988e9451d25a8_02318797', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + 'f80694cc4829becd656ad4f73c431db5dba4722b' => + array ( + 0 => 'views/admin.tpl', + 1 => 1770579251, + 2 => 'file', + ), + ), + 'includes' => + array ( + ), +))) { +function content_6988e9451d25a8_02318797 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'D:\\projetphp\\views'; +?> + + + + + Dashboard - Folliow Admin + + + + src="https://use.fontawesome.com/releases/v6.3.0/js/all.js" crossorigin="anonymous"> +> + + + + + +
+
+ +
+ + +
+
+
+

Dashboard

+
+ +
+ +
+
+
+
+ + +
+ + +
+ +
+ +
+ +
+
+
+
+
+
+
+ + src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"> +> + + src="assests/js/scripts.js"> +> + + + -
- - -
- -
- - -
-
- - -
- - -

Connexion

- - -

- Connectez-vous à votre compte. -

- - - -
- -
- - -
- - -
- - -
- - -
- - -
-
- - -
-
- - -
- -
- - -
- - Pas encore de compte ? - Créer un compte - -
- - - - -
-
- -
- -
-
-
-

Connexion

- -

- Connectez-vous à votre compte. -

- - - - - - -
- -
- - -
- - -
- - -
- - -
- - -
-
- - -
-
- - -
- -
- - -
- - Pas encore de compte ? - Créer un compte - -
- - - -
-
- -
-
- - - diff --git a/views/project.php b/views/project.php deleted file mode 100644 index 9dc6fd9..0000000 --- a/views/project.php +++ /dev/null @@ -1,115 +0,0 @@ - 0) && ($_FILES['imageProject']['error'] != 4)){ - $strDest = '../public/uploads/projects/'.$_FILES['imageProject']['name']; - var_dump($strDest); - move_uploaded_file($_FILES['imageProject']['tmp_name'], $strDest); - } - } - - /** En cas d'appuis sur le bouton d'envoie ou celui de remettre a plus tard - /* 1. Changement de status - /* 2. Hydratation avec les informations récupéré de l'utilisateur - /* 3. Envoie des données à la BDD - */ - if (isset($_POST['sendMessage'])) { - $_SESSION['status'] = 'publié'; - $objProject->hydrate($_SESSION); - $objProject->setThumbnail($strDest); - $objProjectModel->insert($objProject); - - } else if (isset($_POST['toContinue'])) { - $objProject->hydrate($_SESSION); - $objProject->setThumbnail($strDest); - $objProjectModel->insert($objProject); - } - - //Débuggage - var_dump($_SESSION); - var_dump($objProject); - - -?> - -
-
-

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

-
- -
-
- -
- \ No newline at end of file diff --git a/views/project.tpl b/views/project.tpl new file mode 100644 index 0000000..838e494 --- /dev/null +++ b/views/project.tpl @@ -0,0 +1,62 @@ +{extends file="views/layout.tpl"} + +{block name="content"} + +
+
+

Alimenter votre projet

+
+ + {if isset($smarty.post.toContinue)} + + {/if} +
+ + {* Affichage d'un formulaire en cas d'appuie sur le bouton "+" *} + {if isset($smarty.post.showForm) || isset($smarty.post.showFormContinue)} +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ + +
+ {/if} + +
+
+

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

+
+ {foreach $arrProjectToDisplay as $objProject} + {include file="../app/views/partials/preview.tpl"} + {/foreach} +
+
+ +
+ +{/block} \ No newline at end of file diff --git a/views/search.php b/views/search.tpl similarity index 79% rename from views/search.php rename to views/search.tpl index 2eaf765..500940a 100644 --- a/views/search.php +++ b/views/search.tpl @@ -1,3 +1,6 @@ +{extends file="views/layout.tpl"} + +{block name="content"}

Rechercher parmi les articles

@@ -27,18 +30,14 @@
@@ -53,7 +52,7 @@ name="period" id="period-exact" value="0" - + {if $intPeriod == 0}checked{/if} aria-controls="date-exact date-range">
@@ -130,7 +125,7 @@ class="form-control" id="enddate" name="enddate" - value="" > + value="{$strEndDate}" >
@@ -153,17 +148,14 @@

Liste des projets

- + {if count($arrProject) == 0}

Pas de résultats

- + {/if} + {foreach $arrProjectToDisplay as $objProject} + {include file="views/_partial/preview.tpl"} + {/foreach}
@@ -193,3 +185,4 @@ // Initialisation au chargement toggleDateFields(); +{/block} \ No newline at end of file