Compare commits
No commits in common. 'master' and 'evenements' have entirely different histories.
master
...
evenements
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="SqlDialectMappings">
|
||||
<file url="file://$PROJECT_DIR$/php/src/gateway/AlumniGateway.php" dialect="GenericSQL" />
|
||||
</component>
|
||||
</project>
|
Before Width: | Height: | Size: 100 KiB |
@ -1,11 +1,6 @@
|
||||
#RewriteEngine On
|
||||
#
|
||||
#RewriteCond %{REQUEST_FILENAME} !-f
|
||||
#RewriteCond %{REQUEST_FILENAME} !-d
|
||||
#RewriteRule ^(.*)$ index.php/$1 [L]
|
||||
|
||||
|
||||
RewriteEngine on
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule . index.php [L]
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteBase /php/public/
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^(.*)$ index.php [QSA,L]
|
||||
</IfModule>
|
||||
|
@ -1,22 +0,0 @@
|
||||
<?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();
|
Before Width: | Height: | Size: 842 KiB |
@ -1,122 +0,0 @@
|
||||
/* profil.css */
|
||||
.profiles-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
gap: 20px;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.profile {
|
||||
width: calc(50% - 20px); /* Ajustez la largeur si nécessaire pour correspondre au design */
|
||||
border: 1px solid #ccc; /* Bordure comme dans l'image */
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
margin-bottom: 20px;
|
||||
display: flex;
|
||||
align-items: center; /* Alignement vertical */
|
||||
}
|
||||
|
||||
.profile-image-container {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #f0f0f0;
|
||||
flex-shrink: 0; /* Empêche le conteneur de rétrécir */
|
||||
}
|
||||
|
||||
.profile-image-container img {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.profile-details {
|
||||
padding: 10px;
|
||||
flex-grow: 1; /* Permet à ce div de prendre l'espace restant */
|
||||
}
|
||||
|
||||
.profile-details p {
|
||||
margin: 5px 0;
|
||||
font-weight: bold; /* Texte en gras comme dans l'image */
|
||||
}
|
||||
|
||||
.profile-details .job-title {
|
||||
color: #007bff;
|
||||
font-size: 0.85em;
|
||||
}
|
||||
|
||||
.profile-details a {
|
||||
display: block; /* Prend toute la largeur du conteneur */
|
||||
background: #007bff;
|
||||
color: #fff;
|
||||
padding: 5px 15px;
|
||||
text-decoration: none;
|
||||
border-radius: 5px;
|
||||
font-size: 14px;
|
||||
margin-top: 10px; /* Espace au-dessus du lien */
|
||||
text-align: center; /* Centre le texte dans le lien */
|
||||
}
|
||||
|
||||
.profile-details a:hover {
|
||||
background: #0056b3;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* profil.css */
|
||||
.pagination {
|
||||
display: flex;
|
||||
padding-left: 0;
|
||||
list-style: none;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
|
||||
.page-link {
|
||||
position: relative;
|
||||
display: block;
|
||||
padding: 0.5rem 0.75rem;
|
||||
margin-left: -1px;
|
||||
line-height: 1.25;
|
||||
color: #007bff;
|
||||
background-color: #fff;
|
||||
border: 1px solid #dee2e6;
|
||||
}
|
||||
|
||||
.page-link:hover {
|
||||
color: #0056b3;
|
||||
text-decoration: none;
|
||||
background-color: #e9ecef;
|
||||
border-color: #dee2e6;
|
||||
}
|
||||
|
||||
.page-item:first-child .page-link {
|
||||
margin-left: 0;
|
||||
border-top-left-radius: 0.25rem;
|
||||
border-bottom-left-radius: 0.25rem;
|
||||
}
|
||||
|
||||
.page-item:last-child .page-link {
|
||||
border-top-right-radius: 0.25rem;
|
||||
border-bottom-right-radius: 0.25rem;
|
||||
}
|
||||
|
||||
.page-item.active .page-link {
|
||||
z-index: 1;
|
||||
color: #fff;
|
||||
background-color: #007bff;
|
||||
border-color: #007bff;
|
||||
}
|
||||
|
||||
.page-item.disabled .page-link {
|
||||
color: #6c757d;
|
||||
pointer-events: none;
|
||||
cursor: auto;
|
||||
background-color: #fff;
|
||||
border-color: #dee2e6;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,16 @@
|
||||
<?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();
|
Before Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 2.5 MiB |
Before Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 2.5 MiB |
Before Width: | Height: | Size: 162 KiB |
Before Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 2.5 MiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 2.5 MiB |
Before Width: | Height: | Size: 124 KiB |
Before Width: | Height: | Size: 2.5 MiB |
Before Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 164 KiB |
Before Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 2.5 MiB |
Before Width: | Height: | Size: 149 KiB |
Before Width: | Height: | Size: 2.5 MiB |
Before Width: | Height: | Size: 2.5 MiB |
After Width: | Height: | Size: 467 KiB |
Before Width: | Height: | Size: 2.5 MiB |
Before Width: | Height: | Size: 34 KiB |
@ -0,0 +1,24 @@
|
||||
<?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,136 +1,55 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace App\controleur;
|
||||
|
||||
use App\router\AltoRouter;
|
||||
use App\controleur\Error;
|
||||
|
||||
class FrontControleur
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
global $twig;
|
||||
session_start();
|
||||
|
||||
if(!isset($_SESSION['nom']) && !isset($_SESSION['prenom']) && !isset($_SESSION['role']) && !isset($_SESSION['id']))
|
||||
{
|
||||
$_SESSION['nom'] = NULL;
|
||||
$_SESSION['prenom'] = NULL;
|
||||
$_SESSION['role'] = "guest";
|
||||
$_SESSION['id'] = NULL;
|
||||
}
|
||||
else{
|
||||
$twig->addGlobal('nom', $_SESSION['nom']);
|
||||
$twig->addGlobal('prenom', $_SESSION['prenom']);
|
||||
$twig->addGlobal('role', $_SESSION['role']);
|
||||
$twig->addGlobal('id', $_SESSION['id']);
|
||||
}
|
||||
|
||||
|
||||
$router = new AltoRouter();
|
||||
|
||||
$router->setBasePath('/SAE_2A_FA-Reseau_ALICA/php');
|
||||
|
||||
$router->map('GET|POST', '/', 'UtilisateurControleur');
|
||||
|
||||
$router->map('GET|POST','/[a:action]?','UtilisateurControleur');
|
||||
|
||||
$router->map('POST','/[a:action]?','UtilisateurControleur');
|
||||
|
||||
$router->map('GET|POST','/[a:action]/[i:id]?','UtilisateurControleur');
|
||||
|
||||
$router->map('GET|POST', '/user/[a:action]?', 'MembreControleur');
|
||||
|
||||
$router->map('GET|POST', '/user/[i:id]/[a:action]?', 'MembreControleur');
|
||||
|
||||
$router->map('GET|POST', '/user/[i:id]/[a:action]/[i:id2]?', 'MembreControleur');
|
||||
|
||||
|
||||
$router->map('GET|POST', '/admin/[i:id]/[a:action]?', 'AdminControleur');
|
||||
|
||||
$router->map('GET|POST', '/admin/[i:id]/[a:action]/[i:id2]?', 'AdminControleur');
|
||||
|
||||
$id = 0;
|
||||
|
||||
$match = $router->match();
|
||||
|
||||
$action = array();
|
||||
|
||||
$id = array();
|
||||
|
||||
try{
|
||||
if (!$match) {
|
||||
|
||||
$dVueErreur[] = "Error 404 Page not found";
|
||||
echo $twig->render("erreur.html", ['dVueErreur' => $dVueErreur]);
|
||||
}
|
||||
|
||||
if ($match) {
|
||||
|
||||
$controller = $match['target'] ?? NULL;
|
||||
$action = $match['params']['action'] ?? NULL;
|
||||
$id = $match['params']['id'] ?? NULL;
|
||||
|
||||
$namespace = 'App\\controleur\\';
|
||||
|
||||
try {
|
||||
if ($controller == "MembreControleur") {
|
||||
if ($_SESSION["role"] != "Membre" && $_SESSION["role"] != "Admin") {
|
||||
|
||||
echo $twig->render("connection.html", ['msg' => 'Vous devez vous connecter pour effectuer cette action']);
|
||||
} else {
|
||||
$controller = "MembreControleur";
|
||||
$controller = $namespace . $controller;
|
||||
//echo "controller : ".$controller;
|
||||
$controller = new $controller();
|
||||
|
||||
$dVueErreur = [];
|
||||
$actions = array(
|
||||
"Admin" => [
|
||||
"supprimerCompte", "consulterSignalement","supprimerOffre"
|
||||
],
|
||||
"Moderateur" => [
|
||||
//TODO
|
||||
],
|
||||
"Membre" => [
|
||||
"deconnexion","proposerOffre","consulterProfil","modifierProfil","signaler",
|
||||
],
|
||||
"Utilisateur" => [
|
||||
|
||||
"connexion", "inscription", "accueil", "consulterProfilLimite", "publierOffre", "listerEvenement", "creerEvenement", "supprimerEvenement", "avoirDetailEvenement", "rechercherEvenement"
|
||||
]
|
||||
);
|
||||
|
||||
$action = \App\config\Validation::nettoyerString($_GET["action"] ?? "");
|
||||
if(in_array($action,$actions['Admin'])) {
|
||||
if (!isset($_SESSION["role"]) || $_SESSION["role"]!="admin") {
|
||||
$dVueErreur[] = 'Veuillez vous connecter';
|
||||
echo $twig->render('erreur.html', ['dVueErreur' => $dVueErreur]);
|
||||
} else{
|
||||
new AdminControleur();
|
||||
}
|
||||
}
|
||||
|
||||
if ($controller == "AdminControleur") {
|
||||
if ($_SESSION["role"] != "Admin") {
|
||||
$dVueErreur = ["Erreur : Vous n'avez pas les privileges pour cette action"];
|
||||
|
||||
global $twig;
|
||||
else if(in_array($action,$actions['Moderateur'])) {
|
||||
if (!isset($_SESSION["role"]) || ($_SESSION["role"]!="moderateur" && $_SESSION["role"]!="admin")) {
|
||||
$dVueErreur[] = 'Veuillez vous connecter';
|
||||
echo $twig->render('erreur.html', ['dVueErreur' => $dVueErreur]);
|
||||
return;
|
||||
} else {
|
||||
$controller = "AdminControleur";
|
||||
$controller = $namespace . $controller;
|
||||
$controller = new $controller();
|
||||
} else{
|
||||
new ModerateurControleur();
|
||||
}
|
||||
}
|
||||
|
||||
if ($controller == "UtilisateurControleur") {
|
||||
$controller = $namespace . $controller;
|
||||
$controller = new $controller();
|
||||
}
|
||||
|
||||
if (is_callable(array($controller, $action))) {
|
||||
|
||||
call_user_func(array($controller, $action), $match['params']);
|
||||
} else {
|
||||
|
||||
|
||||
echo $twig->render('accueil.html');
|
||||
}
|
||||
|
||||
} catch (Error $error) {
|
||||
$dVueErreur = ['Erreur : Action inconnue'];
|
||||
|
||||
else if(in_array($action,$actions['Membre'])) {
|
||||
if (!isset($_SESSION["utilisateur"])) {
|
||||
$dVueErreur[] = 'Veuillez vous connecter';
|
||||
echo $twig->render('erreur.html', ['dVueErreur' => $dVueErreur]);
|
||||
} else{
|
||||
new MembreControleur();
|
||||
}
|
||||
}else{
|
||||
new UtilisateurControleur();
|
||||
}
|
||||
}
|
||||
catch(Error $e)
|
||||
{
|
||||
$dVueErreur = ['Erreur : Action inconnue'];
|
||||
|
||||
echo $twig->render('erreur.html', ['dVueErreur' => $dVueErreur]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,123 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace App\controleur;
|
||||
use App\config\Validation;
|
||||
use App\gateway\ImageManager;
|
||||
use App\modele\MembreModele;
|
||||
|
||||
class MembreControleur extends UtilisateurControleur
|
||||
{
|
||||
public function __construct()
|
||||
{}
|
||||
|
||||
public function deconnexion()
|
||||
{
|
||||
global $twig;
|
||||
session_unset();
|
||||
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()
|
||||
{
|
||||
session_destroy();
|
||||
|
||||
header("Location: /SAE_2A_FA-Reseau_ALICA/php/");
|
||||
header('Location: index.php?action=accueil');
|
||||
exit();
|
||||
}
|
||||
public function createOfferForm()
|
||||
{
|
||||
global $twig;
|
||||
echo $twig->render("CreateOffer.html", []);
|
||||
}
|
||||
|
||||
public function createOffer()
|
||||
{
|
||||
global $twig;
|
||||
$taberror = [];
|
||||
|
||||
$requiredFields = ['name', 'entreprise', 'description','typeContrat', 'descriptPoste', 'profilRecherche', 'choixExp', 'education', 'mail', 'num'];
|
||||
|
||||
$error = false;
|
||||
foreach ($requiredFields as $field) {
|
||||
if (empty($_POST[$field])) {
|
||||
$error = true;
|
||||
$taberror[] = "Le champ {$field} est requis !";
|
||||
}
|
||||
}
|
||||
if($error)
|
||||
{
|
||||
echo $twig->render("CreateOffer.html", ['tabError' => $taberror ]);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!Validation::verifierEmail($_POST["mail"]))
|
||||
{
|
||||
$taberror[] = "Email non valide !";
|
||||
}
|
||||
|
||||
if(!Validation::validateNumber($_POST["num"]))
|
||||
{
|
||||
$taberror[] = "Numero non valide !";
|
||||
}
|
||||
|
||||
if (!Validation::validateImage("image"))
|
||||
{
|
||||
$taberror[] = "Image non valide !";
|
||||
|
||||
}
|
||||
if(!Validation::validateImage("logo")) {
|
||||
$taberror[] = "Logo non valide !";
|
||||
}
|
||||
|
||||
if(count($taberror) > 0)
|
||||
{
|
||||
echo $twig->render("CreateOffer.html", ['tabError' => $taberror ]);
|
||||
|
||||
}
|
||||
else{
|
||||
$saveImg1 = ImageManager::SaveImage("image");
|
||||
$saveImg2 = ImageManager::SaveImage("logo");
|
||||
if($saveImg1[0] != NULL && $saveImg2[0] != NULL)
|
||||
{
|
||||
$mbrModel = new MembreModele();
|
||||
|
||||
$offre = $mbrModel->publishOffer($saveImg1[1], $saveImg2[1]);
|
||||
|
||||
echo $twig->render("OffreDetail.html", ['offre' => $offre]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$taberror[] = "Erreur lors de l'upload des images";
|
||||
echo $twig->render("CreateOffer.html", ['tabError' => $taberror ]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function deleteOffer(?array $params)
|
||||
{
|
||||
global $twig;
|
||||
$id = $params['id2'];
|
||||
|
||||
$MemberModel = new MembreModele();
|
||||
$offre = $MemberModel->getOfferFromId($id);
|
||||
if($offre != NULL)
|
||||
{
|
||||
$MemberModel->deleteOffer($offre);
|
||||
|
||||
}
|
||||
$this->consultOffers(NULL);
|
||||
|
||||
}
|
||||
|
||||
public function proposerOffre()
|
||||
protected function proposerOffre()
|
||||
{
|
||||
//TODO
|
||||
}
|
||||
public function consulterProfil()
|
||||
|
||||
protected function consulterProfil()
|
||||
{
|
||||
//TODO
|
||||
}
|
||||
public function modifierProfil()
|
||||
|
||||
protected function modifierProfil()
|
||||
{
|
||||
//TODO
|
||||
}
|
||||
public function signaler()
|
||||
|
||||
protected function signaler()
|
||||
{
|
||||
//TODO
|
||||
}
|
||||
|
@ -0,0 +1,74 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -1,62 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\gateway;
|
||||
class ImageManager
|
||||
{
|
||||
|
||||
/**
|
||||
* @return int id aléatoire
|
||||
* @description générer un id aléatoire
|
||||
*/
|
||||
public static function getId() : int
|
||||
{
|
||||
return rand(10000,19999);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description sauvegarder une image
|
||||
* @param string $filename
|
||||
* @return array [bool,string] tableau de retour avec le booléen et le nom de l'image
|
||||
*/
|
||||
public static function SaveImage(string $filename) : array
|
||||
{
|
||||
try {
|
||||
$return=[];
|
||||
|
||||
$name = $_FILES[$filename]["name"];
|
||||
$path = "public/uploads/".$name;
|
||||
while(file_exists($path))
|
||||
{
|
||||
$name = substr($_FILES[$filename]["name"], 0, 45);
|
||||
$name = self::getId().$name;
|
||||
$path = "public/uploads/".$name;
|
||||
}
|
||||
|
||||
|
||||
move_uploaded_file($_FILES[$filename]['tmp_name'], "public/uploads/$name");
|
||||
$return[]=true;
|
||||
$return[]=$name;
|
||||
return $return;
|
||||
} catch (\Exception $e) {
|
||||
$return[] = false;
|
||||
$return[] = "";
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $img
|
||||
* @return bool true si l'image a été supprimée, false sinon
|
||||
* @description supprimer une image
|
||||
*/
|
||||
public static function deleteImg(string $img) : bool
|
||||
{
|
||||
$path = "public/uploads/$img";
|
||||
if (file_exists($path)) {
|
||||
unlink($path);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\gateway;
|
||||
class ImageSaver
|
||||
{
|
||||
|
||||
public static function getId() : int
|
||||
{
|
||||
return rand(10000,19999);
|
||||
}
|
||||
|
||||
public static function SaveImage(string $filename) : array
|
||||
{
|
||||
try {
|
||||
$return=[];
|
||||
|
||||
$name = substr($_FILES[$filename]["name"], 0, 45);
|
||||
$name = self::getId().$name;
|
||||
|
||||
move_uploaded_file($_FILES[$filename]['tmp_name'], "../public/uploads/$name");
|
||||
$return[]=true;
|
||||
$return[]=$name;
|
||||
return $return;
|
||||
} catch (\Exception $e) {
|
||||
$return[] = false;
|
||||
$return[] = "";
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,145 @@
|
||||
<?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);
|
||||
}
|
||||
|
||||
}
|
@ -1,304 +0,0 @@
|
||||
<?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";
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Offre {{ offre.getNom() }}</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,125 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns="http://www.w3.org/1999/html">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Publier une Offre</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header>
|
||||
{% include "menu.html" %}
|
||||
</header>
|
||||
|
||||
<main class="container mt-4">
|
||||
<h1>Publier Une Offre</h1>
|
||||
|
||||
<form style="background-color: #00DBFF" class="p-4" enctype="multipart/form-data" action="index.php?action=createOffer" method="post">
|
||||
|
||||
{% if tabError is defined %}
|
||||
{% for error in tabError %}
|
||||
<p style="color: red">{{ error }}</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
<p>Les champs contenant des astrérisques * sont obligatoires.</p>
|
||||
<div class="form-group">
|
||||
<label for="name">Intitulé de l'offre*</label>
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="Intitulé" maxlength="128" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="entreprise">Nom de l'entreprise :*</label>
|
||||
<input type="text" class="form-control" id="entreprise" name="entreprise" placeholder="Entreprise" maxlength="64" required>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="description">Amorce :*</label>
|
||||
<textarea class="form-control" id="description" name="description" placeholder="Description rapide" maxlength="200" required></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="fullRemote" name="fullRemote" >
|
||||
<label class="form-check-label" for="fullRemote">Full Remote</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="ville">Ville</label>
|
||||
<input type="text" class="form-control" id="ville" name="ville" placeholder="Ville" required maxlength="100">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="choixContrat">Choisissez un type de contrat :*</label>
|
||||
<select class="form-control" id="choixContrat" name="typeContrat">
|
||||
<option value="CDI" selected>CDI</option>
|
||||
<option value="CDD">CDD</option>
|
||||
<option value="Alternance">Alternance</option>
|
||||
<option value="Stage">Stage</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="descriptPoste">Descriptif du Poste :*</label>
|
||||
<textarea class="form-control" id="descriptPoste" name="descriptPoste" placeholder="Description du Poste" required maxlength="2028"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="profilRecherche">Profil Recherché :*</label>
|
||||
<textarea class="form-control" id="profilRecherche" name="profilRecherche" placeholder="Profil recherché" required maxlength="2028"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="choixExp">Experience Recherchée :*</label>
|
||||
<select class="form-control" id="choixExp" name="choixExp" required>
|
||||
<option value="Indifférent" selected>Indifferent</option>
|
||||
<option value="Junior">Junior</option>
|
||||
<option value="Senior">Senior</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="nivEtudes">Niveau d'études :*</label>
|
||||
<select class="form-control" id="nivEtudes" name="education" required>
|
||||
<option value="Indifférent" selected>Indifferent</option>
|
||||
<option value="Bac+2">Bac+2</option>
|
||||
<option value="Bac+3">Bac+3</option>
|
||||
<option value="Bac+5">Bac+5</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="mail">Email de contact :*</label>
|
||||
<input type="text" class="form-control" id="mail" name="mail" placeholder="Adresse de contact" maxlength="30" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="num">Numero de contact :*</label>
|
||||
<input type="text" class="form-control" id="num" name="num" placeholder="Numéro de contact" required maxlength="10">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="site">Site web de l'annonce ou entreprise :</label>
|
||||
<input type="text" class="form-control" id="site" name="site" placeholder="Adresse web" maxlength="40" required>
|
||||
</div>
|
||||
|
||||
<label for="image">Image*</label>
|
||||
<input type="file" name="image" id="image" required>
|
||||
<label for="logo">Logo d'entreprise*</label>
|
||||
<input type="file" name="logo" id="logo" required>
|
||||
<input type="submit" value="Publier L'annonce" name="submit" id="submit">
|
||||
<p><i>Les images doivent être de type png, jpg, jpeg, bmp, webp & inférieures à 10MB</i></p>
|
||||
</form>
|
||||
|
||||
</main>
|
||||
|
||||
<!-- scripts : -->
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.3/dist/umd/popper.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|