Restructuration du git et ajout de la fonctionnalité de création de portfolio
92
app/controllers/project_controller.php
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
<?php
|
||||
require("../app/models/project_model.php");
|
||||
require("../app/entities/project_entity.php");
|
||||
require("../app/models/category_model.php");
|
||||
require("../app/entities/category_entity.php");
|
||||
|
||||
/**
|
||||
* Le controler des Project
|
||||
* @author Yasser & Laura
|
||||
*/
|
||||
class ProjectCtrl{
|
||||
|
||||
/**
|
||||
* Fonction d'affichage de la page d'acceuil
|
||||
*/
|
||||
|
||||
public function home(){
|
||||
|
||||
$objProjectModel = new ProjectModel;
|
||||
$arrProject = $objProjectModel->findAll(4);
|
||||
$arrProjectToDisplay = array();
|
||||
foreach($arrProject as $arrDetProject){
|
||||
$objProject = new Project;
|
||||
$objProject->hydrate($arrDetProject);
|
||||
$arrProjectToDisplay[] = $objProject;
|
||||
}
|
||||
|
||||
include('../app/views/partials/header.php');
|
||||
include('../app/views/home.php');
|
||||
include('../app/views/partials/footer.php');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Fonction d'affichage de la barre de recherche
|
||||
*/
|
||||
|
||||
public function search(){
|
||||
|
||||
// inclusion du header
|
||||
include('../app/views/partials/header.php');
|
||||
|
||||
//Récupérer les informations du Formulaire
|
||||
$strKeywords = $_GET['keywords']??'';
|
||||
$intAuthor = $_GET['author']??0;
|
||||
$intPeriod = $_GET['period']??0;
|
||||
$strDate = $_GET['date']??'';
|
||||
$strStartDate = $_GET['startdate']??'';
|
||||
$strEndDate = $_GET['enddate']??'';
|
||||
$intCategory = $_GET['category']??0;
|
||||
|
||||
// Récupération des Projects
|
||||
$objProjectModel = new ProjectModel;
|
||||
|
||||
// Depuis PHP 8 - accès direct aux paramètres
|
||||
$arrProject = $objProjectModel->findAll();
|
||||
|
||||
// Initialisation d'un tableau => objets
|
||||
$arrProjectToDisplay = array();
|
||||
// Boucle de transformation du tableau de tableau en tableau d'objets
|
||||
foreach($arrProject as $arrDetProject){
|
||||
$objProject = new Project;
|
||||
$objProject->hydrate($arrDetProject);
|
||||
|
||||
$arrProjectToDisplay[] = $objProject;
|
||||
}
|
||||
|
||||
// Récupération des utilisateurs
|
||||
require_once("../app/models/user_model.php");
|
||||
$objUserModel = new UserModel;
|
||||
$arrUser = $objUserModel->findAllUsers();
|
||||
|
||||
// Récupération des catégories
|
||||
require_once("../app/models/category_model.php");
|
||||
$objCategoryModel = new CategoryModel;
|
||||
$arrCategory = $objCategoryModel->findAllCategory();
|
||||
|
||||
|
||||
include('../app/views/search.php');
|
||||
include('../app/views/partials/footer.php');
|
||||
}
|
||||
|
||||
/**
|
||||
* Fonction d'affichage de la page projet
|
||||
*/
|
||||
|
||||
public function project (){
|
||||
include("../app/views/partials/header.php");
|
||||
include('../app/views/project.php');
|
||||
include('../app/views/partials/footer.php');
|
||||
}
|
||||
}
|
||||
61
app/controllers/user_controller.php
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
|
||||
require("../app/models/user_model.php");
|
||||
require("../app/entities/user_entity.php");
|
||||
|
||||
class UserCtrl{
|
||||
|
||||
public function login(){
|
||||
include("../app/views/partials/header.php");
|
||||
|
||||
$strMail = $_POST['mail']??"";
|
||||
$strPwd = $_POST['pwd']??"";
|
||||
|
||||
// Tester le formulaire
|
||||
$arrError = [];
|
||||
if (count($_POST) > 0) {
|
||||
// Vérifier le formulaire
|
||||
if ($strMail == ""){
|
||||
$arrError['mail'] = "Le mail est obligatoire";
|
||||
}
|
||||
if ($strPwd == ""){
|
||||
$arrError['pwd'] = "Le mot de passe est obligatoire";
|
||||
}
|
||||
|
||||
// Si le formulaire est rempli correctement
|
||||
if (count($arrError) == 0){
|
||||
// Vérifier l'utilisateur en BDD
|
||||
$objUserModel = new UserModel;
|
||||
$arrResult = $objUserModel->verifUser($strMail, $strPwd);
|
||||
//var_dump($arrResult);
|
||||
if ($arrResult === false){ // Si la base de données ne renvoie rien
|
||||
$arrError[] = "Mail ou mot de passe invalide";
|
||||
}else{
|
||||
// Ajoute l'utilisateur en session
|
||||
$_SESSION['user'] = $arrResult;
|
||||
$_SESSION['success'] = "Bienvenue, vous êtes bien connecté";
|
||||
|
||||
header("Location:index.php");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
include("../app/views/login.php");
|
||||
include("../app/views/partials/footer.php");
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function logout(){
|
||||
session_start();
|
||||
|
||||
// on supprime l'utilisateur en session
|
||||
unset($_SESSION['user']);
|
||||
|
||||
$_SESSION['success'] = "Vous êtes bien déconnecté";
|
||||
|
||||
header("Location:index.php");
|
||||
exit;
|
||||
|
||||
}
|
||||
}
|
||||
55
app/entities/category_entity.php
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
require_once("mother_entity.php");
|
||||
/**
|
||||
* Classe d'un objet Projet
|
||||
* @author Laura
|
||||
*/
|
||||
|
||||
class Category extends Entity{
|
||||
|
||||
private int $_id;
|
||||
protected string $_name = '';
|
||||
|
||||
/**
|
||||
* Constructeur (j'ai toujours pas compris à quoi ça sert)
|
||||
*/
|
||||
public function __construct(){
|
||||
$this->_prefix = 'category_';
|
||||
}
|
||||
|
||||
// Méthode Getter et Setter
|
||||
|
||||
/**
|
||||
* Récuperation de l'id du Projet
|
||||
* @return int l'id de la catégorie
|
||||
*/
|
||||
public function getId():int{
|
||||
return $this->_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mise à jour de l'id de la catégorie
|
||||
* @param int le nouvelle id
|
||||
*/
|
||||
public function setId($id){
|
||||
$this->_id = $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Récuperation du nom de la catégorie
|
||||
* @return string nom de la catégorie
|
||||
*/
|
||||
public function getName(){
|
||||
return $this->_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mise à jour du nom de la catégorie
|
||||
* @param string le nouveau nom de la catégorie
|
||||
*/
|
||||
public function setName($name){
|
||||
$this->_name = $name;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
30
app/entities/mother_entity.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Classe d'une Mere de tout objet
|
||||
* @author Yass
|
||||
*/
|
||||
|
||||
class Entity{
|
||||
|
||||
protected string $_prefix = '';
|
||||
|
||||
|
||||
public function hydrate(array $arrData){
|
||||
foreach($arrData as $key=>$value){
|
||||
$strMethodName = "set".ucfirst(str_replace($this->_prefix,'',$key));
|
||||
var_dump($strMethodName);
|
||||
if (method_exists($this,$strMethodName)){
|
||||
$this->$strMethodName($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function nettoyer(string $strText){
|
||||
$strText = trim($strText);
|
||||
$strText = str_replace("<script>", "", $strText);
|
||||
$strText = str_replace("</script>", "", $strText);
|
||||
return $strText;
|
||||
}
|
||||
|
||||
}
|
||||
221
app/entities/project_entity.php
Normal file
|
|
@ -0,0 +1,221 @@
|
|||
<?php
|
||||
require_once("mother_entity.php");
|
||||
|
||||
/**
|
||||
* Classe d'un objet Projet
|
||||
* @author Yass
|
||||
*/
|
||||
|
||||
class Project extends Entity{
|
||||
|
||||
private int $_id;
|
||||
private string $_title;
|
||||
private string $_description;
|
||||
private string $_thumbnail;
|
||||
private string $_content;
|
||||
private string $_creation_date;
|
||||
private string $_status;
|
||||
private int $_user;
|
||||
private int $_category;
|
||||
private string $_creatorname;
|
||||
private string $_user_image;
|
||||
|
||||
|
||||
/**
|
||||
* Constructeur (logique mdrr)
|
||||
*/
|
||||
public function __construct(){
|
||||
$this->_prefix = 'project_';
|
||||
}
|
||||
|
||||
// Méthode Getter et Setter
|
||||
|
||||
/**
|
||||
* Récuperation de l'id du Projet
|
||||
* @return int l'id du projet
|
||||
*/
|
||||
public function getId():int{
|
||||
return $this->_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mise à jour de l'id du projet
|
||||
* @param int le nouvelle id
|
||||
*/
|
||||
public function setId($id){
|
||||
$this->_id = $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Récuperation du titre
|
||||
* @return string tite du projet
|
||||
*/
|
||||
public function getTitle(){
|
||||
return $this->_title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mise à jour du titre
|
||||
* @param string le nouveau titre
|
||||
*/
|
||||
public function setTitle($title){
|
||||
$this->_title = $title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Récuperation de la description
|
||||
* @return string description du projet
|
||||
*/
|
||||
public function getDescription(){
|
||||
return $this->_description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mise à jour de la description
|
||||
* @param string la nouvelle description
|
||||
*/
|
||||
public function setDescription($description){
|
||||
$this->_description = $description;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Récuperation de l'image
|
||||
* @return string chemin vers l'image
|
||||
*/
|
||||
public function getThumbnail(){
|
||||
return $this->_thumbnail;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mise à jour de l'image
|
||||
* @param string chemin vers nouvelle image
|
||||
*/
|
||||
public function setThumbnail($thumbnail){
|
||||
$this->_thumbnail = $thumbnail;
|
||||
}
|
||||
|
||||
/**
|
||||
* Récuperation du contenue
|
||||
* @return string contenue du projet
|
||||
*/
|
||||
public function getContent(){
|
||||
return $this->_content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mise à jour du contenue
|
||||
* @param string le nouveau contenue
|
||||
*/
|
||||
public function setContent($content){
|
||||
$this->_content = $content;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Récupération de la date de création
|
||||
* @param string lang de formatage de la date (par défaut = "fr_FR")
|
||||
* @return string date de création formatter
|
||||
*/
|
||||
public function getCreation_date(string $strFormat = "fr_FR"){
|
||||
$objDate = new DateTime($this->_creation_date);
|
||||
|
||||
$objDateFormatter = new IntlDateFormatter(
|
||||
$strFormat,
|
||||
IntlDateFormatter::LONG,
|
||||
IntlDateFormatter::NONE,
|
||||
|
||||
);
|
||||
$strFormat = $objDateFormatter->format($objDate);
|
||||
return $strFormat;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mise à jour de la date de création
|
||||
* @param string la nouvelle date de création
|
||||
*/
|
||||
public function setCreation_date($creation_date){
|
||||
$this->_creation_date = $creation_date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Récupération du statut
|
||||
* @return string statut
|
||||
*/
|
||||
public function getStatus(){
|
||||
return $this->_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mise à jour du statut
|
||||
* @param string le nouveau statut
|
||||
*/
|
||||
public function setStatus($status){
|
||||
$this->_status = $status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Récupération de l'utilisateur
|
||||
* @return int id de l'utilisateur
|
||||
*/
|
||||
public function getUser(){
|
||||
return $this->_user;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mise à jour de l'utilisateur
|
||||
* @param int id de l'utilisateur
|
||||
*/
|
||||
public function setUser($user){
|
||||
$this->_user = $user;
|
||||
}
|
||||
|
||||
/**
|
||||
* Récupération de la catégorie
|
||||
* @return int id de la catégorie
|
||||
*/
|
||||
public function getCategory(){
|
||||
return $this->_category;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mise à jour de la catégorie
|
||||
* @param int id de la catégorie
|
||||
*/
|
||||
public function setCategory($category){
|
||||
$this->_category = $category;
|
||||
}
|
||||
|
||||
/**
|
||||
* Récupération du nom du créateur
|
||||
* @return string nom du créateur
|
||||
*/
|
||||
public function getCreatorName(){
|
||||
return $this->_creatorname;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mise à jour du nom du créateur
|
||||
* @param string le nom du créateur
|
||||
*/
|
||||
public function setCreatorName($creatorname){
|
||||
$this->_creatorname = $creatorname;
|
||||
}
|
||||
/**
|
||||
* Récupération du chemin photo profil
|
||||
* @return string nom du chemin photo profil
|
||||
*/
|
||||
public function getUser_image(){
|
||||
return $this->_user_image;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mise à jour du chemin photo profil
|
||||
* @param string chemin photo profil
|
||||
*/
|
||||
public function setUser_image($user_image){
|
||||
$this->_user_image = $user_image;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
51
app/entities/user_entity.php
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
require_once("mother_entity.php");
|
||||
|
||||
class User extends Entity{
|
||||
// Attributs
|
||||
private string $_name = '';
|
||||
private string $_firstname = '';
|
||||
private string $_mail = '';
|
||||
private string $_pwd;
|
||||
|
||||
/**
|
||||
* Constructeur
|
||||
*/
|
||||
public function __construct(){
|
||||
// Préfixe de la table pour hydratation
|
||||
$this->_prefixe = 'user_';
|
||||
}
|
||||
|
||||
// Méthodes - getters et setters
|
||||
public function getName():string{
|
||||
return $this->_name;
|
||||
}
|
||||
public function setName(string $strNewName){
|
||||
$this->_name = $this->nettoyer($strNewName);
|
||||
}
|
||||
public function getFirstname():string{
|
||||
return $this->_firstname;
|
||||
}
|
||||
public function setFirstname(string $strFirstname){
|
||||
$this->_firstname = $this->nettoyer($strFirstname);
|
||||
}
|
||||
public function getMail():string{
|
||||
return $this->_mail;
|
||||
}
|
||||
public function setMail(string $strMail){
|
||||
$this->_mail = strtolower($this->nettoyer($strMail));
|
||||
}
|
||||
public function getPwd():string{
|
||||
return $this->_pwd;
|
||||
}
|
||||
public function getPwdHash():string{
|
||||
return password_hash($this->_pwd, PASSWORD_DEFAULT);
|
||||
}
|
||||
public function setPwd(string $strPwd){
|
||||
$this->_pwd = $strPwd;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
25
app/models/category_model.php
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
require_once('../config/database.php');
|
||||
|
||||
/**
|
||||
* Classe d'un objet Projet
|
||||
* @author Laura
|
||||
*/
|
||||
|
||||
class CategoryModel extends Connect{
|
||||
|
||||
public function findAllCategory(int $intLimit=0):array{
|
||||
|
||||
// Ecrire la requête
|
||||
$strRq = "SELECT category.*
|
||||
FROM category";
|
||||
|
||||
|
||||
if ($intLimit > 0){
|
||||
$strRq .= " LIMIT ".$intLimit;
|
||||
}
|
||||
|
||||
// Lancer la requête et récupérer les résultats
|
||||
return $this->_db->query($strRq)->fetchAll();
|
||||
}
|
||||
}
|
||||
45
app/models/project_model.php
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
require_once('../config/database.php');
|
||||
|
||||
class ProjectModel extends Connect{
|
||||
|
||||
public function findAll(int $intLimit=0):array{
|
||||
|
||||
// Ecrire la requête
|
||||
$strRq = "SELECT project.*,
|
||||
CONCAT(user_firstname, ' ', user_name) AS 'project_creatorname',
|
||||
user_image
|
||||
FROM project
|
||||
INNER JOIN users ON user_id = project_user";
|
||||
|
||||
|
||||
if ($intLimit > 0){
|
||||
$strRq .= " LIMIT ".$intLimit;
|
||||
}
|
||||
|
||||
// Lancer la requête et récupérer les résultats
|
||||
return $this->_db->query($strRq)->fetchAll();
|
||||
}
|
||||
|
||||
//Fonction d'insertion d'information dans la BDD (Repris de la partie BLOG vu en cours..)
|
||||
public function insert(object $objProject):bool{
|
||||
|
||||
//Construire la requête
|
||||
$strRq = "INSERT INTO project (project_title, project_description, project_thumbnail, project_content, project_status, project_creation_date)
|
||||
VALUES (:title, :description, :thumbnail, :content, :status, DATE(NOW()))";
|
||||
|
||||
// Préparer la requête
|
||||
$rqPrep = $this->_db->prepare($strRq);
|
||||
// Donne les informations
|
||||
$rqPrep->bindValue(":title", $objProject->getTitle(), PDO::PARAM_STR);
|
||||
$rqPrep->bindValue(":description", $objProject->getDescription(), PDO::PARAM_STR);
|
||||
$rqPrep->bindValue(":thumbnail", $objProject->getThumbnail(), PDO::PARAM_STR);
|
||||
$rqPrep->bindValue(":content", $objProject->getContent(), PDO::PARAM_STR);
|
||||
$rqPrep->bindValue(":status", $objProject->getStatus(), PDO::PARAM_STR);
|
||||
|
||||
//Executer la requête
|
||||
//var_dump($strRq);die;
|
||||
//return $db->exec($strRq);
|
||||
return $rqPrep->execute();
|
||||
}
|
||||
}
|
||||
74
app/models/user_model.php
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
<?php
|
||||
require_once('../config/database.php');
|
||||
|
||||
/**
|
||||
* Traitement des requêtes pour les utilisateurs
|
||||
* @author : Christel
|
||||
* @version : V0.5
|
||||
*/
|
||||
class UserModel extends Connect{
|
||||
// Attributs
|
||||
|
||||
|
||||
// Méthodes
|
||||
public function __construct(){
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function findAllUsers():array{
|
||||
// Ecrire la requête
|
||||
$strRq = "SELECT user_id, user_firstname, user_name, user_image
|
||||
FROM users ";
|
||||
// Lancer la requête et récupérer les résultats
|
||||
return $this->_db->query($strRq)->fetchAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $strMail
|
||||
* @param string $strPwd
|
||||
* @return array|bool
|
||||
*/
|
||||
public function verifUser(string $strMail, string $strPwd):array|bool{
|
||||
// 2. Construire la requête
|
||||
$strRq = "SELECT user_id, user_name, user_firstname, user_password, user_image
|
||||
FROM users
|
||||
WHERE user_mail = '".$strMail."'";
|
||||
// Récupère mon utilisateur
|
||||
// Executer la requête et récupérer les résultats
|
||||
$arrUser = $this->_db->query($strRq)->fetch();
|
||||
// Vérification du mot de passe haché
|
||||
if (password_verify($strPwd, $arrUser['user_password'])){
|
||||
// Renvoi l'utilisateur
|
||||
unset($arrUser['user_password']); // on enlève le pwd
|
||||
return $arrUser;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//public function insert(string $strName, string $strFirstname, string $strMail, string $strPwd):int{
|
||||
/**
|
||||
* Fonction d'insertion d'un utilisateur en BDD
|
||||
* @param object $objUser L'objet utilisateur
|
||||
* @return bool Est-ce que la requête s'est bien passée (true/false)
|
||||
*/
|
||||
public function insert(object $objUser):bool{
|
||||
|
||||
// 2. Construire la requête
|
||||
$strRq = "INSERT INTO users (user_name, user_firstname, user_mail, user_pwd)
|
||||
VALUES (:name, :firstname, :mail, :pwd)";
|
||||
// Préparer la requête
|
||||
$rqPrep = $this->_db->prepare($strRq);
|
||||
// Donne les informations
|
||||
$rqPrep->bindValue(":name", $objUser->getName(), PDO::PARAM_STR);
|
||||
$rqPrep->bindValue(":firstname", $objUser->getFirstname(), PDO::PARAM_STR);
|
||||
$rqPrep->bindValue(":mail", $objUser->getMail(), PDO::PARAM_STR);
|
||||
$rqPrep->bindValue(":pwd", $objUser->getPwdHash(), PDO::PARAM_STR);
|
||||
|
||||
// 3. Executer la requête
|
||||
return $rqPrep->execute();
|
||||
}
|
||||
}
|
||||
97
app/views/connexion.php
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
|
||||
<!-- 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 -->
|
||||
<div class="card shadow-sm border-0 rounded-4 p-4 p-lg-5">
|
||||
|
||||
<!-- Titre principal -->
|
||||
<h1 class="h3 fw-bold mb-1">Connexion</h1>
|
||||
|
||||
<!-- Texte descriptif -->
|
||||
<p class="text-secondary mb-4">
|
||||
Connectez-vous à votre compte.
|
||||
</p>
|
||||
|
||||
<!-- Formulaire de connexion -->
|
||||
<!-- Le traitement sera effectué en PHP via la méthode POST -->
|
||||
<form method="POST">
|
||||
|
||||
<div class="row g-3">
|
||||
|
||||
<!-- Champ : adresse e-mail de l'utilisateur -->
|
||||
<div class="col-12">
|
||||
<label for="user_mail" class="form-label">
|
||||
Adresse e-mail
|
||||
</label>
|
||||
<input
|
||||
type="email"
|
||||
class="form-control"
|
||||
id="user_mail"
|
||||
name="user_mail"
|
||||
required
|
||||
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- Champ : mot de passe -->
|
||||
<div class="col-12">
|
||||
<label for="user_password" class="form-label">
|
||||
Mot de passe
|
||||
</label>
|
||||
<input
|
||||
type="password"
|
||||
class="form-control"
|
||||
id="user_password"
|
||||
name="user_password"
|
||||
required
|
||||
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- Option "Se souvenir de moi" (fonctionnalité optionnelle côté PHP) -->
|
||||
<div class="col-12">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" id="remember_me" name="remember_me">
|
||||
<label class="form-check-label" for="remember_me">
|
||||
Se souvenir de moi
|
||||
</label>
|
||||
</div>
|
||||
</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">
|
||||
Se connecter
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Lien vers la page d'inscription -->
|
||||
<div class="col-12 text-center">
|
||||
<small class="text-secondary">
|
||||
Pas encore de compte ?
|
||||
<a href="inscription.php" class="link-primary">Créer un compte</a>
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<!-- Lien pour la récupération du mot de passe -->
|
||||
<div class="col-12 text-center">
|
||||
<small>
|
||||
<a href="#" class="link-primary">
|
||||
Mot de passe oublié ?
|
||||
</a>
|
||||
</small>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
17
app/views/home.php
Normal 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>Là où 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>
|
||||
188
app/views/inscription.php
Normal file
|
|
@ -0,0 +1,188 @@
|
|||
|
||||
<!-- 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 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 (identifiant public de l'utilisateur) -->
|
||||
<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>
|
||||
|
||||
<!-- 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>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
23
app/views/login.php
Normal 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>
|
||||
5
app/views/partials/footer.php
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
<h2>coucou c'est le footer</h2>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
||||
88
app/views/partials/header.php
Normal 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>
|
||||
38
app/views/partials/preview.php
Normal 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>
|
||||
115
app/views/project.php
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
<?php
|
||||
require_once('../app/controllers/project_controller.php');
|
||||
require_once('../app/models/project_model.php');
|
||||
require_once('../app/entities/project_entity.php');
|
||||
|
||||
//Variable data
|
||||
$_SESSION['title'] = $_POST['titleProject']??"";
|
||||
$_SESSION['description'] = $_POST['descProject']??"";
|
||||
$_SESSION['content'] = $_POST['textProject']??"";
|
||||
$_SESSION['thumbnail'] = $_FILES['imageProject']['name']??"";
|
||||
$_SESSION['status'] = 'en_attente';
|
||||
|
||||
|
||||
$objProject = new Project();
|
||||
$objProjectModel = new ProjectModel();
|
||||
|
||||
/**
|
||||
/* Créer par Besnik le GOAT et l'autre GOAT de Guillaume
|
||||
/*
|
||||
/* @return bool pour savoir si le fichier existe,
|
||||
/* puis déplace vers le fichier uploads avec les images projet des utilisateurs
|
||||
/* Communication avec la BDD
|
||||
*/
|
||||
if (($_SESSION['thumbnail'] != null)){
|
||||
$strDest = "";
|
||||
if ((count($_FILES) > 0) && ($_FILES['imageProject']['error'] != 4)){
|
||||
$strDest = '../public/uploads/projects/'.$_FILES['imageProject']['name'];
|
||||
var_dump($strDest);
|
||||
move_uploaded_file($_FILES['imageProject']['tmp_name'], $strDest);
|
||||
}
|
||||
}
|
||||
|
||||
/** En cas d'appuis sur le bouton d'envoie ou celui de remettre a plus tard
|
||||
/* 1. Changement de status
|
||||
/* 2. Hydratation avec les informations récupéré de l'utilisateur
|
||||
/* 3. Envoie des données à la BDD
|
||||
*/
|
||||
if (isset($_POST['sendMessage'])) {
|
||||
$_SESSION['status'] = 'publié';
|
||||
$objProject->hydrate($_SESSION);
|
||||
$objProject->setThumbnail($strDest);
|
||||
$objProjectModel->insert($objProject);
|
||||
|
||||
} else if (isset($_POST['toContinue'])) {
|
||||
$objProject->hydrate($_SESSION);
|
||||
$objProject->setThumbnail($strDest);
|
||||
$objProjectModel->insert($objProject);
|
||||
}
|
||||
|
||||
//Débuggage
|
||||
var_dump($_SESSION);
|
||||
var_dump($objProject);
|
||||
|
||||
|
||||
?>
|
||||
<body>
|
||||
<section class="container mt-5 p-5 d-flex flex-column align-items-center">
|
||||
<div>
|
||||
<h2>Alimenter votre projet</h2>
|
||||
<form method="post">
|
||||
<button type="submit" class="btn btn-primary btn-lg" name="showForm">+</button>
|
||||
<?php if (isset($_POST['toContinue'])) { ?>
|
||||
<button type="submit" class="btn btn-warning btn-lg" name="showFormContinue">Reprendre</button>
|
||||
<?php } ?>
|
||||
</form>
|
||||
|
||||
<?php // Affichage d'un formulaire en cas d'appuie sur le bouton "+"
|
||||
if ((isset($_POST["showForm"])) || (isset($_POST['showFormContinue']))) {?>
|
||||
<form method="post" enctype="multipart/form-data" onsubmit="return confirm('Voulez-vous vraiment envoyer le formulaire ?')">
|
||||
<div>
|
||||
<label>Titre</label>
|
||||
<input type="text" name="titleProject">
|
||||
</div>
|
||||
<div>
|
||||
<label>Description</label>
|
||||
<input type="text" name="descProject">
|
||||
</div>
|
||||
<div>
|
||||
<label>Texte Portfolio</label>
|
||||
<input type="text" name="textProject">
|
||||
</div>
|
||||
<div>
|
||||
<input name="imageProject" class="form-control" type="file">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-md" name="sendMessage">Envoyer</button>
|
||||
<button type="submit" class="btn btn-warning btn-md" name="toContinue">Remettre à plus tard</button>
|
||||
</form>
|
||||
<?php }; ?>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<h3>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>
|
||||
<h3>Photos behind the scene</h3>
|
||||
<div class="row mb-2">
|
||||
<img>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h3>Other projects</h3>
|
||||
<div class="row mb-2">
|
||||
<?php
|
||||
foreach($arrProjectToDisplay as $objProject){
|
||||
include("../app/views/partials/preview.php");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<section>
|
||||
</body>
|
||||
170
app/views/search.php
Normal file
|
|
@ -0,0 +1,170 @@
|
|||
<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>
|
||||
23
config/database.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
class Connect {
|
||||
|
||||
protected $_db;
|
||||
|
||||
public function __construct(){
|
||||
try{
|
||||
// Connexion à la base de données
|
||||
$this->_db = new PDO(
|
||||
"mysql:host=localhost;dbname=projet_folliow", // Serveur et BDD
|
||||
"root", //Nom d'utilisateur de la base de données
|
||||
"",// Mot de passe de la base de données
|
||||
array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC) // Mode de renvoi
|
||||
);
|
||||
// Pour résoudre les problèmes d’encodage
|
||||
$this->_db->exec("SET CHARACTER SET utf8");
|
||||
// Configuration des exceptions
|
||||
$this->_db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
} catch(PDOException$e) {
|
||||
echo "Échec : " . $e->getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
253
database/database.sql
Normal file
|
|
@ -0,0 +1,253 @@
|
|||
CREATE DATABASE IF NOT EXISTS `projet_folliow`
|
||||
DEFAULT CHARACTER SET utf8mb4
|
||||
COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
USE `projet_folliow`;
|
||||
|
||||
/*M!999999\- enable the sandbox mode */
|
||||
-- MariaDB dump 10.19 Distrib 10.11.14-MariaDB, for debian-linux-gnu (x86_64)
|
||||
--
|
||||
-- Host: localhost Database: projet_folliow
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 10.11.14-MariaDB-0+deb12u2
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8mb4 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
--
|
||||
-- Table structure for table `authorisation`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `authorisation`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `authorisation` (
|
||||
`authorisation_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Identifiant unique des autorisations',
|
||||
`authorisation_name` varchar(30) NOT NULL COMMENT 'Administrateur, modérateur, utilisateur',
|
||||
PRIMARY KEY (`authorisation_id`),
|
||||
UNIQUE KEY `uk_authorisation_name` (`authorisation_name`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `authorisation`
|
||||
--
|
||||
|
||||
LOCK TABLES `authorisation` WRITE;
|
||||
/*!40000 ALTER TABLE `authorisation` DISABLE KEYS */;
|
||||
INSERT INTO `authorisation` VALUES
|
||||
(1,'Administrateur'),
|
||||
(2,'Modérateur'),
|
||||
(3,'Utilisateur');
|
||||
/*!40000 ALTER TABLE `authorisation` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `category`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `category`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `category` (
|
||||
`category_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Identifiant unique des catégorie du projet',
|
||||
`category_name` varchar(150) NOT NULL COMMENT 'Nom de chaque catégorie',
|
||||
`category_parent` int(10) unsigned DEFAULT NULL COMMENT 'ID de la catégorie parente (NULL = catégorie principale)',
|
||||
PRIMARY KEY (`category_id`),
|
||||
UNIQUE KEY `uk_category_name_parent` (`category_name`,`category_parent`),
|
||||
KEY `fk_category_parent` (`category_parent`),
|
||||
CONSTRAINT `fk_category_parent` FOREIGN KEY (`category_parent`) REFERENCES `category` (`category_id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `category`
|
||||
--
|
||||
|
||||
LOCK TABLES `category` WRITE;
|
||||
/*!40000 ALTER TABLE `category` DISABLE KEYS */;
|
||||
INSERT INTO `category` VALUES
|
||||
(32,'3D',4),
|
||||
(34,'Aquarelle',4),
|
||||
(5,'Architecture',NULL),
|
||||
(36,'Architecture d\'Intérieur',5),
|
||||
(35,'Architecture Moderne',5),
|
||||
(24,'Backend',2),
|
||||
(33,'Bande Dessinée',4),
|
||||
(1,'Design',NULL),
|
||||
(2,'Développement Web',NULL),
|
||||
(31,'Digital Art',4),
|
||||
(30,'Événementiel',3),
|
||||
(23,'Frontend',2),
|
||||
(25,'Full-Stack',2),
|
||||
(4,'Illustration',NULL),
|
||||
(20,'Logo & Identité Visuelle',1),
|
||||
(39,'Marketing',NULL),
|
||||
(46,'Marketing',NULL),
|
||||
(26,'Mobile',2),
|
||||
(21,'Motion Design',1),
|
||||
(38,'Patrimoine',5),
|
||||
(28,'Paysage',3),
|
||||
(3,'Photographie',NULL),
|
||||
(27,'Portrait',3),
|
||||
(22,'Print Design',1),
|
||||
(40,'Rédaction',NULL),
|
||||
(47,'Rédaction',NULL),
|
||||
(29,'Sport',3),
|
||||
(19,'UI/UX Design',1),
|
||||
(37,'Urbanisme',5),
|
||||
(41,'Vidéo',NULL),
|
||||
(48,'Vidéo',NULL);
|
||||
/*!40000 ALTER TABLE `category` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `image`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `image`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `image` (
|
||||
`image_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'identifiant unique des images',
|
||||
`image_name` varchar(150) NOT NULL COMMENT 'Chemin de l''image enregistrée',
|
||||
`image_alt` varchar(255) DEFAULT NULL COMMENT 'Alt de l''image',
|
||||
`image_status` varchar(50) NOT NULL DEFAULT 'en_attente' COMMENT 'Statut de modération de l''image',
|
||||
`image_project` int(10) unsigned DEFAULT NULL COMMENT 'Identifiant du projet où se trouve l''image',
|
||||
PRIMARY KEY (`image_id`),
|
||||
KEY `fk_image_project` (`image_project`),
|
||||
CONSTRAINT `fk_image_project` FOREIGN KEY (`image_project`) REFERENCES `project` (`project_id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `chk_image_status` CHECK (`image_status` in ('en_attente','approuvé','rejeté'))
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `image`
|
||||
--
|
||||
|
||||
LOCK TABLES `image` WRITE;
|
||||
/*!40000 ALTER TABLE `image` DISABLE KEYS */;
|
||||
INSERT INTO `image` VALUES
|
||||
(1,'/uploads/projects/ecommerce-01.jpg','Page d\'accueil du site e-commerce refondu','approuvé',1),
|
||||
(2,'/uploads/projects/ecommerce-02.jpg','Interface mobile du processus de commande','approuvé',1),
|
||||
(3,'/uploads/projects/taskmanager-01.jpg','Vue kanban de l\'application','approuvé',2),
|
||||
(4,'/uploads/projects/urban-01.jpg','Architecture moderne à La Défense','en_attente',3);
|
||||
/*!40000 ALTER TABLE `image` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `project`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `project`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `project` (
|
||||
`project_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Identifiant unique du projet',
|
||||
`project_title` varchar(150) NOT NULL COMMENT 'Titre du projet',
|
||||
`project_description` text DEFAULT NULL COMMENT 'Description du projet',
|
||||
`project_thumbnail` varchar(150) DEFAULT NULL COMMENT 'Image miniature du projet',
|
||||
`project_content` text DEFAULT NULL COMMENT 'Contenu du projet',
|
||||
`project_creation_date` date NOT NULL COMMENT 'Date de création du projet',
|
||||
`project_status` varchar(30) NOT NULL DEFAULT 'brouillon' COMMENT 'Statut du projet : brouillon, publié, en_attente',
|
||||
`project_user` int(10) unsigned DEFAULT NULL COMMENT 'Identifiant de l''user',
|
||||
`project_category` int(10) unsigned DEFAULT NULL COMMENT 'Identifiant de la catégorie',
|
||||
|
||||
PRIMARY KEY (`project_id`),
|
||||
KEY `fk_project_user` (`project_user`),
|
||||
KEY `fk_project_category` (`project_category`),
|
||||
KEY `idx_project_status` (`project_status`),
|
||||
KEY `idx_project_creation_date` (`project_creation_date`),
|
||||
|
||||
CONSTRAINT `fk_project_category`
|
||||
FOREIGN KEY (`project_category`)
|
||||
REFERENCES `category` (`category_id`)
|
||||
ON DELETE SET NULL
|
||||
ON UPDATE CASCADE,
|
||||
|
||||
CONSTRAINT `fk_project_user`
|
||||
FOREIGN KEY (`project_user`)
|
||||
REFERENCES `users` (`user_id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB
|
||||
DEFAULT CHARSET=utf8mb4
|
||||
COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `project`
|
||||
--
|
||||
|
||||
LOCK TABLES `project` WRITE;
|
||||
/*!40000 ALTER TABLE `project` DISABLE KEYS */;
|
||||
INSERT INTO `project` VALUES
|
||||
(1,'Refonte du site e-commerce','Refonte complète de l\'interface utilisateur d\'une boutique en ligne avec focus sur l\'expérience mobile','/uploads/projects/ecommerce-thumb.jpg','Ce projet visait à moderniser entièrement l\'interface d\'un site e-commerce existant. Les principales améliorations incluent une navigation simplifiée, un processus de commande optimisé et une interface responsive.','2025-12-01','publié',1,1),
|
||||
(2,'Application de gestion de tâches','Développement d\'une application web pour la gestion collaborative de projets','/uploads/projects/taskmanager-thumb.jpg','Application web développée en React et Node.js permettant aux équipes de gérer leurs projets de manière collaborative. Fonctionnalités : kanban, calendrier, notifications en temps réel.','2025-12-15','publié',2,2),
|
||||
(3,'Série photo urbaine','Collection de photographies capturant l\'architecture moderne de Paris','/uploads/projects/urban-thumb.jpg','Série de 30 photographies prises dans différents quartiers de Paris, mettant en valeur le contraste entre architecture classique et moderne. Travail sur la lumière naturelle et les perspectives.','2026-01-05','en_attente',3,3);
|
||||
/*!40000 ALTER TABLE `project` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `users`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `users`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `users` (
|
||||
`user_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Identifiant unique de l''utilisateur',
|
||||
`user_name` varchar(100) NOT NULL COMMENT 'Nom de l''utilisateur',
|
||||
`user_firstname` varchar(100) NOT NULL COMMENT 'Prénom de l''utilisateur',
|
||||
`user_pseudo` varchar(30) NOT NULL COMMENT 'Pseudo de l''utilisateur',
|
||||
`user_image` varchar(150) DEFAULT NULL COMMENT 'Photo de profil de l''utilisateur',
|
||||
`user_mail` varchar(100) NOT NULL COMMENT 'Mail de l''utilisateur',
|
||||
`user_password` varchar(255) NOT NULL COMMENT 'Mot de passe de l''utilisateur',
|
||||
`user_phone` varchar(20) DEFAULT NULL COMMENT 'Téléphone de l''utilisateur',
|
||||
`user_work` varchar(50) DEFAULT NULL COMMENT 'Profession de l''utilisateur',
|
||||
`user_birth` date DEFAULT NULL COMMENT 'Date de naissance de l''utilisateur',
|
||||
`user_location` varchar(150) DEFAULT NULL COMMENT 'Localisation de l''utilisateur',
|
||||
`user_description` varchar(255) DEFAULT NULL COMMENT 'Phrase d''accroche de l''utilisateur',
|
||||
`user_account_creation` datetime NOT NULL DEFAULT current_timestamp() COMMENT 'Date et heure de création du compte',
|
||||
`user_status` int(10) unsigned DEFAULT NULL COMMENT 'identifiant de niveau d''autorisation',
|
||||
PRIMARY KEY (`user_id`),
|
||||
UNIQUE KEY `uk_user_mail` (`user_mail`),
|
||||
UNIQUE KEY `uk_user_pseudo` (`user_pseudo`),
|
||||
KEY `fk_users_authorisation` (`user_status`),
|
||||
KEY `idx_user_mail` (`user_mail`),
|
||||
CONSTRAINT `fk_users_authorisation` FOREIGN KEY (`user_status`) REFERENCES `authorisation` (`authorisation_id`) ON DELETE SET NULL ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `users`
|
||||
--
|
||||
|
||||
LOCK TABLES `users` WRITE;
|
||||
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
|
||||
INSERT INTO `users` VALUES
|
||||
(1,'Dupont','Marie','marie_design','/uploads/users/marie.jpg','marie.dupont@example.com','$2y$10$T5kWRD3NBqXKWtQqrBG3We1Qpq2Odum0/xYAoT2SaCclG7h2Y0Gvq','0612345678','Designer UI/UX','1995-03-15','Paris, France','Passionnée de design et d\'expérience utilisateur','2024-01-15 10:30:00',1),
|
||||
(2,'Martin','Thomas','thomas_dev','/uploads/users/thomas.jpg','thomas.martin@example.com','$2y$10$T5kWRD3NBqXKWtQqrBG3We1Qpq2Odum0/xYAoT2SaCclG7h2Y0Gvq','0623456789','Développeur Full-Stack','1992-07-22','Lyon, France','Créateur d\'applications web modernes','2024-02-20 14:45:00',2),
|
||||
(3,'Dubois','Sophie','sophie_photo','/uploads/users/sophie.jpg','sophie.dubois@example.com','$2y$10$T5kWRD3NBqXKWtQqrBG3We1Qpq2Odum0/xYAoT2SaCclG7h2Y0Gvq','0634567890','Photographe','1998-11-08','Marseille, France','Capturer l\'instant présent est ma passion','2024-03-10 09:15:00',3);
|
||||
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2026-01-09 17:33:08
|
||||
98
public/assests/css/style.css
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
body {
|
||||
background-color: #f5f5f5;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
background-color: #ffffff;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
padding: 0.8rem 2rem;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
font-size: 1.5rem;
|
||||
font-weight: bold;
|
||||
color: #0d6efd !important;
|
||||
}
|
||||
|
||||
.navbar-brand span {
|
||||
color: #6c757d;
|
||||
}
|
||||
|
||||
.navbar-nav .nav-link {
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
padding: 0.5rem 1rem;
|
||||
margin: 0 0.2rem;
|
||||
transition: color 0.3s;
|
||||
}
|
||||
|
||||
.navbar-nav .nav-link:hover {
|
||||
color: #0d6efd;
|
||||
}
|
||||
|
||||
.btn-login {
|
||||
color: #333;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
font-weight: 500;
|
||||
padding: 0.5rem 1rem;
|
||||
}
|
||||
|
||||
.btn-login:hover {
|
||||
color: #0d6efd;
|
||||
}
|
||||
|
||||
.btn-signup {
|
||||
background-color: #0d6efd;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 25px;
|
||||
padding: 0.5rem 2rem;
|
||||
font-weight: 500;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
.btn-signup:hover {
|
||||
background-color: #0b5ed7;
|
||||
}
|
||||
|
||||
.notification-bell {
|
||||
font-size: 1.2rem;
|
||||
color: #6c757d;
|
||||
margin-right: 1rem;
|
||||
cursor: pointer;
|
||||
transition: color 0.3s;
|
||||
}
|
||||
|
||||
.notification-bell:hover {
|
||||
color: #0d6efd;
|
||||
}
|
||||
|
||||
.logo-image {
|
||||
height: 30px;
|
||||
width: auto;
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
.logo{
|
||||
font-size: 5rem;
|
||||
font-weight: 700;
|
||||
background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
}
|
||||
|
||||
.article-card {
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
.article-img {
|
||||
height: 50px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.article-content {
|
||||
height: 20%;
|
||||
padding: 0.75rem;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
BIN
public/assests/img/Logo.png
Normal file
|
After Width: | Height: | Size: 232 KiB |
11
public/assests/styles.css
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/* Style général appliqué à toute la page */
|
||||
body{
|
||||
/* Couleur de fond claire pour améliorer la lisibilité */
|
||||
background: #f7f8fb;
|
||||
}
|
||||
|
||||
/* Style de base des cartes Bootstrap */
|
||||
.card{
|
||||
/* Fond blanc pour mettre en valeur le contenu */
|
||||
background: #fff;
|
||||
}
|
||||
7
public/coucou.txt
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
coucou
|
||||
coucou depuis le cci
|
||||
hehehe
|
||||
|
||||
coucoucoucoucou
|
||||
|
||||
encore un teste, y'en a trop wwsh
|
||||
31
public/index.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
$strCtrl = $_GET['ctrl']??'project';
|
||||
$strMethod = $_GET['action']??'home';
|
||||
$intId = $_GET['id']??null;
|
||||
|
||||
$boolError = false;
|
||||
$strFileName = "../app/controllers/".$strCtrl."_controller.php";
|
||||
if($intId!=null){
|
||||
echo $intId;
|
||||
}
|
||||
if(file_exists($strFileName)){
|
||||
require($strFileName);
|
||||
$strClassName = ucfirst($strCtrl)."Ctrl";
|
||||
if(class_exists($strClassName)){
|
||||
$objController = new $strClassName();
|
||||
if(method_exists($objController,$strMethod)){
|
||||
$objController->$strMethod();
|
||||
}else{
|
||||
$boolError = true;
|
||||
}
|
||||
}else{
|
||||
$boolError = true;
|
||||
}
|
||||
}else{
|
||||
$boolError = true;
|
||||
}
|
||||
|
||||
if($boolError){
|
||||
echo "error 404 - la page elle existe pas batard";
|
||||
}
|
||||
|
||||
0
public/uploads/profiles/.gitkeep
Normal file
BIN
public/uploads/profiles/Logo.png
Normal file
|
After Width: | Height: | Size: 232 KiB |
BIN
public/uploads/profiles/marie.jpg
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
public/uploads/profiles/sophie.jpg
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
public/uploads/profiles/thomas.jpg
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
0
public/uploads/projects/.gitkeep
Normal file
BIN
public/uploads/projects/Capture d'écran 2025-11-06 161706.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
public/uploads/projects/Capture d'écran 2026-01-15 144610.png
Normal file
|
After Width: | Height: | Size: 708 KiB |
BIN
public/uploads/projects/Capture d'écran 2026-01-20 140950.png
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
public/uploads/projects/Logo.png
Normal file
|
After Width: | Height: | Size: 232 KiB |
BIN
public/uploads/projects/ecommerce-thumb.jpg
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
public/uploads/projects/taskmanager-thumb.jpg
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
BIN
public/uploads/projects/urban-thumb.jpg
Normal file
|
After Width: | Height: | Size: 3.7 KiB |