diff --git a/.env b/.env new file mode 100644 index 0000000..312e8f9 --- /dev/null +++ b/.env @@ -0,0 +1,10 @@ +# 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 1b4da35..183434a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ /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 13d28fb..142ea7f 100644 --- a/assests/css/style.css +++ b/assests/css/style.css @@ -10,12 +10,7 @@ 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; @@ -34,13 +29,7 @@ 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; } @@ -128,51 +117,3 @@ 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 670082b..88896dc 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 )){ - $error = new \Controllers\ErrorCtrl(); - return $error->error_403(); + header("Location:index.php?ctrl=error&action=error_403"); + exit; } $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: '.$_ENV['BASE_URL'].'/admin/admin'); + header('Location: index.php?ctrl=admin&action=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: '.$_ENV['BASE_URL'].'/admin/admin'); + header('Location: index.php?ctrl=admin&action=admin'); exit; } @@ -73,7 +73,7 @@ $objUserModel->delete_soft($intUserId); $_SESSION['success'] = "L'utilisateur a été supprimé."; } - header('Location: '.$_ENV['BASE_URL'].'/admin/admin'); + header("Location: index.php?ctrl=admin&action=admin"); exit; } } diff --git a/controllers/ErrorCtrl.php b/controllers/ErrorCtrl.php index 9a5e0ff..2e69e9e 100644 --- a/controllers/ErrorCtrl.php +++ b/controllers/ErrorCtrl.php @@ -11,18 +11,14 @@ * 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 49ccbdf..bea90b2 100644 --- a/controllers/MotherCtrl.php +++ b/controllers/MotherCtrl.php @@ -23,7 +23,6 @@ $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 fc85dd1..6cb408c 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'])){ - $error = new \Controllers\ErrorCtrl(); - return $error->error_403(); + header("Location:index.php?ctrl=error&action=error_403"); + exit; } $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']){ - $error = new \Controllers\ErrorCtrl(); - return $error->error_403(); + header("Location:index.php?ctrl=error&action=error_403"); + exit; } $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 = 1280; $intDestHeight = 720; + $intDestWidth = 200; $intDestHeight = 250; $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:'.$_ENV['BASE_URL']); + header("Location:index.php"); 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: '.$_ENV['BASE_URL'].'/project/home'); + header("Location: index.php?ctrl=project&action=home"); exit; } } else { - header('Location: '.$_ENV['BASE_URL'].'/project/home'); + header("Location: index.php?ctrl=project&action=home"); exit; } } @@ -395,7 +395,7 @@ $arrProject = $objProjectModel->findOne($projectId); if (!$arrProject) { - header('Location: '.$_ENV['BASE_URL'].'/project/home'); + header("Location: index.php?ctrl=project&action=home"); exit; } @@ -429,8 +429,8 @@ $objMail->Subject = "Projet : " . $objProject->getTitle(); - $url = $_ENV['BASE_URL'].'/project/display/'.$projectId; - + $url = "https://php.boulayoune.com/index.php?ctrl=project&action=display&id=" . $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: '.$_ENV['BASE_URL'].'/project/display/'.$projectId.'?mail=ok'); + header("Location: index.php?ctrl=project&action=display&id=".$projectId."&mail=ok"); } else { - header('Location: '.$_ENV['BASE_URL'].'/project/display/'.$projectId.'?mail=fail'); + header("Location: index.php?ctrl=project&action=display&id=".$projectId."&mail=fail"); } exit; } - header('Location: '.$_ENV['BASE_URL'].'/project/home'); + header("Location: index.php?ctrl=project&action=home"); exit; } @@ -459,7 +459,7 @@ $objProjectModel = new ProjectModel; $objProjectModel->accept($intId); - header('Location: '.$_ENV['BASE_URL']); + header("Location: index.php"); exit; } @@ -473,7 +473,7 @@ $objProjectModel = new ProjectModel; $objProjectModel->refuse($intId); - header('Location: '.$_ENV['BASE_URL']); + header("Location: index.php"); exit; } @@ -483,7 +483,7 @@ public function delete(){ if (!isset($_SESSION['user']) || $_SESSION['user']['user_status'] != 2) { - header('Location: '.$_ENV['BASE_URL']); + header("Location: index.php"); exit; } @@ -498,7 +498,7 @@ } } - header('Location: '.$_ENV['BASE_URL']); + header("Location: index.php"); 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 7ecb8a9..c1f288a 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:".$_ENV['BASE_URL']); + header("Location:index.php"); exit; } } @@ -75,7 +75,7 @@ class UserCtrl extends MotherCtrl { $_SESSION['success'] = "Vous êtes bien déconnecté"; - header("Location:".$_ENV['BASE_URL']); + header("Location:index.php"); exit; } @@ -143,7 +143,7 @@ class UserCtrl extends MotherCtrl { if ($boolInsert === true) { $_SESSION['success'] = "Compte créé avec succès"; - header("Location:".$_ENV['BASE_URL']."/user/login"); + header("Location:index.php?ctrl=user&action=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: ".$_ENV['BASE_URL']); + header("Location: index.php"); exit; } @@ -195,7 +195,7 @@ class UserCtrl extends MotherCtrl { */ public function edit(){ if(!isset($_SESSION['user'])){ - header("Location: ".$_ENV['BASE_URL']); + header("Location: index.php"); exit; } $objUserModel = new UserModel; @@ -243,7 +243,6 @@ class UserCtrl extends MotherCtrl { } } } - if (count($arrError) == 0 && isset($strImageName)) { $strDest = $_ENV['IMG_USER_PATH'] . $strImageName; @@ -280,25 +279,17 @@ 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) && $strOldImg !== 'images.jpg' && isset($strImageName)) { - $strOldFile = $_ENV['IMG_USER_PATH'] . $strOldImg; - if (file_exists($strOldFile)) unlink($strOldFile); + if (isset($strOldImg) && !empty($strOldImg) && 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:'.$_ENV['BASE_URL'].'/user/user/'.$objUser->getPseudo()); + header("Location:?ctrl=user&action=user&pseudo=".$objUser->getPseudo()); exit; } else { $arrError['global'] = "Erreur lors de l'update"; diff --git a/entities/Project.php b/entities/Project.php index ca5c941..5071b57 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 getDeleted_at(){ + public function getProject_deleted_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 setDeleted_at($project_deleted_at){ + public function setProject_deleted_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 f156205..1eee5be 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 = str_replace(" ","_",$pseudo); + $this->_pseudo = $pseudo; } /** diff --git a/env b/env index 611d244..1ba2754 100644 --- a/env +++ b/env @@ -1,7 +1,7 @@ # config BDD DB_CONNECTION=mysql -DB_HOSTNAME=localhost +DB_HOSTNAME=boulayoune.com DB_DATABASE=projet_folliow DB_USERNAME= DB_PASSWORD= diff --git a/html/annotated.html b/html/annotated.html index bcd2e96..d1626e1 100644 --- a/html/annotated.html +++ b/html/annotated.html @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
diff --git a/html/class_controllers_1_1_admin_ctrl.html b/html/class_controllers_1_1_admin_ctrl.html index 073a5da..bb970ae 100644 --- a/html/class_controllers_1_1_admin_ctrl.html +++ b/html/class_controllers_1_1_admin_ctrl.html @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
@@ -136,7 +135,7 @@ array $_arrData = array()
The documentation for this class was generated from the following file: diff --git a/html/class_controllers_1_1_error_ctrl.html b/html/class_controllers_1_1_error_ctrl.html index 7d20ce0..3c0faae 100644 --- a/html/class_controllers_1_1_error_ctrl.html +++ b/html/class_controllers_1_1_error_ctrl.html @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
@@ -155,7 +154,7 @@ array $_arrData = array()
The documentation for this class was generated from the following file: diff --git a/html/class_controllers_1_1_mother_ctrl.html b/html/class_controllers_1_1_mother_ctrl.html index 263c2ee..1e358db 100644 --- a/html/class_controllers_1_1_mother_ctrl.html +++ b/html/class_controllers_1_1_mother_ctrl.html @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
@@ -156,7 +155,7 @@ array $_arrData = array()
The documentation for this class was generated from the following file: diff --git a/html/class_controllers_1_1_page_ctrl.html b/html/class_controllers_1_1_page_ctrl.html index 3105772..53078db 100644 --- a/html/class_controllers_1_1_page_ctrl.html +++ b/html/class_controllers_1_1_page_ctrl.html @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
@@ -174,7 +173,7 @@ array $_arrData = array()
The documentation for this class was generated from the following file: diff --git a/html/class_controllers_1_1_project_ctrl.html b/html/class_controllers_1_1_project_ctrl.html index c056977..2f7fae8 100644 --- a/html/class_controllers_1_1_project_ctrl.html +++ b/html/class_controllers_1_1_project_ctrl.html @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
@@ -307,7 +306,7 @@ array $_arrData = array()
The documentation for this class was generated from the following file: diff --git a/html/class_controllers_1_1_user_ctrl.html b/html/class_controllers_1_1_user_ctrl.html index 705ea24..5dd436b 100644 --- a/html/class_controllers_1_1_user_ctrl.html +++ b/html/class_controllers_1_1_user_ctrl.html @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
@@ -212,7 +211,7 @@ array $_arrData = array()
The documentation for this class was generated from the following file: diff --git a/html/class_entities_1_1_authorisation.html b/html/class_entities_1_1_authorisation.html index 5113dfd..c13f812 100644 --- a/html/class_entities_1_1_authorisation.html +++ b/html/class_entities_1_1_authorisation.html @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
@@ -222,7 +221,7 @@ string $_prefix = ''
The documentation for this class was generated from the following file: diff --git a/html/class_entities_1_1_category.html b/html/class_entities_1_1_category.html index 4dea3ca..dad0cc4 100644 --- a/html/class_entities_1_1_category.html +++ b/html/class_entities_1_1_category.html @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
@@ -277,7 +276,7 @@ Additional Inherited Members
The documentation for this class was generated from the following file: diff --git a/html/class_entities_1_1_image.html b/html/class_entities_1_1_image.html index 0814489..012ba50 100644 --- a/html/class_entities_1_1_image.html +++ b/html/class_entities_1_1_image.html @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
@@ -313,7 +312,7 @@ string $_prefix = ''
The documentation for this class was generated from the following file: diff --git a/html/class_entities_1_1_mother.html b/html/class_entities_1_1_mother.html index 91a1fd5..cb099d7 100644 --- a/html/class_entities_1_1_mother.html +++ b/html/class_entities_1_1_mother.html @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
@@ -124,7 +123,7 @@ string $_prefix = ''

Detailed Description

Classe d'un Mere de tout objet

Author
Yass & Laura

The documentation for this class was generated from the following file: diff --git a/html/class_entities_1_1_project.html b/html/class_entities_1_1_project.html index aef01ff..42491a4 100644 --- a/html/class_entities_1_1_project.html +++ b/html/class_entities_1_1_project.html @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
@@ -663,7 +662,7 @@ string $_prefix = ''
The documentation for this class was generated from the following file: diff --git a/html/class_entities_1_1_user.html b/html/class_entities_1_1_user.html index 03c57eb..e97f2f8 100644 --- a/html/class_entities_1_1_user.html +++ b/html/class_entities_1_1_user.html @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
@@ -697,7 +696,7 @@ string $_prefix = ''
The documentation for this class was generated from the following file: diff --git a/html/class_models_1_1_authorisation_model.html b/html/class_models_1_1_authorisation_model.html index 4ff6438..7b9ad6b 100644 --- a/html/class_models_1_1_authorisation_model.html +++ b/html/class_models_1_1_authorisation_model.html @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
@@ -154,7 +153,7 @@ Additional Inherited Members
The documentation for this class was generated from the following file: diff --git a/html/class_models_1_1_category_model.html b/html/class_models_1_1_category_model.html index 5d486dd..58d82e8 100644 --- a/html/class_models_1_1_category_model.html +++ b/html/class_models_1_1_category_model.html @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
@@ -215,7 +214,7 @@ Additional Inherited Members
The documentation for this class was generated from the following file: diff --git a/html/class_models_1_1_image_model.html b/html/class_models_1_1_image_model.html index 5da3c94..914f86b 100644 --- a/html/class_models_1_1_image_model.html +++ b/html/class_models_1_1_image_model.html @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
@@ -140,7 +139,7 @@ Additional Inherited Members
The documentation for this class was generated from the following file: diff --git a/html/class_models_1_1_mother_model.html b/html/class_models_1_1_mother_model.html index 1ee0d37..1c8ee86 100644 --- a/html/class_models_1_1_mother_model.html +++ b/html/class_models_1_1_mother_model.html @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
@@ -112,7 +111,7 @@ Protected Attributes  $_db
The documentation for this class was generated from the following file: diff --git a/html/class_models_1_1_project_model.html b/html/class_models_1_1_project_model.html index efaf2a4..7ab2a7e 100644 --- a/html/class_models_1_1_project_model.html +++ b/html/class_models_1_1_project_model.html @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
@@ -340,7 +339,7 @@ Additional Inherited Members -
Returns
array|bool
+
Returns
array
@@ -469,7 +468,7 @@ Additional Inherited Members
The documentation for this class was generated from the following file: diff --git a/html/class_models_1_1_user_model.html b/html/class_models_1_1_user_model.html index 5b6f02c..301a45d 100644 --- a/html/class_models_1_1_user_model.html +++ b/html/class_models_1_1_user_model.html @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
@@ -377,7 +376,7 @@ Additional Inherited Members -
Returns
bool Le pseudo existe ou pas
+
Returns
array Tableau associatif (ou false si pas trouvé)
@@ -465,7 +464,7 @@ Additional Inherited Members
The documentation for this class was generated from the following file: diff --git a/html/classes.html b/html/classes.html index 0f8ca6d..445742a 100644 --- a/html/classes.html +++ b/html/classes.html @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
diff --git a/html/dir_d522931ffa1371640980b621734a4381.html b/html/dir_1ae4179d5e953611aae20c997279e02c.html similarity index 92% rename from html/dir_d522931ffa1371640980b621734a4381.html rename to html/dir_1ae4179d5e953611aae20c997279e02c.html index b86beaf..6327316 100644 --- a/html/dir_d522931ffa1371640980b621734a4381.html +++ b/html/dir_1ae4179d5e953611aae20c997279e02c.html @@ -5,7 +5,7 @@ -Folliow: C:/Users Directory Reference +Folliow: models Directory Reference @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
@@ -63,7 +62,7 @@ $(function() {
@@ -89,7 +88,7 @@ $(function(){initNavTree('dir_d522931ffa1371640980b621734a4381.html','',''); });
-
Users Directory Reference
+
models Directory Reference
@@ -105,7 +104,7 @@ $(function(){initNavTree('dir_d522931ffa1371640980b621734a4381.html','',''); }); diff --git a/html/dir_a64c5c967bbc6a18c5d8eb713e8e97ff.html b/html/dir_2262efd7ced881ba2289deea4945d6ba.html similarity index 90% rename from html/dir_a64c5c967bbc6a18c5d8eb713e8e97ff.html rename to html/dir_2262efd7ced881ba2289deea4945d6ba.html index 9fe4f9e..8b86fe3 100644 --- a/html/dir_a64c5c967bbc6a18c5d8eb713e8e97ff.html +++ b/html/dir_2262efd7ced881ba2289deea4945d6ba.html @@ -5,7 +5,7 @@ -Folliow: C:/Users/Guill/projet_php/controllers/templates_c Directory Reference +Folliow: templates_c Directory Reference @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
@@ -63,7 +62,7 @@ $(function() {
@@ -105,7 +104,7 @@ $(function(){initNavTree('dir_a64c5c967bbc6a18c5d8eb713e8e97ff.html','',''); }); diff --git a/html/dir_2c23dcab3ba0e8633898b60485787967.html b/html/dir_2c23dcab3ba0e8633898b60485787967.html deleted file mode 100644 index 49553a7..0000000 --- a/html/dir_2c23dcab3ba0e8633898b60485787967.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - - -Folliow: C:/Users/Guill/projet_php Directory Reference - - - - - - - - - - - - - - -
-
- - - - - - -
-
Folliow -
-
Un projet de site web réaliser en PHP
-
-
- - - - - - - - -
-
- -
-
-
- -
-
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
projet_php Directory Reference
-
-
- - - - - -

-Directories

 
controllers
 
entities
 
models
-

Detailed Description

-

-Folliow – Projet PHP

-

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.

-
-

-Features

-
    -
  • User authentication and profile management
  • -
  • Portfolio and project creation
  • -
  • Project showcase with descriptions and technologies
  • -
  • User connections / follow system
  • -
  • Project feed and discovery
  • -
  • Profile and project search
  • -
-
-

-Tech Stack

-

Client: HTML, CSS, JavaScript
- Server: PHP (MVC architecture)
- Database: MySQL
- Web Server: Apache

-
-

-Project Structure

-
folliow/
-
├── app/
-
│ ├── controllers/
-
│ ├── models/
-
│ └── views/
-
├── public/
-
│ ├── assets/
-
│ └── index.php
-
├── config/
-
│ └── database.php
-
├── sql/
-
│ └── folliow.sql
-
└── README.md
-

-

-Installation

-

Clone the project

-
git clone https://github.com/Yasder5/projet_php.git
-

Go to the project directory

-
cd projet_php
-

Import the database

-
    -
  • Use the SQL file located in the sql/ directory
  • -
-

Configure database access

-
    -
  • Update credentials in config/database.php
  • -
-

Run the project

-
    -
  • Use a local server (XAMPP, WAMP, or Apache on Linux)
  • -
-
-

-Learning Objectives

-
    -
  • Build a complete PHP web application
  • -
  • Apply MVC architecture
  • -
  • Manage a relational database
  • -
  • Design a user-oriented portfolio platform
  • -
-
-

-Future Improvements

-
    -
  • Private messaging
  • -
  • Likes and comments on projects
  • -
  • Tags and categories
  • -
  • Improved responsive design
  • -
  • Advanced authentication and roles
  • -
-
-

-License

-

This project is for educational purposes.

-
-
- -
- - - - diff --git a/html/dir_3a74e34fc6fa82edd10e4beee4ded801.html b/html/dir_3a74e34fc6fa82edd10e4beee4ded801.html deleted file mode 100644 index 382c5f0..0000000 --- a/html/dir_3a74e34fc6fa82edd10e4beee4ded801.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - - -Folliow: C:/Users/Guill/projet_php Directory Reference - - - - - - - - - - - - - - -
-
- - - - - - -
-
Folliow -
-
Un projet de site web réaliser en PHP
-
-
- - - - - - - - -
-
- -
-
-
- -
-
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
projet_php Directory Reference
-
-
- - - - - -

-Directories

 
controllers
 
entities
 
models
-

Detailed Description

-

-Folliow – Projet PHP

-

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.

-
-

-Features

-
    -
  • User authentication and profile management
  • -
  • Portfolio and project creation
  • -
  • Project showcase with descriptions and technologies
  • -
  • User connections / follow system
  • -
  • Project feed and discovery
  • -
  • Profile and project search
  • -
-
-

-Tech Stack

-

Client: HTML, CSS, JavaScript
- Server: PHP (MVC architecture)
- Database: MySQL
- Web Server: Apache

-
-

-Project Structure

-
folliow/
-
├── app/
-
│ ├── controllers/
-
│ ├── models/
-
│ └── views/
-
├── public/
-
│ ├── assets/
-
│ └── index.php
-
├── config/
-
│ └── database.php
-
├── sql/
-
│ └── folliow.sql
-
└── README.md
-

-

-Installation

-

Clone the project

-
git clone https://github.com/Yasder5/projet_php.git
-

Go to the project directory

-
cd projet_php
-

Import the database

-
    -
  • Use the SQL file located in the sql/ directory
  • -
-

Configure database access

-
    -
  • Update credentials in config/database.php
  • -
-

Run the project

-
    -
  • Use a local server (XAMPP, WAMP, or Apache on Linux)
  • -
-
-

-Learning Objectives

-
    -
  • Build a complete PHP web application
  • -
  • Apply MVC architecture
  • -
  • Manage a relational database
  • -
  • Design a user-oriented portfolio platform
  • -
-
-

-Future Improvements

-
    -
  • Private messaging
  • -
  • Likes and comments on projects
  • -
  • Tags and categories
  • -
  • Improved responsive design
  • -
  • Advanced authentication and roles
  • -
-
-

-License

-

This project is for educational purposes.

-
-
- -
- - - - diff --git a/html/dir_5498806e52ccd7d2d905ac8baf67301b.html b/html/dir_5498806e52ccd7d2d905ac8baf67301b.html deleted file mode 100644 index 3d5d1c1..0000000 --- a/html/dir_5498806e52ccd7d2d905ac8baf67301b.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - -Folliow: C:/Users/Guill/projet_php/controllers/templates_c Directory Reference - - - - - - - - - - - - - - -
-
- - - - - - -
-
Folliow -
-
Un projet de site web réaliser en PHP
-
-
- - - - - - - - -
-
- -
-
-
- -
-
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
templates_c Directory Reference
-
-
-
-
- -
- - - - diff --git a/html/dir_6a59aaef8e4f4bee39467ed807742262.html b/html/dir_6a59aaef8e4f4bee39467ed807742262.html deleted file mode 100644 index c7d7fad..0000000 --- a/html/dir_6a59aaef8e4f4bee39467ed807742262.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - -Folliow: C:/Users/Guill/projet_php/entities Directory Reference - - - - - - - - - - - - - - -
-
- - - - - - -
-
Folliow -
-
Un projet de site web réaliser en PHP
-
-
- - - - - - - - -
-
- -
-
-
- -
-
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
entities Directory Reference
-
-
-
-
- -
- - - - diff --git a/html/dir_1c617d677ef58765205e8a044aafa06e.html b/html/dir_78f8c0daf938bfa31437d013d3fc896d.html similarity index 89% rename from html/dir_1c617d677ef58765205e8a044aafa06e.html rename to html/dir_78f8c0daf938bfa31437d013d3fc896d.html index 0431c3a..e226041 100644 --- a/html/dir_1c617d677ef58765205e8a044aafa06e.html +++ b/html/dir_78f8c0daf938bfa31437d013d3fc896d.html @@ -5,7 +5,7 @@ -Folliow: C:/Users/Guill/projet_php/models Directory Reference +Folliow: controllers/templates_c Directory Reference @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
@@ -63,7 +62,7 @@ $(function() {
@@ -89,7 +88,7 @@ $(function(){initNavTree('dir_1c617d677ef58765205e8a044aafa06e.html','',''); });
-
models Directory Reference
+
templates_c Directory Reference
@@ -105,7 +104,7 @@ $(function(){initNavTree('dir_1c617d677ef58765205e8a044aafa06e.html','',''); }); diff --git a/html/dir_2756e6070b02be5d362619ded783829c.html b/html/dir_87b6ed4386158a4d6cd0ecd5fb5bd5c2.html similarity index 90% rename from html/dir_2756e6070b02be5d362619ded783829c.html rename to html/dir_87b6ed4386158a4d6cd0ecd5fb5bd5c2.html index 4ec760a..c19d9c6 100644 --- a/html/dir_2756e6070b02be5d362619ded783829c.html +++ b/html/dir_87b6ed4386158a4d6cd0ecd5fb5bd5c2.html @@ -5,7 +5,7 @@ -Folliow: C:/Users/Guill/projet_php/controllers Directory Reference +Folliow: controllers Directory Reference @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
@@ -63,7 +62,7 @@ $(function() {
@@ -95,7 +94,7 @@ $(function(){initNavTree('dir_2756e6070b02be5d362619ded783829c.html','',''); }); - +

Directories

 
templates_c
 
templates_c
@@ -110,7 +109,7 @@ Directories diff --git a/html/dir_91977dd5ba3542af9d4aecff9e888690.html b/html/dir_9404ca00d5cf333c309ae0ebf80749c4.html similarity index 91% rename from html/dir_91977dd5ba3542af9d4aecff9e888690.html rename to html/dir_9404ca00d5cf333c309ae0ebf80749c4.html index ce5c2e0..1296940 100644 --- a/html/dir_91977dd5ba3542af9d4aecff9e888690.html +++ b/html/dir_9404ca00d5cf333c309ae0ebf80749c4.html @@ -5,7 +5,7 @@ -Folliow: C:/Users/Guill/projet_php/entities Directory Reference +Folliow: entities Directory Reference @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
@@ -63,7 +62,7 @@ $(function() {
@@ -105,7 +104,7 @@ $(function(){initNavTree('dir_91977dd5ba3542af9d4aecff9e888690.html','',''); }); diff --git a/html/dir_bfcb6842af0098861ea59b43701e0022.html b/html/dir_bfcb6842af0098861ea59b43701e0022.html deleted file mode 100644 index 523aea6..0000000 --- a/html/dir_bfcb6842af0098861ea59b43701e0022.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - -Folliow: C:/Users/Guill/projet_php/controllers Directory Reference - - - - - - - - - - - - - - -
-
- - - - - - -
-
Folliow -
-
Un projet de site web réaliser en PHP
-
-
- - - - - - - - -
-
- -
-
-
- -
-
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
controllers Directory Reference
-
-
- - - -

-Directories

 
templates_c
-
-
- -
- - - - diff --git a/html/dir_d6b6a3db1c3a00708b1a36123c6a63cc.html b/html/dir_d6b6a3db1c3a00708b1a36123c6a63cc.html deleted file mode 100644 index d9b5324..0000000 --- a/html/dir_d6b6a3db1c3a00708b1a36123c6a63cc.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - -Folliow: C:/Users/Guill Directory Reference - - - - - - - - - - - - - - -
-
- - - - - - -
-
Folliow -
-
Un projet de site web réaliser en PHP
-
-
- - - - - - - - -
-
- -
-
-
- -
-
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
Guill Directory Reference
-
-
- - - -

-Directories

 
projet_php
-
-
- -
- - - - diff --git a/html/dir_f880fbcdfabe64616040b95a4e03089d.html b/html/dir_f880fbcdfabe64616040b95a4e03089d.html deleted file mode 100644 index 7ba12b4..0000000 --- a/html/dir_f880fbcdfabe64616040b95a4e03089d.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - -Folliow: C:/Users/Guill/projet_php/models Directory Reference - - - - - - - - - - - - - - -
-
- - - - - - -
-
Folliow -
-
Un projet de site web réaliser en PHP
-
-
- - - - - - - - -
-
- -
-
-
- -
-
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
models Directory Reference
-
-
-
-
- -
- - - - diff --git a/html/doxygen_crawl.html b/html/doxygen_crawl.html index e20d408..a7f0a67 100644 --- a/html/doxygen_crawl.html +++ b/html/doxygen_crawl.html @@ -157,11 +157,11 @@ - - - - - + + + + + diff --git a/html/functions.html b/html/functions.html index 5faf08f..a3d4020 100644 --- a/html/functions.html +++ b/html/functions.html @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
diff --git a/html/functions_func.html b/html/functions_func.html index 643e105..76745b0 100644 --- a/html/functions_func.html +++ b/html/functions_func.html @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
diff --git a/html/hierarchy.html b/html/hierarchy.html index 908ebcb..a10be6e 100644 --- a/html/hierarchy.html +++ b/html/hierarchy.html @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
diff --git a/html/index.html b/html/index.html index 48abdd8..72c8522 100644 --- a/html/index.html +++ b/html/index.html @@ -28,7 +28,6 @@
Folliow
-
Un projet de site web réaliser en PHP
diff --git a/html/search/all_10.js b/html/search/all_10.js deleted file mode 100644 index bca4de5..0000000 --- a/html/search/all_10.js +++ /dev/null @@ -1,10 +0,0 @@ -var searchData= -[ - ['update_0',['update',['../class_models_1_1_user_model.html#a4f2888d0004092a367fa2d1b2620818f',1,'Models::UserModel']]], - ['updateimagestatus_1',['updateImageStatus',['../class_models_1_1_project_model.html#aeb942ee7cfbea8509e49a5114228f53b',1,'Models::ProjectModel']]], - ['updateproject_2',['updateProject',['../class_models_1_1_project_model.html#a1736ff58fc8fadf358ddb510b4c8d3f7',1,'Models::ProjectModel']]], - ['user_3',['User',['../class_entities_1_1_user.html',1,'Entities']]], - ['user_4',['user',['../class_controllers_1_1_user_ctrl.html#ae8a275690ff1b618e1947378b0ed73ae',1,'Controllers::UserCtrl']]], - ['userctrl_5',['UserCtrl',['../class_controllers_1_1_user_ctrl.html',1,'Controllers']]], - ['usermodel_6',['UserModel',['../class_models_1_1_user_model.html',1,'Models']]] -]; diff --git a/html/search/all_11.js b/html/search/all_11.js deleted file mode 100644 index d922979..0000000 --- a/html/search/all_11.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['verifuser_0',['verifUser',['../class_models_1_1_user_model.html#a04e007855c8aa842068779d8a871bb42',1,'Models::UserModel']]] -]; diff --git a/html/search/all_12.js b/html/search/all_12.js deleted file mode 100644 index 93dc4b6..0000000 --- a/html/search/all_12.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['–_20projet_20php_0',['Folliow – Projet PHP',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md0',1,'']]] -]; diff --git a/html/search/all_5.js b/html/search/all_5.js index be7e39a..ccf331c 100644 --- a/html/search/all_5.js +++ b/html/search/all_5.js @@ -1,15 +1,12 @@ var searchData= [ - ['features_0',['Features',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md2',1,'']]], - ['findall_1',['findAll',['../class_models_1_1_project_model.html#acbfa7e289b7712cf5200f398cff05c43',1,'Models::ProjectModel']]], - ['findallauthorisation_2',['findAllAuthorisation',['../class_models_1_1_authorisation_model.html#af7bd93cc2fd6ac548707d3a66a8380df',1,'Models::AuthorisationModel']]], - ['findallcategory_3',['findAllCategory',['../class_models_1_1_category_model.html#a4e6d48b9130d9cb4cc08a88cef84e8f9',1,'Models::CategoryModel']]], - ['findallimage_4',['findAllImage',['../class_models_1_1_image_model.html#aaf9e88eb8d1aff57a085e1d38de15060',1,'Models::ImageModel']]], - ['findallusers_5',['findAllUsers',['../class_models_1_1_user_model.html#a404b6b890d58bfa7220da4a08a60f445',1,'Models::UserModel']]], - ['findimage_6',['findImage',['../class_models_1_1_project_model.html#a0a8e47e6d6b839638ab85addfda45e3b',1,'Models::ProjectModel']]], - ['findone_7',['findOne',['../class_models_1_1_project_model.html#ae0fabc6b177cda25efeee083f904c207',1,'Models::ProjectModel']]], - ['finduserbyid_8',['findUserById',['../class_models_1_1_user_model.html#a6620c458b01ecbb1ed76083a4ac2345e',1,'Models::UserModel']]], - ['finduserbypseudo_9',['findUserByPseudo',['../class_models_1_1_user_model.html#a9f95476e8b07dbc01f711f36672684ad',1,'Models::UserModel']]], - ['folliow_20–_20projet_20php_10',['Folliow – Projet PHP',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md0',1,'']]], - ['future_20improvements_11',['Future Improvements',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md12',1,'']]] + ['findall_0',['findAll',['../class_models_1_1_project_model.html#acbfa7e289b7712cf5200f398cff05c43',1,'Models::ProjectModel']]], + ['findallauthorisation_1',['findAllAuthorisation',['../class_models_1_1_authorisation_model.html#af7bd93cc2fd6ac548707d3a66a8380df',1,'Models::AuthorisationModel']]], + ['findallcategory_2',['findAllCategory',['../class_models_1_1_category_model.html#a4e6d48b9130d9cb4cc08a88cef84e8f9',1,'Models::CategoryModel']]], + ['findallimage_3',['findAllImage',['../class_models_1_1_image_model.html#aaf9e88eb8d1aff57a085e1d38de15060',1,'Models::ImageModel']]], + ['findallusers_4',['findAllUsers',['../class_models_1_1_user_model.html#a404b6b890d58bfa7220da4a08a60f445',1,'Models::UserModel']]], + ['findimage_5',['findImage',['../class_models_1_1_project_model.html#a0a8e47e6d6b839638ab85addfda45e3b',1,'Models::ProjectModel']]], + ['findone_6',['findOne',['../class_models_1_1_project_model.html#ae0fabc6b177cda25efeee083f904c207',1,'Models::ProjectModel']]], + ['finduserbyid_7',['findUserById',['../class_models_1_1_user_model.html#a6620c458b01ecbb1ed76083a4ac2345e',1,'Models::UserModel']]], + ['finduserbypseudo_8',['findUserByPseudo',['../class_models_1_1_user_model.html#a9f95476e8b07dbc01f711f36672684ad',1,'Models::UserModel']]] ]; diff --git a/html/search/all_8.js b/html/search/all_8.js index 91ecce8..353b00e 100644 --- a/html/search/all_8.js +++ b/html/search/all_8.js @@ -2,8 +2,6 @@ var searchData= [ ['image_0',['Image',['../class_entities_1_1_image.html',1,'Entities']]], ['imagemodel_1',['ImageModel',['../class_models_1_1_image_model.html',1,'Models']]], - ['improvements_2',['Future Improvements',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md12',1,'']]], - ['insert_3',['insert',['../class_models_1_1_project_model.html#ad2a2f3e436d06db0fc4af3c44c867805',1,'Models\\ProjectModel\\insert()'],['../class_models_1_1_user_model.html#ab0eb29a478a1230d479aee1046b0f1dc',1,'Models\\UserModel\\insert()']]], - ['insertcategory_4',['insertCategory',['../class_models_1_1_category_model.html#a1102f9228de8f7938a1f35a3abbc2dc7',1,'Models::CategoryModel']]], - ['installation_5',['Installation',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md8',1,'']]] + ['insert_2',['insert',['../class_models_1_1_project_model.html#ad2a2f3e436d06db0fc4af3c44c867805',1,'Models\\ProjectModel\\insert()'],['../class_models_1_1_user_model.html#ab0eb29a478a1230d479aee1046b0f1dc',1,'Models\\UserModel\\insert()']]], + ['insertcategory_3',['insertCategory',['../class_models_1_1_category_model.html#a1102f9228de8f7938a1f35a3abbc2dc7',1,'Models::CategoryModel']]] ]; diff --git a/html/search/all_9.js b/html/search/all_9.js index 755a71a..3d02d06 100644 --- a/html/search/all_9.js +++ b/html/search/all_9.js @@ -1,7 +1,5 @@ var searchData= [ - ['learning_20objectives_0',['Learning Objectives',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md10',1,'']]], - ['license_1',['License',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md14',1,'']]], - ['login_2',['login',['../class_controllers_1_1_user_ctrl.html#aa311da27ba5706f5710cea7706c8eae1',1,'Controllers::UserCtrl']]], - ['logout_3',['logout',['../class_controllers_1_1_user_ctrl.html#a082405d89acd6835c3a7c7a08a7adbab',1,'Controllers::UserCtrl']]] + ['login_0',['login',['../class_controllers_1_1_user_ctrl.html#aa311da27ba5706f5710cea7706c8eae1',1,'Controllers::UserCtrl']]], + ['logout_1',['logout',['../class_controllers_1_1_user_ctrl.html#a082405d89acd6835c3a7c7a08a7adbab',1,'Controllers::UserCtrl']]] ]; diff --git a/html/search/all_b.js b/html/search/all_b.js index 3c88a3a..4711197 100644 --- a/html/search/all_b.js +++ b/html/search/all_b.js @@ -1,4 +1,8 @@ var searchData= [ - ['objectives_0',['Learning Objectives',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md10',1,'']]] + ['pagectrl_0',['PageCtrl',['../class_controllers_1_1_page_ctrl.html',1,'Controllers']]], + ['project_1',['Project',['../class_entities_1_1_project.html',1,'Entities']]], + ['projectctrl_2',['ProjectCtrl',['../class_controllers_1_1_project_ctrl.html',1,'Controllers']]], + ['projectmodel_3',['ProjectModel',['../class_models_1_1_project_model.html',1,'Models']]], + ['pseudoexists_4',['pseudoExists',['../class_models_1_1_user_model.html#aaf42cd7de4bddf6d3a075aa9bc252b8f',1,'Models::UserModel']]] ]; diff --git a/html/search/all_c.js b/html/search/all_c.js index b4b41a3..ce196b2 100644 --- a/html/search/all_c.js +++ b/html/search/all_c.js @@ -1,11 +1,5 @@ var searchData= [ - ['pagectrl_0',['PageCtrl',['../class_controllers_1_1_page_ctrl.html',1,'Controllers']]], - ['php_1',['Folliow – Projet PHP',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md0',1,'']]], - ['project_2',['Project',['../class_entities_1_1_project.html',1,'Entities']]], - ['project_20structure_3',['Project Structure',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md6',1,'']]], - ['projectctrl_4',['ProjectCtrl',['../class_controllers_1_1_project_ctrl.html',1,'Controllers']]], - ['projectmodel_5',['ProjectModel',['../class_models_1_1_project_model.html',1,'Models']]], - ['projet_20php_6',['Folliow – Projet PHP',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md0',1,'']]], - ['pseudoexists_7',['pseudoExists',['../class_models_1_1_user_model.html#aaf42cd7de4bddf6d3a075aa9bc252b8f',1,'Models::UserModel']]] + ['refuse_0',['refuse',['../class_controllers_1_1_project_ctrl.html#a68a43ec4877b5210ef8ad989fbc14d82',1,'Controllers\\ProjectCtrl\\refuse()'],['../class_models_1_1_project_model.html#a64714f38f74ab942d027f04e86e40d25',1,'Models\\ProjectModel\\refuse()']]], + ['remember_1',['remember',['../class_models_1_1_user_model.html#a30563e7cabc0c9aa2bf4157b241ad55a',1,'Models::UserModel']]] ]; diff --git a/html/search/all_d.js b/html/search/all_d.js index ce196b2..ad2e860 100644 --- a/html/search/all_d.js +++ b/html/search/all_d.js @@ -1,5 +1,31 @@ var searchData= [ - ['refuse_0',['refuse',['../class_controllers_1_1_project_ctrl.html#a68a43ec4877b5210ef8ad989fbc14d82',1,'Controllers\\ProjectCtrl\\refuse()'],['../class_models_1_1_project_model.html#a64714f38f74ab942d027f04e86e40d25',1,'Models\\ProjectModel\\refuse()']]], - ['remember_1',['remember',['../class_models_1_1_user_model.html#a30563e7cabc0c9aa2bf4157b241ad55a',1,'Models::UserModel']]] + ['search_0',['search',['../class_controllers_1_1_project_ctrl.html#a796bf438724e047aeef18579732a3780',1,'Controllers::ProjectCtrl']]], + ['sendemail_1',['sendEmail',['../class_controllers_1_1_project_ctrl.html#a6665aeb6e312ea89283ce785f0dfad60',1,'Controllers::ProjectCtrl']]], + ['setaccountcreation_2',['setAccountCreation',['../class_entities_1_1_user.html#aa8eb1e10f1ab32dcfa4df144fe02ba16',1,'Entities::User']]], + ['setalt_3',['setAlt',['../class_entities_1_1_image.html#a23d9d1d65334db3a72b3c19e146cfe28',1,'Entities::Image']]], + ['setbirth_4',['setBirth',['../class_entities_1_1_user.html#a4a6578fae7673e253c0ddb1f95cf227c',1,'Entities::User']]], + ['setcategory_5',['setCategory',['../class_entities_1_1_project.html#a309475f82c8fca1a84f96f802f05a5fb',1,'Entities::Project']]], + ['setcontent_6',['setContent',['../class_entities_1_1_project.html#a04a5eddb7c3abc7bf31fa25b58f046bf',1,'Entities::Project']]], + ['setcreation_5fdate_7',['setCreation_date',['../class_entities_1_1_project.html#a547ac5297a9b9efc8a4b6bef00eb6c2e',1,'Entities::Project']]], + ['setcreatorname_8',['setCreatorName',['../class_entities_1_1_project.html#aa37594941aea25a0f0d3a33d6a8757b7',1,'Entities::Project']]], + ['setdescription_9',['setDescription',['../class_entities_1_1_project.html#a31fad3e39336ea079ea758e051866627',1,'Entities\\Project\\setDescription()'],['../class_entities_1_1_user.html#a3eda7afea80371b606cd289c66ab3e7c',1,'Entities\\User\\setDescription(string $description)']]], + ['setfirstname_10',['setFirstname',['../class_entities_1_1_user.html#a102793bdeeaa7eaa2bca4e31eb3782e5',1,'Entities::User']]], + ['setid_11',['setId',['../class_entities_1_1_authorisation.html#af8e956b8b0343ff7d1b955c26cb0c780',1,'Entities\\Authorisation\\setId()'],['../class_entities_1_1_category.html#a87313ad678fb2a2a8efb435cf0bdb9a0',1,'Entities\\Category\\setId()'],['../class_entities_1_1_image.html#a87313ad678fb2a2a8efb435cf0bdb9a0',1,'Entities\\Image\\setId()'],['../class_entities_1_1_project.html#af8e956b8b0343ff7d1b955c26cb0c780',1,'Entities\\Project\\setId()'],['../class_entities_1_1_user.html#af8e956b8b0343ff7d1b955c26cb0c780',1,'Entities\\User\\setId(int $id)']]], + ['setimage_12',['setImage',['../class_entities_1_1_user.html#a6c7550f5363e74b3ee9225bf85e11b8d',1,'Entities::User']]], + ['setlocation_13',['setLocation',['../class_entities_1_1_user.html#a4c5c6e78f1e8c0ae4bf416d0f0d73ef1',1,'Entities::User']]], + ['setmail_14',['setMail',['../class_entities_1_1_user.html#ad5ba083b208ed11aa16938a8ba87a78c',1,'Entities::User']]], + ['setname_15',['setName',['../class_entities_1_1_authorisation.html#a392752b62c4f6aacea5c269690921ef3',1,'Entities\\Authorisation\\setName()'],['../class_entities_1_1_category.html#a2fe666694997d047711d7653eca2f132',1,'Entities\\Category\\setName()'],['../class_entities_1_1_image.html#a2fe666694997d047711d7653eca2f132',1,'Entities\\Image\\setName()'],['../class_entities_1_1_user.html#a392752b62c4f6aacea5c269690921ef3',1,'Entities\\User\\setName()']]], + ['setparent_16',['setParent',['../class_entities_1_1_category.html#a3b949fc022c82eb25e8650e0e01404fa',1,'Entities::Category']]], + ['setphone_17',['setPhone',['../class_entities_1_1_user.html#a652bfdb5ce275246ece54449fe5ca59e',1,'Entities::User']]], + ['setproject_5fdeleted_5fat_18',['setProject_deleted_at',['../class_entities_1_1_project.html#a621433ce4917a196047b78e58e38d7fe',1,'Entities::Project']]], + ['setpseudo_19',['setPseudo',['../class_entities_1_1_user.html#a02d546b854db37406ec591d3e16809eb',1,'Entities::User']]], + ['setpwd_20',['setPwd',['../class_entities_1_1_user.html#a9cc7dc33859895f98da4e22f5ae1a9bf',1,'Entities::User']]], + ['setstatus_21',['setStatus',['../class_entities_1_1_image.html#a7d02c100d684fe1dffc6cb3486a48511',1,'Entities\\Image\\setStatus()'],['../class_entities_1_1_project.html#a7d02c100d684fe1dffc6cb3486a48511',1,'Entities\\Project\\setStatus()'],['../class_entities_1_1_user.html#a2f8308ff566858664b95361214f29eac',1,'Entities\\User\\setStatus()']]], + ['setthumbnail_22',['setThumbnail',['../class_entities_1_1_project.html#a89bdfd911301f4ac284a937e93f4de50',1,'Entities::Project']]], + ['settitle_23',['setTitle',['../class_entities_1_1_project.html#a884ba9bb0d54bde7839e798db7964476',1,'Entities::Project']]], + ['setuser_5fid_24',['setUser_id',['../class_entities_1_1_project.html#a74bdd06d4bca0de42e55bdf7763ebfc4',1,'Entities::Project']]], + ['setuser_5fimage_25',['setUser_image',['../class_entities_1_1_project.html#a17164d0ccbccaceb60280836d060e21f',1,'Entities::Project']]], + ['setwork_26',['setWork',['../class_entities_1_1_user.html#ae6c2c46108019bd83091add6417eb894',1,'Entities::User']]], + ['signup_27',['signup',['../class_controllers_1_1_user_ctrl.html#a852ed40b79f143c1478699d908f46957',1,'Controllers::UserCtrl']]] ]; diff --git a/html/search/all_e.js b/html/search/all_e.js index a013425..bca4de5 100644 --- a/html/search/all_e.js +++ b/html/search/all_e.js @@ -1,33 +1,10 @@ var searchData= [ - ['search_0',['search',['../class_controllers_1_1_project_ctrl.html#a796bf438724e047aeef18579732a3780',1,'Controllers::ProjectCtrl']]], - ['sendemail_1',['sendEmail',['../class_controllers_1_1_project_ctrl.html#a6665aeb6e312ea89283ce785f0dfad60',1,'Controllers::ProjectCtrl']]], - ['setaccountcreation_2',['setAccountCreation',['../class_entities_1_1_user.html#aa8eb1e10f1ab32dcfa4df144fe02ba16',1,'Entities::User']]], - ['setalt_3',['setAlt',['../class_entities_1_1_image.html#a23d9d1d65334db3a72b3c19e146cfe28',1,'Entities::Image']]], - ['setbirth_4',['setBirth',['../class_entities_1_1_user.html#a4a6578fae7673e253c0ddb1f95cf227c',1,'Entities::User']]], - ['setcategory_5',['setCategory',['../class_entities_1_1_project.html#a309475f82c8fca1a84f96f802f05a5fb',1,'Entities::Project']]], - ['setcontent_6',['setContent',['../class_entities_1_1_project.html#a04a5eddb7c3abc7bf31fa25b58f046bf',1,'Entities::Project']]], - ['setcreation_5fdate_7',['setCreation_date',['../class_entities_1_1_project.html#a547ac5297a9b9efc8a4b6bef00eb6c2e',1,'Entities::Project']]], - ['setcreatorname_8',['setCreatorName',['../class_entities_1_1_project.html#aa37594941aea25a0f0d3a33d6a8757b7',1,'Entities::Project']]], - ['setdescription_9',['setDescription',['../class_entities_1_1_project.html#a31fad3e39336ea079ea758e051866627',1,'Entities\\Project\\setDescription()'],['../class_entities_1_1_user.html#a3eda7afea80371b606cd289c66ab3e7c',1,'Entities\\User\\setDescription(string $description)']]], - ['setfirstname_10',['setFirstname',['../class_entities_1_1_user.html#a102793bdeeaa7eaa2bca4e31eb3782e5',1,'Entities::User']]], - ['setid_11',['setId',['../class_entities_1_1_authorisation.html#af8e956b8b0343ff7d1b955c26cb0c780',1,'Entities\\Authorisation\\setId()'],['../class_entities_1_1_category.html#a87313ad678fb2a2a8efb435cf0bdb9a0',1,'Entities\\Category\\setId()'],['../class_entities_1_1_image.html#a87313ad678fb2a2a8efb435cf0bdb9a0',1,'Entities\\Image\\setId()'],['../class_entities_1_1_project.html#af8e956b8b0343ff7d1b955c26cb0c780',1,'Entities\\Project\\setId()'],['../class_entities_1_1_user.html#af8e956b8b0343ff7d1b955c26cb0c780',1,'Entities\\User\\setId(int $id)']]], - ['setimage_12',['setImage',['../class_entities_1_1_user.html#a6c7550f5363e74b3ee9225bf85e11b8d',1,'Entities::User']]], - ['setlocation_13',['setLocation',['../class_entities_1_1_user.html#a4c5c6e78f1e8c0ae4bf416d0f0d73ef1',1,'Entities::User']]], - ['setmail_14',['setMail',['../class_entities_1_1_user.html#ad5ba083b208ed11aa16938a8ba87a78c',1,'Entities::User']]], - ['setname_15',['setName',['../class_entities_1_1_authorisation.html#a392752b62c4f6aacea5c269690921ef3',1,'Entities\\Authorisation\\setName()'],['../class_entities_1_1_category.html#a2fe666694997d047711d7653eca2f132',1,'Entities\\Category\\setName()'],['../class_entities_1_1_image.html#a2fe666694997d047711d7653eca2f132',1,'Entities\\Image\\setName()'],['../class_entities_1_1_user.html#a392752b62c4f6aacea5c269690921ef3',1,'Entities\\User\\setName()']]], - ['setparent_16',['setParent',['../class_entities_1_1_category.html#a3b949fc022c82eb25e8650e0e01404fa',1,'Entities::Category']]], - ['setphone_17',['setPhone',['../class_entities_1_1_user.html#a652bfdb5ce275246ece54449fe5ca59e',1,'Entities::User']]], - ['setproject_5fdeleted_5fat_18',['setProject_deleted_at',['../class_entities_1_1_project.html#a621433ce4917a196047b78e58e38d7fe',1,'Entities::Project']]], - ['setpseudo_19',['setPseudo',['../class_entities_1_1_user.html#a02d546b854db37406ec591d3e16809eb',1,'Entities::User']]], - ['setpwd_20',['setPwd',['../class_entities_1_1_user.html#a9cc7dc33859895f98da4e22f5ae1a9bf',1,'Entities::User']]], - ['setstatus_21',['setStatus',['../class_entities_1_1_image.html#a7d02c100d684fe1dffc6cb3486a48511',1,'Entities\\Image\\setStatus()'],['../class_entities_1_1_project.html#a7d02c100d684fe1dffc6cb3486a48511',1,'Entities\\Project\\setStatus()'],['../class_entities_1_1_user.html#a2f8308ff566858664b95361214f29eac',1,'Entities\\User\\setStatus()']]], - ['setthumbnail_22',['setThumbnail',['../class_entities_1_1_project.html#a89bdfd911301f4ac284a937e93f4de50',1,'Entities::Project']]], - ['settitle_23',['setTitle',['../class_entities_1_1_project.html#a884ba9bb0d54bde7839e798db7964476',1,'Entities::Project']]], - ['setuser_5fid_24',['setUser_id',['../class_entities_1_1_project.html#a74bdd06d4bca0de42e55bdf7763ebfc4',1,'Entities::Project']]], - ['setuser_5fimage_25',['setUser_image',['../class_entities_1_1_project.html#a17164d0ccbccaceb60280836d060e21f',1,'Entities::Project']]], - ['setwork_26',['setWork',['../class_entities_1_1_user.html#ae6c2c46108019bd83091add6417eb894',1,'Entities::User']]], - ['signup_27',['signup',['../class_controllers_1_1_user_ctrl.html#a852ed40b79f143c1478699d908f46957',1,'Controllers::UserCtrl']]], - ['stack_28',['Tech Stack',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md4',1,'']]], - ['structure_29',['Project Structure',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md6',1,'']]] + ['update_0',['update',['../class_models_1_1_user_model.html#a4f2888d0004092a367fa2d1b2620818f',1,'Models::UserModel']]], + ['updateimagestatus_1',['updateImageStatus',['../class_models_1_1_project_model.html#aeb942ee7cfbea8509e49a5114228f53b',1,'Models::ProjectModel']]], + ['updateproject_2',['updateProject',['../class_models_1_1_project_model.html#a1736ff58fc8fadf358ddb510b4c8d3f7',1,'Models::ProjectModel']]], + ['user_3',['User',['../class_entities_1_1_user.html',1,'Entities']]], + ['user_4',['user',['../class_controllers_1_1_user_ctrl.html#ae8a275690ff1b618e1947378b0ed73ae',1,'Controllers::UserCtrl']]], + ['userctrl_5',['UserCtrl',['../class_controllers_1_1_user_ctrl.html',1,'Controllers']]], + ['usermodel_6',['UserModel',['../class_models_1_1_user_model.html',1,'Models']]] ]; diff --git a/html/search/all_f.js b/html/search/all_f.js index cabc0de..d922979 100644 --- a/html/search/all_f.js +++ b/html/search/all_f.js @@ -1,4 +1,4 @@ var searchData= [ - ['tech_20stack_0',['Tech Stack',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md4',1,'']]] + ['verifuser_0',['verifUser',['../class_models_1_1_user_model.html#a04e007855c8aa842068779d8a871bb42',1,'Models::UserModel']]] ]; diff --git a/html/search/pages_0.js b/html/search/pages_0.js deleted file mode 100644 index 0fea1ad..0000000 --- a/html/search/pages_0.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['features_0',['Features',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md2',1,'']]], - ['folliow_20–_20projet_20php_1',['Folliow – Projet PHP',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md0',1,'']]], - ['future_20improvements_2',['Future Improvements',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md12',1,'']]] -]; diff --git a/html/search/pages_1.js b/html/search/pages_1.js deleted file mode 100644 index 51cc0fb..0000000 --- a/html/search/pages_1.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['improvements_0',['Future Improvements',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md12',1,'']]], - ['installation_1',['Installation',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md8',1,'']]] -]; diff --git a/html/search/pages_2.js b/html/search/pages_2.js deleted file mode 100644 index 9c9b847..0000000 --- a/html/search/pages_2.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['learning_20objectives_0',['Learning Objectives',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md10',1,'']]], - ['license_1',['License',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md14',1,'']]] -]; diff --git a/html/search/pages_3.js b/html/search/pages_3.js deleted file mode 100644 index 3c88a3a..0000000 --- a/html/search/pages_3.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['objectives_0',['Learning Objectives',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md10',1,'']]] -]; diff --git a/html/search/pages_4.js b/html/search/pages_4.js deleted file mode 100644 index 00a588a..0000000 --- a/html/search/pages_4.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['php_0',['Folliow – Projet PHP',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md0',1,'']]], - ['project_20structure_1',['Project Structure',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md6',1,'']]], - ['projet_20php_2',['Folliow – Projet PHP',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md0',1,'']]] -]; diff --git a/html/search/pages_5.js b/html/search/pages_5.js deleted file mode 100644 index cc6d51c..0000000 --- a/html/search/pages_5.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['stack_0',['Tech Stack',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md4',1,'']]], - ['structure_1',['Project Structure',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md6',1,'']]] -]; diff --git a/html/search/pages_6.js b/html/search/pages_6.js deleted file mode 100644 index cabc0de..0000000 --- a/html/search/pages_6.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['tech_20stack_0',['Tech Stack',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md4',1,'']]] -]; diff --git a/html/search/pages_7.js b/html/search/pages_7.js deleted file mode 100644 index 93dc4b6..0000000 --- a/html/search/pages_7.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['–_20projet_20php_0',['Folliow – Projet PHP',['../dir_3a74e34fc6fa82edd10e4beee4ded801.html#autotoc_md0',1,'']]] -]; diff --git a/html/search/searchdata.js b/html/search/searchdata.js index 7ece18c..d6cd187 100644 --- a/html/search/searchdata.js +++ b/html/search/searchdata.js @@ -1,24 +1,21 @@ var indexSectionsWithContent = { - 0: "_acdefghilmoprstuv–", + 0: "_acdefghilmprsuv", 1: "aceimpu", - 2: "_acdefghilmprsuv", - 3: "filopst–" + 2: "_acdefghilmprsuv" }; var indexSectionNames = { 0: "all", 1: "classes", - 2: "functions", - 3: "pages" + 2: "functions" }; var indexSectionLabels = { 0: "All", 1: "Data Structures", - 2: "Functions", - 3: "Pages" + 2: "Functions" }; diff --git a/index.php b/index.php index 72358a6..0b6c7b0 100644 --- a/index.php +++ b/index.php @@ -2,11 +2,12 @@ session_start(); require(__DIR__ . "/vendor/autoload.php"); + // Environnement $dotenv = Dotenv\Dotenv::createImmutable(__DIR__); $dotenv->safeLoad(); - $strCtrl = preg_replace('/[^a-zA-Z]/', '', $_GET['ctrl'] ?? 'project'); - $strMethod = preg_replace('/[^a-zA-Z_]/', '', $_GET['action'] ?? 'home'); + $strCtrl = $_GET['ctrl'] ?? 'project'; + $strMethod = $_GET['action'] ?? 'home'; $strClassName = "Controllers\\" . ucfirst($strCtrl) . "Ctrl"; @@ -25,8 +26,6 @@ } if ($boolError) { - http_response_code(404); // ← important pour le SEO et les navigateurs - $error = new \Controllers\ErrorCtrl(); - $error->error_404(); // ← pas de "return", juste l'appel - exit; // ← stoppe l'exécution après l'affichage + header("Location: index.php?ctrl=error&action=error_404"); + exit; } \ No newline at end of file diff --git a/models/CategoryModel.php b/models/CategoryModel.php index 3ce1dc4..2511e11 100644 --- a/models/CategoryModel.php +++ b/models/CategoryModel.php @@ -22,18 +22,10 @@ FROM category"; if ($intLimit > 0){ - $strRq .= " LIMIT :limit"; + $strRq .= " LIMIT ".$intLimit; } - $rqPrep = $this->_db->prepare($strRq); - - if ($intLimit > 0){ - $rqPrep->bindValue(":limit", $intLimit, PDO::PARAM_INT); - } - - $rqPrep->execute(); - - return $rqPrep->fetchAll(); + return $this->_db->query($strRq)->fetchAll(); } /** diff --git a/models/ImageModel.php b/models/ImageModel.php index c3cc95d..c471da4 100644 --- a/models/ImageModel.php +++ b/models/ImageModel.php @@ -22,18 +22,11 @@ $strRq = "SELECT image.* FROM image"; - if ($intLimit > 0){ - $strRq .= " LIMIT :limit"; - } - - $rqPrep = $this->_db->prepare($strRq); - - if ($intLimit > 0){ - $rqPrep->bindValue(":limit", $intLimit, PDO::PARAM_INT); - } - $rqPrep->execute(); + if ($intLimit > 0){ + $strRq .= " LIMIT ".$intLimit; + } - return $rqPrep->fetchAll(); + return $this->_db->query($strRq)->fetchAll(); } } \ No newline at end of file diff --git a/models/MotherModel.php b/models/MotherModel.php index 079d791..df9f2f7 100644 --- a/models/MotherModel.php +++ b/models/MotherModel.php @@ -10,9 +10,9 @@ public function __construct(){ try{ $this->_db = new PDO( - "mysql:host=".$_ENV['DB_HOSTNAME'].";dbname=".$_ENV['DB_DATABASE'], - $_ENV['DB_USERNAME'], - $_ENV['DB_PASSWORD'], + "mysql:host=localhost;dbname=projet_folliow", + "projet_user", + "F0lliowRules!", array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC) ); $this->_db->exec("SET CHARACTER SET utf8"); diff --git a/models/ProjectModel.php b/models/ProjectModel.php index 5e1b89f..a248884 100644 --- a/models/ProjectModel.php +++ b/models/ProjectModel.php @@ -23,84 +23,58 @@ string $strEndDate='', int $intCategory=0, bool $boolOlderThan6Months=false): array { - $strRq = "SELECT project.*, + $strRq = "SELECT project.*, user_pseudo AS 'project_creatorname', user_image FROM project - INNER JOIN users ON user_id = project_user_id - WHERE 1=1"; + INNER JOIN users ON user_id = project_user_id"; + + $strRq .= " WHERE project_deleted_at IS NULL"; + + $strAnd = " AND "; if ($strKeywords != '') { - $strRq .= " AND (project_title LIKE :keywords OR project_content LIKE :keywords)"; + + $strSafeKeywords = $this->_db->quote("%" . $strKeywords . "%"); + + $strRq .= $strAnd. " (project_title LIKE ".$strSafeKeywords." + OR project_content LIKE ".$strSafeKeywords.") "; + } if ($intAuthor > 0){ - $strRq .= " AND project_user_id = :author"; - } + $strRq .= $strAnd." user_id = ".$intAuthor; + } if ($intCategory > 0){ - $strRq .= " AND project_category = :category"; + $strRq .= $strAnd." project_category = ".$intCategory; } - if ($boolOlderThan6Months === true) { - $strRq .= " AND project_creation_date <= DATE_SUB(NOW(), INTERVAL 6 MONTH)"; + $strRq .= $strAnd . " project_creation_date <= DATE_SUB(NOW(), INTERVAL 6 MONTH) "; } - if ($intPeriod == 0){ if ($strDate != ''){ - $strRq .= " AND project_creation_date = :date_exacte"; + $strRq .= $strAnd." project_creation_date = '".$strDate."'"; } - } else { + }else{ if ($strStartDate != '' && $strEndDate != ''){ - $strRq .= " AND project_creation_date BETWEEN :date_debut AND :date_fin"; - } else { + $strRq .= $strAnd." project_creation_date BETWEEN '".$strStartDate."' AND '".$strEndDate."'"; + }else{ if ($strStartDate != ''){ - $strRq .= " AND project_creation_date >= :date_debut"; - } else if ($strEndDate != ''){ - $strRq .= " AND project_creation_date <= :date_fin"; + $strRq .= $strAnd." project_creation_date >= '".$strStartDate."'"; + }else if ($strEndDate != ''){ + $strRq .= $strAnd." project_creation_date <= '".$strEndDate."'"; } } } - + $strRq .= " ORDER BY project_creation_date DESC"; if ($intLimit > 0){ - $strRq .= " LIMIT :limit"; + $strRq .= " LIMIT ".$intLimit; } - $rqPrep = $this->_db->prepare($strRq); - - if ($strKeywords != '') { - $rqPrep->bindValue(':keywords', '%' . $strKeywords . '%', PDO::PARAM_STR); - } - if ($intAuthor > 0){ - $rqPrep->bindValue(':author', $intAuthor, PDO::PARAM_INT); - } - if ($intCategory > 0){ - $rqPrep->bindValue(':category', $intCategory, PDO::PARAM_INT); - } - if ($intPeriod == 0){ - if ($strDate != ''){ - $rqPrep->bindValue(':date_exacte', $strDate, PDO::PARAM_STR); - } - } else { - if ($strStartDate != '' && $strEndDate != ''){ - $rqPrep->bindValue(':date_debut', $strStartDate, PDO::PARAM_STR); - $rqPrep->bindValue(':date_fin', $strEndDate, PDO::PARAM_STR); - } else { - if ($strStartDate != ''){ - $rqPrep->bindValue(':date_debut', $strStartDate, PDO::PARAM_STR); - } else if ($strEndDate != ''){ - $rqPrep->bindValue(':date_fin', $strEndDate, PDO::PARAM_STR); - } - } - } - if ($intLimit > 0){ - $rqPrep->bindValue(':limit', $intLimit, PDO::PARAM_INT); - } - - $rqPrep->execute(); - return $rqPrep->fetchAll(); + return $this->_db->query($strRq)->fetchAll(); } @@ -136,9 +110,9 @@ /** * Fonction de recherche d'un seul projet * @param int $intId - * @return array|bool + * @return array */ - public function findOne(int $intId) :array|bool{ + public function findOne(int $intId) :array{ $strRq = "SELECT project.*, users.user_pseudo AS 'project_creatorname', users.user_image, @@ -194,8 +168,7 @@ public function delete_soft_project(int $intId): bool { $strRq = "UPDATE project SET project_deleted_at = NOW(), - project_edit_date = NOW(), - project_status = 'supprimé' + project_edit_date = NOW() WHERE project_id = :id"; $rqPrep = $this->_db->prepare($strRq); diff --git a/models/UserModel.php b/models/UserModel.php index 5663504..3563238 100644 --- a/models/UserModel.php +++ b/models/UserModel.php @@ -37,15 +37,9 @@ $strRq = "SELECT user_id, user_name, user_firstname, user_password, user_image, user_status, authorisation_name, user_pseudo FROM users INNER JOIN authorisation ON authorisation.authorisation_id = users.user_status - WHERE user_mail = :mail"; - - $rqPrep = $this->_db->prepare($strRq); - $rqPrep->bindValue(":mail", $strMail, PDO::PARAM_STR); - $rqPrep->execute(); - - + WHERE user_mail = '".$strMail."'"; - $arrUser = $rqPrep->fetch(); + $arrUser = $this->_db->query($strRq)->fetch(); if (password_verify($strPwd, $arrUser['user_password'])){ unset($arrUser['user_password']); return $arrUser; @@ -242,7 +236,7 @@ /** * Verifie sur le pseudo entré n'est pas déjà utilisé * @param string $pseudo Pseudo a verifié - * @return bool Le pseudo existe ou pas + * @return array Tableau associatif (ou false si pas trouvé) */ public function pseudoExists(string $pseudo): bool{ @@ -250,6 +244,6 @@ $rq->bindValue(":pseudo", $pseudo, PDO::PARAM_STR); $rq->execute(); - return (bool)$rq->fetchColumn(); + return $rq->fetchColumn(); } } diff --git a/uploads/profiles/699d648ba35c3.webp b/uploads/profiles/699d648ba35c3.webp new file mode 100644 index 0000000..3fa3f0a Binary files /dev/null and b/uploads/profiles/699d648ba35c3.webp differ diff --git a/uploads/profiles/69a5f0418103c.webp b/uploads/profiles/69a5f0418103c.webp deleted file mode 100644 index 5652841..0000000 Binary files a/uploads/profiles/69a5f0418103c.webp and /dev/null differ diff --git a/uploads/profiles/69a5f1e87275c.webp b/uploads/profiles/69a5f1e87275c.webp deleted file mode 100644 index db8dfc7..0000000 Binary files a/uploads/profiles/69a5f1e87275c.webp and /dev/null differ diff --git a/uploads/profiles/69a5f231cd969.webp b/uploads/profiles/69a5f231cd969.webp deleted file mode 100644 index 0605d6c..0000000 Binary files a/uploads/profiles/69a5f231cd969.webp and /dev/null differ diff --git a/views/_partial/apigeo.tpl b/views/_partial/apigeo.tpl deleted file mode 100644 index fb32c47..0000000 --- a/views/_partial/apigeo.tpl +++ /dev/null @@ -1,112 +0,0 @@ - - \ No newline at end of file diff --git a/views/_partial/delphoto.tpl b/views/_partial/delphoto.tpl deleted file mode 100644 index 019ebcb..0000000 --- a/views/_partial/delphoto.tpl +++ /dev/null @@ -1,31 +0,0 @@ - \ No newline at end of file diff --git a/views/_partial/footer.tpl b/views/_partial/footer.tpl index fd0d63c..e90b260 100644 --- a/views/_partial/footer.tpl +++ b/views/_partial/footer.tpl @@ -4,24 +4,20 @@
- + \ No newline at end of file diff --git a/views/_partial/header.tpl b/views/_partial/header.tpl index 6f60a4d..316ce2e 100644 --- a/views/_partial/header.tpl +++ b/views/_partial/header.tpl @@ -3,108 +3,101 @@ - - + + + Folliow{block name="title"}{/block} - + +
+
+
+

+ {block name="h2"}{/block} +

+

+ {block name="p"}{/block} +

+

+ {block name="date_maj"}{/block} +

+
+
+
-
-
-
-

- {block name="h2"}{/block} -

-

- {block name="p"}{/block} -

-

- {block name="date_maj"}{/block} -

-
-
-
- + {include file="views/_partial/messages.tpl"} diff --git a/views/_partial/preview.tpl b/views/_partial/preview.tpl index a8c94d5..19ff6d3 100644 --- a/views/_partial/preview.tpl +++ b/views/_partial/preview.tpl @@ -3,46 +3,30 @@
- - + getCreatorName()|stripos:'minou' !== false} - style =" box-shadow: 0 0 0 4px #000; "{/if} alt="" loading="lazy">
-
getCreatorName()|stripos:'minou' !== false}style=" 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; - color: #000 !important; - position: relative; - z-index: 1;"{/if}> +
- - + Photo de profil

{$objProject->getTitle()}

- + style="position: relative; z-index: 2;"> {$objProject->getCreatorname()}

@@ -57,13 +41,8 @@ {if $objProject->getStatus() != "refusé"} - getCreatorName()|stripos:'minou' !== false}style=" - background-color: #000 !important; - color: #ff8c00 !important; - border: none !important; - font-weight: bold !important; - transition: transform 0.2s;"{/if}> + Voir → {/if} @@ -71,7 +50,7 @@ {if isset($smarty.session.user)} {if $smarty.session.user.user_id == $objProject->getUser_id()} - Editer @@ -86,13 +65,13 @@