diff --git a/controllers/project_controller.php b/controllers/project_controller.php
index 6f469f0..e5eecb1 100644
--- a/controllers/project_controller.php
+++ b/controllers/project_controller.php
@@ -263,4 +263,46 @@
header("Location: index.php?ctrl=project&action=home");
exit;
}
+
+ public function accept(){
+
+ //Récupéré l'id dans l'url
+ $intId = $_GET['id'];
+
+ //Je créer un nouveau model pour exec la commande SQL
+ $objProjectModel = new ProjectModel;
+ $objProjectModel->accept($intId);
+
+ //Redirection vers la page
+ header("Location: index.php");
+ exit;
+ }
+
+ public function refuse(){
+
+ //Récupéré l'id dans l'url
+ $intId = $_GET['id'];
+
+ //Je créer un nouveau model pour exec la commande SQL
+ $objProjectModel = new ProjectModel;
+ $objProjectModel->refuse($intId);
+
+ //Redirection vers la page
+ header("Location: index.php");
+ exit;
+ }
+
+ public function delete(){
+
+ //Récupéré l'id dans l'url
+ $intId = $_GET['id'];
+
+ //Je créer un nouveau model pour exec la commande SQL
+ $objProjectModel = new ProjectModel;
+ $objProjectModel->delete($intId);
+
+ //Redirection vers la page
+ header("Location: index.php");
+ exit;
+ }
}
\ No newline at end of file
diff --git a/controllers/user_controller.php b/controllers/user_controller.php
index 70e2599..b6938e1 100644
--- a/controllers/user_controller.php
+++ b/controllers/user_controller.php
@@ -147,7 +147,4 @@ class UserCtrl extends MotherCtrl {
// Affichage de la vue inscription
$this->_display("inscription");
}
-
-
-
}
diff --git a/models/mother_model.php b/models/mother_model.php
index d43d0fa..9bc3881 100644
--- a/models/mother_model.php
+++ b/models/mother_model.php
@@ -20,4 +20,16 @@
echo "Échec : " . $e->getMessage();
}
}
- }
\ No newline at end of file
+ }
+
+ /**
+ Pour passer sur le serveur de YASS:
+ *"mysql:host=boulayoune.com;dbname=projet_folliow", // Serveur et BDD
+ "projet_user", //Nom d'utilisateur de la base de données
+ "F0lliowRules!",// Mot de passe de la base de données
+
+ Pour passer en local:
+ "mysql:host=localhost;dbname=projet_folliow", // Serveur et BDD
+ "root", //Nom d'utilisateur de la base de données
+ "",// Mot de passe de la base de données
+ */
\ No newline at end of file
diff --git a/models/project_model.php b/models/project_model.php
index c0ffece..058788a 100644
--- a/models/project_model.php
+++ b/models/project_model.php
@@ -122,4 +122,32 @@
return $rqPrep->fetch();
}
+
+ public function accept(int $id){
+
+ //SQL pour changer le status en accept
+ $strRq = "UPDATE project
+ SET project_status= 'publié'
+ WHERE project_id =".$id;
+
+ //retourne la commande
+ return $this->_db->query($strRq);
+ }
+
+ public function refuse(int $id){
+
+ $strRq = "UPDATE project
+ SET project_status= 'refusé'
+ WHERE project_id =".$id;
+
+ return $this->_db->query($strRq);
+ }
+
+ public function delete(int $id){
+
+ $strRq = "DELETE FROM project
+ WHERE project_id =".$id;
+
+ return $this->_db->query($strRq);
+ }
}
\ No newline at end of file
diff --git a/templates_c/061ec8f4caa90f6cac9dd0d1f101149077158460_0.file_projet_display.tpl.php b/templates_c/061ec8f4caa90f6cac9dd0d1f101149077158460_0.file_projet_display.tpl.php
new file mode 100644
index 0000000..825c29f
--- /dev/null
+++ b/templates_c/061ec8f4caa90f6cac9dd0d1f101149077158460_0.file_projet_display.tpl.php
@@ -0,0 +1,128 @@
+getCompiled()->isFresh($_smarty_tpl, array (
+ 'version' => '5.7.0',
+ 'unifunc' => 'content_6989e58c411304_60305191',
+ 'has_nocache_code' => false,
+ 'file_dependency' =>
+ array (
+ '061ec8f4caa90f6cac9dd0d1f101149077158460' =>
+ array (
+ 0 => 'views/projet_display.tpl',
+ 1 => 1770639154,
+ 2 => 'file',
+ ),
+ ),
+ 'includes' =>
+ array (
+ ),
+))) {
+function content_6989e58c411304_60305191 (\Smarty\Template $_smarty_tpl) {
+$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\projet_php-guillaume\\views';
+$_smarty_tpl->getInheritance()->init($_smarty_tpl, true);
+?>
+
+
+getInheritance()->instanceBlock($_smarty_tpl, 'Block_13978244256989e58c406518_61332798', "content");
+$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir);
+}
+/* {block "content"} */
+class Block_13978244256989e58c406518_61332798 extends \Smarty\Runtime\Block
+{
+public function callBlock(\Smarty\Template $_smarty_tpl) {
+$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\projet_php-guillaume\\views';
+?>
+
+
+
+
+
+ Email envoyé avec succès.
+
+ Erreur lors de l'envoi de l'email.
+
+
+
+
+
+
+
+
getValue('objProject')->getTitle();?>
+
+
+
+ getValue('arrProject')['category_name'] ?? 'Général';?>
+
+
+
+
+
+
+
+
+
Description
+
getValue('objProject')->getDescription();?>
+
+
+
+ getValue('objProject')->getContent();?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getValue('objProject')->getCreatorName();?>
+
+
+
+ Publié le getValue('objProject')->getCreation_date();?>
+
+
+
+
Contacter le talent
+
+
+
+
+
+
+getCompiled()->isFresh($_smarty_tpl, array (
+ 'version' => '5.7.0',
+ 'unifunc' => 'content_6989f726978651_30802796',
+ 'has_nocache_code' => false,
+ 'file_dependency' =>
+ array (
+ '20a11b6ecdc7e0959bdb519973f0177a783a4561' =>
+ array (
+ 0 => 'views/_partial/header.tpl',
+ 1 => 1770639154,
+ 2 => 'file',
+ ),
+ ),
+ 'includes' =>
+ array (
+ ),
+))) {
+function content_6989f726978651_30802796 (\Smarty\Template $_smarty_tpl) {
+$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\projet_php-guillaume\\views\\_partial';
+?>
+
+
+
+
+
+
+
+
+ src="https://use.fontawesome.com/releases/v6.3.0/js/all.js" crossorigin="anonymous">
+>
+ Folliow
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+getCompiled()->isFresh($_smarty_tpl, array (
+ 'version' => '5.7.0',
+ 'unifunc' => 'content_6989f7269f97f7_68511256',
+ 'has_nocache_code' => false,
+ 'file_dependency' =>
+ array (
+ '3848b4db17319a951391d803dc4119c46e490c52' =>
+ array (
+ 0 => 'views/_partial/preview.tpl',
+ 1 => 1770646177,
+ 2 => 'file',
+ ),
+ ),
+ 'includes' =>
+ array (
+ ),
+))) {
+function content_6989f7269f97f7_68511256 (\Smarty\Template $_smarty_tpl) {
+$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\projet_php-guillaume\\views\\_partial';
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getValue('objProject')->getTitle();?>
+
+
+
+ getValue('objProject')->getCreation_date();?>
+
+ – getValue('objProject')->getCreatorname();?>
+
+
+
+
+ Lire la suite →
+
+
+
+
+
+
+ getValue('objProject')->getStatus() == "en_attente") {?>
+
+ getValue('projectStatus') == "refusé") {?>
+ Portfolio refusé
+
+ getCompiled()->isFresh($_smarty_tpl, array (
+ 'version' => '5.7.0',
+ 'unifunc' => 'content_6989e5b1383d99_95399806',
+ 'has_nocache_code' => false,
+ 'file_dependency' =>
+ array (
+ '55cbb497c7dde2dae3a712628e44c1dff2d9365b' =>
+ array (
+ 0 => 'views/search.tpl',
+ 1 => 1770639154,
+ 2 => 'file',
+ ),
+ ),
+ 'includes' =>
+ array (
+ 'file:views/_partial/preview.tpl' => 1,
+ ),
+))) {
+function content_6989e5b1383d99_95399806 (\Smarty\Template $_smarty_tpl) {
+$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\projet_php-guillaume\\views';
+$_smarty_tpl->getInheritance()->init($_smarty_tpl, true);
+?>
+
+
+getInheritance()->instanceBlock($_smarty_tpl, 'Block_10517171146989e5b1375aa5_10994726', "content");
+$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir);
+}
+/* {block "content"} */
+class Block_10517171146989e5b1375aa5_10994726 extends \Smarty\Runtime\Block
+{
+public function callBlock(\Smarty\Template $_smarty_tpl) {
+$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\projet_php-guillaume\\views';
+?>
+
+
+ Rechercher parmi les articles
+
+
+
+
+
+ Liste des projets
+
+ getSmarty()->getModifierCallback('count')($_smarty_tpl->getValue('arrProject')) == 0) {?>
+
+
+ getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrProjectToDisplay'), 'objProject');
+$foreach2DoElse = true;
+foreach ($_from ?? [] as $_smarty_tpl->getVariable('objProject')->value) {
+$foreach2DoElse = false;
+?>
+ renderSubTemplate("file:views/_partial/preview.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
+?>
+ getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
+
+
+
+
+
+>
+ // Gestion de l'affichage des champs de date
+ const periodRadios = document.querySelectorAll('input[name="period"]');
+ const dateExact = document.getElementById('date-exact');
+ const dateRange = document.getElementById('date-range');
+
+ function toggleDateFields() {
+ const selectedPeriod = document.querySelector('input[name="period"]:checked').value;
+
+ if (selectedPeriod === '0') {
+ dateExact.style.display = 'block';
+ dateRange.style.display = 'none';
+ } else {
+ dateExact.style.display = 'none';
+ dateRange.style.display = 'block';
+ }
+ }
+
+ periodRadios.forEach(radio => {
+ radio.addEventListener('change', toggleDateFields);
+ });
+
+ // Initialisation au chargement
+ toggleDateFields();
+
+>
+getCompiled()->isFresh($_smarty_tpl, array (
+ 'version' => '5.7.0',
+ 'unifunc' => 'content_6989f726914163_83904848',
+ 'has_nocache_code' => false,
+ 'file_dependency' =>
+ array (
+ '708269d7487a64eac6b48ed73fcd1924b1bda41b' =>
+ array (
+ 0 => 'views/layout.tpl',
+ 1 => 1770639154,
+ 2 => 'file',
+ ),
+ ),
+ 'includes' =>
+ array (
+ 'file:views/_partial/header.tpl' => 1,
+ 'file:views/_partial/footer.tpl' => 1,
+ ),
+))) {
+function content_6989f726914163_83904848 (\Smarty\Template $_smarty_tpl) {
+$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\projet_php-guillaume\\views';
+$_smarty_tpl->getInheritance()->init($_smarty_tpl, false);
+$_smarty_tpl->renderSubTemplate("file:views/_partial/header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
+?>
+
+getInheritance()->instanceBlock($_smarty_tpl, 'Block_14089017836989f726912e95_86271581', "content");
+?>
+
+
+renderSubTemplate("file:views/_partial/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
+}
+/* {block "content"} */
+class Block_14089017836989f726912e95_86271581 extends \Smarty\Runtime\Block
+{
+public function callBlock(\Smarty\Template $_smarty_tpl) {
+$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\projet_php-guillaume\\views';
+?>
+
+
+getCompiled()->isFresh($_smarty_tpl, array (
+ 'version' => '5.7.0',
+ 'unifunc' => 'content_6989f72687e0c8_78461032',
+ 'has_nocache_code' => false,
+ 'file_dependency' =>
+ array (
+ '7e6dbbb1e41ad859e7f5b7b444b7670474263f88' =>
+ array (
+ 0 => 'views/home.tpl',
+ 1 => 1770639154,
+ 2 => 'file',
+ ),
+ ),
+ 'includes' =>
+ array (
+ 'file:views/_partial/preview.tpl' => 1,
+ ),
+))) {
+function content_6989f72687e0c8_78461032 (\Smarty\Template $_smarty_tpl) {
+$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\projet_php-guillaume\\views';
+$_smarty_tpl->getInheritance()->init($_smarty_tpl, true);
+?>
+
+
+getInheritance()->instanceBlock($_smarty_tpl, 'Block_15962470546989f72687a521_39502617', "content");
+?>
+
+getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir);
+}
+/* {block "content"} */
+class Block_15962470546989f72687a521_39502617 extends \Smarty\Runtime\Block
+{
+public function callBlock(\Smarty\Template $_smarty_tpl) {
+$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\projet_php-guillaume\\views';
+?>
+
+
+ Folliow
+ Là où les talents rencontrent leur avenir
+ Une plateforme de portfolio adapté à vos besoins et aux besoins des entreprises.
+ Créer un portfolio réellement pertinent aux exigences du marché et rentrez
+ directement en contact avec les entreprises.
+
+
+
+ Les 4 derniers articles
+
+
+ getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrProjectToDisplay'), 'objProject');
+$foreach0DoElse = true;
+foreach ($_from ?? [] as $_smarty_tpl->getVariable('objProject')->value) {
+$foreach0DoElse = false;
+?>
+ renderSubTemplate("file:views/_partial/preview.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
+?>
+ getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
+
+getCompiled()->isFresh($_smarty_tpl, array (
+ 'version' => '5.7.0',
+ 'unifunc' => 'content_6989f71c761896_25894348',
+ 'has_nocache_code' => false,
+ 'file_dependency' =>
+ array (
+ 'b7b39f4634df66c24660dc5baa93ac9d38bfe874' =>
+ array (
+ 0 => 'views/login.tpl',
+ 1 => 1770639154,
+ 2 => 'file',
+ ),
+ ),
+ 'includes' =>
+ array (
+ ),
+))) {
+function content_6989f71c761896_25894348 (\Smarty\Template $_smarty_tpl) {
+$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\projet_php-guillaume\\views';
+$_smarty_tpl->getInheritance()->init($_smarty_tpl, true);
+?>
+
+
+getInheritance()->instanceBlock($_smarty_tpl, 'Block_19992775976989f71c758fc2_34188356', "content");
+$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir);
+}
+/* {block "content"} */
+class Block_19992775976989f71c758fc2_34188356 extends \Smarty\Runtime\Block
+{
+public function callBlock(\Smarty\Template $_smarty_tpl) {
+$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\projet_php-guillaume\\views';
+?>
+
+
+ getSmarty()->getModifierCallback('count')($_smarty_tpl->getValue('arrError')) > 0) {?>
+
+ getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrError'), 'strError');
+$foreach0DoElse = true;
+foreach ($_from ?? [] as $_smarty_tpl->getVariable('strError')->value) {
+$foreach0DoElse = false;
+?>
+
getValue('strError');?>
+
+ getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Connexion
+
+
+
+ Connectez-vous à votre compte.
+
+
+
+
+
+
+
+
+
+
+
+
+getCompiled()->isFresh($_smarty_tpl, array (
+ 'version' => '5.7.0',
+ 'unifunc' => 'content_6989f726ac4850_67307943',
+ 'has_nocache_code' => false,
+ 'file_dependency' =>
+ array (
+ 'cef94db5b9dde613f0f79dcacc6c7b4e161e98a2' =>
+ array (
+ 0 => 'views/_partial/footer.tpl',
+ 1 => 1770639154,
+ 2 => 'file',
+ ),
+ ),
+ 'includes' =>
+ array (
+ ),
+))) {
+function content_6989f726ac4850_67307943 (\Smarty\Template $_smarty_tpl) {
+$_smarty_current_dir = 'C:\\wamp64\\www\\Folliow\\projet_php-guillaume\\views\\_partial';
+?>
+
+
+ src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous">
+>
+
+ src="js/scripts.js">
+>
+