diff --git a/.env b/.env deleted file mode 100644 index 312e8f9..0000000 --- a/.env +++ /dev/null @@ -1,10 +0,0 @@ -# config BDD - -DB_CONNECTION=mysql -DB_HOSTNAME=boulayoune.com -DB_DATABASE=projet_folliow -DB_USERNAME= -DB_PASSWORD= - -IMG_PROJECT_PATH = uploads/projects/ -IMG_USER_PATH = uploads/profiles/ \ No newline at end of file diff --git a/.gitignore b/.gitignore index 183434a..1b4da35 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /templates_c/ /templates_c/** .env +.htaccess \ No newline at end of file diff --git a/assests/css/style.css b/assests/css/style.css index 142ea7f..13d28fb 100644 --- a/assests/css/style.css +++ b/assests/css/style.css @@ -10,7 +10,12 @@ body { background-color: #ffffff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); padding: 0.8rem 2rem; + min-height: 64px; + max-height: 64px; } +.navbar .navbar-collapse { + align-items: center; + } .navbar-brand { font-size: 1.5rem; @@ -29,7 +34,13 @@ body { margin: 0 0.2rem; transition: color 0.3s; } - +.nav-avatar { + width: 36px; + height: 36px; + object-fit: cover; + border-radius: 50%; + display: block; + } .navbar-nav .nav-link:hover { color: #0d6efd; } @@ -117,3 +128,51 @@ body { .txt_title { color: rgb(51, 152, 217); } + +/* On cible la card sans casser ses propriétés Bootstrap */ +.tiger-theme { + background-color: #ff8c00 !important; /* Orange tigre */ + background-image: repeating-linear-gradient( + 45deg, + transparent, + transparent 30px, + rgba(0, 0, 0, 0.15) 30px, + rgba(0, 0, 0, 0.15) 60px + ) !important; + border: 2px solid #000 !important; + color: #000 !important; + position: relative; + z-index: 1; +} + +/* Style du texte pour qu'il ressorte sur l'orange */ +.tiger-text { + font-weight: 800 !important; + text-transform: uppercase; + color: #000 !important; +} + +.tiger-date { + font-size: 0.8rem; + font-weight: bold; + color: rgba(0, 0, 0, 0.7); +} + +/* Bordure de l'image (n'affecte pas la taille de la card) */ +.tiger-border { + box-shadow: 0 0 0 4px #000; +} + +/* Bouton style tigre */ +.btn-tiger { + background-color: #000 !important; + color: #ff8c00 !important; + border: none !important; + font-weight: bold !important; + transition: transform 0.2s; +} + +.btn-tiger:hover { + transform: scale(1.05); + background-color: #222 !important; +} \ No newline at end of file diff --git a/controllers/AdminCtrl.php b/controllers/AdminCtrl.php index 88896dc..670082b 100644 --- a/controllers/AdminCtrl.php +++ b/controllers/AdminCtrl.php @@ -21,8 +21,8 @@ public function admin(){ if (!isset($_SESSION['user']) && ($_SESSION['user']['user_status'] != 1 )){ - header("Location:index.php?ctrl=error&action=error_403"); - exit; + $error = new \Controllers\ErrorCtrl(); + return $error->error_403(); } $objCategoryModel = new CategoryModel; @@ -32,7 +32,7 @@ $newCat->setName($_POST['new_category']); $objCategoryModel->insertCategory($newCat); $_SESSION['success'] = "La catégorie a bien été ajoutée"; - header('Location: index.php?ctrl=admin&action=admin'); + header('Location: '.$_ENV['BASE_URL'].'/admin/admin'); exit; } @@ -42,7 +42,7 @@ $editCat->setName($_POST['new_name']); $objCategoryModel->editCategory($editCat); $_SESSION['success'] = "La catégorie a bien été modifiée"; - header('Location: index.php?ctrl=admin&action=admin'); + header('Location: '.$_ENV['BASE_URL'].'/admin/admin'); exit; } @@ -73,7 +73,7 @@ $objUserModel->delete_soft($intUserId); $_SESSION['success'] = "L'utilisateur a été supprimé."; } - header("Location: index.php?ctrl=admin&action=admin"); + header('Location: '.$_ENV['BASE_URL'].'/admin/admin'); exit; } } diff --git a/controllers/ErrorCtrl.php b/controllers/ErrorCtrl.php index 2e69e9e..9a5e0ff 100644 --- a/controllers/ErrorCtrl.php +++ b/controllers/ErrorCtrl.php @@ -11,14 +11,18 @@ * Page erreur 404 */ public function error_404(){ + http_response_code(404); $this->_display("error_404"); + exit; } /** * Page erreur 403 */ public function error_403(){ + http_response_code(403); $this->_display("error_403"); + exit; } } \ No newline at end of file diff --git a/controllers/MotherCtrl.php b/controllers/MotherCtrl.php index bea90b2..49ccbdf 100644 --- a/controllers/MotherCtrl.php +++ b/controllers/MotherCtrl.php @@ -23,6 +23,7 @@ $objSmarty = new Smarty(); $objSmarty->registerPlugin('modifier', 'vardump', 'var_dump'); $objSmarty->registerPlugin('modifier', 'file_exists', 'file_exists'); + $objSmarty->registerPlugin('modifier', 'stripos', 'stripos'); $objSmarty->caching = false; $objSmarty->force_compile = true; diff --git a/controllers/ProjectCtrl.php b/controllers/ProjectCtrl.php index 6cb408c..fc85dd1 100644 --- a/controllers/ProjectCtrl.php +++ b/controllers/ProjectCtrl.php @@ -79,7 +79,7 @@ */ public function search(){ - $strKeywords = $_POST['keywords']??''; + $strKeywords = $_POST['keywords']??""; $intAuthor = $_POST['author']??0; $intPeriod = $_POST['period']??0; $strDate = $_POST['date']??''; @@ -124,8 +124,8 @@ */ public function addedit_project() { if (!isset($_SESSION['user'])){ - header("Location:index.php?ctrl=error&action=error_403"); - exit; + $error = new \Controllers\ErrorCtrl(); + return $error->error_403(); } $objProject = new Project; @@ -135,8 +135,8 @@ if (isset($_GET['id'])){ $arrProject = $objProjectModel->findOne($_GET['id']); if($_SESSION['user']['user_id'] != $arrProject['project_user_id']){ - header("Location:index.php?ctrl=error&action=error_403"); - exit; + $error = new \Controllers\ErrorCtrl(); + return $error->error_403(); } $objProject->hydrate($arrProject); $this->_arrData['arrImages'] = $objProjectModel->getImagesByProjectId($objProject->getId()); @@ -200,7 +200,7 @@ $strSource = $_FILES['thumbnail']['tmp_name']; list($intWidth, $intHeight) = getimagesize($strSource); - $intDestWidth = 200; $intDestHeight = 250; + $intDestWidth = 1280; $intDestHeight = 720; $fltDestRatio = $intDestWidth / $intDestHeight; $fltSourceRatio = $intWidth / $intHeight; @@ -325,7 +325,7 @@ } $_SESSION['success'] = (!isset($_GET['id'])) ? "Le projet a bien été créé" : "Le projet a bien été modifié"; - header("Location:index.php"); + header('Location:'.$_ENV['BASE_URL']); exit; } else { $arrError[] = "Erreur lors de l'enregistrement en base de données"; @@ -360,9 +360,9 @@ $objProjectModel = new ProjectModel(); $arrProject = $objProjectModel->findOne((int)$intId); - $arrImages = $objProjectModel->getImagesByProjectId((int)$intId); if ($arrProject) { + $arrImages = $objProjectModel->getImagesByProjectId((int)$intId); $objProject = new Project(); $objProject->hydrate($arrProject); @@ -373,11 +373,11 @@ $this->_display("project_display"); } else { - header("Location: index.php?ctrl=project&action=home"); + header('Location: '.$_ENV['BASE_URL'].'/project/home'); exit; } } else { - header("Location: index.php?ctrl=project&action=home"); + header('Location: '.$_ENV['BASE_URL'].'/project/home'); exit; } } @@ -395,7 +395,7 @@ $arrProject = $objProjectModel->findOne($projectId); if (!$arrProject) { - header("Location: index.php?ctrl=project&action=home"); + header('Location: '.$_ENV['BASE_URL'].'/project/home'); exit; } @@ -429,8 +429,8 @@ $objMail->Subject = "Projet : " . $objProject->getTitle(); - $url = "https://php.boulayoune.com/index.php?ctrl=project&action=display&id=" . $projectId; - + $url = $_ENV['BASE_URL'].'/project/display/'.$projectId; + $this->_arrData['projectTitle'] = $objProject->getTitle(); $this->_arrData['projectDescription'] = $objProject->getDescription(); $this->_arrData['projectUrl'] = $url; @@ -438,14 +438,14 @@ $objMail->Body = $this->_display("mail_message", false); if ($objMail->Send()) { - header("Location: index.php?ctrl=project&action=display&id=".$projectId."&mail=ok"); + header('Location: '.$_ENV['BASE_URL'].'/project/display/'.$projectId.'?mail=ok'); } else { - header("Location: index.php?ctrl=project&action=display&id=".$projectId."&mail=fail"); + header('Location: '.$_ENV['BASE_URL'].'/project/display/'.$projectId.'?mail=fail'); } exit; } - header("Location: index.php?ctrl=project&action=home"); + header('Location: '.$_ENV['BASE_URL'].'/project/home'); exit; } @@ -459,7 +459,7 @@ $objProjectModel = new ProjectModel; $objProjectModel->accept($intId); - header("Location: index.php"); + header('Location: '.$_ENV['BASE_URL']); exit; } @@ -473,7 +473,7 @@ $objProjectModel = new ProjectModel; $objProjectModel->refuse($intId); - header("Location: index.php"); + header('Location: '.$_ENV['BASE_URL']); exit; } @@ -483,7 +483,7 @@ public function delete(){ if (!isset($_SESSION['user']) || $_SESSION['user']['user_status'] != 2) { - header("Location: index.php"); + header('Location: '.$_ENV['BASE_URL']); exit; } @@ -498,7 +498,7 @@ } } - header("Location: index.php"); + header('Location: '.$_ENV['BASE_URL']); exit; } @@ -518,7 +518,7 @@ } $urlRedirect = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : "index.php"; - header("Location: " . $urlRedirect); + header('Location: ' . $urlRedirect); exit; } @@ -541,7 +541,7 @@ } $url = (isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : "index.php"; - header("Location: " . $url); + header('Location: ' . $url); exit; } diff --git a/controllers/UserCtrl.php b/controllers/UserCtrl.php index c1f288a..7ecb8a9 100644 --- a/controllers/UserCtrl.php +++ b/controllers/UserCtrl.php @@ -48,7 +48,7 @@ class UserCtrl extends MotherCtrl { setcookie('remember_me', $token, time() + (15*24*60*60), "/", "", true, true); } - header("Location:index.php"); + header("Location:".$_ENV['BASE_URL']); exit; } } @@ -75,7 +75,7 @@ class UserCtrl extends MotherCtrl { $_SESSION['success'] = "Vous êtes bien déconnecté"; - header("Location:index.php"); + header("Location:".$_ENV['BASE_URL']); exit; } @@ -143,7 +143,7 @@ class UserCtrl extends MotherCtrl { if ($boolInsert === true) { $_SESSION['success'] = "Compte créé avec succès"; - header("Location:index.php?ctrl=user&action=login"); + header("Location:".$_ENV['BASE_URL']."/user/login"); exit; } else { $arrError['global'] = "Erreur lors de l'ajout"; @@ -169,7 +169,7 @@ class UserCtrl extends MotherCtrl { $arrUserData = $objUserModel->findUserByPseudo($strPseudo); if ($arrUserData === false) { - header("Location: index.php"); + header("Location: ".$_ENV['BASE_URL']); exit; } @@ -195,7 +195,7 @@ class UserCtrl extends MotherCtrl { */ public function edit(){ if(!isset($_SESSION['user'])){ - header("Location: index.php"); + header("Location: ".$_ENV['BASE_URL']); exit; } $objUserModel = new UserModel; @@ -243,6 +243,7 @@ class UserCtrl extends MotherCtrl { } } } + if (count($arrError) == 0 && isset($strImageName)) { $strDest = $_ENV['IMG_USER_PATH'] . $strImageName; @@ -279,17 +280,25 @@ class UserCtrl extends MotherCtrl { } + if ($_POST['delete_image'] === '1') { + $strOldImg = $objUser->getImage(); + if (!empty($strOldImg) && $strOldImg !== 'images.jpg') { + $strOldFile = $_ENV['IMG_USER_PATH'] . $strOldImg; + if (file_exists($strOldFile)) unlink($strOldFile); + } + $objUser->setImage('images.jpg'); + } $boolInsert = $objUserModel->update($objUser); if ($boolInsert === true) { - if (isset($strOldImg) && !empty($strOldImg) && isset($strImageName)) { - $strOldFile = $_ENV['IMG_USER_PATH'] . $strOldImg; - if (file_exists($strOldFile)) unlink($strOldFile); + if (isset($strOldImg) && !empty($strOldImg) && $strOldImg !== 'images.jpg' && isset($strImageName)) { + $strOldFile = $_ENV['IMG_USER_PATH'] . $strOldImg; + if (file_exists($strOldFile)) unlink($strOldFile); } $arrNewInfo = $objUserModel->findUserByPseudo($objUser->getPseudo()); $_SESSION['user'] = $arrNewInfo; $_SESSION['success'] = "Compte modifier avec succès"; - header("Location:?ctrl=user&action=user&pseudo=".$objUser->getPseudo()); + header('Location:'.$_ENV['BASE_URL'].'/user/user/'.$objUser->getPseudo()); exit; } else { $arrError['global'] = "Erreur lors de l'update"; diff --git a/entities/Project.php b/entities/Project.php index 5071b57..ca5c941 100644 --- a/entities/Project.php +++ b/entities/Project.php @@ -226,7 +226,7 @@ class Project extends Mother{ * Récupération de la date du projet supprimer * @return string date du projet */ - public function getProject_deleted_at(){ + public function getDeleted_at(){ return $this->_project_deleted_at; } @@ -234,7 +234,7 @@ class Project extends Mother{ * Mise à jour de la date de suppression de projet * @param string date du projet */ - public function setProject_deleted_at($project_deleted_at){ + public function setDeleted_at($project_deleted_at){ $this->_project_deleted_at = $project_deleted_at; } } \ No newline at end of file diff --git a/entities/User.php b/entities/User.php index 1eee5be..f156205 100644 --- a/entities/User.php +++ b/entities/User.php @@ -90,7 +90,7 @@ * @return string le nouveau pseudo de l'utilisateur */ public function setPseudo(string $pseudo){ - $this->_pseudo = $pseudo; + $this->_pseudo = str_replace(" ","_",$pseudo); } /** diff --git a/env b/env index 1ba2754..611d244 100644 --- a/env +++ b/env @@ -1,7 +1,7 @@ # config BDD DB_CONNECTION=mysql -DB_HOSTNAME=boulayoune.com +DB_HOSTNAME=localhost DB_DATABASE=projet_folliow DB_USERNAME= DB_PASSWORD= diff --git a/html/annotated.html b/html/annotated.html new file mode 100644 index 0000000..bcd2e96 --- /dev/null +++ b/html/annotated.html @@ -0,0 +1,130 @@ + + +
+ + + + +|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
| NControllers | |
| CAdminCtrl | |
| CErrorCtrl | |
| CMotherCtrl | |
| CPageCtrl | |
| CProjectCtrl | |
| CUserCtrl | |
| NEntities | |
| CAuthorisation | |
| CCategory | |
| CImage | |
| CMother | |
| CProject | |
| CUser | |
| NModels | |
| CAuthorisationModel | |
| CCategoryModel | |
| CImageModel | |
| CMotherModel | |
| CProjectModel | |
| CUserModel |
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
+
++Public Member Functions | |
| admin () | |
+Additional Inherited Members | |
| Protected Member Functions inherited from MotherCtrl | |
| _display ($strView, bool $boolDisplay=true) | |
| Protected Attributes inherited from MotherCtrl | |
| +array | $_arrData = array() |
Le controller de la partie accessible uniquement par l'admin
+| admin | +( | +) | ++ |
Page Admin
+ +|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
+
++Public Member Functions | |
| error_404 () | |
| error_403 () | |
+Additional Inherited Members | |
| Protected Member Functions inherited from MotherCtrl | |
| _display ($strView, bool $boolDisplay=true) | |
| Protected Attributes inherited from MotherCtrl | |
| +array | $_arrData = array() |
Le contrôleur des erreurs
+| error_403 | +( | +) | ++ |
Page erreur 403
+ +| error_404 | +( | +) | ++ |
Page erreur 404
+ +|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
+
++Protected Member Functions | |
| _display ($strView, bool $boolDisplay=true) | |
+Protected Attributes | |
| +array | $_arrData = array() |
Controller Mère qui permet de gèrer l'affichage des pages
+
+
|
+ +protected | +
Méthode d'affichage des pages
| string | $strView | Le fichier a afficher |
| bool | $boolDisplay | Booléen pour afficher web ou mail |
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
+
++Public Member Functions | |
| help () | |
| mentions () | |
| about () | |
+Additional Inherited Members | |
| Protected Member Functions inherited from MotherCtrl | |
| _display ($strView, bool $boolDisplay=true) | |
| Protected Attributes inherited from MotherCtrl | |
| +array | $_arrData = array() |
Le controller des pages annexes
+| about | +( | +) | ++ |
Page à propos
+ +| help | +( | +) | ++ |
Page aide utilisateur
+ +| mentions | +( | +) | ++ |
Page mentions légales
+ +|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
+
++Public Member Functions | |
| home () | |
| search () | |
| addedit_project () | |
| display () | |
| sendEmail () | |
| accept () | |
| refuse () | |
| delete () | |
| change_image_status () | |
| delete_image () | |
+Additional Inherited Members | |
| Protected Member Functions inherited from MotherCtrl | |
| _display ($strView, bool $boolDisplay=true) | |
| Protected Attributes inherited from MotherCtrl | |
| +array | $_arrData = array() |
Le controler des Project
+| accept | +( | +) | ++ |
Fonction de modération de projet = accepté
+ +| addedit_project | +( | +) | ++ |
Fonction d'affichage de la page projet
+ +| change_image_status | +( | +) | ++ |
Fonction de changement de statut (Approuvé, Refusé, En attente)
+ +| delete | +( | +) | ++ |
Fonction de suppression de projet
+ +| delete_image | +( | +) | ++ |
Fonction de validation de l'image de projet
+ +| display | +( | +) | ++ |
Fonction d'affichage d'un projet
+ +| home | +( | +) | ++ |
Fonction d'affichage de la page d'acceuil
+ +| refuse | +( | +) | ++ |
Fonction de modération de projet = refusé
+ +| search | +( | +) | ++ |
Fonction d'affichage de la barre de recherche
+ +| sendEmail | +( | +) | ++ |
Fonction d'envoi d'email
+ +|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
+
++Public Member Functions | |
| login () | |
| logout () | |
| signup () | |
| user () | |
| edit () | |
+Additional Inherited Members | |
| Protected Member Functions inherited from MotherCtrl | |
| _display ($strView, bool $boolDisplay=true) | |
| Protected Attributes inherited from MotherCtrl | |
| +array | $_arrData = array() |
Le controller de la page d'aide utilisateur
+| edit | +( | +) | ++ |
le controlleur de la modification d'un user
+ +| login | +( | +) | ++ |
Page Login
+ +| logout | +( | +) | ++ |
Fonction pour ce déconnecter
+ +| signup | +( | +) | ++ |
Fonction d'inscription d'un utilisateur Effectue les validations du formulaire, vérifie l'unicité du mail et du pseudo, puis insère l'utilisateur en base de données
| user | +( | +) | ++ |
le controlleur affichage de la page user
+ +|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
+
++Public Member Functions | |
| __construct () | |
| getId () | |
| setId (int $id) | |
| getName () | |
| setName (string $name) | |
| Public Member Functions inherited from Mother | |
| + | hydrate (array $arrData) |
+Additional Inherited Members | |
| Protected Member Functions inherited from Mother | |
| + | nettoyer (string $strText) |
| Protected Attributes inherited from Mother | |
| +string | $_prefix = '' |
Classe d'un objet Authorisation
+| __construct | +( | +) | ++ |
le constructeur de la table authorisation
+ +| getId | +( | +) | ++ |
Récuperation de l'id du statut d'un utilisateur
| getName | +( | +) | ++ |
Récuperation de l'intitulé du statut d'un utilisateur
| setId | +( | +int | $id | ) | ++ |
Mise à jour de l'id du statut d'un utilisateur
| int | le nouvelle id du statut |
| setName | +( | +string | $name | ) | ++ |
Mise à jour de l'intitulé du statut d'un utilisateur
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
+
++Public Member Functions | |
| __construct () | |
| getId () | |
| setId ($id) | |
| getName () | |
| setName ($name) | |
| getParent () | |
| setParent ($parent) | |
| Public Member Functions inherited from Mother | |
| + | hydrate (array $arrData) |
+Protected Attributes | |
| +string | $_name = '' |
| +int | $_parent = null |
| Protected Attributes inherited from Mother | |
| +string | $_prefix = '' |
+Additional Inherited Members | |
| Protected Member Functions inherited from Mother | |
| + | nettoyer (string $strText) |
Classe d'un objet Category
+| __construct | +( | +) | ++ |
le constructeur de la table category
+ +| getId | +( | +) | ++ |
Récuperation de l'id de la catégorie
| getName | +( | +) | ++ |
Récuperation du nom de la catégorie
| getParent | +( | +) | ++ |
Récuperation du nom du parent de la catégorie
| setId | +( | +$id | ) | ++ |
Mise à jour de l'id de la catégorie
| int | le nouvelle id |
| setName | +( | +$name | ) | ++ |
Mise à jour du nom de la catégorie
| string | le nouveau nom de la catégorie |
| setParent | +( | +$parent | ) | ++ |
Mise à jour du nom du parent de la catégorie
| int | le nouveau nom de la catégorie |
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
+
++Public Member Functions | |
| __construct () | |
| getId () | |
| setId ($id) | |
| getName () | |
| setName ($name) | |
| getAlt () | |
| setAlt ($alt) | |
| getStatus () | |
| setStatus ($status) | |
| Public Member Functions inherited from Mother | |
| + | hydrate (array $arrData) |
+Additional Inherited Members | |
| Protected Member Functions inherited from Mother | |
| + | nettoyer (string $strText) |
| Protected Attributes inherited from Mother | |
| +string | $_prefix = '' |
Classe d'un objet Projet
+| __construct | +( | +) | ++ |
le constructeur de la table image
+ +| getAlt | +( | +) | ++ |
Récuperation de l'alt
| getId | +( | +) | ++ |
Récuperation de l'id de l'image
| getName | +( | +) | ++ |
Récuperation du nom de l'image
| getStatus | +( | +) | ++ |
Récuperation du statut de la photo
| setAlt | +( | +$alt | ) | ++ |
Mise à jour de l'alt
| string | le nouveau contenu de l'alt |
| setId | +( | +$id | ) | ++ |
Mise à jour de l'id de l'image
| int | le nouvelle id |
| setName | +( | +$name | ) | ++ |
Mise à jour du nom de l'image
| string | le nouveau nom de l'image |
| setStatus | +( | +$status | ) | ++ |
Mise à jour du statut de la photo
| string | le nouveau statut de la photo |
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
+
++Public Member Functions | |
| + | hydrate (array $arrData) |
+Protected Member Functions | |
| + | nettoyer (string $strText) |
+Protected Attributes | |
| +string | $_prefix = '' |
Classe d'un Mere de tout objet
+|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
+
++Public Member Functions | |
| __construct () | |
| getId () | |
| setId (int $id) | |
| getTitle () | |
| setTitle ($title) | |
| getDescription () | |
| setDescription ($description) | |
| getThumbnail () | |
| setThumbnail ($thumbnail) | |
| getContent () | |
| setContent ($content) | |
| getCreation_date (string $strFormat="fr_FR") | |
| setCreation_date ($creation_date) | |
| getStatus () | |
| setStatus ($status) | |
| getUser_id () | |
| setUser_id ($user) | |
| getCategory () | |
| setCategory ($category) | |
| getCreatorName () | |
| setCreatorName ($creatorname) | |
| getUser_image () | |
| setUser_image ($user_image) | |
| getProject_deleted_at () | |
| setProject_deleted_at ($project_deleted_at) | |
| Public Member Functions inherited from Mother | |
| + | hydrate (array $arrData) |
+Additional Inherited Members | |
| Protected Member Functions inherited from Mother | |
| + | nettoyer (string $strText) |
| Protected Attributes inherited from Mother | |
| +string | $_prefix = '' |
Classe d'un objet Projet
+| __construct | +( | +) | ++ |
le constructeur de la table project
+ +| getCategory | +( | +) | ++ |
Récupération de la catégorie
| getContent | +( | +) | ++ |
Récuperation du contenu
| getCreation_date | +( | +string | $strFormat = "fr_FR" | ) | ++ |
Récupération de la date de création
| string | lang de formatage de la date (par défaut = "fr_FR") |
| getCreatorName | +( | +) | ++ |
Récupération du nom du créateur
| getDescription | +( | +) | ++ |
Récuperation de la description
| getId | +( | +) | ++ |
Récuperation de l'id du projet
| getProject_deleted_at | +( | +) | ++ |
Récupération de la date du projet supprimer
| getStatus | +( | +) | ++ |
Récupération du statut
| getThumbnail | +( | +) | ++ |
Récuperation de l'image
| getTitle | +( | +) | ++ |
Récuperation du titre
| getUser_id | +( | +) | ++ |
Récupération de l'utilisateur
| getUser_image | +( | +) | ++ |
Récupération du chemin photo profil
| setCategory | +( | +$category | ) | ++ |
Mise à jour de la catégorie
| int | id de la catégorie |
| setContent | +( | +$content | ) | ++ |
Mise à jour du contenu
| string | le nouveau contenu |
| setCreation_date | +( | +$creation_date | ) | ++ |
Mise à jour de la date de création
| string | la nouvelle date de création |
| setCreatorName | +( | +$creatorname | ) | ++ |
Mise à jour du nom du créateur
| string | le nom du créateur |
| setDescription | +( | +$description | ) | ++ |
Mise à jour de la description
| string | la nouvelle description |
| setId | +( | +int | $id | ) | ++ |
Mise à jour de l'id du projet
| int | le nouvelle id |
| setProject_deleted_at | +( | +$project_deleted_at | ) | ++ |
Mise à jour de la date de suppression de projet
| string | date du projet |
| setStatus | +( | +$status | ) | ++ |
Mise à jour du statut
| string | le nouveau statut |
| setThumbnail | +( | +$thumbnail | ) | ++ |
Mise à jour de l'image
| string | chemin vers nouvelle image |
| setTitle | +( | +$title | ) | ++ |
Mise à jour du titre
| string | le nouveau titre |
| setUser_id | +( | +$user | ) | ++ |
Mise à jour de l'utilisateur
| int | id de l'utilisateur |
| setUser_image | +( | +$user_image | ) | ++ |
Mise à jour du chemin photo profil
| string | chemin photo profil |
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
+
++Public Member Functions | |
| __construct () | |
| getId () | |
| setId (int $id) | |
| getName () | |
| setName (string $name) | |
| getFirstname () | |
| setFirstname (string $firstname) | |
| getPseudo () | |
| setPseudo (string $pseudo) | |
| getImage () | |
| setImage (?string $image) | |
| getMail () | |
| setMail (string $mail) | |
| getPwd () | |
| getPwdHash () | |
| setPwd (string $pwd) | |
| getPhone () | |
| setPhone (string $phone) | |
| getWork () | |
| setWork (string $work) | |
| getBirth () | |
| setBirth (?string $birth) | |
| getLocation () | |
| setLocation (string $location) | |
| getDescription () | |
| setDescription (string $description) | |
| getAccountCreation () | |
| setAccountCreation (string $account_creation) | |
| getStatus () | |
| setStatus (int $status) | |
| Public Member Functions inherited from Mother | |
| + | hydrate (array $arrData) |
+Additional Inherited Members | |
| Protected Member Functions inherited from Mother | |
| + | nettoyer (string $strText) |
| Protected Attributes inherited from Mother | |
| +string | $_prefix = '' |
Classe d'un objet User
+| __construct | +( | +) | ++ |
le constructeur de la table user
+ +| getAccountCreation | +( | +) | ++ |
Récuperation de la date de création d'un utilisateur
| getBirth | +( | +) | ++ |
Récuperation de la date de naissance d'un utilisateur
| getDescription | +( | +) | ++ |
Récuperation de la description d'un utilisateur
| getFirstname | +( | +) | ++ |
Récuperation du prénom d'un utilisateur
| getId | +( | +) | ++ |
Récuperation de l'id d'un utilisateur
| getImage | +( | +) | ++ |
Récuperation du nom de l'image d'un utilisateur
| getLocation | +( | +) | ++ |
Récuperation de la localisation d'un utilisateur
| getMail | +( | +) | ++ |
Récuperation de l'email d'un utilisateur
| getName | +( | +) | ++ |
Récuperation du nom d'un utilisateur
| getPhone | +( | +) | ++ |
Récuperation du numéro de téléphone d'un utilisateur
| getPseudo | +( | +) | ++ |
Récuperation du pseudo unique d'un utilisateur
| getPwd | +( | +) | ++ |
Récuperation du mot de passe d'un utilisateur
| getPwdHash | +( | +) | ++ |
Récuperation du mot de passe haché d'un utilisateur
| getStatus | +( | +) | ++ |
Récuperation de l'id du statut d'un utilisateur
| getWork | +( | +) | ++ |
Récuperation de la profession d'un utilisateur
| setAccountCreation | +( | +string | $account_creation | ) | ++ |
Mise à jour de la date de création d'un utilisateur
| setBirth | +( | +?string | $birth | ) | ++ |
Mise à jour de la date de naissance d'un utilisateur
| setDescription | +( | +string | $description | ) | ++ |
Mise à jour de la description d'un utilisateur
| setFirstname | +( | +string | $firstname | ) | ++ |
Mise à jour du prénom d'un utilisateur
| setId | +( | +int | $id | ) | ++ |
Mise à jour de l'id d'un utilisateur
| int | le nouvelle id de l'utilisateur |
| setImage | +( | +?string | $image | ) | ++ |
Mise à jour du nom de l'image d'un utilisateur
| setLocation | +( | +string | $location | ) | ++ |
Mise à jour de la localisation d'un utilisateur
| setMail | +( | +string | ) | ++ |
Mise à jour de l'email d'un utilisateur
| setName | +( | +string | $name | ) | ++ |
Mise à jour du nom d'un utilisateur
| setPhone | +( | +string | $phone | ) | ++ |
Mise à jour du numéro de téléphone d'un utilisateur
| setPseudo | +( | +string | $pseudo | ) | ++ |
Mise à jour du pseudo unique d'un utilisateur
| setPwd | +( | +string | $pwd | ) | ++ |
Mise à jour du mot de passe d'un utilisateur
| setStatus | +( | +int | $status | ) | ++ |
Mise à jour de l'id du statut d'un utilisateur
| setWork | +( | +string | $work | ) | ++ |
Mise à jour de la profession d'un utilisateur
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
+
++Public Member Functions | |
| findAllAuthorisation () | |
+Additional Inherited Members | |
| Protected Attributes inherited from MotherModel | |
| + | $_db |
Traitement des requêtes pour le status de l'utilisateur
+| __construct | +( | +) | ++ |
Reimplemented from MotherModel.
+ +| findAllAuthorisation | +( | +) | ++ |
fonction de récupération des infos d'authorisation
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
+
++Public Member Functions | |
| findAllCategory (int $intLimit=0) | |
| insertCategory (object $objCategory) | |
| deleteCategory (object $objCategory) | |
| editCategory (object $objCategory) | |
+Additional Inherited Members | |
| Protected Attributes inherited from MotherModel | |
| + | $_db |
Traitement des requêtes pour les catégories
+| deleteCategory | +( | +object | $objCategory | ) | ++ |
fonction de suppression d'une catégorie dans la bdd
| object | $objCategory | l'objet catégorie |
| editCategory | +( | +object | $objCategory | ) | ++ |
fonction de modification d'une catégorie dans la bdd
| object | $objCategory | l'objet catégorie |
| findAllCategory | +( | +int | $intLimit = 0 | ) | ++ |
Fonction de récupération des catégories
| int | $intLimit |
| insertCategory | +( | +object | $objCategory | ) | ++ |
fonction d'insertion d'une nouvelle catégorie dans la bdd
| object | $objCategory | l'objet catégorie |
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
+
++Public Member Functions | |
| findAllImage (int $intLimit=0) | |
+Additional Inherited Members | |
| Protected Attributes inherited from MotherModel | |
| + | $_db |
Traitement de la requête pour les images
+| findAllImage | +( | +int | $intLimit = 0 | ) | ++ |
Fonction de récupération des images
| int | $intLimit |
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
+
++Public Member Functions | |
| findAll (int $intLimit=0, string $strKeywords='', int $intAuthor=0, int $intPeriod=0, string $strDate='', string $strStartDate='', string $strEndDate='', int $intCategory=0, bool $boolOlderThan6Months=false) | |
| insert (object $objProject) | |
| findOne (int $intId) | |
| accept (int $id) | |
| refuse (int $id) | |
| delete_soft_project (int $intId) | |
| updateProject (object $objProject) | |
| getImagesByProjectId (int $projectId) | |
| deleteImage (int $id) | |
| updateImageStatus (int $id, string $status) | |
| findImage (int $id) | |
| addImageInProject (string $fileName, int $projectId, string $alt="Image projet") | |
+Additional Inherited Members | |
| Protected Attributes inherited from MotherModel | |
| + | $_db |
Traitement des requêtes pour les projets
+| accept | +( | +int | $id | ) | ++ |
Fonction de changement de status (accepter) d'un projet en BDD
| int | $id | l'id du projet |
| addImageInProject | +( | +string | $fileName, | +
| + | + | int | $projectId, | +
| + | + | string | $alt = "Image projet" ) | +
Ajoute une image liée à un projet dans la table 'image'
| string | $fileName | Nom du fichier image |
| int | $projectId | ID du projet parent |
| string | $alt | Texte alternatif |
| delete_soft_project | +( | +int | $intId | ) | ++ |
Fonction de suppression d'un projet en BDD
| int | $id | l'id du projet |
| deleteImage | +( | +int | $id | ) | ++ |
Fonction de récupération d'image d'un projet en BDD
| int | $id | L'Id de l'image choisit |
| findAll | +( | +int | $intLimit = 0, | +
| + | + | string | $strKeywords = '', | +
| + | + | int | $intAuthor = 0, | +
| + | + | int | $intPeriod = 0, | +
| + | + | string | $strDate = '', | +
| + | + | string | $strStartDate = '', | +
| + | + | string | $strEndDate = '', | +
| + | + | int | $intCategory = 0, | +
| + | + | bool | $boolOlderThan6Months = false ) | +
Fonction de recherche des projets
| type | string, int et bool |
| findImage | +( | +int | $id | ) | ++ |
Fonction de récupération d'image d'un projet en BDD
| int | $id | L'Id de l'image choisit |
| findOne | +( | +int | $intId | ) | ++ |
Fonction de recherche d'un seul projet
| int | $intId |
| getImagesByProjectId | +( | +int | $projectId | ) | ++ |
Fonction de récupération d'image d'un projet en BDD
| int | $objProject | L'Id du projet choisit |
| insert | +( | +object | $objProject | ) | ++ |
Fonction d'insertion d'un nouveau projet dans la bdd
| object | $objProject | l'objet projet |
| refuse | +( | +int | $id | ) | ++ |
Fonction de changement de status (refusé) d'un projet en BDD
| int | $id | l'id du projet |
| updateImageStatus | +( | +int | $id, | +
| + | + | string | $status ) | +
Fonction de modifications de status de l'image d'un projet en BDD
| int | $id | L'Id de l'image choisit, string $status le status choisit |
| updateProject | +( | +object | $objProject | ) | ++ |
Fonction de mise à jour d'un projet en BDD
| object | $objProject | L'objet utilisateur |
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
+
++Public Member Functions | |
| findAllUsers () | |
| verifUser (string $strMail, string $strPwd) | |
| insert (object $objUser) | |
| remember (int $userId, string $token) | |
| getTokenUser (string $hash) | |
| deleteToken (string $hash) | |
| update (object $objUser) | |
| mailExists (string $mail) | |
| editStatus (object $objUser) | |
| delete_soft (int $intId) | |
| findUserById (int $intId) | |
| findUserByPseudo (string $strPseudo) | |
| pseudoExists (string $pseudo) | |
+Additional Inherited Members | |
| Protected Attributes inherited from MotherModel | |
| + | $_db |
Traitement des requêtes pour les utilisateurs
+| __construct | +( | +) | ++ |
Reimplemented from MotherModel.
+ +| delete_soft | +( | +int | $intId | ) | ++ |
Fonction permettant de supprimer un utilisateur avec une date de suppression
| int | $intId | L'identifiant de l'utilisateur |
| deleteToken | +( | +string | $hash | ) | ++ |
Méthode pour supprimer le token lors de la déconnexion
| string | $hash | Token hashé unique lié à l'utilisateur |
| editStatus | +( | +object | $objUser | ) | ++ |
Fonction de changement de status d'un utilisateur
| object | $objUser | L'objet utilisateur |
| findAllUsers | +( | +) | ++ |
Fonction de recherche des utilisateurs et leur niveau d'autorisation
| findUserById | +( | +int | $intId | ) | ++ |
Récupère les informations d'un utilisateur par son ID
| int | $intId | L'identifiant de l'utilisateur |
| findUserByPseudo | +( | +string | $strPseudo | ) | ++ |
Récupère les informations d'un utilisateur par son ID
| string | $strPseudo | Pseudo de l'utilisateur |
| getTokenUser | +( | +string | $hash | ) | ++ |
Méthode pour récupperer l'utilisateur par rapport au cookie enregistrer
| string | $hash | Token hashé unique lié à l'utilisateur |
| insert | +( | +object | $objUser | ) | ++ |
Fonction d'insertion d'un utilisateur en BDD
| object | $objUser | L'objet utilisateur |
| mailExists | +( | +string | ) | ++ |
Fonction de vérification de mail
| string |
| pseudoExists | +( | +string | $pseudo | ) | ++ |
Verifie sur le pseudo entré n'est pas déjà utilisé
| string | $pseudo | Pseudo a verifié |
| remember | +( | +int | $userId, | +
| + | + | string | $token ) | +
Méthode pour sauvegarder l'utilisateur lorsqu'il veut être souvenue
| int | $userId | l'id de l'utilisateur a se rappeler |
| string | $token | Token hashé unique lié à l'utilisateur à se rappeler |
| update | +( | +object | $objUser | ) | ++ |
Méthode pour mettre a jour l'utilisateur
| object | $objUser | L'objet user a mettre à jour + |
| verifUser | +( | +string | $strMail, | +
| + | + | string | $strPwd ) | +
Fonction de vérification des utilisateurs
| string | $strMail | |
| string | $strPwd |
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
+Directories | |
| templates_c | |
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
+Directories | |
| controllers | |
| entities | |
| models | |
A platform for sharing portfolios and projects, designed as a mix between Behance and LinkedIn. Folliow focuses on highlighting real projects while making it easy to connect with other users.
+This project was developed as part of the DWWM (Développeur Web et Web Mobile) training.
+Client: HTML, CSS, JavaScript
+ Server: PHP (MVC architecture)
+ Database: MySQL
+ Web Server: Apache
Clone the project
+Go to the project directory
+Import the database
+Configure database access
+Run the project
+This project is for educational purposes.
+|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
+Directories | |
| controllers | |
| entities | |
| models | |
A platform for sharing portfolios and projects, designed as a mix between Behance and LinkedIn. Folliow focuses on highlighting real projects while making it easy to connect with other users.
+This project was developed as part of the DWWM (Développeur Web et Web Mobile) training.
+Client: HTML, CSS, JavaScript
+ Server: PHP (MVC architecture)
+ Database: MySQL
+ Web Server: Apache
Clone the project
+Go to the project directory
+Import the database
+Configure database access
+Run the project
+This project is for educational purposes.
+|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
+Directories | |
| templates_c | |
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
+Directories | |
| projet_php | |
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+
| CMother | |
| CAuthorisation | |
| CCategory | |
| CImage | |
| CProject | |
| CUser | |
| CMotherCtrl | |
| CAdminCtrl | |
| CErrorCtrl | |
| CPageCtrl | |
| CProjectCtrl | |
| CUserCtrl | |
| CMotherModel | |
| CAuthorisationModel | |
| CCategoryModel | |
| CImageModel | |
| CProjectModel | |
| CUserModel |
|
+ Folliow
+
+ Un projet de site web réaliser en PHP
+ |
+