@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/php.iml" filepath="$PROJECT_DIR$/.idea/php.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" packagePrefix="App\" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-ctype" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-mbstring" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/twig/twig" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="MessDetectorOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PHPCSFixerOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PHPCodeSnifferOptionsConfiguration">
|
||||
<option name="highlightLevel" value="WARNING" />
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PhpIncludePathManager">
|
||||
<include_path>
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-mbstring" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-ctype" />
|
||||
<path value="$PROJECT_DIR$/vendor/composer" />
|
||||
<path value="$PROJECT_DIR$/vendor/twig/twig" />
|
||||
</include_path>
|
||||
</component>
|
||||
<component name="PhpProjectSharedConfiguration" php_language_level="8.1">
|
||||
<option name="suggestChangeDefaultLanguageLevel" value="false" />
|
||||
</component>
|
||||
<component name="PhpStanOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PsalmOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
After Width: | Height: | Size: 333 B |
After Width: | Height: | Size: 657 B |
@ -0,0 +1,54 @@
|
||||
/* styles.css */
|
||||
|
||||
/* Reset CSS pour normaliser le rendu sur tous les navigateurs */
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Arial', sans-serif;
|
||||
background-color: #f8f9fa;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.container {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.div_titres {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.div_titres a {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.div_titres h1 {
|
||||
width: 50%;
|
||||
color: #00DBFF;
|
||||
}
|
||||
|
||||
.div_titres a img {
|
||||
margin-left: 40px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
color: #00DBFF;
|
||||
}
|
||||
|
||||
.list-group-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
margin-top: 20px;
|
||||
padding: 15px;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 5px;
|
||||
}
|
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 467 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 160 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 467 KiB |
After Width: | Height: | Size: 467 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 467 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 467 KiB |
@ -1,52 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\modele;
|
||||
|
||||
use App\gateway\Connection;
|
||||
use App\metier\Image;
|
||||
use App\gateway\ImageGateway;
|
||||
class ImageModele
|
||||
{
|
||||
private ImageGateway $gw;
|
||||
public function __construct()
|
||||
{
|
||||
$this->gw = new ImageGateway(new Connection(DB_HOST,DB_USER,DB_PASS));
|
||||
}
|
||||
|
||||
public function publierImage(string $file) : Image
|
||||
{
|
||||
$img = new Image($this->gw->getNewId(),
|
||||
$_FILES[$file]["name"],
|
||||
$_FILES[$file]["size"],
|
||||
$_FILES[$file]["type"],
|
||||
file_get_contents($_FILES[$file]["tmp_name"]));
|
||||
|
||||
$this->insertImage($img);
|
||||
|
||||
return $img;
|
||||
}
|
||||
|
||||
public function insertImage(Image $img)
|
||||
{
|
||||
$this->gw->insertImage($img);
|
||||
}
|
||||
|
||||
public function obtenirParId(int $id)
|
||||
{
|
||||
$this->gw->getFromId($id);
|
||||
$res = $this->gw->getResults();
|
||||
return new Image($this->gw->getNewId(),$res[0]['nom'], $res[0]['taille'], $res[0]['type'], $res[0]['blob']);
|
||||
}
|
||||
|
||||
public function obtenirToutesImages() : array
|
||||
{
|
||||
$this->gw->obtenirToutesImages();
|
||||
$res = $this->gw->getResults();
|
||||
foreach ($res as $r) {
|
||||
$array[] = new Image($this->gw->getNewId(),$r['nom'], $r['taille'], $r['type'], $r['blob']);
|
||||
}
|
||||
return $array;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Créer un Événement</title>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container mt-5">
|
||||
<h1 class="text-center">Créer un Événement</h1>
|
||||
<form action="index.php?action=creerEvenement" method="post" enctype="multipart/form-data">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="titre">Titre de l'Événement :</label>
|
||||
<input type="text" class="form-control" id="titre" name="titre" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="description">Description de l'Événement :</label>
|
||||
<textarea class="form-control" id="description" name="description" rows="4" required></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="date">Date de l'Événement :</label>
|
||||
<input type="date" class="form-control" id="date" name="date" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="nbPlaceMax">Nombre maximal d'inscrits :</label>
|
||||
<input type="number" class="form-control" id="nbPlaceMax" name="nbPlaceMax" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="image">Image de l'Événement :</label>
|
||||
<input type="file" class="form-control-file" name="image" id="image" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="submit" class="btn btn-primary" value="Créer l'Événement">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<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>
|
@ -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>
|
||||
|
||||
|
@ -0,0 +1,38 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
{% if evenement %}
|
||||
<title>{{evenement.titre}}</title>
|
||||
{% endif %}
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="css/evenement_details.css"> <!-- You can create a separate CSS file for event details -->
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header>
|
||||
{% include "menu.html" %}
|
||||
</header>
|
||||
|
||||
<div class="container mt-4">
|
||||
{% if evenement %}
|
||||
<h1>Détails de l'Événement : {{evenement.titre}}</h1>
|
||||
<div class="event-details">
|
||||
<p><strong>Organisateur:</strong> {{ evenement.organisateurId }}</p>
|
||||
<p><strong>Date:</strong> {{ evenement.date }}</p>
|
||||
<p><strong>Description:</strong> {{ evenement.description }}</p>
|
||||
<img src="uploads/{{ evenement.getImage() }}" width="250px" class="img-fluid" alt="Event Image">
|
||||
<p><strong>Places disponibles:</strong> {{ evenement.nbPlaceMax }}</p>
|
||||
<a href="../public/index.php?action=listerEvenement" class="btn btn-primary">Retour</a>
|
||||
</div>
|
||||
{% else %}
|
||||
<p>L'événement n'existe pas ou n'est pas disponible.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<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>
|
@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<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="css/evenement.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header>
|
||||
{% include "menu.html" %}
|
||||
</header>
|
||||
|
||||
<div class="container mt-4">
|
||||
<div class="div_titres">
|
||||
<form action="../public/index.php?action=rechercherEvenement" method="post">
|
||||
<input type="text" name="recherche" id="recherche" placeholder="Rechercher un événement">
|
||||
<button type="submit">
|
||||
<img src="assets/search.svg" alt="rechercher" width="30px">
|
||||
</button>
|
||||
</form>
|
||||
<h1>Liste des Événements</h1>
|
||||
<a href="../public/index.php?action=creerEvenement" class="btn btn-primary">Publier événement</a>
|
||||
</div>
|
||||
|
||||
<ul class="list-group">
|
||||
{% if evenements is not empty %}
|
||||
{% for evenement in evenements %}
|
||||
<li class="list-group-item">
|
||||
<div class="infos">
|
||||
<h2>{{ evenement.titre }}</h2>
|
||||
<p><strong>Organisateur:</strong> {{ evenement.getNomOrganisateur() }}</p>
|
||||
<p><strong>Date:</strong> {{ evenement.date }}</p>
|
||||
<p><strong>Description:</strong> {{ evenement.description }}</p>
|
||||
<img src="uploads/{{ evenement.getImage() }}" width="250px" class="img-fluid" alt="{{ evenement.titre }}">
|
||||
<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>
|
||||
</div>
|
||||
<form action="../public/index.php?action=supprimerEvenement&id={{ evenement.id }}" method="post">
|
||||
<button type="submit" class="btn btn-primary" id="deleteButton">
|
||||
<img src="assets/close.png" alt="Supprimer" width="20px">
|
||||
</button>
|
||||
</form>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<li class="list-group-item">Aucun événement trouvé.</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<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>
|