.
This commit is contained in:
parent
aec3c845e0
commit
edb6c00219
22 changed files with 941 additions and 69 deletions
|
|
@ -1,13 +1,15 @@
|
|||
<?php
|
||||
|
||||
require("../app/models/project_model.php");
|
||||
require("../app/entities/project_entity.php");
|
||||
require("../app/models/category_model.php");
|
||||
require("../app/entities/category_entity.php");
|
||||
require("../app/models/image_model.php");
|
||||
require("../app/entities/image_entity.php");
|
||||
require("../app/models/user_model.php");
|
||||
require("../app/entities/user_entity.php");
|
||||
require("models/project_model.php");
|
||||
require("entities/project_entity.php");
|
||||
require("models/category_model.php");
|
||||
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");
|
||||
|
||||
/**
|
||||
* Le controller de la partie accessible uniquement par l'admin
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
public function home(){
|
||||
|
||||
$objProjectModel = new ProjectModel;
|
||||
$arrProject = $objProjectModel->findAll(4);
|
||||
$arrProject = $objProjectModel->findAll();
|
||||
$arrProjectToDisplay = array();
|
||||
foreach($arrProject as $arrDetProject){
|
||||
$objProject = new Project;
|
||||
|
|
@ -28,10 +28,9 @@
|
|||
$arrProjectToDisplay[] = $objProject;
|
||||
}
|
||||
|
||||
//$this->_arrData['arrArticleToDisplay'] = $arrArticleToDisplay;
|
||||
$this->_arrData['arrProjectToDisplay'] = $arrProjectToDisplay;
|
||||
|
||||
var_dump($this->_arrData);
|
||||
|
||||
|
||||
$this->_display("home");
|
||||
|
||||
}
|
||||
|
|
@ -70,10 +69,15 @@
|
|||
|
||||
$objCategoryModel = new CategoryModel;
|
||||
$arrCategory = $objCategoryModel->findAllCategory();
|
||||
|
||||
$this->_arrData['arrProjectToDisplay'] = $arrProjectToDisplay;
|
||||
$this->_arrData['arrCategory'] = $arrCategory;
|
||||
$this->_arrData['arrUser'] = $arrUser;
|
||||
|
||||
|
||||
|
||||
|
||||
include('../app/views/search.php');
|
||||
include('../app/views/partials/footer.php');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -0,0 +1,69 @@
|
|||
<?php
|
||||
/* Smarty version 5.7.0, created on 2026-02-06 08:21:14
|
||||
from 'file:views/home.tpl' */
|
||||
|
||||
/* @var \Smarty\Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
|
||||
'version' => '5.7.0',
|
||||
'unifunc' => 'content_6985a47abcda40_19846426',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'299f75d7692a19207f23bf5795a2721f507c3fc6' =>
|
||||
array (
|
||||
0 => 'views/home.tpl',
|
||||
1 => 1770365364,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
'file:views/_partial/preview.tpl' => 1,
|
||||
),
|
||||
))) {
|
||||
function content_6985a47abcda40_19846426 (\Smarty\Template $_smarty_tpl) {
|
||||
$_smarty_current_dir = 'C:\\wamp64\\www\\projetphp\\views';
|
||||
$_smarty_tpl->getInheritance()->init($_smarty_tpl, false);
|
||||
?>
|
||||
|
||||
<?php
|
||||
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_3150142016985a47abb6c29_00747518', "content");
|
||||
?>
|
||||
|
||||
<?php }
|
||||
/* {block "content"} */
|
||||
class Block_3150142016985a47abb6c29_00747518 extends \Smarty\Runtime\Block
|
||||
{
|
||||
public function callBlock(\Smarty\Template $_smarty_tpl) {
|
||||
$_smarty_current_dir = 'C:\\wamp64\\www\\projetphp\\views';
|
||||
?>
|
||||
|
||||
<section class="container mt-5 p-5 d-flex flex-column align-items-center text-center">
|
||||
<h1 class="logo">Folliow</h1>
|
||||
<h2>Là où les talents rencontrent leur avenir</h2>
|
||||
<p class="col-6">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.</p>
|
||||
</section>
|
||||
|
||||
<section class="container" aria-label="Articles récents">
|
||||
<h2 class="visually-hidden">Les 4 derniers articles</h2>
|
||||
<div class="row mb-2">
|
||||
|
||||
<?php
|
||||
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrProjectToDisplay'), 'objProject');
|
||||
$foreach0DoElse = true;
|
||||
foreach ($_from ?? [] as $_smarty_tpl->getVariable('objProject')->value) {
|
||||
$foreach0DoElse = false;
|
||||
?>
|
||||
<?php $_smarty_tpl->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);
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
|
||||
</section>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
/* {/block "content"} */
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
/* Smarty version 5.7.0, created on 2026-02-06 08:21:14
|
||||
from 'file:views/_partial/preview.tpl' */
|
||||
|
||||
/* @var \Smarty\Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
|
||||
'version' => '5.7.0',
|
||||
'unifunc' => 'content_6985a47ad585d5_25749521',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'c724044e55872f26030b02de6dcd14dc34a20b16' =>
|
||||
array (
|
||||
0 => 'views/_partial/preview.tpl',
|
||||
1 => 1770365554,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
),
|
||||
))) {
|
||||
function content_6985a47ad585d5_25749521 (\Smarty\Template $_smarty_tpl) {
|
||||
$_smarty_current_dir = 'C:\\wamp64\\www\\projetphp\\views\\_partial';
|
||||
?><article class="col-md-3 mb-4">
|
||||
<div class="card h-100 shadow-sm article-card">
|
||||
|
||||
<div class="ratio ratio-16x9">
|
||||
<img src=".<?php echo $_smarty_tpl->getValue('objProject')->getThumbnail();?>
|
||||
"
|
||||
class="w-100 h-100 object-fit-cover"
|
||||
alt=""
|
||||
loading="lazy">
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-start gap-3">
|
||||
|
||||
<img src=".<?php echo $_smarty_tpl->getValue('objProject')->getUser_image();?>
|
||||
"
|
||||
class="rounded-circle flex-shrink-0 mt-2 ml-5"
|
||||
style="width: 48px; height: 48px; object-fit: cover;"
|
||||
alt="Photo de profil">
|
||||
|
||||
<div class="flex-grow-1 card-body p-3">
|
||||
<h3 class="h6 mb-1"><?php echo $_smarty_tpl->getValue('objProject')->getTitle();?>
|
||||
</h3>
|
||||
|
||||
<small class="text-body-secondary d-block mb-1">
|
||||
<time><?php echo $_smarty_tpl->getValue('objProject')->getCreation_date();?>
|
||||
</time>
|
||||
– <?php echo $_smarty_tpl->getValue('objProject')->getCreatorname();?>
|
||||
|
||||
</small>
|
||||
|
||||
<a href="?id=<?php echo $_smarty_tpl->getValue('objProject')->getId();?>
|
||||
"
|
||||
class="stretched-link small">
|
||||
Lire la suite →
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</article><?php }
|
||||
}
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
|
||||
require("../app/models/user_model.php");
|
||||
require("../app/entities/user_entity.php");
|
||||
require("models/user_model.php");
|
||||
require("entities/user_entity.php");
|
||||
require("mother_controller.php");
|
||||
|
||||
class UserCtrl{
|
||||
class UserCtrl extends MotherCtrl {
|
||||
|
||||
public function login(){
|
||||
include("../app/views/partials/header.php");
|
||||
|
||||
$strMail = $_POST['mail']??"";
|
||||
$strPwd = $_POST['pwd']??"";
|
||||
|
|
@ -40,8 +40,12 @@ class UserCtrl{
|
|||
}
|
||||
}
|
||||
}
|
||||
include("../app/views/login.php");
|
||||
include("../app/views/partials/footer.php");
|
||||
$this->_arrData['arrError'] = $arrError;
|
||||
|
||||
|
||||
|
||||
$this->_display("login");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -63,9 +67,6 @@ class UserCtrl{
|
|||
|
||||
public function signin(){
|
||||
|
||||
// Inclusion du header
|
||||
include("../app/views/partials/header.php");
|
||||
|
||||
// Entité pour réafficher les valeurs dans le formulaire
|
||||
$objUser = new User();
|
||||
|
||||
|
|
@ -138,8 +139,7 @@ class UserCtrl{
|
|||
}
|
||||
|
||||
// Affichage de la vue inscription
|
||||
include("../app/views/inscription.php");
|
||||
include("../app/views/partials/footer.php");
|
||||
$this->_display("inscription");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue