diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..db60a95 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,36 @@ +name: Deploy production (servyass) + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Deploy via SSH + uses: appleboy/ssh-action@master + with: + host: boulayoune.com + username: yass + key: ${{ secrets.SSH_KEY }} + port: 22 + script: | + set -e + echo "➡️ Connexion réussie !" + cd /var/www/projet_php + + echo "➡️ Mise à jour du code..." + # On enlève le SUDO ici pour que Git utilise la clé de l'utilisateur yass + git fetch origin main + git reset --hard origin/main + + echo "➡️ Correction des permissions et nettoyage..." + # On garde le SUDO ici car ces commandes touchent au système + sudo chown -R yass:www-data /var/www/projet_php + sudo chmod -R 775 /var/www/projet_php/templates_c + sudo rm -rf /var/www/projet_php/templates_c/* + + echo "✅ Déploiement terminé ! (Shin-en no Egotisu)" \ No newline at end of file diff --git a/assests/img/Logo.png b/assests/img/logo.png similarity index 100% rename from assests/img/Logo.png rename to assests/img/logo.png diff --git a/controllers/project_controller.php b/controllers/project_controller.php index 232d32d..68fca13 100644 --- a/controllers/project_controller.php +++ b/controllers/project_controller.php @@ -85,6 +85,7 @@ $this->_arrData['arrProjectToDisplay'] = $arrProjectToDisplay; $this->_arrData['arrCategory'] = $arrCategory; + $this->_arrData['arrProject'] = $arrProject; $this->_arrData['arrUser'] = $arrUser; @@ -179,7 +180,7 @@ $objProject->hydrate($arrProject); $this->_arrData["objProject"] = $objProject; - $this->_display("projet_display"); + $this->_display("project_display"); } else { header("Location: index.php?ctrl=project&action=home"); exit; diff --git a/controllers/user_controller.php b/controllers/user_controller.php index f231dd3..1a3b464 100644 --- a/controllers/user_controller.php +++ b/controllers/user_controller.php @@ -3,6 +3,8 @@ require("models/user_model.php"); require("entities/user_entity.php"); require("mother_controller.php"); + require("./models/project_model.php"); + require("./entities/project_entity.php"); class UserCtrl extends MotherCtrl { @@ -121,7 +123,6 @@ class UserCtrl extends MotherCtrl { // Si pas d'erreurs => insertion if (count($arrError) === 0) { $objUserModel = new UserModel(); - $boolInsert = $objUserModel->insert($objUser); if ($objUserModel->mailExists($objUser->getMail())) { @@ -141,6 +142,46 @@ class UserCtrl extends MotherCtrl { } // Affichage de la vue inscription + $this->_arrData["arrError"] = $arrError; $this->_display("inscription"); } + + /** + * le controlleur affichage de la page user + */ + public function user(){ + + $intId = isset($_GET['id']) ? (int)$_GET['id'] : 0; + + if ($intId <= 0) { + header("Location: index.php"); + exit; + } + + //affichage info utilisateur + $objUserModel = new UserModel; + $arrUserData = $objUserModel->findUserById($intId); + + if ($arrUserData === false) { + header("Location: index.php"); + exit; + } + $objUser = new User; + $objUser->hydrate($arrUserData); + + //affichage projet de l'utilisateur + $objProjectModel = new ProjectModel; + $arrProjects = $objProjectModel->findAll(0,'',$intId); + + $arrProjectToDisplay = array(); + foreach($arrProjects as $projectData) { + $objProject = new Project(); + $objProject->hydrate($projectData); + $arrProjectToDisplay[] = $objProject; + } + + $this->_arrData['user'] = $objUser; + $this->_arrData['arrProjectToDisplay'] = $arrProjectToDisplay; + $this->_display("user"); + } } diff --git a/models/mother_model.php b/models/mother_model.php index 9ccd7ec..59eea4f 100644 --- a/models/mother_model.php +++ b/models/mother_model.php @@ -7,9 +7,9 @@ try{ // Connexion à la base de données $this->_db = new PDO( - "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 + "mysql:host=boulayoune.com;dbname=projet_folliow", // Serveur et BDD "mysql:host=localhost;dbname=projet_folliow", + "projet_user", //Nom d'utilisateur de la base de données root + "F0lliowRules!",// Mot de passe de la base de données array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC) // Mode de renvoi ); // Pour résoudre les problèmes d’encodage diff --git a/models/project_model.php b/models/project_model.php index 058788a..d6bce18 100644 --- a/models/project_model.php +++ b/models/project_model.php @@ -104,9 +104,9 @@ /** * Fonction de recherche d'un seul projet * @param int $intId - * @return + * @return array */ - public function findOne(int $intId) { + public function findOne(int $intId) :array{ $strRq = "SELECT project.*, CONCAT(users.user_firstname, ' ', users.user_name) AS 'project_creatorname', users.user_image, @@ -150,4 +150,26 @@ return $this->_db->query($strRq); } + + /** + * Fonction de mise à jour d'un projet en BDD + * @param object $objProject L'objet utilisateur + * @return bool Est-ce que la requête s'est bien passée + */ + public function updateProject(object $objProject):bool{ + + $strRq = "UPDATE project + SET project_title = :title, project_description = :description, project_content = :content + WHERE project_id = :id"; + + $rqPrep = $this->_db->prepare($strRq); + + $rqPrep->bindValue(":title", $objProject->getTitle(), PDO::PARAM_STR); + $rqPrep->bindValue(":description", $objProject->getDescription(), PDO::PARAM_STR); + $rqPrep->bindValue(":content", $objProject->getContent(), PDO::PARAM_STR); + + + // Executer la requête + return $rqPrep->execute(); + } } \ No newline at end of file diff --git a/models/user_model.php b/models/user_model.php index d20b743..baa46dd 100644 --- a/models/user_model.php +++ b/models/user_model.php @@ -116,5 +116,21 @@ $rqPrep = $this->_db->prepare($strRq); $rqPrep->bindValue(":id", $intId, PDO::PARAM_INT); return $rqPrep->execute(); - } + } + + /** + * Récupère les informations d'un utilisateur par son ID + * @param int $intId L'identifiant de l'utilisateur + * @return array Tableau associatif (ou false si pas trouvé) + */ + public function findUserById(int $intId): array|bool { + + $strRq = "SELECT * FROM users WHERE user_id = :id"; + + $prep = $this->_db->prepare($strRq); + $prep->bindValue(':id', $intId, PDO::PARAM_INT); + $prep->execute(); + + return $prep->fetch(); + } } diff --git a/templates_c/0f54e8b5c9bcafd01d94486bfa02ee91c2c5fe68_0.file_home.tpl.php b/templates_c/0f54e8b5c9bcafd01d94486bfa02ee91c2c5fe68_0.file_home.tpl.php index 76d88b5..19e2b80 100644 --- a/templates_c/0f54e8b5c9bcafd01d94486bfa02ee91c2c5fe68_0.file_home.tpl.php +++ b/templates_c/0f54e8b5c9bcafd01d94486bfa02ee91c2c5fe68_0.file_home.tpl.php @@ -1,18 +1,18 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989b403135214_06797903', + 'unifunc' => 'content_698cb3489df022_21637833', 'has_nocache_code' => false, 'file_dependency' => array ( '0f54e8b5c9bcafd01d94486bfa02ee91c2c5fe68' => array ( 0 => 'views/home.tpl', - 1 => 1770579251, + 1 => 1770721453, 2 => 'file', ), ), @@ -21,20 +21,20 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( 'file:views/_partial/preview.tpl' => 1, ), ))) { -function content_6989b403135214_06797903 (\Smarty\Template $_smarty_tpl) { +function content_698cb3489df022_21637833 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'D:\\projetphp\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, true); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_8519413186989b403131000_39935260', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_625675898698cb3489daba8_53798441', "content"); ?> getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); } /* {block "content"} */ -class Block_8519413186989b403131000_39935260 extends \Smarty\Runtime\Block +class Block_625675898698cb3489daba8_53798441 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'D:\\projetphp\\views'; @@ -48,6 +48,19 @@ $_smarty_current_dir = 'D:\\projetphp\\views'; directement en contact avec les entreprises.

+
+
+
+ + + + + + Tout +
+
+
+

Les 4 derniers articles

diff --git a/templates_c/184f81453f2b8e9c87b8f61bf5df178eaf9a1be4_0.file_inscription.tpl.php b/templates_c/184f81453f2b8e9c87b8f61bf5df178eaf9a1be4_0.file_inscription.tpl.php new file mode 100644 index 0000000..89d19a3 --- /dev/null +++ b/templates_c/184f81453f2b8e9c87b8f61bf5df178eaf9a1be4_0.file_inscription.tpl.php @@ -0,0 +1,245 @@ +getCompiled()->isFresh($_smarty_tpl, array ( + 'version' => '5.7.0', + 'unifunc' => 'content_698cba62a72df8_61715147', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + '184f81453f2b8e9c87b8f61bf5df178eaf9a1be4' => + array ( + 0 => 'views/inscription.tpl', + 1 => 1770830431, + 2 => 'file', + ), + ), + 'includes' => + array ( + ), +))) { +function content_698cba62a72df8_61715147 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'D:\\projetphp\\views'; +$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); +?> + + +getInheritance()->instanceBlock($_smarty_tpl, 'Block_1012653795698cba62a6b7c0_71138616', "content"); +$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); +} +/* {block "content"} */ +class Block_1012653795698cba62a6b7c0_71138616 extends \Smarty\Runtime\Block +{ +public function callBlock(\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'D:\\projetphp\\views'; +?> + + + + +
+ + +
+
+ + +
+ + +

Inscription

+ + +

+ Créez votre compte utilisateur. +

+ hasVariable('arrError') && null !== ($_smarty_tpl->getValue('arrError') ?? null))) && $_smarty_tpl->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);?> +
+ + + +
+ +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ @ + +
+
+ + +
+ + +
+ + +
+ + +
+ +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ + +
+ + Déjà un compte ? + Se connecter + +
+ + +
+ + +
+ +
+
+
+getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989b41646f355_64257736', + 'unifunc' => 'content_698cba62b4e137_64473486', 'has_nocache_code' => false, 'file_dependency' => array ( '1c51ad9f5c349145220f82584009ce981aa35e0b' => array ( 0 => 'views/layout.tpl', - 1 => 1770579251, + 1 => 1770649781, 2 => 'file', ), ), @@ -22,21 +22,21 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( 'file:views/_partial/footer.tpl' => 1, ), ))) { -function content_6989b41646f355_64257736 (\Smarty\Template $_smarty_tpl) { +function content_698cba62b4e137_64473486 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'D:\\projetphp\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, false); $_smarty_tpl->renderSubTemplate("file:views/_partial/header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_12018663056989b41646d2e0_34201164', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_1102964570698cba62b4c8c6_53649331', "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_12018663056989b41646d2e0_34201164 extends \Smarty\Runtime\Block +class Block_1102964570698cba62b4c8c6_53649331 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'D:\\projetphp\\views'; diff --git a/templates_c/264314e384c04e79c5fa56e3cf6837f9df55d7fb_0.file_footer.tpl.php b/templates_c/264314e384c04e79c5fa56e3cf6837f9df55d7fb_0.file_footer.tpl.php index 54f0ed8..1eabb22 100644 --- a/templates_c/264314e384c04e79c5fa56e3cf6837f9df55d7fb_0.file_footer.tpl.php +++ b/templates_c/264314e384c04e79c5fa56e3cf6837f9df55d7fb_0.file_footer.tpl.php @@ -1,18 +1,18 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989b416601ef8_77236186', + 'unifunc' => 'content_698cba62c7aed8_62552440', 'has_nocache_code' => false, 'file_dependency' => array ( '264314e384c04e79c5fa56e3cf6837f9df55d7fb' => array ( 0 => 'views/_partial/footer.tpl', - 1 => 1770579251, + 1 => 1770649781, 2 => 'file', ), ), @@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_6989b416601ef8_77236186 (\Smarty\Template $_smarty_tpl) { +function content_698cba62c7aed8_62552440 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'D:\\projetphp\\views\\_partial'; ?>
diff --git a/templates_c/32d027bc6f198a0e3016434b0dddc13d6ee22b4c_0.file_user.tpl.php b/templates_c/32d027bc6f198a0e3016434b0dddc13d6ee22b4c_0.file_user.tpl.php new file mode 100644 index 0000000..d919b98 --- /dev/null +++ b/templates_c/32d027bc6f198a0e3016434b0dddc13d6ee22b4c_0.file_user.tpl.php @@ -0,0 +1,99 @@ +getCompiled()->isFresh($_smarty_tpl, array ( + 'version' => '5.7.0', + 'unifunc' => 'content_698b36e931d9d8_07796633', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + '32d027bc6f198a0e3016434b0dddc13d6ee22b4c' => + array ( + 0 => 'views/user.tpl', + 1 => 1770729421, + 2 => 'file', + ), + ), + 'includes' => + array ( + 'file:views/_partial/preview.tpl' => 1, + ), +))) { +function content_698b36e931d9d8_07796633 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; +$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); +?> + + +getInheritance()->instanceBlock($_smarty_tpl, 'Block_2035018945698b36e930efe0_69529586', "content"); +$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); +} +/* {block "content"} */ +class Block_2035018945698b36e930efe0_69529586 extends \Smarty\Runtime\Block +{ +public function callBlock(\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'C:\\wamp64\\www\\DWWM_2025\\projet2\\views'; +?> + + + + +
+

Les projets de getValue('user')->getPseudo();?> +

+ +
+ getSmarty()->getModifierCallback('count')($_smarty_tpl->getValue('arrProjectToDisplay')) > 0) {?> + 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);?> + +

Cet utilisateur n'a pas encore publié de projets.

+ +
+
+ +getCompiled()->isFresh($_smarty_tpl, array ( + 'version' => '5.7.0', + 'unifunc' => 'content_698cb22434fee2_91445718', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + '4c2b74d2d77abca5363ffd92e8bc3a455c22b1bd' => + array ( + 0 => 'views/project_display.tpl', + 1 => 1770828198, + 2 => 'file', + ), + ), + 'includes' => + array ( + ), +))) { +function content_698cb22434fee2_91445718 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'D:\\projetphp\\views'; +$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); +?> + + +getInheritance()->instanceBlock($_smarty_tpl, 'Block_1025150471698cb224342408_37694456', "content"); +$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); +} +/* {block "content"} */ +class Block_1025150471698cb224342408_37694456 extends \Smarty\Runtime\Block +{ +public function callBlock(\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'D:\\projetphp\\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();?> + +

+ + + +
+
+ +
+
+getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989b416566583_15954947', + 'unifunc' => 'content_698cb92a3aa989_86517927', 'has_nocache_code' => false, 'file_dependency' => array ( '67e1ae3a210fc2d1bf8782993687bad91a1cf0f6' => array ( 0 => 'views/_partial/preview.tpl', - 1 => 1770629075, + 1 => 1770828147, 2 => 'file', ), ), @@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_6989b416566583_15954947 (\Smarty\Template $_smarty_tpl) { +function content_698cb92a3aa989_86517927 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'D:\\projetphp\\views\\_partial'; ?> @@ -38,32 +38,60 @@ $_smarty_current_dir = 'D:\\projetphp\\views\\_partial';
- getValue('objProject')->getUser_image();?> " - class="rounded-circle flex-shrink-0 mt-2 ml-5" - style="width: 48px; height: 48px; object-fit: cover;" - alt="Photo de profil"> + class="rounded-circle flex-shrink-0 mt-2 ml-5" + style="width: 48px; height: 48px; object-fit: cover;" + alt="Photo de profil"> -
-

getValue('objProject')->getTitle();?> +
+

getValue('objProject')->getTitle();?>

- - - getValue('objProject')->getId();?> " - class="stretched-link small"> - Lire la suite → - -
+ class="stretched-link small"> + Lire la suite → + + + getValue('objProject')->getUser()) {?> + + Editer + + + +

-
+
-getValue('objProject')->getStatus() == "en_attente") {?> +
+ Accepter + Refuser + Supprimer +
+ getValue('projectStatus') == "refusé") {?> +

Portfolio refusé

+ + +getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989b4162cc7a7_31054147', + 'unifunc' => 'content_698cb92a0876d1_70933700', 'has_nocache_code' => false, 'file_dependency' => array ( '72e5e5c0ee2729980deadb1687a6d7b7b3c501bb' => array ( 0 => 'views/search.tpl', - 1 => 1770580115, + 1 => 1770649781, 2 => 'file', ), ), @@ -21,18 +21,18 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( 'file:views/_partial/preview.tpl' => 1, ), ))) { -function content_6989b4162cc7a7_31054147 (\Smarty\Template $_smarty_tpl) { +function content_698cb92a0876d1_70933700 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'D:\\projetphp\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, true); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_1139012436989b4162bac57_95455595', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_17092653698cb92a075e12_78860742', "content"); $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); } /* {block "content"} */ -class Block_1139012436989b4162bac57_95455595 extends \Smarty\Runtime\Block +class Block_17092653698cb92a075e12_78860742 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'D:\\projetphp\\views'; diff --git a/templates_c/8056b95e7f6b28be5e36947735d13c8d176ec944_0.file_header.tpl.php b/templates_c/8056b95e7f6b28be5e36947735d13c8d176ec944_0.file_header.tpl.php index bdde77a..fe50bd4 100644 --- a/templates_c/8056b95e7f6b28be5e36947735d13c8d176ec944_0.file_header.tpl.php +++ b/templates_c/8056b95e7f6b28be5e36947735d13c8d176ec944_0.file_header.tpl.php @@ -1,18 +1,18 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989b4164decf6_40046278', + 'unifunc' => 'content_698cba62bdf239_98152130', 'has_nocache_code' => false, 'file_dependency' => array ( '8056b95e7f6b28be5e36947735d13c8d176ec944' => array ( 0 => 'views/_partial/header.tpl', - 1 => 1770631509, + 1 => 1770827564, 2 => 'file', ), ), @@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_6989b4164decf6_40046278 (\Smarty\Template $_smarty_tpl) { +function content_698cba62bdf239_98152130 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'D:\\projetphp\\views\\_partial'; ?> @@ -38,7 +38,7 @@ $_smarty_current_dir = 'D:\\projetphp\\views\\_partial'; - +getCompiled()->isFresh($_smarty_tpl, array ( + 'version' => '5.7.0', + 'unifunc' => 'content_698cb2800e84d0_43477988', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + 'ac38676c030d472426b3bc83bc530b255f98de05' => + array ( + 0 => 'views/user.tpl', + 1 => 1770828319, + 2 => 'file', + ), + ), + 'includes' => + array ( + 'file:views/_partial/preview.tpl' => 1, + ), +))) { +function content_698cb2800e84d0_43477988 (\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'D:\\projetphp\\views'; +$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); +?> + + +getInheritance()->instanceBlock($_smarty_tpl, 'Block_2003790771698cb2800d9f81_10343438', "content"); +$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); +} +/* {block "content"} */ +class Block_2003790771698cb2800d9f81_10343438 extends \Smarty\Runtime\Block +{ +public function callBlock(\Smarty\Template $_smarty_tpl) { +$_smarty_current_dir = 'D:\\projetphp\\views'; +?> + + + + +
+

Les projets de getValue('user')->getPseudo();?> +

+ +
+ getSmarty()->getModifierCallback('count')($_smarty_tpl->getValue('arrProjectToDisplay')) > 0) {?> + 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);?> + +

Cet utilisateur n'a pas encore publié de projets.

+ +
+
+ +getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989b40d157c69_73022561', + 'unifunc' => 'content_698cb953b608a8_76956629', 'has_nocache_code' => false, 'file_dependency' => array ( 'b44ab733c93381dbf5dbbeae871506874cefd9d6' => array ( 0 => 'views/login.tpl', - 1 => 1770632188, + 1 => 1770649781, 2 => 'file', ), ), @@ -20,18 +20,18 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_6989b40d157c69_73022561 (\Smarty\Template $_smarty_tpl) { +function content_698cb953b608a8_76956629 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'D:\\projetphp\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, true); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_3583856956989b40d14e663_91083378', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_1066475645698cb953b56638_10931349', "content"); $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); } /* {block "content"} */ -class Block_3583856956989b40d14e663_91083378 extends \Smarty\Runtime\Block +class Block_1066475645698cb953b56638_10931349 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'D:\\projetphp\\views'; diff --git a/templates_c/f80694cc4829becd656ad4f73c431db5dba4722b_0.file_admin.tpl.php b/templates_c/f80694cc4829becd656ad4f73c431db5dba4722b_0.file_admin.tpl.php index f948f94..de247f5 100644 --- a/templates_c/f80694cc4829becd656ad4f73c431db5dba4722b_0.file_admin.tpl.php +++ b/templates_c/f80694cc4829becd656ad4f73c431db5dba4722b_0.file_admin.tpl.php @@ -1,18 +1,18 @@ getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.7.0', - 'unifunc' => 'content_6989b189902285_60575184', + 'unifunc' => 'content_698cb277dd9632_57655004', 'has_nocache_code' => false, 'file_dependency' => array ( 'f80694cc4829becd656ad4f73c431db5dba4722b' => array ( 0 => 'views/admin.tpl', - 1 => 1770630804, + 1 => 1770827564, 2 => 'file', ), ), @@ -20,193 +20,139 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( array ( ), ))) { -function content_6989b189902285_60575184 (\Smarty\Template $_smarty_tpl) { +function content_698cb277dd9632_57655004 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'D:\\projetphp\\views'; $_smarty_tpl->getInheritance()->init($_smarty_tpl, true); ?> getInheritance()->instanceBlock($_smarty_tpl, 'Block_13716580806989b1898f9564_82803825', "content"); +$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_186078871698cb277dcbef8_81710710', "content"); $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); } /* {block "content"} */ -class Block_13716580806989b1898f9564_82803825 extends \Smarty\Runtime\Block +class Block_186078871698cb277dcbef8_81710710 extends \Smarty\Runtime\Block { public function callBlock(\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = 'D:\\projetphp\\views'; ?> -
- - - -
-
- -
- -
-
-
-

Dashboard

-
- -
-
-
-
- -
-
- + + getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('arrUserToDisplay'), 'user'); $foreach0DoElse = true; -foreach ($_from ?? [] as $_smarty_tpl->getVariable('arrDetStatus')->value) { +foreach ($_from ?? [] as $_smarty_tpl->getVariable('user')->value) { $foreach0DoElse = false; ?> - - getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?> - -
-
- -
-
-
-
- -
-
-
-
-
- + -
- -
-
- -
-
- -
+ +
+
+ + +
+ +
+
+
+ +
+
+

Gestion des catégories

+
+
+
+

Modifier une catégorie existante

+ +
+
+ +
-
-
-
-
- -
- -
- - -
-
-
- -
+ + +
+
+
+
+
+ +
+
+

Créer une nouvelle catégorie

+
+ +
-
- +
+ +
+ +
-
+
-
+ + +
Connecté avec le compte : + + +
+
{* Logo *} - + Logo @@ -71,7 +71,7 @@
- \ No newline at end of file + diff --git a/views/_partial/preview.tpl b/views/_partial/preview.tpl index 4c6b39f..df3fd10 100644 --- a/views/_partial/preview.tpl +++ b/views/_partial/preview.tpl @@ -15,7 +15,7 @@
{* PHOTO DE PROFIL *} - Photo de profil @@ -26,13 +26,26 @@ - – {$objProject->getCreatorname()} + – + + {$objProject->getCreatorname()} + - Lire la suite → + class="stretched-link small"> + Lire la suite → + {if isset($smarty.session.user)} + {if $smarty.session.user.user_id == $objProject->getUser()} + + Editer + + {/if} + {/if}
@@ -50,4 +63,4 @@ {elseif $projectStatus eq "refusé"}

Portfolio refusé

{/if} - \ No newline at end of file + diff --git a/views/admin.tpl b/views/admin.tpl index af91005..7b0fefe 100644 --- a/views/admin.tpl +++ b/views/admin.tpl @@ -2,164 +2,89 @@ {block name="content"} -
- - - -
-
-
- -
-
-
-

Dashboard

-
- -
-
-

Gestion de l'utilsateur

-

Changer le statut ou supprimer un utilisateur

-
+ +
+
+

Gestion des catégories

+
+
+
+

Modifier une catégorie existante

+ +
+
+ + +
+ +
+
+
+
+
+
+ +
+
+

Créer une nouvelle catégorie

+
+ + +
- +
- -
- - -
-
- - -
-
-
+
- -
-
-

Gestion des catégories

-
-
-
-

Modifier une catégorie existante

- -
-
- - -
- -
-
-
-
-
-
- -
-
-

Créer une nouvelle catégorie

-
- - -
-
- -
-
-
-
-
- -
-
+
-
+ + +
Connecté avec le compte : {$smarty.session.user.user_name} {$smarty.session.user.user_firstname} + {/block} \ No newline at end of file diff --git a/views/inscription.tpl b/views/inscription.tpl index 96d331a..7b82e77 100644 --- a/views/inscription.tpl +++ b/views/inscription.tpl @@ -7,7 +7,7 @@
-
+
@@ -20,7 +20,13 @@

Créez votre compte utilisateur.

- + {if (isset($arrError) && count($arrError) > 0) } +
+ {foreach $arrError as $strError} +

{$strError}

+ {/foreach} +
+ {/if}
@@ -98,6 +104,19 @@ required >
+ +
+ + +
diff --git a/views/projet_display.tpl b/views/project_display.tpl similarity index 87% rename from views/projet_display.tpl rename to views/project_display.tpl index 21301dc..9500283 100644 --- a/views/projet_display.tpl +++ b/views/project_display.tpl @@ -58,11 +58,11 @@
- - - + + +
{$objProject->getCreatorName()}

diff --git a/views/user.tpl b/views/user.tpl new file mode 100644 index 0000000..1a6ba54 --- /dev/null +++ b/views/user.tpl @@ -0,0 +1,41 @@ +{extends file="views/layout.tpl"} + +{block name="content"} + +

+ +
+

Les projets de {$user->getPseudo()}

+ +
+ {if count($arrProjectToDisplay) > 0} + {foreach $arrProjectToDisplay as $objProject} + {include file="views/_partial/preview.tpl"} + {/foreach} + {else} +

Cet utilisateur n'a pas encore publié de projets.

+ {/if} +
+
+ +{/block} \ No newline at end of file