Compare commits

...

5 Commits

Author SHA1 Message Date
Baptiste D e4d480b28f test
1 year ago
Baptiste D bd7f228d1f fix conflicts je crois
1 year ago
Baptiste D ef93699a64 test
1 year ago
Baptiste D 6f82697826 modif offres
1 year ago
Baptiste D b4127bb330 modification image saver gestion cas image nom existant
1 year ago

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

@ -0,0 +1,15 @@
<?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());
$cont = new \App\controleur\FrontControleur();

@ -1,16 +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 '';
}
}

@ -2,23 +2,29 @@
namespace App\controleur;
use App\config;
use App\config\Validation;
use App\gateway\Connection;
use App\gateway\ImageSaver;
use App\modele\OffreModele;
use App\gateway\OffreGateway;
use App\modele\UtilisateurModele;
use App\config;
class UtilisateurControleur
{
private \App\modele\UtilisateurModele $userModel;
public function __construct()
{
global $twig;
$this->userModel = new \App\modele\UtilisateurModele();
if (!isset($_REQUEST["action"])) {
//$action = NULL;
$action = "listerEvenement";
$action = "consultOffers";
} else {
$action = Validation::nettoyerString($_REQUEST["action"]);
$action = \App\config\Validation::nettoyerString($_REQUEST["action"]);
}
switch ($action) {
case NULL:
@ -33,6 +39,7 @@ class UtilisateurControleur
break;
case "inscription":
$this->inscription();
break;
case "consultOffers":
$this->consultOffers();
@ -49,24 +56,10 @@ class UtilisateurControleur
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";
echo $twig->render("erreur.html", ['dVueErreur' => $dVueErreur]);
}
}
@ -115,20 +108,6 @@ class UtilisateurControleur
}
$nouvelUtilisateur = $userModel->inscription($prenom,$nom,$email, $hash);
// <<<<<<< HEAD
// // Validez les données d'inscription, par exemple, vérifiez si l'email est unique
// // Vous pouvez également effectuer d'autres validations nécessaires
// $userModel = new \App\modele\UtilisateurModele();
// $nouvelUtilisateur = $userModel->inscription($email, $motDePasse);
// // Si l'inscription a réussi, redirigez l'utilisateur vers une page de confirmation
// // Vous pouvez également gérer les erreurs ici en cas d'échec de l'inscription
// if ($nouvelUtilisateur instanceof \App\metier\Alumni) {
// // L'inscription a réussi, redirigez l'utilisateur vers une page de confirmation
// // par exemple :
// =======
if ($nouvelUtilisateur instanceof \App\metier\Alumni) {
header('Location: index.php?action=inscription_success');
exit();
@ -165,17 +144,25 @@ class UtilisateurControleur
//TODO
}
/**
* @return void
* @brief Affiche la liste des offres d'emploi
*/
protected function consultOffers()
{
$offerMdl = new OffreModele();
global $twig;
$niveauEtudes=null;
$typeContrat=null;
$exp = null;
// number of offers by pages
$nbOffers = 5 ;
/** validation of entry's : */
if(isset($_GET["niveauEtudes"]) && Validation::validateTypeStudies($_GET["niveauEtudes"])) {
$niveauEtudes = $_GET["niveauEtudes"];
}
@ -189,26 +176,30 @@ class UtilisateurControleur
}
if ($niveauEtudes == null && $typeContrat == null && $exp == null) {
$totalOffers = $offerMdl->getNbOffers();
$totalOffers = $this->userModel->getNbOffers();
} else {
$params = array(
'typeContrat' => $typeContrat,
'exp' => $exp,
'niveauEtudes' => $niveauEtudes,
);
$offers = $offerMdl->getOffersWithFilters($params);
$offers = $this->userModel->getOffersWithFilters($params);
$totalOffers = count($offers);
}
// get the current pages to display
$numberPages = ceil($totalOffers / 5);
if($numberPages == 0 )
{
echo $twig->render("erreur.html",['dVueErreur' => ['Aucune Offre Trouvée']]);
echo $twig->render("OffersList.html",['dVueErreur' => ['Aucune Offre Trouvée']]);
return;
}
// validate the page number
if (isset($_GET["page"]) && intval($_GET["page"]) != null) {
$page = intval($_GET["page"]);
if ($page > $numberPages || $page < 1) {
@ -220,16 +211,19 @@ class UtilisateurControleur
$page = 1;
}
$start = intval(($page - 1) * 5);
if ($niveauEtudes == null && $typeContrat == null && $exp == null) {
$offers = $offerMdl->getOfferLimit($start, $nbOffers);
$offers = $this->userModel->getOfferLimit($start, $nbOffers);
} else {
$params['start'] = $start;
$params['nbOffers'] = 5;
$offers = $offerMdl->getOffersWithFilters($params);
$offers = $this->userModel->getOffersWithFilters($params);
}
/* echo "filtre :".$niveauEtudes."<br>";
echo "filtre :".$typeContrat."<br>";
echo "filtre :".$exp."<br>";*/
@ -247,12 +241,18 @@ class UtilisateurControleur
]);
}
// display the form to create an offer
protected function createOfferForm()
{
global $twig;
echo $twig->render("CreerOffre.html", []);
}
// create offer
protected function createOffer()
{
global $twig;
@ -260,6 +260,8 @@ class UtilisateurControleur
$requiredFields = ['name', 'entreprise', 'description','typeContrat', 'descriptPoste', 'profilRecherche', 'choixExp', 'education', 'mail', 'num'];
// validate required fields
$error = false;
foreach ($requiredFields as $field) {
if (empty($_POST[$field])) {
@ -273,6 +275,8 @@ class UtilisateurControleur
return;
}
// validate entrys
if(!Validation::verifierEmail($_POST["mail"]))
{
//echo $twig->render("CreerOffre.html", ['errMsg' => "Email non valide !" ]);
@ -297,6 +301,8 @@ class UtilisateurControleur
return;
}
// if errors display the form with errors
if(count($taberror) > 0)
{
echo $twig->render("CreerOffre.html", ['tabError' => $taberror ]);
@ -306,10 +312,8 @@ class UtilisateurControleur
$saveImg1 = ImageSaver::SaveImage("image");
$saveImg2 = ImageSaver::SaveImage("logo");
if($saveImg1[0] && $saveImg2[0]) {
$offreMdl = new OffreModele();
$offre = $offreMdl->publishOffer($saveImg1[1], $saveImg2[1]);
$offre = $this->userModel->publishOffer($saveImg1[1], $saveImg2[1]);
echo $twig->render("OffreDetailTest.html", ['offre' => $offre]);
}
@ -321,14 +325,14 @@ class UtilisateurControleur
}
}
// display offers
public function displayOffer()
{
global $twig;
if (isset($_GET["id"]) && intval($_GET["id"]) != null)
{
$offreMdl = new OffreModele();
$offre = $offreMdl->getOfferFromId(intval($_GET["id"]));
$offre = $this->userModel->getOfferFromId(intval($_GET["id"]));
if($offre != NULL)
{
echo $twig->render("OffreDetailTest.html",['offre' => $offre]);
@ -339,65 +343,4 @@ class UtilisateurControleur
echo $twig->render("erreur.html", ['dVueErreur' => $dVueErreur]);
}
protected function listerEvenement()
{
$mdl = new UtilisateurModele();
$evenements = $mdl->getEvenement();
global $twig;
echo $twig->render('evenement.html', ['evenements' => $evenements]);
}
protected function creerEvenement()
{
global $twig;
if (isset($_FILES["image"])) {
$img = ImageSaver::SaveImage('image');
if (!Validation::validerEvenement($_POST["titre"], $_POST["description"], $_POST["date"], $_POST["nbPlaceMax"], $img[1])) {
$mdl = new UtilisateurModele();
$mdl->ajouterEvenement($_POST["titre"], $_POST["description"], $_POST["date"], $_POST["nbPlaceMax"], $img[1]);
$this->listerEvenement();
} else {
$dVueErreur[] ="Erreur lors de la création de l'évènement";
echo $twig->render("erreur.html",['dVueErreur' => $dVueErreur]);
}
} else {
echo $twig->render('creerEvenement.html', []);
}
}
protected function supprimerEvenement()
{
$mdl = new UtilisateurModele();
$mdl->deleteEvenement($_GET["id"]);
$this->listerEvenement();
}
protected function avoirDetailEvenement()
{
$mdl = new UtilisateurModele();
$evenement = $mdl->getEvenementById($_GET["id"]);
global $twig;
echo $twig->render('detailEvenement.html', ['evenement' => $evenement]);
}
protected function rechercherEvenement()
{
$mdl = new UtilisateurModele();
$evenements = $mdl->getEvenement();
if(isset($_POST["recherche"]) AND !empty($_POST["recherche"]))
{
$recherche = Validation::nettoyerString($_POST["recherche"]);
$evenements = $mdl->getEvenementByTitre($recherche);
}
global $twig;
echo $twig->render('evenement.html', ['evenements' => $evenements]);
}
}

@ -4,8 +4,6 @@ use PDO;
use App\metier\Alumni;
use App\metier\Role;
use App\metier\Alumni;
class AlumniGateway
{
private \App\gateway\Connection $con;

@ -1,74 +0,0 @@
<?php
namespace App\gateway;
use App\metier\Image;
use PDO;
class ImageGateway
{
private Connection $con;
/**
* @param $con
*/
public function __construct(Connection $con)
{
$this->con = $con;
}
public function insertImage(Image $img)
{
$query = "INSERT INTO Image (`nom`, `taille`, `type`, `blob`) VALUES ( :n, :t, :ty, :b)";
$this->con->executeQuery($query, array(
':n' => array($img->getName(), PDO::PARAM_STR),
':t' => array($img->getTaille(), PDO::PARAM_STR),
':ty' => array($img->getType(), PDO::PARAM_STR),
':b' => array($img->getBlob(), PDO::PARAM_STR)
));
}
public function delete(int $id)
{
$query = 'DELETE FROM Image WHERE id=:i';
$this->con->executeQuery($query, array(
':i' => array($id, PDO::PARAM_INT)
));
}
public function getFromId(int $id) : array
{
$query = 'SELECT * FROM Image WHERE id=:i';
$this->con->executeQuery($query, array(
':i' => array($id, PDO::PARAM_INT)
));
return $this->con->getResults();
}
public function getNewId() : int
{
$query = 'SELECT MAX(id) FROM Image';
$this->con->executeQuery($query);
$res = $this->con->getResults();
if ($res[0]['MAX(id)'] === null) {
return 1;
}
return intval($res[0]['MAX(id)'])+1;
}
public function obtenirToutesImages()
{
$query = 'SELECT * FROM Image';
$this->con->executeQuery($query);
$res = $this->con->getResults();
$array = [];
foreach ($res as $r) {
$array[] = new Image($this->getNewId(),$r['nom'], $r['taille'], $r['type'], $r['blob']);
}
return $array;
}
}
?>

@ -14,12 +14,25 @@ class ImageSaver
try {
$return = [];
$name = substr($_FILES[$filename]["name"], 0, 45);
$originalName = $_FILES[$filename]["name"];
$name = substr($originalName, 0, 45);
$name = self::getId() . $name;
move_uploaded_file($_FILES[$filename]['tmp_name'], "../public/uploads/$name");
$uploadDir = "public/uploads/";
$targetPath = $uploadDir . $name;
$counter = 1;
while (file_exists($targetPath)) {
$name = self::getId() . $counter . $originalName;
$targetPath = $uploadDir . $name;
$counter++;
}
move_uploaded_file($_FILES[$filename]['tmp_name'], $targetPath);
$return[] = true;
$return[] = $name;
return $return;
} catch (\Exception $e) {
$return[] = false;
@ -27,4 +40,5 @@ class ImageSaver
return $return;
}
}
}

@ -1,63 +0,0 @@
<?php
namespace App\metier;
class Image
{
private int $id;
private string $name;
private string $taille;
private string $type;
private string $blob;
/**
* @param int $id
* @param string $name
* @param string $taille
* @param string $type
* @param string $blob
*/
public function __construct(int $id, string $name, string $taille, string $type, string $blob)
{
$this->id = $id;
$this->name = $name;
$this->taille = $taille;
$this->type = $type;
$this->blob = $blob;
}
public function getName(): string
{
return $this->name;
}
public function getTaille(): string
{
return $this->taille;
}
public function getType(): string
{
return $this->type;
}
public function getBlob(): string
{
return $this->blob;
}
public function getId() : string
{
return $this->id;
}
public function toString() : string {
return "Image : " . $this->name . " " . $this->taille . " " . $this->type . " blob " . $this->blob;
}
}

@ -2,9 +2,20 @@
namespace App\modele;
use App\gateway\Connection;
use App\gateway\OffreGateway;
use App\metier\Alumni;
use App\metier\Offre;
class MembreModele extends UtilisateurModele
{
private OffreGateway $offreGw;
public function __construct()
{
$this->offreGw = new OffreGateway(new Connection("mysql:host=localhost;dbname=dbAlica", "Dev", "Dev"));
}
/**
* @description modifier photo de profil
@ -15,6 +26,8 @@ class MembreModele extends UtilisateurModele
return false;
}
/**
* @description ajouter formation
*/
@ -62,6 +75,53 @@ class MembreModele extends UtilisateurModele
// TO DO
return false;
}
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,18 +1,29 @@
<?php
namespace App\modele;
use App\gateway\AlumniGateway;
use App\gateway\Connection;
use App\gateway\EvenementGateway;
use App\metier\Evenement;
use App\gateway\OffreGateway;
use App\gateway\ProfilGateway;
use App\metier\Alumni;
use App\metier\Offre;
class UtilisateurModele
{
private $con;
/**
* @description Charger le flux d'activiter
* @return array flux
*/
public function LoadFeed() : array
{
// TO DO
return [];
}
private OffreGateway $offreGw;
public function __construct()
{
$this->con = new Connection(DB_HOST,DB_USER,DB_PASS);
$this->offreGw = new OffreGateway(new Connection("mysql:host=localhost;dbname=dbAlica", "Dev", "Dev"));
}
/**
@ -60,6 +71,14 @@ class UtilisateurModele
$profilGate = new \App\gateway\ProfilGateway($con);
// Insérez le nouvel utilisateur dans la base de données en utilisant AlumniGateway
if ($gate->insert($email, $hashpassword, $role)) {
// <<<<<<< HEAD
// // L'insertion a réussi, retournez le nouvel utilisateur
// $nouvelUtilisateur = new \App\metier\Alumni($email, $hashpassword, $role);
// return $nouvelUtilisateur;
// } else {
// // L'insertion a échoué, renvoyez un utilisateur vide pour indiquer l'échec
// return new \App\metier\Alumni(null, null, null);
// =======
$alumni = $gate->getID($email);
if($profilGate->insert($alumni,$nom, $prenom,$email)){
// L'insertion a réussi, retournez le nouvel utilisateur
@ -88,92 +107,129 @@ class UtilisateurModele
}
}
public function getEvenement() : array
public function getOffers() : array
{
$gate = new EvenementGateway($this->con);
$res = $this->offreGw->getOffers();
$offers = $this->CreateOffersFromGw($res);
return $offers;
}
$data = $gate->getAllEvenement();
public function getOfferFromId(int $id) : ?Offre
{
$res = $this->offreGw->getOfferFromId($id);
if($res != null)
return $this->CreateOffersFromGw($res)[0];
return null;
}
$evenement = array();
public function CreateOffersFromGw($res) : array
{
$alGw = new AlumniGateway(new Connection("mysql:host=localhost;dbname=dbAlica", "test", "test"));
foreach($data as $row)
$offers=[];
foreach ($res as $row)
{
$evenement[] = new Evenement(
$resal = $alGw->ObtenirById($row['offreur']);
$profilGw = new ProfilGateway(new Connection("mysql:host=localhost;dbname=dbAlica", "Dev", "Dev"));
$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'],
$row['organisateur'],
$alumni,
$row['titre'],
$row['description'],
$row['date'],
$row['nbPlaceMax'],
$row['image']
);
$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 $evenement;
}
public function ajouterEvenement(string $titre, string $description, string $date, int $nbPlaceMax, string $img)
{
$gate = new EvenementGateway($this->con);
$evenement = new Evenement(
$gate->getNewId(),
'1', //TODO : Ajouter l'ID de l'admin connecté
$titre,
$description,
$date,
$nbPlaceMax,
$img
);
$gate->insertEvenement($evenement);
return $offers;
}
public function deleteEvenement(int $id)
public function getOfferLimit($start, $nbOffers): array
{
$gate = new EvenementGateway($this->con);
$gate->deleteEvenement($id);
$res = $this->offreGw->getOfferLimit($start, $nbOffers);
return $this->CreateOffersFromGw($res);
}
public function getEvenementById(int $id) : Evenement
public function getNbOffers() : int
{
$gate = new EvenementGateway($this->con);
return $this->offreGw->getNbOffers();
}
$data = $gate->findById($id);
$evenement = new Evenement(
$data[0]['id'],
$data[0]['organisateur'],
$data[0]['titre'],
$data[0]['description'],
$data[0]['date'],
$data[0]['nbPlaceMax'],
$data[0]['image']
);
return $evenement;
public function getOffersWithFilters($params) : array
{
return $this->offreGw->getOffersWithFilters($params);
}
public function getEvenementByTitre(string $titre) : array
public function publishOffer(string $img,string $logo)
{
$gate = new EvenementGateway($this->con);
$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;
$data = $gate->findByTitle($titre);
// à 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);
$evenement = array();
$this->offreGw->addOffers($offre);
foreach($data as $row)
{
$evenement[] = new Evenement(
$row['id'],
$row['organisateur'],
$row['titre'],
$row['description'],
$row['date'],
$row['nbPlaceMax'],
$row['image']
);
return $offre;
}
return $evenement;
}
}

@ -5,7 +5,7 @@
<title>Alica - Offres</title>
<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 rel="stylesheet" href="css/offres.css">
<link rel="stylesheet" href="public/css/offres.css">
</head>
<body>
<header>
@ -14,13 +14,13 @@
<div class="container mt-4 d-flex align-content-center ">
<div>
<a href="index.php?action=createOfferForm" type="button" class="btn btn-outline-success mb-4">Publier une offre</a>
<a href="?action=createOfferForm" type="button" class="btn btn-outline-success mb-4">Publier une offre</a>
</div>
<div class="container mt-4">
<div class="d-flex flex-column align-items-center">
<form action="index.php" method="get" class="form-inline flex-wrap mb-4">
<form action="?consultOffer" method="get" class="form-inline flex-wrap mb-4">
<h2 class="mr-3">Filtrer les offres</h2>
<div class="form-group mr-3 flex-column justify-content-left">
@ -79,7 +79,7 @@
</div>
<div>
<a href="index.php?action=consultOffers" class="btn btn-info">Réinitialiser les filtres</a>
<a href="?action=consultOffers" class="btn btn-info">Réinitialiser les filtres</a>
</div>
</div>
@ -87,13 +87,19 @@
<h1 id="titrePrincipal">Offres d'emploi</h1>
{% if dVueErreur is defined %}
{% for value in dVueErreur %}
<p>{{value}}</p>
{% endfor %}
{% endif %}
<div class="col-md-8 offset-md-2">
{% for offre in offres %}
<article class="mb-4">
<div class="row1">
<img src="uploads/{{offre.getLogo()}}" class="img-fluid rounded" alt="logo"> <!-- Ajoutez la classe "rounded" pour arrondir les coins -->
<img src="public/uploads/{{offre.getLogo()}}" class="img-fluid rounded" alt="logo"> <!-- Ajoutez la classe "rounded" pour arrondir les coins -->
<h4>{{ offre.getNom() }}</h4>
</div>
<div class="row2">
@ -102,11 +108,11 @@
</div>
<div class="row3">
<img src="assets/location.png" alt="location">
<img src="public/assets/location.png" alt="location">
<p>{{offre.getVille()}}</p>
</div>
<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 = '?action=displayOffer&id={{offre.getId()}}';">En savoir plus >
</button>
</article>
@ -121,9 +127,9 @@
<!--
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="?action=consultOffers&page={{ i }}&{{valContrat}}{{valExp}}{{ValEtudes}}" class="active bg-danger">{{ i }}</a>
{% else %}
<a href="index.php?action=consultOffers&page={{ i }}&{{valContrat}}{{valExp}}{{ValEtudes}}">{{ i }}</a>
<a href="?action=consultOffers&page={{ i }}&{{valContrat}}{{valExp}}{{ValEtudes}}">{{ i }}</a>
{% endif %}
{% endfor %}
{% endif %}

@ -17,8 +17,8 @@
<ul class="list-group">
<!-- 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"><img src="uploads/{{offre.getImg()}}" alt="Offer Image" class="img-fluid"></li>
<li class="list-group-item"></li><img src="public/uploads/{{offre.getLogo()}}" alt="Logo" class="img-thumbnail" style="max-height: 50px; max-width: 50px;"</li>
<li class="list-group-item"><img src="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>Offreur:</strong> {{ offre.getOffreur().getNom() }}</li>
<li class="list-group-item"><strong>Nom de l'offre:</strong> {{ offre.getNom() }}</li>
@ -37,7 +37,7 @@
<li class="list-group-item">
<strong>Full Remote :</strong>
{% if offre.isRemote() %}
Oui
{% else %}
Non
{% endif %}

@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="css/accueil.css">
<link rel="stylesheet" type="text/css" href="/css/accueil.css">
<title>Alica - Accueil</title>
</head>

@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Alica - Connexion</title>
<link rel="stylesheet" type="text/css" href="../public/css/connexion.css">
<link rel="stylesheet" type="text/css" href="public/css/connexion.css">
</head>
<body>
<div class="container">
@ -37,7 +37,7 @@
</form>
<div class="CadreInput">
<div class="box">
<form action="../public/index.php?action=inscription" method="POST">
<form action="/?action=inscription" method="POST">
<input type="submit" class="other" value="S'inscrire">
</form>
</div>

@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<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="public/css/erreur.css">
<title>Alica - Erreur</title>
</head>
@ -21,8 +21,6 @@
<p>{{value}}</p>
{% endfor %}
{% endif %}
<form action="../public/index.php" method="POST">
<input type="submit" value="Retourner à l'accueil">
</form>
<a href=".">Retourner à l'accueil<a/>
</body>
</html>

@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Alica - Inscription</title>
<link rel="stylesheet" type="text/css" href="../public/css/inscription.css">
<link rel="stylesheet" type="text/css" href="public/css/inscription.css">
</head>
<body>
<div class="container">
@ -62,7 +62,7 @@
</form>
<div class="CadreInput">
<div class="box">
<form action="../public/index.php?action=connection" method="POST">
<form action="/?action=connection" method="POST">
<input class="other" type="submit" value="Se connecter">
</form>
</div>

@ -15,7 +15,7 @@
</div>
<script>
setTimeout(function () {
window.location.href = "../public/index.php?action=connection";
window.location.href = "../index.php";
}, 5000);
</script>

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

@ -12,9 +12,9 @@
</header>
<div id="titleDiv" class="jumbotron text-center">
<img src="assets/michelin.png" alt="Logo" height="70px">
<img src="public/assets/michelin.png" alt="Logo" height="70px">
<h1>Developpeur Fullstack</h1>
<img src="assets/location.png">
<img src="public/assets/location.png">
<p>Paris</p>
<div id="key" class="row justify-content-center">

Loading…
Cancel
Save