trohjrtiuuitri

AffichageProfil
Leo TUAILLON 1 year ago
commit f2cea0d18d

84
.gitignore vendored

@ -8,9 +8,6 @@ ehthumbs_vista.db
# Dump file # Dump file
*.stackdump *.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares # Recycle Bin used on file shares
$RECYCLE.BIN/ $RECYCLE.BIN/
@ -77,12 +74,6 @@ Temporary Items
##### GPG ##### GPG
secring.* secring.*
##### Dropbox
# Dropbox settings and caches
.dropbox
.dropbox.attr
.dropbox.cache
##### SynopsysVCS ##### SynopsysVCS
# Waveform formats # Waveform formats
*.vcd *.vcd
@ -165,23 +156,11 @@ Sessionx.vim
# Temporary # Temporary
.netrwhist .netrwhist
*~
# Auto-generated tag files # Auto-generated tag files
tags tags
# Persistent undo # Persistent undo
[._]*.un~ [._]*.un~
##### Emacs
# -*- mode: gitignore; -*-
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*
# Org-mode # Org-mode
.org-id-locations .org-id-locations
*_archive *_archive
@ -254,10 +233,6 @@ bh_unicode_properties.cache
# https://packagecontrol.io/packages/sublime-github # https://packagecontrol.io/packages/sublime-github
GitHub.sublime-settings GitHub.sublime-settings
##### Notepad++
# Notepad++ backups #
*.bak
##### TextMate ##### TextMate
*.tmproj *.tmproj
*.tmproject *.tmproject
@ -280,7 +255,6 @@ tmtags
**/nbproject/Package-*.bash **/nbproject/Package-*.bash
build/ build/
nbbuild/ nbbuild/
dist/
nbdist/ nbdist/
.nb-gradle/ .nb-gradle/
@ -289,27 +263,27 @@ nbdist/
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff # User-specific stuff
.idea/**/workspace.xml php/.idea/**/workspace.xml
.idea/**/tasks.xml php/.idea/**/tasks.xml
.idea/**/usage.statistics.xml php/.idea/**/usage.statistics.xml
.idea/**/dictionaries php/.idea/**/dictionaries
.idea/**/shelf php/.idea/**/shelf
# Generated files # Generated files
.idea/**/contentModel.xml php/.idea/**/contentModel.xml
# Sensitive or high-churn files # Sensitive or high-churn files
.idea/**/dataSources/ php/.idea/**/dataSources/
.idea/**/dataSources.ids php/.idea/**/dataSources.ids
.idea/**/dataSources.local.xml php/.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml php/.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml php/.idea/**/dynamic.xml
.idea/**/uiDesigner.xml php/.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml php/.idea/**/dbnavigator.xml
# Gradle # Gradle
.idea/**/gradle.xml php/.idea/**/gradle.xml
.idea/**/libraries php/.idea/**/libraries
# Gradle and Maven with auto-import # Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files, # When using Gradle or Maven with auto-import, you should exclude module files,
@ -328,7 +302,7 @@ nbdist/
cmake-build-*/ cmake-build-*/
# Mongo Explorer plugin # Mongo Explorer plugin
.idea/**/mongoSettings.xml php/.idea/**/mongoSettings.xml
# File-based project format # File-based project format
*.iws *.iws
@ -343,7 +317,7 @@ out/
atlassian-ide-plugin.xml atlassian-ide-plugin.xml
# Cursive Clojure plugin # Cursive Clojure plugin
.idea/replstate.xml php/.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ) # Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml com_crashlytics_export_strings.xml
@ -352,17 +326,15 @@ crashlytics-build.properties
fabric.properties fabric.properties
# Editor-based Rest Client # Editor-based Rest Client
.idea/httpRequests php/.idea/httpRequests
# Android studio 3.1+ serialized cache file # Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser php/.idea/caches/build_file_checksums.ser
##### Eclipse ##### Eclipse
.metadata .metadata
bin/ bin/
tmp/ tmp/
*.tmp
*.bak
*.swp *.swp
*~.nib *~.nib
local.properties local.properties
@ -376,12 +348,6 @@ local.properties
# Locally stored "Eclipse launch configurations" # Locally stored "Eclipse launch configurations"
*.launch *.launch
# PyDev specific (Python IDE for Eclipse)
*.pydevproject
# CDT-specific (C/C++ Development Tooling)
.cproject
# CDT- autotools # CDT- autotools
.autotools .autotools
@ -410,11 +376,6 @@ local.properties
.apt_generated/ .apt_generated/
.apt_generated_test/ .apt_generated_test/
# Scala IDE specific (Scala & Java development for Eclipse)
.cache-main
.scala_dependencies
.worksheet
# Uncomment this line if you wish to ignore the project description file. # Uncomment this line if you wish to ignore the project description file.
# Typically, this file would be tracked if it contains build/dependency configurations: # Typically, this file would be tracked if it contains build/dependency configurations:
#.project #.project
@ -452,12 +413,13 @@ gradle-app.setting
# gradle/wrapper/gradle-wrapper.properties # gradle/wrapper/gradle-wrapper.properties
##### Composer ##### Composer
composer.phar php/composer.phar
/vendor/ php/composer
php/vendor/
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control # Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file # You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
composer.lock php/composer.lock
##### PHP CodeSniffer ##### PHP CodeSniffer
# gitignore for the PHP Codesniffer framework # gitignore for the PHP Codesniffer framework

@ -1 +0,0 @@
dqzdqd

@ -1,6 +1,11 @@
<IfModule mod_rewrite.c> #RewriteEngine On
RewriteEngine On #
RewriteBase /php/public/ #RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-f #RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L] #RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]

@ -1,6 +1,7 @@
{ {
"require": { "require": {
"twig/twig": "^3.0", "twig/twig": "^3.0",
"twig/extensions": "^1.5",
"ext-pdo": "*", "ext-pdo": "*",
"ext-fileinfo": "*" "ext-fileinfo": "*"
}, },

@ -0,0 +1,22 @@
<?php
/** PC IUT - PHP 8.1 */
/** Chargement config */
require_once __DIR__ . '/src/config/config.php';
require __DIR__ . '/vendor/autoload.php';
/** Configuration twig */
$loader = new \Twig\Loader\FilesystemLoader(__DIR__ . '/templates');
$twig = new \Twig\Environment($loader, [
'cache' => false,
'debug' => true
]);
$twig->addExtension(new \Twig\Extension\DebugExtension());
$twig->addGlobal('dir', '/SAE_2A_FA-Reseau_ALICA/php');
$cont = new \App\controleur\FrontControleur();

Binary file not shown.

After

Width:  |  Height:  |  Size: 842 KiB

@ -12,13 +12,14 @@ a{
body{ body{
display: flex; display: flex;
flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
min-height: 100vh; min-height: 100vh;
background: #fff; background: #fff;
} }
.container{ .containerC{
position: relative; position: relative;
width: 500px; width: 500px;
min-height: 500px; min-height: 500px;
@ -30,12 +31,13 @@ body{
-10px -10px 20px #ccc; -10px -10px 20px #ccc;
border-radius: 30px; border-radius: 30px;
padding: 50px; padding: 50px;
margin: 50px;
} }
form{ form{
position: relative; position: relative;
width: 100%; width: 100%;
} }
.container h3{ .containerC h3{
color: #000; color: #000;
font-weight: 600; font-weight: 600;
font-size: 2em; font-size: 2em;

@ -12,13 +12,14 @@ a{
body{ body{
display: flex; display: flex;
flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
min-height: 100vh; min-height: 100vh;
background: #fff; background: #fff;
} }
.container{ .containerC{
position: relative; position: relative;
width: 500px; width: 500px;
min-height: 500px; min-height: 500px;
@ -30,12 +31,13 @@ body{
-10px -10px 20px #ccc; -10px -10px 20px #ccc;
border-radius: 30px; border-radius: 30px;
padding: 50px; padding: 50px;
margin: 50px;
} }
form{ form{
position: relative; position: relative;
width: 100%; width: 100%;
} }
.container h3{ .containerC h3{
color: #000; color: #000;
font-weight: 600; font-weight: 600;
font-size: 2em; font-size: 2em;

@ -49,3 +49,12 @@
.row3 img { .row3 img {
align-self: flex-start; align-self: flex-start;
} }
a{
text-decoration: none;
}
.current{
border-bottom: 1px solid black;
}

@ -1,17 +0,0 @@
<?php
/** PC IUT - PHP 8.1 */
/** Chargement config */
require_once __DIR__ . '/../src/config/config.php';
require __DIR__ . '/../vendor/autoload.php';
require_once __DIR__ . '/../src/TwigExtensions.php'; // utile pour les images à supprimer sinon
/** Configuration twig */
$loader = new \Twig\Loader\FilesystemLoader(__DIR__ . '/../templates');
$twig = new \Twig\Environment($loader, [
'cache' => false,
'debug' => true
]);
$twig->addExtension(new \Twig\Extension\DebugExtension());
$cont = new \App\controleur\FrontControleur();

@ -1,24 +0,0 @@
<?php
namespace App;
use Twig\Extension\AbstractExtension;
use Twig\TwigFilter;
class TwigExtensions extends AbstractExtension
{
public function getFilters()
{
return [
new TwigFilter('base64', [$this, 'twig_base64_filter']),
];
}
public function twig_base64_filter($source)
{
if ($source !== null) {
return base64_encode($source);
}
return '';
}
}

@ -1,6 +1,7 @@
<?php <?php
namespace App\config; namespace App\config;
use App\metier\Alumni;
use App\modele\ImageModele; use App\modele\ImageModele;
use App\modele\OffreModele; use App\modele\OffreModele;
@ -143,4 +144,15 @@ class Validation
} }
public function isAdmin() : ?Alumni
{
if(isset($_SESSION['login']) && isset($_SESSION['role']))
{
$login = self::nettoyerString($_SESSION['login']);
$role = self::nettoyerString($_SESSION['role']);
return $_SESSION["utilisateur"];
}
return null;
}
} }

@ -1,55 +1,105 @@
<?php <?php
namespace App\controleur; namespace App\controleur;
use App\router\AltoRouter;
use App\metier\Alumni;
use App\controleur\UtilisateurControleur;
use App\controleur\MembreControleur;
use App\controleur\AdminControleur;
class FrontControleur class FrontControleur
{ {
public function __construct() public function __construct()
{ {
global $twig; global $twig;
session_start(); session_start();
$dVueErreur = [];
$actions = array( $router = new AltoRouter();
"Admin" => [
"supprimerCompte", "consulterSignalement","supprimerOffre" $router->setBasePath('/SAE_2A_FA-Reseau_ALICA/php');
],
"Moderateur" => [ $router->map('GET', '/', 'UtilisateurControleur');
//TODO
], $router->map('GET','/[a:action]?','UtilisateurControleur');
"Membre" => [
"deconnexion","proposerOffre","consulterProfil","modifierProfil","signaler", $router->map('POST','/[a:action]?','UtilisateurControleur');
],
"Utilisateur" => [ $router->map('GET','/[a:action]/[i:id]?','UtilisateurControleur');
"connexion", "getProfilByPage","inscription", "accueil", "consulterProfilLimite", "publierOffre", "listerEvenement", "creerEvenement", "supprimerEvenement", "avoirDetailEvenement", "rechercherEvenement" $router->map('GET|POST', '/user/[i:id]/[a:action]?', 'MembreControleur');
]
); $router->map('GET|POST', '/admin/[i:id]/[a:action]?', 'AdminControleur');
$action = \App\config\Validation::nettoyerString($_GET["action"] ?? ""); $id = 0;
if(in_array($action,$actions['Admin'])) {
if (!isset($_SESSION["role"]) || $_SESSION["role"]!="admin") { $match = $router->match();
$dVueErreur[] = 'Veuillez vous connecter';
echo $twig->render('erreur.html', ['dVueErreur' => $dVueErreur]); $action = array();
} else{
new AdminControleur(); $id = array();
}
} $twig->render("accueil.html",[]);
else if(in_array($action,$actions['Moderateur'])) {
if (!isset($_SESSION["role"]) || ($_SESSION["role"]!="moderateur" && $_SESSION["role"]!="admin")) { if (!$match) {
$dVueErreur[] = 'Veuillez vous connecter';
echo $twig->render('erreur.html', ['dVueErreur' => $dVueErreur]); $dVueErreur[] = "Error 404 Page not found";
} else{ echo $twig->render("erreur.html", ['dVueErreur' => $dVueErreur]);
new ModerateurControleur();
}
} }
else if(in_array($action,$actions['Membre'])) {
if (!isset($_SESSION["utilisateur"])) { if ($match) {
$dVueErreur[] = 'Veuillez vous connecter';
$controller = $match['target'] ?? NULL;
$action = $match['params']['action'] ?? NULL;
$id = $match['params']['id'] ?? NULL;
//var_dump($match);
try {
if ($controller == "MembreControleur") {
if ($_SESSION["utilisateur"]->getRole() != "Admin" || $_SESSION["utilisateur"]->getRole() != "Membre") {
echo $twig->render("connection.html",['msg' => 'Vous devez vous connecter pour effectuer cette action']);
}
}
if ($controller == "AdminControleur") {
$Alumni = $_SESSION["utilisateur"];
if ($Alumni->getRole() != "Admin") {
$dVueErreur = ["Erreur : Vous n'avez pas les privileges pour cette action"];
global $twig;
echo $twig->render('erreur.html', ['dVueErreur' => $dVueErreur]);
return;
}
} else {
$namespace = 'App\\Controleur\\';
$controller = $namespace . $controller;
$controller = new $controller();
}
if (is_callable(array($controller, $action))) {
call_user_func(array($controller, $action), $match['params']);
} else {
$dVueErreur = ['Erreur : Action inconnue'];
echo $twig->render('accueil.html', ['dVueErreur' => $dVueErreur]);
}
} catch (Error $error) {
$dVueErreur = ['Erreur : Action inconnue'];
echo $twig->render('erreur.html', ['dVueErreur' => $dVueErreur]); echo $twig->render('erreur.html', ['dVueErreur' => $dVueErreur]);
} else{
new MembreControleur();
} }
}else{
new UtilisateurControleur();
} }
} }
} }

@ -5,36 +5,12 @@ class MembreControleur extends UtilisateurControleur
{ {
public function __construct() public function __construct()
{ {
global $twig;
if (!isset($_REQUEST["action"])) {
$action = NULL;
} else {
$action = \App\config\Validation::nettoyerString($_REQUEST["action"]);
}
switch ($action) {
case "deconnexion":
$this->deconnexion();
break;
case "proposerOffre":
$this->proposerOffre();
break;
case "consulterProfil":
$this->consulterProfil();
break;
case "modifierProfil":
$this->modifierProfil();
break;
case "signaler":
$this->signaler();
break;
default:
parent::__construct();
}
} }
protected function deconnexion() protected function deconnexion()
{ {
session_destroy(); session_destroy();
echo "on est passes ici";
header('Location: index.php?action=accueil'); header('Location: index.php?action=accueil');
exit(); exit();
} }

@ -11,71 +11,9 @@ use App\modele\UtilisateurModele;
class UtilisateurControleur class UtilisateurControleur
{ {
public function __construct()
{
global $twig;
if (!isset($_REQUEST["action"])) {
$action = NULL;
} else {
$action = Validation::nettoyerString($_REQUEST["action"]);
}
switch ($action) {
case NULL:
case "accueil":
$this->accueil();
break;
case "profil":
$this->profil();
break;
case "getProfilByPage":
$this->getProfilByPage();
break;
case "inscription_success":
$this->inscription_success();
break;
case "connection":
$this->connection();
break;
case "inscription":
$this->inscription();
break;
case "consultOffers":
$this->consultOffers();
break;
case "consulterProfilLimite":
$this->consulterProfilLimite();
break;
case "createOffer":
$this->createOffer();
break;
case "createOfferForm":
$this->createOfferForm();
break;
case "displayOffer":
$this->displayOffer();
break;
case "listerEvenement":
$this->listerEvenement();
break;
case "creerEvenement":
$this->creerEvenement();
break;
case "supprimerEvenement":
$this->supprimerEvenement();
break;
case "avoirDetailEvenement":
$this->avoirDetailEvenement();
break;
case "rechercherEvenement":
$this->rechercherEvenement();
break;
default:
$dVueErreur[] = "Action inconnue ou non autorisée" . $action;
echo $twig->render("erreur.html", ['dVueErreur' => $dVueErreur]);
}
} }
protected function connection() public function connection()
{ {
global $twig; global $twig;
$dVueErreur = []; // Tableau pour stocker les erreurs, le cas échéant $dVueErreur = []; // Tableau pour stocker les erreurs, le cas échéant
@ -89,7 +27,7 @@ class UtilisateurControleur
if ($utilisateur instanceof Alumni) { if ($utilisateur instanceof Alumni) {
$_SESSION['utilisateur'] = $utilisateur; $_SESSION['utilisateur'] = $utilisateur;
header('Location: index.php?action=accueil'); header('Location: accueil');
exit(); exit();
} else { } else {
$dVueErreur[] = "L'adresse email ou le mot de passe est incorrect."; $dVueErreur[] = "L'adresse email ou le mot de passe est incorrect.";
@ -98,8 +36,9 @@ class UtilisateurControleur
echo $twig->render('connection.html', ['dVueErreur' => $dVueErreur]); echo $twig->render('connection.html', ['dVueErreur' => $dVueErreur]);
} }
protected function inscription() public function inscription()
{ {
global $twig; global $twig;
$dVueErreur = []; // Tableau pour stocker les erreurs, le cas échéant $dVueErreur = []; // Tableau pour stocker les erreurs, le cas échéant
$userModel = new UtilisateurModele(); $userModel = new UtilisateurModele();
@ -120,21 +59,14 @@ class UtilisateurControleur
$dVueErreur[] = "L'adresse email est déjà utilisée."; $dVueErreur[] = "L'adresse email est déjà utilisée.";
} }
} }
try { $nouvelUtilisateur = $userModel->inscription($prenom,$nom,$email, $hash);
$nouvelUtilisateur = $userModel->inscription($prenom,$nom,$email, $hash);
if ($nouvelUtilisateur instanceof Alumni) { if ($nouvelUtilisateur instanceof Alumni) {
header('Location: index.php?action=inscription_success'); echo $twig->render('inscription_success.html');
exit(); exit();
} else { } else {
$dVueErreur[] = "L'inscription a échoué, veuillez réessayer.";
}
} catch (\Exception $e) {
$dVueErreur[] = "L'inscription a échoué, veuillez réessayer."; $dVueErreur[] = "L'inscription a échoué, veuillez réessayer.";
$twig->render('inscription.html', ['dVueErreur' => $dVueErreur]);
} }
} }
echo $twig->render('inscription.html', ['dVueErreur' => $dVueErreur]); echo $twig->render('inscription.html', ['dVueErreur' => $dVueErreur]);
} }
@ -153,29 +85,35 @@ class UtilisateurControleur
$nom = null; $nom = null;
$id = null; $id = null;
} }
$userModel = new UtilisateurModele();
$evenements=$userModel->getEvenement();
//aller sur la page d'accueil avec le nom et prenom de l'utilisateur //aller sur la page d'accueil avec le nom et prenom de l'utilisateur
echo $twig->render('accueil.html', ['prenom' => $prenom, 'nom' => $nom, 'id' => $id]); echo $twig->render('accueil.html', ['prenom' => $prenom, 'nom' => $nom, 'id' => $id,"eventsList"=>$evenements]);
} }
protected function inscription_success() public function consulterProfilLimite()
{
global $twig;
echo $twig->render('inscription_success.html');
}
protected function consulterProfilLimite()
{ {
//TODO //TODO
echo 'not implemented yet';
} }
protected function consultOffers() public function consultOffers()
{ {
$offerMdl = new OffreModele();
$userMdl = new UtilisateurModele();
global $twig; global $twig;
$niveauEtudes=null; $niveauEtudes=null;
$typeContrat=null; $typeContrat=null;
$exp = null; $exp = null;
$role = NULL;
if(isset($_SESSION['utilisateur']))
{
$role = $_SESSION['utilisateur']->getRole() ;
}
$nbOffers = 5 ; $nbOffers = 5 ;
if(isset($_GET["niveauEtudes"]) && Validation::validateTypeStudies($_GET["niveauEtudes"])) { if(isset($_GET["niveauEtudes"]) && Validation::validateTypeStudies($_GET["niveauEtudes"])) {
@ -191,31 +129,30 @@ class UtilisateurControleur
} }
if ($niveauEtudes == null && $typeContrat == null && $exp == null) { if ($niveauEtudes == null && $typeContrat == null && $exp == null) {
$totalOffers = $offerMdl->getNbOffers(); $totalOffers = $userMdl->getNbOffers();
} else { } else {
$params = array( $params = array(
'typeContrat' => $typeContrat, 'typeContrat' => $typeContrat,
'exp' => $exp, 'exp' => $exp,
'niveauEtudes' => $niveauEtudes, 'niveauEtudes' => $niveauEtudes,
'role' => $role
); );
$offers = $offerMdl->getOffersWithFilters($params); $offers = $userMdl->getOffersWithFilters($params);
$totalOffers = count($offers); $totalOffers = count($offers);
} }
$numberPages = ceil($totalOffers / 5); $numberPages = ceil($totalOffers / 5);
if($numberPages == 0 ) $msg = NULL;
{ if($numberPages == 0 ) {
$msg = 'Aucune Offre Trouvée';
echo $twig->render("erreur.html",['dVueErreur' => ['Aucune Offre Trouvée']]);
return;
} }
if (isset($_GET["page"]) && intval($_GET["page"]) != null) { if (isset($_GET["page"]) && intval($_GET["page"]) != null) {
$page = intval($_GET["page"]); $page = intval($_GET["page"]);
if ($page > $numberPages || $page < 1) { if ($page > $numberPages || $page < 1) {
$dVueErreur[] = "Page introuvable"; $dVueErreur[] = "Page introuvable";
echo $twig->render("erreur.html", ['dVueErreur' => $dVueErreur]); echo $twig->render("erreur.html", ['dVueErreur' => $dVueErreur ]);
return; return;
} }
} else { } else {
@ -225,11 +162,11 @@ class UtilisateurControleur
$start = intval(($page - 1) * 5); $start = intval(($page - 1) * 5);
if ($niveauEtudes == null && $typeContrat == null && $exp == null) { if ($niveauEtudes == null && $typeContrat == null && $exp == null) {
$offers = $offerMdl->getOfferLimit($start, $nbOffers); $offers = $userMdl->getOfferLimit($start, $nbOffers);
} else { } else {
$params['start'] = $start; $params['start'] = $start;
$params['nbOffers'] = 5; $params['nbOffers'] = 5;
$offers = $offerMdl->getOffersWithFilters($params); $offers = $userMdl->getOffersWithFilters($params);
} }
/* echo "filtre :".$niveauEtudes."<br>"; /* echo "filtre :".$niveauEtudes."<br>";
@ -237,25 +174,27 @@ class UtilisateurControleur
echo "filtre :".$exp."<br>";*/ echo "filtre :".$exp."<br>";*/
echo $twig->render('OffersList.html', [ echo $twig->render('OffersList.html', [
'msg' => $msg,
'offres' => $offers, 'offres' => $offers,
'numberPages' => $numberPages, 'numberPages' => $numberPages,
'currentPage' => $page, 'currentPage' => $page,
'typeContrat' => (($typeContrat != null ? $typeContrat : "")), 'typeContrat' => (($typeContrat != null) ? $typeContrat : ""),
'experience' => (($exp != null ? $exp : "")), 'experience' => (($exp != null) ? $exp : ""),
'niveauEtudes' => (($niveauEtudes != null ? $niveauEtudes : "")), 'niveauEtudes' => (($niveauEtudes != null) ? $niveauEtudes : ""),
'valContrat' => (($typeContrat != null ? "&typeContrat=".$typeContrat : "")), 'valContrat' => (($typeContrat != null) ? "&typeContrat=".$typeContrat : ""),
'valExp' => (($exp != null ? "&experience=".$exp : "")), 'valExp' => (($exp != null) ? "&experience=".$exp : ""),
'valEtudes' => (($niveauEtudes != null ? "&niveauEtudes=".$niveauEtudes : "")), 'valEtudes' => (($niveauEtudes != null) ? "&niveauEtudes=".$niveauEtudes : ""),
'role' => $role
]); ]);
} }
protected function createOfferForm() public function createOfferForm()
{ {
global $twig; global $twig;
echo $twig->render("CreerOffre.html", []); echo $twig->render("CreerOffre.html", []);
} }
protected function createOffer() public function createOffer()
{ {
global $twig; global $twig;
$taberror = []; $taberror = [];
@ -308,10 +247,10 @@ class UtilisateurControleur
$saveImg1 = ImageSaver::SaveImage("image"); $saveImg1 = ImageSaver::SaveImage("image");
$saveImg2 = ImageSaver::SaveImage("logo"); $saveImg2 = ImageSaver::SaveImage("logo");
if($saveImg1[0] && $saveImg2[0]) { if($saveImg1[0] && $saveImg2[0]) {
$offreMdl = new OffreModele(); $mbrModel = new MembreModele();
$offre = $offreMdl->publishOffer($saveImg1[1], $saveImg2[1]); $offre = $mbrModel->publishOffer($saveImg1[1], $saveImg2[1]);
echo $twig->render("OffreDetailTest.html", ['offre' => $offre]); echo $twig->render("OffreDetailTest.html", ['offre' => $offre]);
} }
@ -323,14 +262,14 @@ class UtilisateurControleur
} }
} }
public function displayOffer() public function displayOffer(?array $params)
{ {
global $twig; global $twig;
if (isset($_GET["id"]) && intval($_GET["id"]) != null) if (isset($params['id']) && intval($params['id']) != null)
{ {
$offreMdl = new OffreModele(); $uttilsMdl = new UtilisateurModele();
$offre = $offreMdl->getOfferFromId(intval($_GET["id"])); $offre = $uttilsMdl->getOfferFromId(intval($params["id"]));
if($offre != NULL) if($offre != NULL)
{ {
echo $twig->render("OffreDetailTest.html",['offre' => $offre]); echo $twig->render("OffreDetailTest.html",['offre' => $offre]);
@ -341,7 +280,7 @@ class UtilisateurControleur
echo $twig->render("erreur.html", ['dVueErreur' => $dVueErreur]); echo $twig->render("erreur.html", ['dVueErreur' => $dVueErreur]);
} }
protected function listerEvenement() public function listerEvenement()
{ {
$mdl = new UtilisateurModele(); $mdl = new UtilisateurModele();
$evenements = $mdl->getEvenement(); $evenements = $mdl->getEvenement();
@ -350,7 +289,7 @@ class UtilisateurControleur
echo $twig->render('evenement.html', ['evenements' => $evenements]); echo $twig->render('evenement.html', ['evenements' => $evenements]);
} }
protected function creerEvenement() public function creerEvenement()
{ {
global $twig; global $twig;
@ -371,30 +310,37 @@ class UtilisateurControleur
} }
} }
protected function supprimerEvenement() public function supprimerEvenement(?array $params)
{ {
$mdl = new UtilisateurModele(); $mdl = new UtilisateurModele();
$mdl->deleteEvenement($_GET["id"]); $mdl->deleteEvenement($params["id"]);
$this->listerEvenement(); $this->listerEvenement();
} }
protected function avoirDetailEvenement() public function avoirDetailEvenement(?array $params)
{ {
$mdl = new UtilisateurModele(); $mdl = new UtilisateurModele();
$evenement = $mdl->getEvenementById($_GET["id"]);
global $twig; global $twig;
echo $twig->render('detailEvenement.html', ['evenement' => $evenement]);
if(isset($params['id']))
{
$evenement = $mdl->getEvenementById($params['id']);
echo $twig->render('detailEvenement.html', ['evenement' => $evenement]);
}
else echo $twig->render('erreur.html', ['dVueErreur' => ['erreur id evenement']]);
} }
protected function rechercherEvenement() public function rechercherEvenement()
{ {
$mdl = new UtilisateurModele(); $mdl = new UtilisateurModele();
$evenements = $mdl->getEvenement(); $evenements = $mdl->getEvenement();
if(isset($_POST["recherche"]) AND !empty($_POST["recherche"])) if (isset($_POST["recherche"]) and !empty($_POST["recherche"])) {
{
$recherche = Validation::nettoyerString($_POST["recherche"]); $recherche = Validation::nettoyerString($_POST["recherche"]);
$evenements = $mdl->getEvenementByTitre($recherche); $evenements = $mdl->getEvenementByTitre($recherche);
} }

@ -1,6 +1,9 @@
<?php <?php
namespace App\gateway; namespace App\gateway;
use PDO; use PDO;
use App\metier\Alumni;
use App\metier\Role;
use App\metier\Profil;
class AlumniGateway class AlumniGateway
{ {

@ -17,7 +17,7 @@ class ImageSaver
$name = substr($_FILES[$filename]["name"], 0, 45); $name = substr($_FILES[$filename]["name"], 0, 45);
$name = self::getId().$name; $name = self::getId().$name;
move_uploaded_file($_FILES[$filename]['tmp_name'], "../public/uploads/$name"); move_uploaded_file($_FILES[$filename]['tmp_name'], "public/uploads/$name");
$return[]=true; $return[]=true;
$return[]=$name; $return[]=$name;
return $return; return $return;

@ -10,21 +10,21 @@ class TypeContrat {
const Alternance = "Alternance"; const Alternance = "Alternance";
const Stage = "Stage"; const Stage = "Stage";
} }
//
enum ProfilRecherche : string //enum ProfilRecherche : string
{ //{
case Junior = "Junior"; // case Junior = "Junior";
case Senior = "Senior"; // case Senior = "Senior";
case Indifferent = "Indifferent"; // case Indifferent = "Indifferent";
} //}
//
enum NiveauEtudes: string //enum NiveauEtudes: string
{ //{
case Bac2 = "Bac+2"; // case Bac2 = "Bac+2";
case Bac3 = "Bac+3"; // case Bac3 = "Bac+3";
case Bac5 = "Bac+5"; // case Bac5 = "Bac+5";
case Indifferent = "Indifferent"; // case Indifferent = "Indifferent";
} //}
class Offre class Offre
{ {

@ -2,6 +2,9 @@
namespace App\modele; namespace App\modele;
use App\metier\Alumni;
use App\metier\Offre;
class MembreModele extends UtilisateurModele class MembreModele extends UtilisateurModele
{ {
@ -65,4 +68,53 @@ class MembreModele extends UtilisateurModele
public function publishOffer(string $img, string $logo)
{
$desc = $_POST["description"];
$descposte = $_POST["descriptPoste"];
$nom = $_POST["name"];
$ville = $_POST["ville"];
$entreprise = $_POST["entreprise"];
$profilRecherche = $_POST["profilRecherche"];
$mail = $_POST["mail"];
$num = $_POST["num"];
$site = $_POST["site"];
$exp = $_POST["choixExp"];
$typeContrat = $_POST["typeContrat"];
$niveauEtudes = $_POST["education"];
$date = new \DateTime();
if(isset($_POST["fullRemote"]))
{
$remote = true;
}
else $remote = false;
// à la place de NULL passer id utilisateur créateur offre
$offre = new Offre($this->offreGw->getNewId(),
new Alumni("test.mail@icloud.fr","password","admin","prenom","nom"),
$nom,
$desc,
$img,
$logo,
$typeContrat,
$ville,
$entreprise,
$descposte,
$profilRecherche,
$exp,
$niveauEtudes,
$mail,
$num,
$site,
$remote,
$date);
$this->offreGw->addOffers($offre);
return $offre;
}
} }

@ -1,145 +0,0 @@
<?php
namespace App\modele;
use App\gateway\AlumniGateway;
use App\gateway\Connection;
use App\gateway\ImageGateway;
use App\gateway\OffreGateway;
use App\gateway\ProfilGateway;
use App\metier\Alumni;
use App\metier\Offre;
use App\metier\Image;
use mysql_xdevapi\Exception;
class OffreModele
{
private OffreGateway $offreGw;
public function __construct()
{
$this->offreGw = new OffreGateway(new Connection(DB_HOST,DB_USER,DB_PASS));
}
public function publishOffer(string $img, string $logo)
{
$desc = $_POST["description"];
$descposte = $_POST["descriptPoste"];
$nom = $_POST["name"];
$ville = $_POST["ville"];
$entreprise = $_POST["entreprise"];
$profilRecherche = $_POST["profilRecherche"];
$mail = $_POST["mail"];
$num = $_POST["num"];
$site = $_POST["site"];
$exp = $_POST["choixExp"];
$typeContrat = $_POST["typeContrat"];
$niveauEtudes = $_POST["education"];
$date = new \DateTime();
if(isset($_POST["fullRemote"]))
{
$remote = true;
}
else $remote = false;
// à la place de NULL passer id utilisateur créateur offre
$offre = new Offre($this->offreGw->getNewId(),
new Alumni("test.mail@icloud.fr","password","admin","prenom","nom"),
$nom,
$desc,
$img,
$logo,
$typeContrat,
$ville,
$entreprise,
$descposte,
$profilRecherche,
$exp,
$niveauEtudes,
$mail,
$num,
$site,
$remote,
$date);
$this->offreGw->addOffers($offre);
return $offre;
}
public function getOffers() : array
{
$res = $this->offreGw->getOffers();
$offers = $this->CreateOffersFromGw($res);
return $offers;
}
public function getOfferFromId(int $id) : ?Offre
{
$res = $this->offreGw->getOfferFromId($id);
if($res != null)
return $this->CreateOffersFromGw($res)[0];
return null;
}
public function CreateOffersFromGw($res) : array
{
$alGw = new AlumniGateway(new Connection(DB_HOST,DB_USER,DB_PASS));
$offers=[];
foreach ($res as $row)
{
$resal = $alGw->ObtenirById($row['offreur']);
$profilGw = new ProfilGateway(new Connection(DB_HOST,DB_USER,DB_PASS));
$resProfl = $profilGw->getProfilById($row['offreur']);
$alumni = new Alumni($resal[0]['mail'],$resal[0]['mdp'],$resal[0]['role'],$resProfl[0]['nom'],$resProfl[0]["prenom"]);
$date = \DateTime::createFromFormat('Y-m-d', $row['date']);
$offers[]=new Offre(
$row['id'],
$alumni,
$row['titre'],
$row['description'],
$row["image"],
$row["logo"],
$row['typeContrat'],
$row['ville'],
$row["entreprise"],
$row['descriptifPoste'],
$row['profil'],
$row['experience'],
$row['niveauEtudes'],
$row['mailContact'],
$row['numero'],
$row['websiteURL'],
$row['remote'],
$date);
}
return $offers;
}
public function getOfferLimit($start, $nbOffers): array
{
$res = $this->offreGw->getOfferLimit($start, $nbOffers);
return $this->CreateOffersFromGw($res);
}
public function getNbOffers() : int
{
return $this->offreGw->getNbOffers();
}
public function getOffersWithFilters($params) : array
{
return $this->offreGw->getOffersWithFilters($params);
}
}

@ -3,20 +3,25 @@ namespace App\modele;
use App\gateway\Connection; use App\gateway\Connection;
use App\gateway\EvenementGateway; use App\gateway\EvenementGateway;
use App\gateway\OffreGateway;
use App\metier\Evenement; use App\metier\Evenement;
use App\metier\Alumni; use App\metier\Alumni;
use App\gateway\AlumniGateway; use App\gateway\AlumniGateway;
use App\gateway\ProfilGateway; use App\gateway\ProfilGateway;
use App\metier\Profil; use App\metier\Profil;
use App\metier\Offre;
class UtilisateurModele class UtilisateurModele
{ {
private $con; private $con;
protected $offreGw;
public function __construct() public function __construct()
{ {
$this->con = new Connection(DB_HOST, DB_USER, DB_PASS); $this->con = new Connection(DB_HOST,DB_USER,DB_PASS);
$this->offreGw = new OffreGateway($this->con);
} }
/** /**
@ -31,20 +36,22 @@ class UtilisateurModele
$con = new Connection(DB_HOST, DB_USER, DB_PASS); $con = new Connection(DB_HOST, DB_USER, DB_PASS);
$gate = new AlumniGateway($con); $gate = new AlumniGateway($con);
// Récupation de l'utilisateur avec l'email // Récupation de l'utilisateur avec l'email
$utilisateur = $gate->findByEmail($email); $utilisateur = $gate->findByEmail($email);
if ($utilisateur[0] != null) { if (isset($utilisateur[0])) {
// L'utilisateur existe, vérification du mot de passe // L'utilisateur existe, vérification du mot de passe
if (password_verify($mdp, $utilisateur[0]['mdp'])) { if (password_verify($mdp, $utilisateur[0]['mdp'])) {
// Le mot de passe est correct, retournez l'utilisateur // Le mot de passe est correct, retournez l'utilisateur
return new Alumni($utilisateur[0]['id'], $utilisateur[0]['mail'], $utilisateur[0]['mdp'], $utilisateur[0]['role'], $utilisateur[0]['nom'], $utilisateur[0]['prenom']); return new Alumni($utilisateur[0]['id'],$utilisateur[0]['mail'], $utilisateur[0]['mdp'], $utilisateur[0]['role'],$utilisateur[0]['nom'],$utilisateur[0]['prenom']);
} else { } else {
return null; // Le mot de passe est incorrect, renvoyez null
} return null;
} else { }
return null; } else {
} // L'utilisateur n'existe pas, renvoyez null
} return null;
}
}
/** /**
* @description s'inscrire * @description s'inscrire
@ -90,7 +97,7 @@ class UtilisateurModele
} }
} }
public function getEvenement(): array public function getEvenement() : array
{ {
$gate = new EvenementGateway($this->con); $gate = new EvenementGateway($this->con);
@ -135,7 +142,7 @@ class UtilisateurModele
$gate->deleteEvenement($id); $gate->deleteEvenement($id);
} }
public function getEvenementById(int $id): Evenement public function getEvenementById(int $id) : Evenement
{ {
$gate = new EvenementGateway($this->con); $gate = new EvenementGateway($this->con);
@ -154,7 +161,7 @@ class UtilisateurModele
return $evenement; return $evenement;
} }
public function getEvenementByTitre(string $titre): array public function getEvenementByTitre(string $titre) : array
{ {
$gate = new EvenementGateway($this->con); $gate = new EvenementGateway($this->con);
@ -162,7 +169,8 @@ class UtilisateurModele
$evenement = array(); $evenement = array();
foreach ($data as $row) { foreach($data as $row)
{
$evenement[] = new Evenement( $evenement[] = new Evenement(
$row['id'], $row['id'],
$row['organisateur'], $row['organisateur'],
@ -201,4 +209,85 @@ class UtilisateurModele
} }
return null; return null;
} }
public function getOfferFromId(int $id) : ?Offre
{
$res = $this->offreGw->getOfferFromId($id);
if($res != null)
return $this->CreateOffersFromGw($res)[0];
return null;
}
public function CreateOffersFromGw($res) : array
{
$alGw = new AlumniGateway(new Connection(DB_HOST,DB_USER,DB_PASS));
$offers=[];
foreach ($res as $row)
{
$resal = $alGw->ObtenirById($row['offreur']);
$profilGw = new ProfilGateway(new Connection(DB_HOST,DB_USER,DB_PASS));
$resProfl = $profilGw->getProfilById($row['offreur']);
$alumni = new Alumni(intval($resal[0]['id']),$resal[0]['mail'],$resal[0]['mdp'],$resal[0]['role'],$resProfl[0]['nom'],$resProfl[0]["prenom"]);
$date = \DateTime::createFromFormat('Y-m-d', $row['date']);
$offers[]=new Offre(
$row['id'],
$alumni,
$row['titre'],
$row['description'],
$row["image"],
$row["logo"],
$row['typeContrat'],
$row['ville'],
$row["entreprise"],
$row['descriptifPoste'],
$row['profil'],
$row['experience'],
$row['niveauEtudes'],
$row['mailContact'],
$row['numero'],
$row['websiteURL'],
$row['remote'],
$date);
}
return $offers;
}
public function getOfferLimit($start, $nbOffers): array
{
$res = $this->offreGw->getOfferLimit($start, $nbOffers);
return $this->CreateOffersFromGw($res);
}
public function getNbOffers() : int
{
return $this->offreGw->getNbOffers();
}
public function getOffersWithFilters($params) : array
{
return $this->offreGw->getOffersWithFilters($params);
}
public function getOffers() : array
{
$res = $this->offreGw->getOffers();
$offers = $this->CreateOffersFromGw($res);
return $offers;
}
} }

@ -0,0 +1,304 @@
<?php
namespace App\router;
/*
MIT License
Copyright (c) 2012 Danny van Kooten <hi@dannyvankooten.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
class AltoRouter
{
/**
* @var array Array of all routes (incl. named routes).
*/
protected $routes = [];
/**
* @var array Array of all named routes.
*/
protected $namedRoutes = [];
/**
* @var string Can be used to ignore leading part of the Request URL (if main file lives in subdirectory of host)
*/
protected $basePath = '';
/**
* @var array Array of default match types (regex helpers)
*/
protected $matchTypes = [
'i' => '[0-9]++',
'a' => '[0-9A-Za-z]++',
'h' => '[0-9A-Fa-f]++',
'*' => '.+?',
'**' => '.++',
'' => '[^/\.]++'
];
/**
* Create router in one call from config.
*
* @param array $routes
* @param string $basePath
* @param array $matchTypes
* @throws Exception
*/
public function __construct(array $routes = [], $basePath = '', array $matchTypes = [])
{
$this->addRoutes($routes);
$this->setBasePath($basePath);
$this->addMatchTypes($matchTypes);
}
/**
* Retrieves all routes.
* Useful if you want to process or display routes.
* @return array All routes.
*/
public function getRoutes()
{
return $this->routes;
}
/**
* Add multiple routes at once from array in the following format:
*
* $routes = [
* [$method, $route, $target, $name]
* ];
*
* @param array $routes
* @return void
* @author Koen Punt
* @throws Exception
*/
public function addRoutes($routes)
{
if (!is_array($routes) && !$routes instanceof Traversable) {
throw new RuntimeException('Routes should be an array or an instance of Traversable');
}
foreach ($routes as $route) {
call_user_func_array([$this, 'map'], $route);
}
}
/**
* Set the base path.
* Useful if you are running your application from a subdirectory.
* @param string $basePath
*/
public function setBasePath($basePath)
{
$this->basePath = $basePath;
}
/**
* Add named match types. It uses array_merge so keys can be overwritten.
*
* @param array $matchTypes The key is the name and the value is the regex.
*/
public function addMatchTypes(array $matchTypes)
{
$this->matchTypes = array_merge($this->matchTypes, $matchTypes);
}
/**
* Map a route to a target
*
* @param string $method One of 5 HTTP Methods, or a pipe-separated list of multiple HTTP Methods (GET|POST|PATCH|PUT|DELETE)
* @param string $route The route regex, custom regex must start with an @. You can use multiple pre-set regex filters, like [i:id]
* @param mixed $target The target where this route should point to. Can be anything.
* @param string $name Optional name of this route. Supply if you want to reverse route this url in your application.
* @throws Exception
*/
public function map($method, $route, $target, $name = null)
{
$this->routes[] = [$method, $route, $target, $name];
if ($name) {
if (isset($this->namedRoutes[$name])) {
throw new RuntimeException("Can not redeclare route '{$name}'");
}
$this->namedRoutes[$name] = $route;
}
return;
}
/**
* Reversed routing
*
* Generate the URL for a named route. Replace regexes with supplied parameters
*
* @param string $routeName The name of the route.
* @param array @params Associative array of parameters to replace placeholders with.
* @return string The URL of the route with named parameters in place.
* @throws Exception
*/
public function generate($routeName, array $params = [])
{
// Check if named route exists
if (!isset($this->namedRoutes[$routeName])) {
throw new RuntimeException("Route '{$routeName}' does not exist.");
}
// Replace named parameters
$route = $this->namedRoutes[$routeName];
// prepend base path to route url again
$url = $this->basePath . $route;
if (preg_match_all('`(/|\.|)\[([^:\]]*+)(?::([^:\]]*+))?\](\?|)`', $route, $matches, PREG_SET_ORDER)) {
foreach ($matches as $index => $match) {
list($block, $pre, $type, $param, $optional) = $match;
if ($pre) {
$block = substr($block, 1);
}
if (isset($params[$param])) {
// Part is found, replace for param value
$url = str_replace($block, $params[$param], $url);
} elseif ($optional && $index !== 0) {
// Only strip preceding slash if it's not at the base
$url = str_replace($pre . $block, '', $url);
} else {
// Strip match block
$url = str_replace($block, '', $url);
}
}
}
return $url;
}
/**
* Match a given Request Url against stored routes
* @param string $requestUrl
* @param string $requestMethod
* @return array|boolean Array with route information on success, false on failure (no match).
*/
public function match($requestUrl = null, $requestMethod = null)
{
$params = [];
// set Request Url if it isn't passed as parameter
if ($requestUrl === null) {
$requestUrl = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/';
}
// strip base path from request url
$requestUrl = substr($requestUrl, strlen($this->basePath));
// Strip query string (?a=b) from Request Url
if (($strpos = strpos($requestUrl, '?')) !== false) {
$requestUrl = substr($requestUrl, 0, $strpos);
}
$lastRequestUrlChar = $requestUrl ? $requestUrl[strlen($requestUrl)-1] : '';
// set Request Method if it isn't passed as a parameter
if ($requestMethod === null) {
$requestMethod = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET';
}
foreach ($this->routes as $handler) {
list($methods, $route, $target, $name) = $handler;
$method_match = (stripos($methods, $requestMethod) !== false);
// Method did not match, continue to next route.
if (!$method_match) {
continue;
}
if ($route === '*') {
// * wildcard (matches all)
$match = true;
} elseif (isset($route[0]) && $route[0] === '@') {
// @ regex delimiter
$pattern = '`' . substr($route, 1) . '`u';
$match = preg_match($pattern, $requestUrl, $params) === 1;
} elseif (($position = strpos($route, '[')) === false) {
// No params in url, do string comparison
$match = strcmp($requestUrl, $route) === 0;
} else {
// Compare longest non-param string with url before moving on to regex
// Check if last character before param is a slash, because it could be optional if param is optional too (see https://github.com/dannyvankooten/AltoRouter/issues/241)
if (strncmp($requestUrl, $route, $position) !== 0 && ($lastRequestUrlChar === '/' || $route[$position-1] !== '/')) {
continue;
}
$regex = $this->compileRoute($route);
$match = preg_match($regex, $requestUrl, $params) === 1;
}
if ($match) {
if ($params) {
foreach ($params as $key => $value) {
if (is_numeric($key)) {
unset($params[$key]);
}
}
}
return [
'target' => $target,
'params' => $params,
'name' => $name
];
}
}
return false;
}
/**
* Compile the regex for a given route (EXPENSIVE)
* @param $route
* @return string
*/
protected function compileRoute($route)
{
if (preg_match_all('`(/|\.|)\[([^:\]]*+)(?::([^:\]]*+))?\](\?|)`', $route, $matches, PREG_SET_ORDER)) {
$matchTypes = $this->matchTypes;
foreach ($matches as $match) {
list($block, $pre, $type, $param, $optional) = $match;
if (isset($matchTypes[$type])) {
$type = $matchTypes[$type];
}
if ($pre === '.') {
$pre = '\.';
}
$optional = $optional !== '' ? '?' : null;
//Older versions of PCRE require the 'P' in (?P<named>)
$pattern = '(?:'
. ($pre !== '' ? $pre : null)
. '('
. ($param !== '' ? "?P<$param>" : null)
. $type
. ')'
. $optional
. ')'
. $optional;
$route = str_replace($block, $pattern, $route);
}
}
return "`^$route$`u";
}
}

@ -5,7 +5,7 @@
<title>Alica - Offres</title> <title>Alica - Offres</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="css/offres.css"> <link rel="stylesheet" href="{{dir}}/public/css/offres.css">
</head> </head>
<body> <body>
<header> <header>
@ -14,13 +14,17 @@
<div class="container mt-4 d-flex align-content-center "> <div class="container mt-4 d-flex align-content-center ">
<div> <div>
<a href="index.php?action=createOfferForm" type="button" class="btn btn-outline-success mb-4">Publier une offre</a>
{% if role == 'Membre' or role == 'Admin' %}
<a href="{{dir}}/createOfferForm" type="button" class="btn btn-outline-success mb-4">Publier une offre</a>
{% endif %}
</div> </div>
<div class="container mt-4"> <div class="container mt-4">
<div class="d-flex flex-column align-items-center"> <div class="d-flex flex-column align-items-center">
<form action="index.php" method="get" class="form-inline flex-wrap mb-4"> <form action="{{dir}}/consultOffers" method="get" class="form-inline flex-wrap mb-4">
<h2 class="mr-3">Filtrer les offres</h2> <h2 class="mr-3">Filtrer les offres</h2>
<div class="form-group mr-3 flex-column justify-content-left"> <div class="form-group mr-3 flex-column justify-content-left">
@ -79,7 +83,7 @@
</div> </div>
<div> <div>
<a href="index.php?action=consultOffers" class="btn btn-info">Réinitialiser les filtres</a> <a href="{{dir}}/consultOffers" class="btn btn-info">Réinitialiser les filtres</a>
</div> </div>
</div> </div>
@ -87,27 +91,29 @@
<h1 id="titrePrincipal">Offres d'emploi</h1> <h1 id="titrePrincipal">Offres d'emploi</h1>
{% if msg %}
<p>{{ msg }}</p>
{% endif %}
<div class="col-md-8 offset-md-2"> <div class="col-md-8 offset-md-2">
{% for offre in offres %} {% for offre in offres %}
<article class="mb-4"> <article class="mb-4">
<div class="row1"> <div class="row1">
<img src="uploads/{{offre.getLogo()}}" class="img-fluid rounded" alt="logo"> <!-- Ajoutez la classe "rounded" pour arrondir les coins --> <img src="{{dir}}/public/uploads/{{offre.getLogo()}}" class="img-fluid rounded" alt="logo"> <!-- Ajoutez la classe "rounded" pour arrondir les coins -->
<h4>{{ offre.getNom() }}</h4> <h4>{{ offre.getNom() }}</h4>
</div> </div>
<div class="row2"> <div class="row2">
<p class="authorDate"><strong>Julien Martin | {{ offre.getDateStringFr()}}</strong></p> <p class="authorDate"><strong>{{offre.getOffreur().Prenom()}}, {{offre.getOffreur().getNom() }} | {{ offre.getDateStringFr()}}</strong></p>
<p>{{ offre.getDescription() }}</p> <p>{{ offre.getDescription() }}</p>
</div> </div>
<div class="row3"> <div class="row3">
<img src="assets/location.png" alt="location"> <img src="public/assets/location.png" alt="location">
<p>{{offre.getVille()}}</p> <p>{{offre.getVille()}}</p>
</div> </div>
<button type="button" class="btn btn-outline-primary btn-sm mb-2 custom-button" <button type="button" class="btn btn-outline-primary btn-sm mb-2 custom-button"
onclick="window.location.href = 'index.php?action=displayOffer&id={{offre.getId()}}';">En savoir plus > onclick="window.location.href = '{{dir}}/displayOffer/{{offre.getId()}}'">En savoir plus</button>
</button>
</article> </article>
{% endfor %} {% endfor %}
@ -115,19 +121,21 @@
<nav style="text-align: center;"> <nav style="text-align: center;">
<nav style="text-align: center;"> <nav style="text-align: center;">
{% if numberPages is defined %} {% if numberPages is defined %}
{% if numberPages > 1 %}
{% if currentPage is defined %} {% if currentPage is defined %}
{% for i in 1..numberPages %} {% for i in 1..numberPages %}
{% if i == currentPage %} {% if i == currentPage %}
<!-- <!--
index.php?action=consultOffers&page={{ i }}&typeContrat={{ typeContrat }}&experience={{ experience }}&niveauEtudes={{ niveauEtudes }} index.php?action=consultOffers&page={{ i }}&typeContrat={{ typeContrat }}&experience={{ experience }}&niveauEtudes={{ niveauEtudes }}
--> -->
<a href="index.php?action=consultOffers&page={{ i }}&{{valContrat}}{{valExp}}{{ValEtudes}}" class="active bg-danger">{{ i }}</a> <a href="{{dir}}/consultOffers?page={{i}}{{valContrat}}{{valExp}}{{ValEtudes}}" class="current">{{ i }}</a>
{% else %} {% else %}
<a href="index.php?action=consultOffers&page={{ i }}&{{valContrat}}{{valExp}}{{ValEtudes}}">{{ i }}</a> <a href="{{dir}}/consultOffers?page={{i}}{{valContrat}}{{valExp}}{{ValEtudes}}">{{ i }}</a>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endif %}
</nav> </nav>
</nav> </nav>
@ -136,8 +144,6 @@
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script> <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>

@ -1,10 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Offre {{ offre.getNom() }}</title>
</head>
<body>
</body>
</html>

@ -17,10 +17,10 @@
<ul class="list-group"> <ul class="list-group">
<!-- Add an image related to the offer --> <!-- Add an image related to the offer -->
<li class="list-group-item"></li><img src="uploads/{{offre.getLogo()}}" alt="Logo" class="img-thumbnail" style="max-height: 50px; max-width: 50px;"</li> <li class="list-group-item"></li><img src="{{dir}}/public/uploads/{{offre.getLogo()}}" alt="Logo" class="img-thumbnail" style="max-height: 50px; max-width: 50px;"></li>
<li class="list-group-item"><img src="uploads/{{offre.getImg()}}" alt="Offer Image" class="img-fluid"></li> <li class="list-group-item"><img src="{{dir}}/public/uploads/{{offre.getImg()}}" alt="Offer Image" class="img-fluid"></li>
<!--<li class="list-group-item"><strong>ID:</strong> {{ offre.getId() }}</li> --> <!--<li class="list-group-item"><strong>ID:</strong> {{ offre.getId() }}</li> -->
<li class="list-group-item"><strong>Offreur:</strong> {{ offre.getOffreur().getNom() }}</li> <li class="list-group-item"><strong>Offreur:</strong> {{offre.getOffreur().Prenom()}} {{offre.getOffreur().getNom() }}</li>
<li class="list-group-item"><strong>Nom de l'offre:</strong> {{ offre.getNom() }}</li> <li class="list-group-item"><strong>Nom de l'offre:</strong> {{ offre.getNom() }}</li>
<li class="list-group-item"><strong>Entreprise :</strong> {{ offre.getEntreprise() }}</li> <li class="list-group-item"><strong>Entreprise :</strong> {{ offre.getEntreprise() }}</li>
<li class="list-group-item"><strong>Description:</strong> {{ offre.getDescription() }}</li> <li class="list-group-item"><strong>Description:</strong> {{ offre.getDescription() }}</li>

@ -8,6 +8,7 @@
</head> </head>
<!-- balise center provisoire c'est pour mes yeux -->
<body> <body>
<header> <header>
{% include 'menu.html' %} {% include 'menu.html' %}
@ -33,8 +34,71 @@
</div> </div>
</div> </div>
{% endif %} {% endif %}
<div class="main">
<div class="banner">
<img class="banner-img" src="assets/bandeau.png">
<div class="title-banner">
<div class="subtitle">Le réseau Alica te souhaite la bienvenue !</div>
<div class="title">Alica Info</div>
<div class="description">Nous sommes danciens étudiants à lIUT dAubière qui aimerions créer un réseau d'anciens étudiants au travers d'un réseau alumni du département Informatique.</div>
</div>
</div>
</div>
<div class="slideshow-container" id="evenements">
{% for event in eventsList %}
<div class="slide">
<div class="slide-img">
<img src="{{ event.image }}">
</div>
<div class="slide-info">
<div class="slide-date">{{event.date}}</div>
<div class="slide-title">{{event.titre}}</div>
<div class="slide-description">{{event.description}}</div>
<a href="index.php?action=" class="button">S'inscrire</a>
</div>
</div>
{% endfor %}
<button class="prevButton" onclick="plusDivs(-1)">&#10094;</button>
<button class="nextButton" onclick="plusDivs(1)">&#10095;</button>
</div>
<div class="search">
<input class="search-bar" type="text" placeholder=" Rechercher des alumni...">
<a class="search-button" href="index.php?action=consulterProfilLimite">
<ion-icon name="search-outline"></ion-icon>
</a>
</div>
</div>
</body> </body>
<footer>
{% include 'footer.html' %}
</footer>
</html> </html>
<script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script>
<script>
let bar = document.querySelector('.bars'), navItem = document.querySelector('.nav-items');
bar.addEventListener('click', () => {
navItem.classList.toggle('active');
});
var slideIndex = 1;
showDivs(slideIndex);
function plusDivs(n) {
showDivs(slideIndex += n);
}
function showDivs(n) {
var i;
var x = document.getElementsByClassName("slide");
if (n > x.length) {slideIndex = 1}
if (n < 1) {slideIndex = x.length}
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
x[slideIndex-1].style.display = "flex";
}
</script>

@ -4,11 +4,16 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Alica - Connexion</title> <title>Alica - Connexion</title>
<link rel="stylesheet" type="text/css" href="../public/css/connexion.css"> <link rel="stylesheet" type="text/css" href="{{dir}}/public/css/connexion.css">
</head> </head>
<body> <body>
{% if msg %}
<p>{{msg}}</p>
{% endif %}
<div class="container"> <div class="container">
<form action="" method="POST"> <form action="{{dir}}/connection" method="POST">
<h3>Connexion</h3> <h3>Connexion</h3>
<div class="CadreInput"> <div class="CadreInput">
<span>Identifiant</span> <span>Identifiant</span>
@ -37,9 +42,7 @@
</form> </form>
<div class="CadreInput"> <div class="CadreInput">
<div class="box"> <div class="box">
<form action="../public/index.php?action=inscription" method="POST"> <a href="{{dir}}/inscription" class="other">S'inscrire</a>
<input type="submit" class="other" value="S'inscrire">
</form>
</div> </div>
</div> </div>
{% if dVueErreur is not empty %} {% if dVueErreur is not empty %}

@ -9,7 +9,7 @@
<body> <body>
<div class="container mt-5"> <div class="container mt-5">
<h1 class="text-center">Créer un Événement</h1> <h1 class="text-center">Créer un Événement</h1>
<form action="index.php?action=creerEvenement" method="post" enctype="multipart/form-data"> <form action="creerEvenement" method="post" enctype="multipart/form-data">
<div class="form-group"> <div class="form-group">
<label for="titre">Titre de l'Événement :</label> <label for="titre">Titre de l'Événement :</label>

@ -15,7 +15,7 @@
<main class="container mt-4"> <main class="container mt-4">
<h1>Publier Une Offre</h1> <h1>Publier Une Offre</h1>
<form style="background-color: #00DBFF" class="p-4" enctype="multipart/form-data" action="index.php?action=createOffer" method="post"> <form style="background-color: #00DBFF" class="p-4" enctype="multipart/form-data" action="createOffer" method="post">
{% if tabError is defined %} {% if tabError is defined %}
{% for error in tabError %} {% for error in tabError %}

@ -22,9 +22,9 @@
<p><strong>Organisateur:</strong> {{ evenement.organisateurId }}</p> <p><strong>Organisateur:</strong> {{ evenement.organisateurId }}</p>
<p><strong>Date:</strong> {{ evenement.date }}</p> <p><strong>Date:</strong> {{ evenement.date }}</p>
<p><strong>Description:</strong> {{ evenement.description }}</p> <p><strong>Description:</strong> {{ evenement.description }}</p>
<img src="uploads/{{ evenement.getImage() }}" width="250px" class="img-fluid" alt="Event Image"> <img src="{{dir}}/public/uploads/{{ evenement.getImage() }}" width="250px" class="img-fluid" alt="Event Image">
<p><strong>Places disponibles:</strong> {{ evenement.nbPlaceMax }}</p> <p><strong>Places disponibles:</strong> {{ evenement.nbPlaceMax }}</p>
<a href="../public/index.php?action=listerEvenement" class="btn btn-primary">Retour</a> <a href="{{dir}}/listerEvenement" class="btn btn-primary">Retour</a>
</div> </div>
{% else %} {% else %}
<p>L'événement n'existe pas ou n'est pas disponible.</p> <p>L'événement n'existe pas ou n'est pas disponible.</p>

@ -3,25 +3,23 @@
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="../public/css/erreur.css"> <link rel="stylesheet" type="text/css" href="{{dir}}/public/css/erreur.css">
<title>Alica - Erreur</title> <title>Alica - Erreur</title>
</head> </head>
<style>
body{
text-align: center;
}
</style>
{% include "menu.html" %}
<body> <body>
<header>
{% include "menu.html" %}
</header>
<h1>Erreur</h1> <h1>Erreur</h1>
{% if dVueErreur is defined %} {% if dVueErreur is defined %}
{% for value in dVueErreur %} {% for value in dVueErreur %}
<p>{{value}}</p> <p>{{value}}</p>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
<form action="../public/index.php" method="POST"> <form action="{{dir}}/accueil" method="POST">
<input type="submit" value="Retourner à l'accueil"> <input type="submit" value="Retourner à l'accueil">
</form> </form>
</body> </body>

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Liste des Événements</title> <title>Liste des Événements</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link rel="stylesheet" href="css/evenement.css"> <link rel="stylesheet" href="{{dir}}/public/css/evenement.css">
</head> </head>
<body> <body>
@ -15,14 +15,14 @@
<div class="container mt-4"> <div class="container mt-4">
<div class="div_titres"> <div class="div_titres">
<form action="../public/index.php?action=rechercherEvenement" method="post"> <form action="{{dir}}/rechercherEvenement" method="post">
<input type="text" name="recherche" id="recherche" placeholder="Rechercher un événement"> <input type="text" name="recherche" id="recherche" placeholder="Rechercher un événement">
<button type="submit"> <button type="submit">
<img src="assets/search.svg" alt="rechercher" width="30px"> <img src="{{dir}}/public/assets/search.svg" alt="rechercher" width="30px">
</button> </button>
</form> </form>
<h1>Liste des Événements</h1> <h1>Liste des Événements</h1>
<a href="../public/index.php?action=creerEvenement" class="btn btn-primary">Publier événement</a> <a href="{{dir}}/creerEvenement" class="btn btn-primary">Publier événement</a>
</div> </div>
<ul class="list-group"> <ul class="list-group">
@ -34,13 +34,13 @@
<p><strong>Organisateur:</strong> {{ evenement.getNomOrganisateur() }}</p> <p><strong>Organisateur:</strong> {{ evenement.getNomOrganisateur() }}</p>
<p><strong>Date:</strong> {{ evenement.date }}</p> <p><strong>Date:</strong> {{ evenement.date }}</p>
<p><strong>Description:</strong> {{ evenement.description }}</p> <p><strong>Description:</strong> {{ evenement.description }}</p>
<img src="uploads/{{ evenement.getImage() }}" width="250px" class="img-fluid" alt="{{ evenement.titre }}"> <img src="{{dir}}/public/uploads/{{ evenement.getImage() }}" width="250px" class="img-fluid" alt="{{ evenement.titre }}">
<p><strong>Places disponibles:</strong> {{ evenement.nbPlaceMax }}</p> <p><strong>Places disponibles:</strong> {{ evenement.nbPlaceMax }}</p>
<a href="../public/index.php?action=avoirDetailEvenement&id={{ evenement.id }}" class="btn btn-primary">Détails</a> <a href="{{dir}}/avoirDetailEvenement/{{ evenement.id }}" class="btn btn-primary">Détails</a>
</div> </div>
<form action="../public/index.php?action=supprimerEvenement&id={{ evenement.id }}" method="post"> <form action="{{dir}}/supprimerEvenement/{{ evenement.id }}" method="get">
<button type="submit" class="btn btn-primary" id="deleteButton"> <button type="submit" class="btn btn-primary" id="deleteButton">
<img src="assets/close.png" alt="Supprimer" width="20px"> <img src="{{dir}}/public/assets/close.png" alt="Supprimer" width="20px">
</button> </button>
</form> </form>
</li> </li>

@ -4,11 +4,11 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Alica - Inscription</title> <title>Alica - Inscription</title>
<link rel="stylesheet" type="text/css" href="../public/css/inscription.css"> <link rel="stylesheet" type="text/css" href="{{dir}}/public/css/inscription.css">
</head> </head>
<body> <body>
<div class="container"> <div class="container">
<form action="" method="POST"> <form action="{{dir}}/inscription" method="POST">
<h3>S'inscrire</h3> <h3>S'inscrire</h3>
<div class="CadreInput"> <div class="CadreInput">
<span>Prénom :</span> <span>Prénom :</span>
@ -18,27 +18,23 @@
</div> </div>
<label> <label>
<input type="text" name="firstname" required> <input type="text" name="firstname" required>
</label>
</div>
</div>
<div class="CadreInput">
<span>Nom :</span>
<div class="box">
<div class="icon">
<ion-icon name="person"></ion-icon>
</div> </div>
<label>
<input type="text" name="name" required>
</label>
</div> </div>
</div> <div class="CadreInput">
<div class="CadreInput"> <span>Nom :</span>
<span>Email</span> <div class="box">
<div class="box"> <div class="icon">
<div class="icon"> <ion-icon name="person"></ion-icon>
<ion-icon name="mail-outline"></ion-icon> </div>
<input type="text" name="name" required>
</div> </div>
<label> </div>
<div class="CadreInput">
<span>Email</span>
<div class="box">
<div class="icon">
<ion-icon name="mail-outline"></ion-icon>
</div>
<input type="email" name="email" required> <input type="email" name="email" required>
</label> </label>
</div> </div>
@ -62,9 +58,7 @@
</form> </form>
<div class="CadreInput"> <div class="CadreInput">
<div class="box"> <div class="box">
<form action="../public/index.php?action=connection" method="POST"> <a href="{{dir}}/connection" class="other">Se Connecter</a>
<input class="other" type="submit" value="Se connecter">
</form>
</div> </div>
</div> </div>
{% if dVueErreur is not empty %} {% if dVueErreur is not empty %}

@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Success</title> <title>Success</title>
<link rel="stylesheet" type="text/css" href="../public/css/inscription_success.css"> <link rel="stylesheet" type="text/css" href="{{dir}}/public/css/inscription_success.css">
</head> </head>
<body> <body>
<h1>Inscription effectuée avec succès, vous pouvez désormais vous connecter</h1> <h1>Inscription effectuée avec succès, vous pouvez désormais vous connecter</h1>
@ -15,7 +15,7 @@
</div> </div>
<script> <script>
setTimeout(function () { setTimeout(function () {
window.location.href = "../public/index.php?action=connection"; window.location.href = "{{dir}}/connection";
}, 5000); }, 5000);
</script> </script>

@ -1,13 +1,13 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="fr"> <html lang="fr">
<head> <head>
<link rel="stylesheet" type="text/css" href="css/menu.css"> <link rel="stylesheet" type="text/css" href="{{dir}}/public/css/menu.css">
</head> </head>
<nav class="navbar-container"> <nav class="navbar-container">
<div class="logo-container"> <div class="logo-container">
<a href="index.php"> <a href="{{dir}}/accueil">
<img src="assets/logo.png" alt="Logo" height="70px"> <img src="{{dir}}/public/assets/logo.png" alt="Logo" height="70px">
</a> </a>
</div> </div>
<div class="bars"> <div class="bars">
@ -17,20 +17,20 @@
</div> </div>
<ul class="nav-items"> <ul class="nav-items">
<li class="nav-link"><a href="#">A propos</a></li> <li class="nav-link"><a href="#">A propos</a></li>
<li class="nav-link"><a href="#">Evenements</a></li> <li class="nav-link"><a href="{{dir}}/listerEvenement">Evenements</a></li>
<li class="nav-link"><a href="index.php?action=consultOffers">Offres</a></li> <li class="nav-link"><a href="{{dir}}/consultOffers">Offres</a></li>
<li class="nav-link"><a href="#">Nous contacter</a></li> <li class="nav-link"><a href="#">Nous contacter</a></li>
</ul> </ul>
<ul class="nav-items"> <ul class="nav-items">
<!-- Afficher boutons de connexion et d'inscription --> <!-- Afficher boutons de connexion et d'inscription -->
{% if nom and prenom %} {% if nom and prenom %}
<!-- Afficher bouton de déconnexion --> <!-- Afficher bouton de déconnexion -->
<a href="index.php?action=deconnexion" class="button">Déconnexion</a> <a href="{{dir}}/deconnexion" class="button">Déconnexion</a>
{% else %} {% else %}
<div class="login-register"> <div class="login-register">
<a href="index.php?action=connection" class="button">Connexion</a> <a href="{{dir}}/connection" class="button">Connexion</a>
<a href="index.php?action=inscription" class="button button2">Inscription</a> <a href="{{dir}}/inscription" class="button button2">Inscription</a>
</div> </div>
{% endif %} {% endif %}

@ -1,52 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Offre Detail</title>
<link rel="stylesheet" href="css/offreDetail.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
</head>
<body>
<header>
{% include "menu.html" %}
</header>
<div id="titleDiv" class="jumbotron text-center">
<img src="assets/michelin.png" alt="Logo" height="70px">
<h1>Developpeur Fullstack</h1>
<img src="assets/location.png">
<p>Paris</p>
<div id="key" class="row justify-content-center">
<div class="col-md-2">
<p>CDI</p>
</div>
<div class="col-md-3">
<p>Experience: Non spécifié</p>
</div>
<div class="col-md-3">
<p>Etudes: Bac+2</p>
</div>
</div>
</div>
<p>Offre Proposée par marvin marbout</p>
<p>Publiée le 15/17/2023</p>
<h3>Description de l'offre</h3>
<div id="description" class="container">
<p>
Accompagné(e) par nos experts au sein d'une équipe pluridisciplinaire, tu conçois et développes des solutions innovantes répondant aux besoins de nos clients.
A ce titre, tu utilises les langages, frameworks et outils actuels.
Les méthodes agiles ainsi que les pratiques DevOps, l'intégration et le déploiement continu sont ton quotidien.
Tu interviens dans un environnement technique très riche. Rejoindre CGI dans le cadre de ton stage de fin détudes,
cest intervenir sur des projets denvergure et variés en lien avec ta formation tout en bénéficiant dun accompagnement de proximité pour construire ta carrière.
Cest aussi sinvestir auprès dune entreprise responsable qui propose de nombreux avantages (prise en charge jusquà 100% des transports en commun) et partager des moments de convivialité pour ensuite nous rejoindre en CDI !
</p>
</div>
<!-- Include Bootstrap JS and jQuery -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.2/dist/js/bootstrap.min.js"></script>
</body>
</html>

@ -44,7 +44,7 @@
<div class="col-12 col-md-9"> <div class="col-12 col-md-9">
<h3>{{ offre.getNom() }}</h3> <h3>{{ offre.getNom() }}</h3>
<p>Julien Martin</p> <p>Julien Martin</p><!-- A changer -->
</div> </div>
</div> </div>
<div class="row"> <div class="row">

Loading…
Cancel
Save