Débug de la partie Création de Projet

This commit is contained in:
Guillaume HESS 2026-02-16 16:28:10 +01:00
parent e9857c44e3
commit 46f48230a9
12 changed files with 110 additions and 64 deletions

View file

@ -99,6 +99,9 @@
*/ */
public function project (){ public function project (){
$objCategoryModel = new CategoryModel;
$arrCategory = $objCategoryModel->findAllCategory();
$objProjectModel = new ProjectModel; $objProjectModel = new ProjectModel;
$arrProject = $objProjectModel->findAll(4); $arrProject = $objProjectModel->findAll(4);
$arrProjectToDisplay = array(); $arrProjectToDisplay = array();
@ -123,12 +126,12 @@
$_SESSION['thumbnail'] = $_FILES['imageThumbnail']['name']??""; $_SESSION['thumbnail'] = $_FILES['imageThumbnail']['name']??"";
$_SESSION['status'] = 'en_attente'; $_SESSION['status'] = 'en_attente';
$_SESSION['user_id'] = $_SESSION['user']['user_id']; $_SESSION['user_id'] = $_SESSION['user']['user_id'];
$_SESSION['category']= $_POST['category']??0;
$objProject = new Project(); $objProject = new Project();
/** /**
* Créer par Besnik le GOAT et l'autre GOAT de Guillaume * Créer par Besnik le GOAT et Guillaume
* *
* @return bool pour savoir si le fichier existe, * @return bool pour savoir si le fichier existe,
* puis déplace vers le fichier uploads avec les images projet des utilisateurs * puis déplace vers le fichier uploads avec les images projet des utilisateurs
@ -147,22 +150,21 @@
* 2. Hydratation avec les informations récupéré de l'utilisateur * 2. Hydratation avec les informations récupéré de l'utilisateur
* 3. Envoie des données à la BDD * 3. Envoie des données à la BDD
*/ */
if (isset($_POST['sendMessage'])) { if (isset($_POST['sendProject'])) {
$_SESSION['status'] = 'publié';
$objProject->hydrate($_SESSION); $objProject->hydrate($_SESSION);
$objProject->setThumbnail($strDest); $objProject->setThumbnail($strDest);
var_dump($strDest);
var_dump($objProject);
$objProjectModel->insert($objProject); $objProjectModel->insert($objProject);
} else if (isset($_POST['toContinue'])) { } else if (isset($_POST['toContinue'])) {
$objProject->hydrate($_SESSION); $objProject->hydrate($_SESSION);
$objProject->setThumbnail($strDest); $objProject->setThumbnail($strDest);
$objProjectModel->insert($objProject); //$objProjectModel->insert($objProject);
} }
var_dump($_SESSION); var_dump($_SESSION);
var_dump($objProject); var_dump($objProject);
$this->_arrData['arrCategory'] = $arrCategory;
$this->_arrData['arrProjectToDiplay'] = $arrProjectToDisplay; $this->_arrData['arrProjectToDiplay'] = $arrProjectToDisplay;
$this->_arrData['arrImageToDiplay'] = $arrImageToDisplay; $this->_arrData['arrImageToDiplay'] = $arrImageToDisplay;

View file

@ -87,8 +87,8 @@
*/ */
public function insert(object $objProject):bool{ public function insert(object $objProject):bool{
$strRq = "INSERT INTO project (project_title, project_description, project_thumbnail, project_content, project_status, project_creation_date) $strRq = "INSERT INTO project (project_title, project_description, project_thumbnail, project_content, project_status, project_creation_date, project_user_id, project_category)
VALUES (:title, :description, :thumbnail, :content, :status, DATE(NOW()))"; VALUES (:title, :description, :thumbnail, :content, :status, DATE(NOW()), :project_user_id, :project_category)";
$rqPrep = $this->_db->prepare($strRq); $rqPrep = $this->_db->prepare($strRq);
@ -97,6 +97,8 @@
$rqPrep->bindValue(":thumbnail", $objProject->getThumbnail(), PDO::PARAM_STR); $rqPrep->bindValue(":thumbnail", $objProject->getThumbnail(), PDO::PARAM_STR);
$rqPrep->bindValue(":content", $objProject->getContent(), PDO::PARAM_STR); $rqPrep->bindValue(":content", $objProject->getContent(), PDO::PARAM_STR);
$rqPrep->bindValue(":status", $objProject->getStatus(), PDO::PARAM_STR); $rqPrep->bindValue(":status", $objProject->getStatus(), PDO::PARAM_STR);
$rqPrep->bindValue(":project_user_id", $objProject->getUser_id(), PDO::PARAM_STR);
$rqPrep->bindValue(":project_category", $objProject->getCategory(), PDO::PARAM_STR);
return $rqPrep->execute(); return $rqPrep->execute();
} }

View file

@ -1,11 +1,11 @@
<?php <?php
/* Smarty version 5.7.0, created on 2026-02-13 07:38:16 /* Smarty version 5.7.0, created on 2026-02-16 15:14:02
from 'file:views/login.tpl' */ from 'file:views/login.tpl' */
/* @var \Smarty\Template $_smarty_tpl */ /* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.7.0', 'version' => '5.7.0',
'unifunc' => 'content_698ed4e80d1241_05782427', 'unifunc' => 'content_6993343ab09804_38716820',
'has_nocache_code' => false, 'has_nocache_code' => false,
'file_dependency' => 'file_dependency' =>
array ( array (
@ -20,18 +20,18 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
array ( array (
), ),
))) { ))) {
function content_698ed4e80d1241_05782427 (\Smarty\Template $_smarty_tpl) { function content_6993343ab09804_38716820 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views'; $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views';
$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); $_smarty_tpl->getInheritance()->init($_smarty_tpl, true);
?> ?>
<?php <?php
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_1501214486698ed4e807c474_40846729', "content"); $_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_19316887096993343aab3467_87777428', "content");
$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir);
} }
/* {block "content"} */ /* {block "content"} */
class Block_1501214486698ed4e807c474_40846729 extends \Smarty\Runtime\Block class Block_19316887096993343aab3467_87777428 extends \Smarty\Runtime\Block
{ {
public function callBlock(\Smarty\Template $_smarty_tpl) { public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views'; $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views';

View file

@ -1,11 +1,11 @@
<?php <?php
/* Smarty version 5.7.0, created on 2026-02-13 08:48:00 /* Smarty version 5.7.0, created on 2026-02-16 15:27:00
from 'file:views/_partial/footer.tpl' */ from 'file:views/_partial/footer.tpl' */
/* @var \Smarty\Template $_smarty_tpl */ /* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.7.0', 'version' => '5.7.0',
'unifunc' => 'content_698ee54027c692_47294813', 'unifunc' => 'content_699337446f7ad3_43163205',
'has_nocache_code' => false, 'has_nocache_code' => false,
'file_dependency' => 'file_dependency' =>
array ( array (
@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
array ( array (
), ),
))) { ))) {
function content_698ee54027c692_47294813 (\Smarty\Template $_smarty_tpl) { function content_699337446f7ad3_43163205 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views\\_partial'; $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views\\_partial';
?> ?>
<footer class="footer container-fluid d-flex justify-content-around"> <footer class="footer container-fluid d-flex justify-content-around">

View file

@ -1,11 +1,11 @@
<?php <?php
/* Smarty version 5.7.0, created on 2026-02-13 09:26:01 /* Smarty version 5.7.0, created on 2026-02-16 15:26:59
from 'file:views/layout.tpl' */ from 'file:views/layout.tpl' */
/* @var \Smarty\Template $_smarty_tpl */ /* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.7.0', 'version' => '5.7.0',
'unifunc' => 'content_698eee29a76a24_89248455', 'unifunc' => 'content_69933743e11ea0_42706617',
'has_nocache_code' => false, 'has_nocache_code' => false,
'file_dependency' => 'file_dependency' =>
array ( array (
@ -22,21 +22,21 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'file:views/_partial/footer.tpl' => 1, 'file:views/_partial/footer.tpl' => 1,
), ),
))) { ))) {
function content_698eee29a76a24_89248455 (\Smarty\Template $_smarty_tpl) { function content_69933743e11ea0_42706617 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views'; $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views';
$_smarty_tpl->getInheritance()->init($_smarty_tpl, false); $_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); $_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);
?> ?>
<?php <?php
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_1471911380698eee29a699a7_12148894', "content"); $_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_21663424269933743e05859_07402341', "content");
?> ?>
<?php $_smarty_tpl->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); <?php $_smarty_tpl->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"} */ /* {block "content"} */
class Block_1471911380698eee29a699a7_12148894 extends \Smarty\Runtime\Block class Block_21663424269933743e05859_07402341 extends \Smarty\Runtime\Block
{ {
public function callBlock(\Smarty\Template $_smarty_tpl) { public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views'; $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views';

View file

@ -1,11 +1,11 @@
<?php <?php
/* Smarty version 5.7.0, created on 2026-02-13 07:38:22 /* Smarty version 5.7.0, created on 2026-02-16 14:55:27
from 'file:views/search.tpl' */ from 'file:views/search.tpl' */
/* @var \Smarty\Template $_smarty_tpl */ /* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.7.0', 'version' => '5.7.0',
'unifunc' => 'content_698ed4eeeb9a63_02339117', 'unifunc' => 'content_69932fdf32efe9_83974973',
'has_nocache_code' => false, 'has_nocache_code' => false,
'file_dependency' => 'file_dependency' =>
array ( array (
@ -21,18 +21,18 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'file:views/_partial/preview.tpl' => 1, 'file:views/_partial/preview.tpl' => 1,
), ),
))) { ))) {
function content_698ed4eeeb9a63_02339117 (\Smarty\Template $_smarty_tpl) { function content_69932fdf32efe9_83974973 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views'; $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views';
$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); $_smarty_tpl->getInheritance()->init($_smarty_tpl, true);
?> ?>
<?php <?php
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_466388494698ed4eedf8875_98482148', "content"); $_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_78954057769932fdf276a65_02540204', "content");
$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir);
} }
/* {block "content"} */ /* {block "content"} */
class Block_466388494698ed4eedf8875_98482148 extends \Smarty\Runtime\Block class Block_78954057769932fdf276a65_02540204 extends \Smarty\Runtime\Block
{ {
public function callBlock(\Smarty\Template $_smarty_tpl) { public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views'; $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views';

View file

@ -1,18 +1,18 @@
<?php <?php
/* Smarty version 5.7.0, created on 2026-02-13 09:26:01 /* Smarty version 5.7.0, created on 2026-02-16 15:27:00
from 'file:views/_partial/header.tpl' */ from 'file:views/_partial/header.tpl' */
/* @var \Smarty\Template $_smarty_tpl */ /* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.7.0', 'version' => '5.7.0',
'unifunc' => 'content_698eee29d9bb23_31258074', 'unifunc' => 'content_69933744053ab7_63539674',
'has_nocache_code' => false, 'has_nocache_code' => false,
'file_dependency' => 'file_dependency' =>
array ( array (
'd1ce76cd275b7aacbc06533821a89d7d735c5727' => 'd1ce76cd275b7aacbc06533821a89d7d735c5727' =>
array ( array (
0 => 'views/_partial/header.tpl', 0 => 'views/_partial/header.tpl',
1 => 1770967614, 1 => 1771253012,
2 => 'file', 2 => 'file',
), ),
), ),
@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
array ( array (
), ),
))) { ))) {
function content_698eee29d9bb23_31258074 (\Smarty\Template $_smarty_tpl) { function content_69933744053ab7_63539674 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views\\_partial'; $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views\\_partial';
?><!DOCTYPE html> ?><!DOCTYPE html>
<html lang="fr"> <html lang="fr">
@ -48,15 +48,7 @@ $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views\\_partial';
<div class="collapse navbar-collapse" id="navbarNav"> <div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav me-auto"> <ul class="navbar-nav me-auto">
<li class="nav-item">
<a class="nav-link" href="?ctrl=&action=">Découvrir</a>
</li>
<li class="nav-item">
<a class="nav-link" href="?ctrl=&action=">Customisation</a>
</li>
<li class="nav-item">
<a class="nav-link" href="?ctrl=&action=">Orientation</a>
</li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="?ctrl=&action=">À propos</a> <a class="nav-link" href="?ctrl=&action=">À propos</a>
</li> </li>
@ -65,6 +57,9 @@ $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views\\_partial';
<a class="nav-link" href="?ctrl=project&action=search">Rechercher</a> <a class="nav-link" href="?ctrl=project&action=search">Rechercher</a>
</li> </li>
<?php if ((true && (true && null !== ($_SESSION['user'] ?? null)))) {?> <?php if ((true && (true && null !== ($_SESSION['user'] ?? null)))) {?>
<li class="nav-item">
<a class="nav-link" href="?ctrl=project&action=project">Ajouter un projet</a>
</li>
<?php if ($_SESSION['user']['authorisation_name'] == "Administrateur") {?> <?php if ($_SESSION['user']['authorisation_name'] == "Administrateur") {?>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="?ctrl=admin&action=admin">Admin</a> <a class="nav-link" href="?ctrl=admin&action=admin">Admin</a>

View file

@ -1,18 +1,18 @@
<?php <?php
/* Smarty version 5.7.0, created on 2026-02-13 09:26:02 /* Smarty version 5.7.0, created on 2026-02-16 15:27:00
from 'file:views/_partial/preview.tpl' */ from 'file:views/_partial/preview.tpl' */
/* @var \Smarty\Template $_smarty_tpl */ /* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.7.0', 'version' => '5.7.0',
'unifunc' => 'content_698eee2a213901_58530696', 'unifunc' => 'content_699337442da884_31807427',
'has_nocache_code' => false, 'has_nocache_code' => false,
'file_dependency' => 'file_dependency' =>
array ( array (
'd60fb02b58bc4794052e022152a4d410b20abede' => 'd60fb02b58bc4794052e022152a4d410b20abede' =>
array ( array (
0 => 'views/_partial/preview.tpl', 0 => 'views/_partial/preview.tpl',
1 => 1770967614, 1 => 1771253012,
2 => 'file', 2 => 'file',
), ),
), ),
@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
array ( array (
), ),
))) { ))) {
function content_698eee2a213901_58530696 (\Smarty\Template $_smarty_tpl) { function content_699337442da884_31807427 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views\\_partial'; $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views\\_partial';
?> ?>
@ -52,7 +52,7 @@ $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views\\_partial';
<time><?php echo $_smarty_tpl->getValue('objProject')->getCreation_date();?> <time><?php echo $_smarty_tpl->getValue('objProject')->getCreation_date();?>
</time> </time>
<a href="index.php?ctrl=user&action=user&id=<?php echo $_smarty_tpl->getValue('objProject')->getUser();?> <a href="index.php?ctrl=user&action=user&id=<?php echo $_smarty_tpl->getValue('objProject')->getUser_id();?>
" "
class="text-decoration-none" class="text-decoration-none"
style="position: relative; z-index: 2;"> style="position: relative; z-index: 2;">
@ -67,7 +67,7 @@ $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views\\_partial';
Lire la suite Lire la suite
</a> </a>
<?php if ((true && (true && null !== ($_SESSION['user'] ?? null)))) {?> <?php if ((true && (true && null !== ($_SESSION['user'] ?? null)))) {?>
<?php if ($_SESSION['user']['user_id'] == $_smarty_tpl->getValue('objProject')->getUser()) {?> <?php if ($_SESSION['user']['user_id'] == $_smarty_tpl->getValue('objProject')->getUser_id()) {?>
<a href="index.php?ctrl=project&action=display&id=<?php echo $_smarty_tpl->getValue('objProject')->getId();?> <a href="index.php?ctrl=project&action=display&id=<?php echo $_smarty_tpl->getValue('objProject')->getId();?>
" "
class="stretched-link small"> class="stretched-link small">
@ -80,14 +80,16 @@ $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views\\_partial';
</div> </div>
</div> </div>
<?php if ((true && (true && null !== ($_SESSION['user'] ?? null))) && $_SESSION['user']['user_status'] == 2 && $_smarty_tpl->getValue('objProject')->getStatus() == "en_attente") {?> <?php if ((true && (true && null !== ($_SESSION['user'] ?? null))) && $_SESSION['user']['user_status'] == 2) {?>
<div class="border rounded text-center"> <div class="border rounded text-center">
<a class="btn btn-sm m-1 btn-danger" href="?ctrl=project&action=delete&id=<?php echo $_smarty_tpl->getValue('objProject')->getId();?>
" name="toDelete">Supprimer</a>
<?php }?>
<?php if ((true && (true && null !== ($_SESSION['user'] ?? null))) && $_smarty_tpl->getValue('objProject')->getStatus() == "en_attente" && $_SESSION['user']['user_status'] == 2) {?>
<a class="btn btn-sm m-1 btn-success" href="?ctrl=project&action=accept&id=<?php echo $_smarty_tpl->getValue('objProject')->getId();?> <a class="btn btn-sm m-1 btn-success" href="?ctrl=project&action=accept&id=<?php echo $_smarty_tpl->getValue('objProject')->getId();?>
" name="toPublished">Accepter</a> " name="toPublished">Accepter</a>
<a class="btn btn-sm m-1 btn-warning" href="?ctrl=project&action=refuse&id=<?php echo $_smarty_tpl->getValue('objProject')->getId();?> <a class="btn btn-sm m-1 btn-warning" href="?ctrl=project&action=refuse&id=<?php echo $_smarty_tpl->getValue('objProject')->getId();?>
" name="toRefused">Refuser</a> " name="toRefused">Refuser</a>
<a class="btn btn-sm m-1 btn-danger" href="?ctrl=project&action=delete&id=<?php echo $_smarty_tpl->getValue('objProject')->getId();?>
" name="toDelete">Supprimer</a>
</div> </div>
<?php } elseif ($_smarty_tpl->getValue('projectStatus') == "refusé") {?> <?php } elseif ($_smarty_tpl->getValue('projectStatus') == "refusé") {?>
<p class="text-danger fw-bold">Portfolio refusé</p> <p class="text-danger fw-bold">Portfolio refusé</p>

View file

@ -1,11 +1,11 @@
<?php <?php
/* Smarty version 5.7.0, created on 2026-02-13 09:26:01 /* Smarty version 5.7.0, created on 2026-02-16 15:26:59
from 'file:views/home.tpl' */ from 'file:views/home.tpl' */
/* @var \Smarty\Template $_smarty_tpl */ /* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.7.0', 'version' => '5.7.0',
'unifunc' => 'content_698eee297c6a01_92208913', 'unifunc' => 'content_69933743c124c8_73391952',
'has_nocache_code' => false, 'has_nocache_code' => false,
'file_dependency' => 'file_dependency' =>
array ( array (
@ -21,20 +21,20 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'file:views/_partial/preview.tpl' => 1, 'file:views/_partial/preview.tpl' => 1,
), ),
))) { ))) {
function content_698eee297c6a01_92208913 (\Smarty\Template $_smarty_tpl) { function content_69933743c124c8_73391952 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views'; $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views';
$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); $_smarty_tpl->getInheritance()->init($_smarty_tpl, true);
?> ?>
<?php <?php
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_1902790934698eee2955f9f3_02581757', "content"); $_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_172359299469933743bf2c76_25426245', "content");
?> ?>
<?php $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); <?php $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir);
} }
/* {block "content"} */ /* {block "content"} */
class Block_1902790934698eee2955f9f3_02581757 extends \Smarty\Runtime\Block class Block_172359299469933743bf2c76_25426245 extends \Smarty\Runtime\Block
{ {
public function callBlock(\Smarty\Template $_smarty_tpl) { public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views'; $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views';

View file

@ -1,18 +1,18 @@
<?php <?php
/* Smarty version 5.7.0, created on 2026-02-13 08:47:59 /* Smarty version 5.7.0, created on 2026-02-16 15:26:55
from 'file:views/project.tpl' */ from 'file:views/project.tpl' */
/* @var \Smarty\Template $_smarty_tpl */ /* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.7.0', 'version' => '5.7.0',
'unifunc' => 'content_698ee53fc2cf91_24542112', 'unifunc' => 'content_6993373fd8c653_70022249',
'has_nocache_code' => false, 'has_nocache_code' => false,
'file_dependency' => 'file_dependency' =>
array ( array (
'eda0e4559a4ddfacbd33a6d4c74f4917d3685101' => 'eda0e4559a4ddfacbd33a6d4c74f4917d3685101' =>
array ( array (
0 => 'views/project.tpl', 0 => 'views/project.tpl',
1 => 1770822944, 1 => 1771255302,
2 => 'file', 2 => 'file',
), ),
), ),
@ -21,18 +21,18 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'file:../app/views/partials/preview.tpl' => 1, 'file:../app/views/partials/preview.tpl' => 1,
), ),
))) { ))) {
function content_698ee53fc2cf91_24542112 (\Smarty\Template $_smarty_tpl) { function content_6993373fd8c653_70022249 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views'; $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views';
$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); $_smarty_tpl->getInheritance()->init($_smarty_tpl, true);
?> ?>
<?php <?php
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_348652156698ee53fbddf70_21846825', "content"); $_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_19229320646993373fd04ed7_75753900', "content");
$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir);
} }
/* {block "content"} */ /* {block "content"} */
class Block_348652156698ee53fbddf70_21846825 extends \Smarty\Runtime\Block class Block_19229320646993373fd04ed7_75753900 extends \Smarty\Runtime\Block
{ {
public function callBlock(\Smarty\Template $_smarty_tpl) { public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views'; $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views';
@ -64,6 +64,33 @@ $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views';
<label>Texte Portfolio</label> <label>Texte Portfolio</label>
<input type="text" name="textProject"> <input type="text" name="textProject">
</div> </div>
<div class="col-6">
<fieldset>
<legend class="form-label">Type de recherche par catégories</legend>
<div class="col-md-6">
<label for="author" class="form-label">Catégorie</label>
<select class="form-select" id="category" name="category">
<option value="0" <?php if ($_smarty_tpl->getValue('intCategory') == 0) {?>selected<?php }?>>Toutes les catégories</option>
<?php
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrCategory'), 'arrDetCategory');
$foreach0DoElse = true;
foreach ($_from ?? [] as $_smarty_tpl->getVariable('arrDetCategory')->value) {
$foreach0DoElse = false;
?>
<option value="<?php echo $_smarty_tpl->getValue('arrDetCategory')['category_id'];?>
"
<?php if ($_smarty_tpl->getValue('intCategory') == $_smarty_tpl->getValue('arrDetCategory')['category_id']) {?>selected<?php }?>
>
<?php echo $_smarty_tpl->getValue('arrDetCategory')['category_name'];?>
</option>
<?php
}
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
</select>
</div>
</fieldset>
</div>
<div> <div>
<h3>Image thumbnail</h3> <h3>Image thumbnail</h3>
<input name="imageThumbnail" class="form-control" type="file"> <input name="imageThumbnail" class="form-control" type="file">
@ -73,7 +100,7 @@ $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views';
<input name="imageProject" class="form-control" type="file"> <input name="imageProject" class="form-control" type="file">
</div> </div>
<div class="mt-2"> <div class="mt-2">
<button type="submit" class="btn btn-primary btn-md" name="sendMessage">Envoyer</button> <button type="submit" class="btn btn-primary btn-md" name="sendProject">Envoyer</button>
<button type="submit" class="btn btn-warning btn-md" name="toContinue">Remettre à plus tard</button> <button type="submit" class="btn btn-warning btn-md" name="toContinue">Remettre à plus tard</button>
</div> </div>
</form> </form>
@ -102,9 +129,9 @@ $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views';
<div class="row mb-2"> <div class="row mb-2">
<?php <?php
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrProjectToDisplay'), 'objProject'); $_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrProjectToDisplay'), 'objProject');
$foreach0DoElse = true; $foreach1DoElse = true;
foreach ($_from ?? [] as $_smarty_tpl->getVariable('objProject')->value) { foreach ($_from ?? [] as $_smarty_tpl->getVariable('objProject')->value) {
$foreach0DoElse = false; $foreach1DoElse = false;
?> ?>
<?php $_smarty_tpl->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); <?php $_smarty_tpl->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);
?> ?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View file

@ -28,6 +28,24 @@
<label>Texte Portfolio</label> <label>Texte Portfolio</label>
<input type="text" name="textProject"> <input type="text" name="textProject">
</div> </div>
<div class="col-6">
<fieldset>
<legend class="form-label">Type de recherche par catégories</legend>
<div class="col-md-6">
<label for="author" class="form-label">Catégorie</label>
<select class="form-select" id="category" name="category">
<option value="0" {if $intCategory == 0}selected{/if}>Toutes les catégories</option>
{foreach $arrCategory as $arrDetCategory}
<option value="{$arrDetCategory['category_id']}"
{if $intCategory == $arrDetCategory['category_id']}selected{/if}
>
{$arrDetCategory['category_name']}
</option>
{/foreach}
</select>
</div>
</fieldset>
</div>
<div> <div>
<h3>Image thumbnail</h3> <h3>Image thumbnail</h3>
<input name="imageThumbnail" class="form-control" type="file"> <input name="imageThumbnail" class="form-control" type="file">
@ -37,7 +55,7 @@
<input name="imageProject" class="form-control" type="file"> <input name="imageProject" class="form-control" type="file">
</div> </div>
<div class="mt-2"> <div class="mt-2">
<button type="submit" class="btn btn-primary btn-md" name="sendMessage">Envoyer</button> <button type="submit" class="btn btn-primary btn-md" name="sendProject">Envoyer</button>
<button type="submit" class="btn btn-warning btn-md" name="toContinue">Remettre à plus tard</button> <button type="submit" class="btn btn-warning btn-md" name="toContinue">Remettre à plus tard</button>
</div> </div>
</form> </form>