This commit is contained in:
Yass 2026-02-08 19:49:17 +01:00
parent aec3c845e0
commit edb6c00219
22 changed files with 941 additions and 69 deletions

View file

@ -0,0 +1,218 @@
<?php
/* Smarty version 5.7.0, created on 2026-02-06 08:34:07
from 'file:views/inscription.tpl' */
/* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.7.0',
'unifunc' => 'content_6985a77f8dfcd0_35158098',
'has_nocache_code' => false,
'file_dependency' =>
array (
'6a0422fe7dc4be4b812fa3545dad4b27dd58fe64' =>
array (
0 => 'views/inscription.tpl',
1 => 1770366787,
2 => 'file',
),
),
'includes' =>
array (
),
))) {
function content_6985a77f8dfcd0_35158098 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\projetphp\\views';
$_smarty_tpl->getInheritance()->init($_smarty_tpl, true);
?>
<?php
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_4039535986985a77f8da504_37962670', "content");
$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir);
}
/* {block "content"} */
class Block_4039535986985a77f8da504_37962670 extends \Smarty\Runtime\Block
{
public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\projetphp\\views';
?>
<!-- Page : Inscription -->
<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 contenant le formulaire d'inscription -->
<div class="card shadow-sm border-0 rounded-4 p-4 p-lg-5">
<!-- Titre principal de la page -->
<h1 class="h3 fw-bold mb-1">Inscription</h1>
<!-- Texte descriptif -->
<p class="text-secondary mb-4">
Créez votre compte utilisateur.
</p>
<!-- Formulaire d'inscription -->
<!-- Les données seront traitées côté serveur en PHP via la méthode POST -->
<form method="POST">
<div class="row g-3">
<!-- Champ : prénom de l'utilisateur -->
<div class="col-md-6">
<label class="form-label" for="user_firstname">
Prénom *
</label>
<input
class="form-control"
type="text"
id="user_firstname"
name="user_firstname"
required >
</div>
<!-- Champ : nom de l'utilisateur -->
<div class="col-md-6">
<label class="form-label" for="user_name">
Nom *
</label>
<input
class="form-control"
type="text"
id="user_name"
name="user_name"
required
>
</div>
<!-- Champ : pseudo -->
<div class="col-12">
<label class="form-label" for="user_pseudo">
Pseudo *
</label>
<div class="input-group">
<span class="input-group-text">@</span>
<input
class="form-control"
type="text"
id="user_pseudo"
name="user_pseudo"
required
>
</div>
</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>
<!-- 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 -->
<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="index.php?ctrl=user&action=login">Se connecter</a>
</small>
</div>
</form>
</div>
</div>
</div>
</div>
</main>
<?php
}
}
/* {/block "content"} */
}

View file

@ -0,0 +1,83 @@
<?php
/* Smarty version 5.7.0, created on 2026-02-06 08:34:12
from 'file:views/login.tpl' */
/* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.7.0',
'unifunc' => 'content_6985a7843b8a09_57121812',
'has_nocache_code' => false,
'file_dependency' =>
array (
'7a5d14230a80bcfb142dfc9d5f8ae68eb5c308ba' =>
array (
0 => 'views/login.tpl',
1 => 1770366310,
2 => 'file',
),
),
'includes' =>
array (
),
))) {
function content_6985a7843b8a09_57121812 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\projetphp\\views';
$_smarty_tpl->getInheritance()->init($_smarty_tpl, true);
?>
<?php
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_10260818746985a7843a3c23_56661515', "content");
$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir);
}
/* {block "content"} */
class Block_10260818746985a7843a3c23_56661515 extends \Smarty\Runtime\Block
{
public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\projetphp\\views';
?>
<section aria-label="Se connecter">
<?php if ($_smarty_tpl->getSmarty()->getModifierCallback('count')($_smarty_tpl->getValue('arrError')) > 0) {?>
<div class="alert alert-danger">
<?php
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrError'), 'strError');
$foreach0DoElse = true;
foreach ($_from ?? [] as $_smarty_tpl->getVariable('strError')->value) {
$foreach0DoElse = false;
?>
<p><?php echo $_smarty_tpl->getValue('strError');?>
</p>
<?php
}
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
</div>
<?php }?>
<form method="post">
<p>
<label>Mail:</label>
<input name="mail"
value="<?php echo (($tmp = $_smarty_tpl->getValue('strMail') ?? null)===null||$tmp==='' ? '' ?? null : $tmp);?>
"
class="form-control <?php if ((true && (true && null !== ($_smarty_tpl->getValue('arrError')['mail'] ?? null)))) {?>is-invalid<?php }?>"
type="email">
</p>
<p>
<label>Mot de passe:</label>
<input name="pwd"
class="form-control <?php if ((true && (true && null !== ($_smarty_tpl->getValue('arrError')['pwd'] ?? null)))) {?>is-invalid<?php }?>"
type="password">
</p>
<p>
<input class="form-control btn btn-primary" type="submit" value="Se connecter">
</p>
</form>
</section>
<?php
}
}
/* {/block "content"} */
}

View file

@ -0,0 +1,69 @@
<?php
/* Smarty version 5.7.0, created on 2026-02-06 12:00:58
from 'file:views/_partial/preview.tpl' */
/* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.7.0',
'unifunc' => 'content_6985d7fac4c158_24962671',
'has_nocache_code' => false,
'file_dependency' =>
array (
'8a75168f6980e04270d359ecf544040a414ed627' =>
array (
0 => 'views/_partial/preview.tpl',
1 => 1770366777,
2 => 'file',
),
),
'includes' =>
array (
),
))) {
function content_6985d7fac4c158_24962671 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\projetphp\\views\\_partial';
?>
<article class="col-md-3 mb-4">
<div class="card h-100 shadow-sm article-card">
<div class="ratio ratio-16x9">
<img src=".<?php echo $_smarty_tpl->getValue('objProject')->getThumbnail();?>
"
class="w-100 h-100 object-fit-cover"
alt=""
loading="lazy">
</div>
<div class="d-flex align-items-start gap-3">
<img src=".<?php echo $_smarty_tpl->getValue('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">
<div class="flex-grow-1 card-body p-3">
<h3 class="h6 mb-1"><?php echo $_smarty_tpl->getValue('objProject')->getTitle();?>
</h3>
<small class="text-body-secondary d-block mb-1">
<time><?php echo $_smarty_tpl->getValue('objProject')->getCreation_date();?>
</time>
<?php echo $_smarty_tpl->getValue('objProject')->getCreatorname();?>
</small>
<a href="?id=<?php echo $_smarty_tpl->getValue('objProject')->getId();?>
"
class="stretched-link small">
Lire la suite
</a>
</div>
</div>
</div>
</article><?php }
}

View file

@ -0,0 +1,63 @@
<?php
/* Smarty version 5.7.0, created on 2026-02-06 12:00:58
from 'file:views/_partial/footer.tpl' */
/* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.7.0',
'unifunc' => 'content_6985d7fad9ae79_00567614',
'has_nocache_code' => false,
'file_dependency' =>
array (
'98cc8c099e0c6b2a1fe1eaa5fc81e6e357127f49' =>
array (
0 => 'views/_partial/footer.tpl',
1 => 1770363982,
2 => 'file',
),
),
'includes' =>
array (
),
))) {
function content_6985d7fad9ae79_00567614 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\projetphp\\views\\_partial';
?>
<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>
<?php echo '<script'; ?>
src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
src="js/scripts.js"><?php echo '</script'; ?>
>
</body>
</html><?php }
}

View file

@ -0,0 +1,50 @@
<?php
/* Smarty version 5.7.0, created on 2026-02-06 12:00:58
from 'file:views/layout.tpl' */
/* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.7.0',
'unifunc' => 'content_6985d7faa97148_49592200',
'has_nocache_code' => false,
'file_dependency' =>
array (
'e18412d61db50ad0096e53056a7c17f1dc50fcde' =>
array (
0 => 'views/layout.tpl',
1 => 1770366174,
2 => 'file',
),
),
'includes' =>
array (
'file:views/_partial/header.tpl' => 1,
'file:views/_partial/footer.tpl' => 1,
),
))) {
function content_6985d7faa97148_49592200 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\projetphp\\views';
$_smarty_tpl->getInheritance()->init($_smarty_tpl, false);
$_smarty_tpl->renderSubTemplate("file:views/_partial/header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
?>
<?php
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_5420313386985d7faa93b13_94487614', "content");
?>
<?php $_smarty_tpl->renderSubTemplate("file:views/_partial/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
}
/* {block "content"} */
class Block_5420313386985d7faa93b13_94487614 extends \Smarty\Runtime\Block
{
public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\projetphp\\views';
?>
<?php
}
}
/* {/block "content"} */
}

View file

@ -1,42 +1,43 @@
<?php
/* Smarty version 5.7.0, created on 2026-02-04 21:47:55
/* Smarty version 5.7.0, created on 2026-02-06 12:00:58
from 'file:views/home.tpl' */
/* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.7.0',
'unifunc' => 'content_6983be8b334a57_18130562',
'unifunc' => 'content_6985d7fa8af3a1_55395258',
'has_nocache_code' => false,
'file_dependency' =>
array (
'0f54e8b5c9bcafd01d94486bfa02ee91c2c5fe68' =>
'ec3d3ee358d0cb60e3d7bc28a51149e2e63b3bf1' =>
array (
0 => 'views/home.tpl',
1 => 1770240896,
1 => 1770366165,
2 => 'file',
),
),
'includes' =>
array (
'file:views/partials/preview.php' => 1,
'file:views/_partial/preview.tpl' => 1,
),
))) {
function content_6983be8b334a57_18130562 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'D:\\projetphp\\views';
$_smarty_tpl->getInheritance()->init($_smarty_tpl, false);
function content_6985d7fa8af3a1_55395258 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\projetphp\\views';
$_smarty_tpl->getInheritance()->init($_smarty_tpl, true);
?>
<?php ob_start();
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_16697957106983be8b32f404_81038557', "content");
$_prefixVariable1 = ob_get_clean();
echo $_prefixVariable1;?>
<?php }
<?php
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_10419637376985d7fa8a0f96_31902176', "content");
?>
<?php $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir);
}
/* {block "content"} */
class Block_16697957106983be8b32f404_81038557 extends \Smarty\Runtime\Block
class Block_10419637376985d7fa8a0f96_31902176 extends \Smarty\Runtime\Block
{
public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'D:\\projetphp\\views';
$_smarty_current_dir = 'C:\\wamp64\\www\\projetphp\\views';
?>
<section class="container mt-5 p-5 d-flex flex-column align-items-center text-center">
@ -52,12 +53,12 @@ $_smarty_current_dir = 'D:\\projetphp\\views';
<div class="row mb-2">
<?php
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrArticleToDisplay'), 'objArticle');
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrProjectToDisplay'), 'objProject');
$foreach0DoElse = true;
foreach ($_from ?? [] as $_smarty_tpl->getVariable('objArticle')->value) {
foreach ($_from ?? [] as $_smarty_tpl->getVariable('objProject')->value) {
$foreach0DoElse = false;
?>
<?php $_smarty_tpl->renderSubTemplate("file:views/partials/preview.php", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
<?php $_smarty_tpl->renderSubTemplate("file:views/_partial/preview.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
?>
<?php
}

View file

@ -0,0 +1,108 @@
<?php
/* Smarty version 5.7.0, created on 2026-02-06 12:00:58
from 'file:views/_partial/header.tpl' */
/* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.7.0',
'unifunc' => 'content_6985d7fab71ca5_68849299',
'has_nocache_code' => false,
'file_dependency' =>
array (
'fa32ecfd2db3b295fbf8f80cb970eb1abb3c21fb' =>
array (
0 => 'views/_partial/header.tpl',
1 => 1770363982,
2 => 'file',
),
),
'includes' =>
array (
),
))) {
function content_6985d7fab71ca5_68849299 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'C:\\wamp64\\www\\projetphp\\views\\_partial';
?><!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">
<?php echo '<script'; ?>
src="https://use.fontawesome.com/releases/v6.3.0/js/all.js" crossorigin="anonymous"><?php echo '</script'; ?>
>
<title>Folliow</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light">
<div class="container-fluid">
<a class="navbar-brand d-flex align-items-center" href="#">
<img src="assests/img/logo.png" alt="Logo" class="logo-image">
</a>
<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>
<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>
<nav class="col-4 d-flex justify-content-end align-items-center" aria-label="Connexion utilisateur">
<?php if (!(true && (true && null !== ($_SESSION['user'] ?? null)))) {?>
<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 { ?>
<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>
</body>
</html><?php }
}