Débug et ajout de la page addedit_project
This commit is contained in:
parent
46f48230a9
commit
a448d0e2b4
14 changed files with 186 additions and 124 deletions
|
|
@ -125,7 +125,7 @@
|
||||||
$_SESSION['content'] = $_POST['textProject']??"";
|
$_SESSION['content'] = $_POST['textProject']??"";
|
||||||
$_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']??null;
|
||||||
$_SESSION['category']= $_POST['category']??0;
|
$_SESSION['category']= $_POST['category']??0;
|
||||||
|
|
||||||
$objProject = new Project();
|
$objProject = new Project();
|
||||||
|
|
@ -169,6 +169,9 @@
|
||||||
$this->_arrData['arrImageToDiplay'] = $arrImageToDisplay;
|
$this->_arrData['arrImageToDiplay'] = $arrImageToDisplay;
|
||||||
|
|
||||||
$this->_display("project");
|
$this->_display("project");
|
||||||
|
|
||||||
|
header("Location: index.php");
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -308,4 +311,18 @@
|
||||||
header("Location: index.php");
|
header("Location: index.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function modify(){
|
||||||
|
|
||||||
|
//Récupéré l'id dans l'url
|
||||||
|
$intId = $_GET['id'];
|
||||||
|
|
||||||
|
//Je créer un nouveau model pour exec la commande SQL
|
||||||
|
$objProjectModel = new ProjectModel;
|
||||||
|
$objProjectModel->modify($intId);
|
||||||
|
|
||||||
|
//Redirection vers la page projet
|
||||||
|
header("Location: index.php?ctrl=project&action=addedit_project&id=".$intId);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -184,4 +184,19 @@ class UserCtrl extends MotherCtrl {
|
||||||
$this->_arrData['arrProjectToDisplay'] = $arrProjectToDisplay;
|
$this->_arrData['arrProjectToDisplay'] = $arrProjectToDisplay;
|
||||||
$this->_display("user");
|
$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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
/* Smarty version 5.7.0, created on 2026-02-16 15:14:02
|
/* Smarty version 5.7.0, created on 2026-02-17 15:14:05
|
||||||
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_6993343ab09804_38716820',
|
'unifunc' => 'content_699485bdc8dc40_80399906',
|
||||||
'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_6993343ab09804_38716820 (\Smarty\Template $_smarty_tpl) {
|
function content_699485bdc8dc40_80399906 (\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_19316887096993343aab3467_87777428', "content");
|
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_1446317869699485bdc3a914_83043646', "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_19316887096993343aab3467_87777428 extends \Smarty\Runtime\Block
|
class Block_1446317869699485bdc3a914_83043646 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';
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
/* Smarty version 5.7.0, created on 2026-02-16 15:27:00
|
/* Smarty version 5.7.0, created on 2026-02-17 15:22:12
|
||||||
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_699337446f7ad3_43163205',
|
'unifunc' => 'content_699487a439efe3_65678140',
|
||||||
'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_699337446f7ad3_43163205 (\Smarty\Template $_smarty_tpl) {
|
function content_699487a439efe3_65678140 (\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">
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
/* Smarty version 5.7.0, created on 2026-02-16 15:26:59
|
/* Smarty version 5.7.0, created on 2026-02-17 15:22:11
|
||||||
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_69933743e11ea0_42706617',
|
'unifunc' => 'content_699487a3a68439_17737729',
|
||||||
'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_69933743e11ea0_42706617 (\Smarty\Template $_smarty_tpl) {
|
function content_699487a3a68439_17737729 (\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_21663424269933743e05859_07402341', "content");
|
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_538806849699487a3a5cad4_69670426', "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_21663424269933743e05859_07402341 extends \Smarty\Runtime\Block
|
class Block_538806849699487a3a5cad4_69670426 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';
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
/* Smarty version 5.7.0, created on 2026-02-16 14:55:27
|
/* Smarty version 5.7.0, created on 2026-02-17 14:58:14
|
||||||
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_69932fdf32efe9_83974973',
|
'unifunc' => 'content_6994820629a465_76682739',
|
||||||
'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_69932fdf32efe9_83974973 (\Smarty\Template $_smarty_tpl) {
|
function content_6994820629a465_76682739 (\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_78954057769932fdf276a65_02540204', "content");
|
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_146634734699482061db225_27427171', "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_78954057769932fdf276a65_02540204 extends \Smarty\Runtime\Block
|
class Block_146634734699482061db225_27427171 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';
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
/* Smarty version 5.7.0, created on 2026-02-16 15:27:00
|
/* Smarty version 5.7.0, created on 2026-02-17 15:22:11
|
||||||
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_69933744053ab7_63539674',
|
'unifunc' => 'content_699487a3bfa552_65946637',
|
||||||
'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 => 1771253012,
|
1 => 1771340938,
|
||||||
2 => 'file',
|
2 => 'file',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
|
||||||
array (
|
array (
|
||||||
),
|
),
|
||||||
))) {
|
))) {
|
||||||
function content_69933744053ab7_63539674 (\Smarty\Template $_smarty_tpl) {
|
function content_699487a3bfa552_65946637 (\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">
|
||||||
|
|
@ -58,7 +58,7 @@ $_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views\\_partial';
|
||||||
</li>
|
</li>
|
||||||
<?php if ((true && (true && null !== ($_SESSION['user'] ?? null)))) {?>
|
<?php if ((true && (true && null !== ($_SESSION['user'] ?? null)))) {?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="?ctrl=project&action=project">Ajouter un projet</a>
|
<a class="nav-link" href="?ctrl=project&action=addedit_project">Ajouter un projet</a>
|
||||||
</li>
|
</li>
|
||||||
<?php if ($_SESSION['user']['authorisation_name'] == "Administrateur") {?>
|
<?php if ($_SESSION['user']['authorisation_name'] == "Administrateur") {?>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
/* Smarty version 5.7.0, created on 2026-02-16 15:27:00
|
/* Smarty version 5.7.0, created on 2026-02-17 15:22:11
|
||||||
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_699337442da884_31807427',
|
'unifunc' => 'content_699487a3e78223_34934520',
|
||||||
'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_699337442da884_31807427 (\Smarty\Template $_smarty_tpl) {
|
function content_699487a3e78223_34934520 (\Smarty\Template $_smarty_tpl) {
|
||||||
$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views\\_partial';
|
$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\views\\_partial';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
/* Smarty version 5.7.0, created on 2026-02-16 15:26:59
|
/* Smarty version 5.7.0, created on 2026-02-17 15:22:11
|
||||||
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_69933743c124c8_73391952',
|
'unifunc' => 'content_699487a3810e29_87040457',
|
||||||
'has_nocache_code' => false,
|
'has_nocache_code' => false,
|
||||||
'file_dependency' =>
|
'file_dependency' =>
|
||||||
array (
|
array (
|
||||||
'dec070599de91da0c8f203d582a8cc367e0bd265' =>
|
'dec070599de91da0c8f203d582a8cc367e0bd265' =>
|
||||||
array (
|
array (
|
||||||
0 => 'views/home.tpl',
|
0 => 'views/home.tpl',
|
||||||
1 => 1770795606,
|
1 => 1771341728,
|
||||||
2 => 'file',
|
2 => 'file',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -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_69933743c124c8_73391952 (\Smarty\Template $_smarty_tpl) {
|
function content_699487a3810e29_87040457 (\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_172359299469933743bf2c76_25426245', "content");
|
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_1641473295699487a37f03f7_95408363', "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_172359299469933743bf2c76_25426245 extends \Smarty\Runtime\Block
|
class Block_1641473295699487a37f03f7_95408363 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';
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
/* Smarty version 5.7.0, created on 2026-02-16 15:26:55
|
/* Smarty version 5.7.0, created on 2026-02-17 15:20:50
|
||||||
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_6993373fd8c653_70022249',
|
'unifunc' => 'content_6994875217b403_02249466',
|
||||||
'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:../app/views/partials/preview.tpl' => 1,
|
'file:../app/views/partials/preview.tpl' => 1,
|
||||||
),
|
),
|
||||||
))) {
|
))) {
|
||||||
function content_6993373fd8c653_70022249 (\Smarty\Template $_smarty_tpl) {
|
function content_6994875217b403_02249466 (\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_19229320646993373fd04ed7_75753900', "content");
|
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_261778149699487520f5087_45577844', "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_19229320646993373fd04ed7_75753900 extends \Smarty\Runtime\Block
|
class Block_261778149699487520f5087_45577844 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';
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
</li>
|
</li>
|
||||||
{if isset($smarty.session.user)}
|
{if isset($smarty.session.user)}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="?ctrl=project&action=project">Ajouter un projet</a>
|
<a class="nav-link" href="?ctrl=project&action=addedit_project">Ajouter un projet</a>
|
||||||
</li>
|
</li>
|
||||||
{if $smarty.session.user.authorisation_name == "Administrateur"}
|
{if $smarty.session.user.authorisation_name == "Administrateur"}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
|
|
|
||||||
27
views/addedit_project.tpl
Normal file
27
views/addedit_project.tpl
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{extends file="views/layout.tpl"}
|
||||||
|
|
||||||
|
{block name="content"}
|
||||||
|
<section>
|
||||||
|
<form method="post" enctype="multipart/form-data" >
|
||||||
|
<p>
|
||||||
|
<label>Titre:</label>
|
||||||
|
<input name="title" value="{$objArticle->getTitle()}"
|
||||||
|
class="form-control {if (isset($arrError['title'])) } is-invalid {/if} " type="text" >
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<label>Contenu:</label>
|
||||||
|
<textarea name="content" class="form-control {if (isset($arrError['content'])) } is-invalid {/if} " >{$objArticle->getContent()}</textarea>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<label>Image:</label>
|
||||||
|
{if (!$objArticle->getId()|is_null)}
|
||||||
|
<img src="assests/images/{$objArticle->getImg()}">
|
||||||
|
{/if}
|
||||||
|
<input name="img" class="form-control {if (isset($arrError['img'])) } is-invalid {/if}" type="file">
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<input class="form-control btn btn-primary" type="submit" >
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
{/block}
|
||||||
|
|
@ -74,15 +74,18 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{*Controle de l'utilisateur ainsi que du status du projet + Suppression disponible pour l'utilisateur possédant le projet*}
|
{*Controle de l'utilisateur ainsi que du status du projet + Suppression disponible pour l'utilisateur possédant le projet*}
|
||||||
{if isset($smarty.session.user) and $smarty.session.user.user_status == 2 or $smarty.session.user.user_id == $objProject->getUser_id()}
|
{if isset($smarty.session.user) and $smarty.session.user.user_status eq 2 or $smarty.session.user.user_id eq $objProject->getUser_id()}
|
||||||
<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={$objProject->getId()}" name="toDelete">Supprimer le projet</a>
|
<a class="btn btn-sm m-1 btn-danger" href="?ctrl=project&action=delete&id={$objProject->getId()}" name="toDelete">Supprimer le projet</a>
|
||||||
{/if}
|
{/if}
|
||||||
{if isset($smarty.session.user) and $smarty.session.user.user_id == $objProject->getUser_id()}
|
|
||||||
|
|
||||||
|
{if isset($smarty.session.user) and $smarty.session.user.user_id eq $objProject->getUser_id()}
|
||||||
<a class="btn btn-sm m-1 btn-warning" href="?ctrl=project&action=addedit&id={$objProject->getId()}" name="toEdit">Modifier le projet</a>
|
<a class="btn btn-sm m-1 btn-warning" href="?ctrl=project&action=addedit&id={$objProject->getId()}" name="toEdit">Modifier le projet</a>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{*Conditions permettant au Modérateur de modifier le status d'un projet*}
|
{*Conditions permettant au Modérateur de modifier le status d'un projet*}
|
||||||
{if isset($smarty.session.user) and $smarty.session.user.user_status == 2 and $objProject->getStatus() eq "en_attente"}
|
{if isset($smarty.session.user) and $smarty.session.user.user_status eq 2 and $objProject->getStatus() eq "en_attente"}
|
||||||
<a class="btn btn-sm m-1 btn-success" href="?ctrl=project&action=accept&id={$objProject->getId()}" name="toPublished">Accepter</a>
|
<a class="btn btn-sm m-1 btn-success" href="?ctrl=project&action=accept&id={$objProject->getId()}" name="toPublished">Accepter</a>
|
||||||
<a class="btn btn-sm m-1 btn-warning" href="?ctrl=project&action=refuse&id={$objProject->getId()}" name="toRefused">Refuser</a>
|
<a class="btn btn-sm m-1 btn-warning" href="?ctrl=project&action=refuse&id={$objProject->getId()}" name="toRefused">Refuser</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue