Merge branch 'main' into guillaume
This commit is contained in:
commit
8aed1e526b
18 changed files with 810 additions and 40 deletions
|
|
@ -3,6 +3,8 @@
|
|||
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");
|
||||
|
||||
/**
|
||||
* Le controler des Project
|
||||
|
|
@ -37,23 +39,24 @@
|
|||
|
||||
public function search(){
|
||||
|
||||
//variable pour faire fonctionner le script en footer
|
||||
$strPage = "search";
|
||||
|
||||
// inclusion du header
|
||||
include('../app/views/partials/header.php');
|
||||
|
||||
//Récupérer les informations du Formulaire
|
||||
$strKeywords = $_GET['keywords']??'';
|
||||
$intAuthor = $_GET['author']??0;
|
||||
$intPeriod = $_GET['period']??0;
|
||||
$strDate = $_GET['date']??'';
|
||||
$strStartDate = $_GET['startdate']??'';
|
||||
$strEndDate = $_GET['enddate']??'';
|
||||
$intCategory = $_GET['category']??0;
|
||||
|
||||
// Récupération des Projects
|
||||
$strKeywords = $_POST['keywords']??'';
|
||||
$intAuthor = $_POST['author']??0;
|
||||
$intPeriod = $_POST['period']??0;
|
||||
$strDate = $_POST['date']??'';
|
||||
$strStartDate = $_POST['startdate']??'';
|
||||
$strEndDate = $_POST['enddate']??'';
|
||||
$intCategory = $_POST['category']??0;
|
||||
// Récupération des projetc
|
||||
$objProjectModel = new ProjectModel;
|
||||
|
||||
// Depuis PHP 8 - accès direct aux paramètres
|
||||
$arrProject = $objProjectModel->findAll();
|
||||
$arrProject = $objProjectModel->findAll(intAuthor:$intAuthor, intPeriod:$intPeriod, strDate:$strDate,
|
||||
strKeywords:$strKeywords, strStartDate:$strStartDate, strEndDate:$strEndDate, intCategory:$intCategory);
|
||||
|
||||
// Initialisation d'un tableau => objets
|
||||
$arrProjectToDisplay = array();
|
||||
|
|
@ -84,9 +87,30 @@
|
|||
* Fonction d'affichage de la page projet
|
||||
*/
|
||||
|
||||
|
||||
public function project (){
|
||||
|
||||
$objProjectModel = new ProjectModel;
|
||||
$arrProject = $objProjectModel->findAll(4);
|
||||
$arrProjectToDiplay = array();
|
||||
foreach($arrProject as $arrDetProject){
|
||||
$objProject = new Project;
|
||||
$objProject->hydrate($arrDetProject);
|
||||
$arrProjectToDiplay[] = $objProject;
|
||||
}
|
||||
|
||||
$objImageModel = new ImageModel;
|
||||
$arrImage = $objImageModel->findAllImage(4);
|
||||
$arrImageToDiplay = array();
|
||||
foreach($arrImage as $arrDetImage){
|
||||
$objImage = new Image;
|
||||
$objImage->hydrate($arrDetImage);
|
||||
$arrImageToDiplay[] = $objImage;
|
||||
}
|
||||
|
||||
include("../app/views/partials/header.php");
|
||||
include('../app/views/project.php');
|
||||
include('../app/views/partials/footer.php');
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue