Merge branch 'main' into besnik

This commit is contained in:
Yass 2026-01-23 11:53:49 +01:00 committed by GitHub
commit c1c3a75aa2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 1661 additions and 7 deletions

View file

@ -3,6 +3,11 @@
<!-- Centrage horizontal du formulaire -->
<div class="row justify-content-center">
<!-- Contenu principal de la page -->
<main class="container py-5">
<!-- Centrage horizontal du formulaire -->
<div class="row justify-content-center">
<div class="col-12 col-md-8 col-lg-5">
<!-- Carte contenant le formulaire de connexion -->

17
app/views/home.php Normal file
View file

@ -0,0 +1,17 @@
<section class="container mt-5 p-5 d-flex flex-column align-items-center text-center">
<h1 class="logo">Folliow</h1>
<h2> les talents rencontrent leur avenir</h2>
<p class="col-6">Une plateforme de portfolio adapté à vos besoins et aux besoins des entreprises.
Créer un portfolio réellement pertinent aux exigences du marché et rentrez
directement en contact avec les entreprises.</p>
</section>
<section aria-label="Articles récents">
<h2 class="visually-hidden">Les 4 derniers articles</h2>
<div class="row mb-2">
<?php
foreach($arrProjectToDiplay as $objProject){
include("../app/views/partials/preview.php");
}
?>
</section>

View file

@ -3,6 +3,11 @@
<!-- Centrage du formulaire -->
<div class="row justify-content-center">
<!-- Contenu principal de la page -->
<main class="container py-5">
<!-- Centrage horizontal du formulaire -->
<div class="row justify-content-center">
<div class="col-12 col-md-10 col-lg-6">
<!-- Carte Bootstrap contenant le formulaire -->
@ -192,6 +197,119 @@
</div>
</form>
</div>
<!-- Champ : adresse e-mail -->
<div class="col-12">
<label class="form-label" for="user_mail">
Adresse e-mail *
</label>
<input
class="form-control"
type="email"
id="user_mail"
name="user_mail"
required
>
</div>
<!-- Champ : mot de passe -->
<div class="col-12">
<label class="form-label" for="user_password">
Mot de passe *
</label>
<input
class="form-control"
type="password"
id="user_password"
name="user_password"
required
>
</div>
<!-- Confirmation du mot de passe -->
<div class="col-12">
<label class="form-label" for="pwd_confirm">
Confirmation du mot de passe *
</label>
<input
class="form-control <?php if (isset($arrError['pwd_confirm'])) echo 'is-invalid'; ?>"
type="password"
id="pwd_confirm"
name="pwd_confirm"
required
>
</div>
<!-- Champ optionnel : numéro de téléphone -->
<div class="col-12">
<label class="form-label" for="user_phone">
Téléphone
</label>
<input
class="form-control"
type="text"
id="user_phone"
name="user_phone"
>
</div>
<!-- Champ optionnel : profession de l'utilisateur -->
<div class="col-12">
<label class="form-label" for="user_work">
Profession
</label>
<input
class="form-control"
type="text"
id="user_work"
name="user_work"
>
</div>
<!-- Champ optionnel : localisation de l'utilisateur -->
<div class="col-12">
<label class="form-label" for="user_location">
Localisation
</label>
<input
class="form-control"
type="text"
id="user_location"
name="user_location"
>
</div>
<!-- Champ optionnel : phrase d'accroche / description courte -->
<div class="col-12">
<label class="form-label" for="user_description">
Phrase d'accroche
</label>
<textarea
class="form-control"
id="user_description"
name="user_description"
rows="3"
></textarea>
</div>
<!-- Bouton de soumission du formulaire -->
<div class="col-12 d-grid mt-2">
<button type="submit" class="btn btn-primary btn-lg rounded-3">
Créer mon compte
</button>
</div>
<!-- Lien vers la page de connexion -->
<div class="col-12 text-center">
<small class="text-secondary">
Déjà un compte ?
<a href="connexion.php">Se connecter</a>
</small>
</div>
</div>
</form>
</div>

23
app/views/login.php Normal file
View file

@ -0,0 +1,23 @@
<section aria-label="Se connecter">
<?php if (count($arrError) > 0) {?>
<div class="alert alert-danger">
<?php foreach ($arrError as $strError){ ?>
<p><?php echo $strError; ?></p>
<?php } ?>
</div>
<?php } ?>
<form method="post">
<p>
<label>Mail:</label>
<input name="mail" value="<?php echo($strMail); ?>"
class="form-control <?php if (isset($arrError['mail'])) { echo 'is-invalid'; } ?> " type="text" >
</p>
<p>
<label>Mot de passe:</label>
<input name="pwd" class="form-control <?php if (isset($arrError['pwd'])) { echo 'is-invalid'; } ?> " type="text" >
</p>
<p>
<input class="form-control btn btn-primary" type="submit" >
</p>
</form>
</section>

View file

@ -0,0 +1,32 @@
<footer class="footer container-fluid d-flex justify-content-around">
<div class="col-3">
<ul>
<li><a href="#">Découvrir</a>
<li><a href="#">Customisation</a>
<li><a href="#">Emploi</a>
<li><a href="#">A propos</a>
</ul>
</div>
<div class="col-3">
<ul>
<li><a href="#">Recruter</a>
<li><a href="#">Partenariat</a>
<li><a href="#">Blog</a>
<li><a href="#">Aide et support</a>
</ul>
</div>
<div class="col-3">
<ul>
<li><a href="#">Politique de confidentialité</a>
<li><a href="#">Politique sur les données</a>
<li><a href="#">CGU</a>
<li><a href="#">CGV</a>
</ul>
</div>
<div class="col-3">
<p>Suivez-nous</p>
</div>
</footer>
</body>
</html>

View file

@ -0,0 +1,88 @@
<?php
session_start();
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="assests/css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
<title>Folliow</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light">
<div class="container-fluid">
<!-- Logo -->
<a class="navbar-brand d-flex align-items-center" href="#">
<img src="assests/img/logo.png" alt="Logo" class="logo-image">
</a>
<!-- Toggler pour mobile -->
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<!-- Menu de navigation -->
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav me-auto">
<li class="nav-item">
<a class="nav-link" href="?ctrl=&action=">Découvrir</a>
</li>
<li class="nav-item">
<a class="nav-link" href="?ctrl=''&action=''">Customisation</a>
</li>
<li class="nav-item">
<a class="nav-link" href="?ctrl=''&action=''">Orientation</a>
</li>
<li class="nav-item">
<a class="nav-link" href="?ctrl=''&action=''">À propos</a>
</li>
<li class="nav-item">
<a class="nav-link" href="?ctrl=project&action=search">Rechercher</a>
</li>
</ul>
<!-- Menu secondaire -->
<nav class="col-4 d-flex justify-content-end align-items-center" aria-label="Connexion utilisateur">
<?php if (!isset($_SESSION['user'])){ ?>
<!--- Utilisateur non connecté -->
<ul class="navbar-nav ">
<li class="nav-item">
<a class="nav-link" href="index.php?ctrl=user&action=signin" title="Créer un compte" aria-label="Créer un compte">
S'inscrire
</a>
</li>
<li class="nav-item ">
<a class="nav-link" href="index.php?ctrl=user&action=login" title="Se connecter" aria-label="Se connecter">
Se connecter
</a>
</li>
</ul>
<?php }else{ ?>
<!--- Utilisateur connecté -->
<ul class="navbar-nav ">
<li class="nav-item ">
<a class="nav-link" href="edit_account.php" title="Modifier mon compte" aria-label="Modifier mon compte">
<img src=".<?php echo $_SESSION["user"]["user_image"]; ?>"
class="rounded-circle flex-shrink-0 mt-2 ml-5"
style="width: 36px; height: 36px; object-fit: cover;"
alt="Photo de profil">
</a>
</li>
<li class="nav-item ">
<a class="nav-link" href="index.php?ctrl=user&action=logout" title="Se déconnecter" aria-label="Se déconnecter">
Logout
</a>
</li>
</ul>
<?php } ?>
</nav>
</div>
</div>
</nav>

View file

@ -0,0 +1,38 @@
<article class="col-md-3 mb-4">
<div class="card h-100 shadow-sm article-card">
<!-- IMAGE (80%) -->
<div class="ratio ratio-16x9">
<img src=".<?php echo $objProject->getThumbnail(); ?>"
class="w-100 h-100 object-fit-cover"
alt=""
loading="lazy">
</div>
<div class="d-flex align-items-start gap-3">
<!-- PHOTO DE PROFIL -->
<img src=".<?php echo $objProject->getUser_image(); ?>"
class="rounded-circle flex-shrink-0 mt-2 ml-5"
style="width: 48px; height: 48px; object-fit: cover;"
alt="Photo de profil">
<!-- INFOS -->
<div class="flex-grow-1 card-body p-3">
<h3 class="h6 mb-1"><?php echo $objProject->getTitle(); ?></h3>
<small class="text-body-secondary d-block mb-1">
<time><?php echo $objProject->getCreation_date(); ?></time>
<?php echo $objProject->getCreatorname(); ?>
</small>
<a href="?id=<?php echo $objProject->getId()?>"
class="stretched-link small">
Lire la suite
</a>
</div>
</div>
</div>
</article>

31
app/views/project.php Normal file
View file

@ -0,0 +1,31 @@
<body>
<section class="container mt-5 p-5 d-flex flex-column align-items-center justify-content-center">
<h2>Alimenter votre projet</h2>
<div class="justify-content-center align-items-center">
<button type="button" class="btn btn-primary rounded-circle d-flex justify-content-center align-items-center"><span class="fs-4 fw-bold text-white mb-2 ms-2 me-2">+</span></button>
</div class="col-12">
<div>
<h3 class="fw-semibold fs-3 my-5">Description</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
<div class="col-12">
<h3 class="fw-semibold fs-3 my-5">Photos behind the scene</h3>
<div class="row my-2">
<img class="bd-placeholder-img" width="200" height="250" src="<?= isset($objImage) ? '../../public/assets/img/'.$objImage->getName() : '' ?>" alt="<?php echo $objImage->getAlt(); ?>" loading="lazy">
</div>
</div>
<div class="col-12">
<h3>Other projects</h3>
<div class="row my-2">
<?php
foreach($arrProjectToDiplay as $objProject){
include("../app/views/partials/preview.php");
}
?>
</div>
</div>
</div>
<section>
</body>

194
app/views/search.php Normal file
View file

@ -0,0 +1,194 @@
<section aria-label="Blog">
<h2 class="visually-hidden">Rechercher parmi les articles</h2>
<div class="row mb-2">
<section class="mb-5" aria-labelledby="search-heading">
<form name="formSearch" method="post" action="?ctrl=project&action=search" class="border rounded p-4 bg-light">
<h3 id="search-heading" class="h4 mb-4">
<i class="fas fa-search me-2" aria-hidden="true"></i>
Rechercher des articles
</h3>
<div class="row g-3">
<div class="col-md-6">
<label for="keywords" class="form-label">Mots-clés</label>
<input
value=""
type="text"
class="form-control"
id="keywords"
name="keywords"
placeholder="Ex: JavaScript, CSS..."
aria-describedby="keywords-help">
<small id="keywords-help" class="form-text text-muted">
Recherchez dans les titres et contenus
</small>
</div>
<div class="col-md-6">
<label for="author" class="form-label">Auteur</label>
<select class="form-select" id="author" name="author">
<option value="0" <?php echo ($intAuthor == 0)?'selected':''; ?>>Tous les auteurs</option>
<?php
foreach($arrUser as $arrDetUser){
?>
<option value="<?php echo $arrDetUser['user_id']; ?>"
<?php echo ($intAuthor == $arrDetUser['user_id'])?'selected':''; ?>
>
<?php echo $arrDetUser['user_firstname'].' '.$arrDetUser['user_name']; ?>
</option>
<?php
}
?>
</select>
</div>
<div class="col-6">
<fieldset>
<legend class="form-label">Type de recherche par date</legend>
<div class="form-check form-check-inline">
<input
class="form-check-input"
type="radio"
name="period"
id="period-exact"
value="0"
<?php echo ($intPeriod == 0)?'checked':'' ; ?>
aria-controls="date-exact date-range">
<label class="form-check-label" for="period-exact">
Date exacte
</label>
</div>
<div class="form-check form-check-inline">
<input
class="form-check-input"
type="radio"
name="period"
id="period-range"
value="1"
<?php echo ($intPeriod == 1)?'checked':'' ; ?>
aria-controls="date-exact date-range">
<label class="form-check-label" for="period-range">
Période
</label>
</div>
</fieldset>
</div>
<!-- AJOUT RECHERCHE PAR CATEGORIE -->
<div class="col-6">
<fieldset>
<legend class="form-label">Type de recherche par catégories</legend>
<div class="col-md-6">
<label for="author" class="form-label">Catégorie</label>
<select class="form-select" id="category" name="category">
<option value="0" <?php echo ($intCategory == 0)?'selected':''; ?>>Toutes les catégories</option>
<?php
foreach($arrCategory as $arrDetCategory){
?>
<option value="<?php echo $arrDetCategory['category_id']; ?>"
<?php echo ($intCategory == $arrDetCategory['category_id'])?'selected':''; ?> >
<?php echo $arrDetCategory['category_name']; ?>
</option>
<?php
}
?>
</select>
</div>
</fieldset>
</div>
<div class="col-md-6" id="date-exact">
<label for="date" class="form-label">Date</label>
<input
type="date"
class="form-control"
id="date"
name="date"
aria-describedby="date-help"
value="<?php echo $strDate; ?>" >
<small id="date-help" class="form-text text-muted">
Format: JJ/MM/AAAA
</small>
</div>
<div id="date-range" style="display: none;">
<div class="row g-3">
<div class="col-md-6">
<label for="startdate" class="form-label">Date de début</label>
<input
type="date"
class="form-control"
id="startdate"
name="startdate"
value="<?php echo $strStartDate; ?>" >
</div>
<div class="col-md-6">
<label for="enddate" class="form-label">Date de fin</label>
<input
type="date"
class="form-control"
id="enddate"
name="enddate"
value="<?php echo $strEndDate; ?>" >
</div>
</div>
</div>
<div class="col-12">
<button type="submit" class="btn btn-primary">
<i class="fas fa-search me-2" aria-hidden="true"></i>
Rechercher
</button>
<button type="reset" class="btn btn-secondary ms-2">
<i class="fas fa-redo me-2" aria-hidden="true"></i>
Réinitialiser
</button>
</div>
</div>
</form>
</section>
<!-- Liste des articles -->
<section aria-labelledby="articles-heading">
<h3 id="articles-heading" class="visually-hidden">Liste des projets</h3>
<div class="row mb-2">
<?php
if (count($arrProject) == 0){
?>
<div class="alert alert-warning">
<p>Pas de résultats</p>
</div>
<?php
}
foreach($arrProjectToDisplay as $objProject){
include("../app/views/partials/preview.php");
} ?>
</div>
</section>
</div>
</section>
<script>
// Gestion de l'affichage des champs de date
const periodRadios = document.querySelectorAll('input[name="period"]');
const dateExact = document.getElementById('date-exact');
const dateRange = document.getElementById('date-range');
function toggleDateFields() {
const selectedPeriod = document.querySelector('input[name="period"]:checked').value;
if (selectedPeriod === '0') {
dateExact.style.display = 'block';
dateRange.style.display = 'none';
} else {
dateExact.style.display = 'none';
dateRange.style.display = 'block';
}
}
periodRadios.forEach(radio => {
radio.addEventListener('change', toggleDateFields);
});
// Initialisation au chargement
toggleDateFields();
</script>