ajouter btn edit account page profile, lien cliquable img user connecté

This commit is contained in:
Yasder5 2026-02-19 20:38:19 +01:00
parent 09ec39c7bb
commit 190554d966
7 changed files with 28 additions and 22 deletions

View file

@ -1,11 +1,11 @@
<?php <?php
/* Smarty version 5.7.0, created on 2026-02-19 18:00:36 /* Smarty version 5.7.0, created on 2026-02-19 19:37:38
from 'file:views/home.tpl' */ from 'file:views/home.tpl' */
/* @var \Smarty\Template $_smarty_tpl */ /* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.7.0', 'version' => '5.7.0',
'unifunc' => 'content_69974fc49008e7_88350972', 'unifunc' => 'content_69976682c1c284_75435092',
'has_nocache_code' => false, 'has_nocache_code' => false,
'file_dependency' => 'file_dependency' =>
array ( array (
@ -21,20 +21,20 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'file:views/_partial/preview.tpl' => 1, 'file:views/_partial/preview.tpl' => 1,
), ),
))) { ))) {
function content_69974fc49008e7_88350972 (\Smarty\Template $_smarty_tpl) { function content_69976682c1c284_75435092 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'D:\\projetphp\\views'; $_smarty_current_dir = 'D:\\projetphp\\views';
$_smarty_tpl->getInheritance()->init($_smarty_tpl, true); $_smarty_tpl->getInheritance()->init($_smarty_tpl, true);
?> ?>
<?php <?php
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_147623784469974fc48fc6e0_21060000', "content"); $_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_144579886869976682c18113_46108017', "content");
?> ?>
<?php $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir); <?php $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir);
} }
/* {block "content"} */ /* {block "content"} */
class Block_147623784469974fc48fc6e0_21060000 extends \Smarty\Runtime\Block class Block_144579886869976682c18113_46108017 extends \Smarty\Runtime\Block
{ {
public function callBlock(\Smarty\Template $_smarty_tpl) { public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'D:\\projetphp\\views'; $_smarty_current_dir = 'D:\\projetphp\\views';

View file

@ -1,11 +1,11 @@
<?php <?php
/* Smarty version 5.7.0, created on 2026-02-19 18:00:38 /* Smarty version 5.7.0, created on 2026-02-19 19:37:45
from 'file:views/layout.tpl' */ from 'file:views/layout.tpl' */
/* @var \Smarty\Template $_smarty_tpl */ /* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.7.0', 'version' => '5.7.0',
'unifunc' => 'content_69974fc6b5dc95_68713473', 'unifunc' => 'content_69976689b01014_92688396',
'has_nocache_code' => false, 'has_nocache_code' => false,
'file_dependency' => 'file_dependency' =>
array ( array (
@ -22,21 +22,21 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'file:views/_partial/footer.tpl' => 1, 'file:views/_partial/footer.tpl' => 1,
), ),
))) { ))) {
function content_69974fc6b5dc95_68713473 (\Smarty\Template $_smarty_tpl) { function content_69976689b01014_92688396 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'D:\\projetphp\\views'; $_smarty_current_dir = 'D:\\projetphp\\views';
$_smarty_tpl->getInheritance()->init($_smarty_tpl, false); $_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); $_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);
?> ?>
<?php <?php
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_49941558469974fc6b5c4e0_48832484', "content"); $_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_210858053669976689aff6c2_11310529', "content");
?> ?>
<?php $_smarty_tpl->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); <?php $_smarty_tpl->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"} */ /* {block "content"} */
class Block_49941558469974fc6b5c4e0_48832484 extends \Smarty\Runtime\Block class Block_210858053669976689aff6c2_11310529 extends \Smarty\Runtime\Block
{ {
public function callBlock(\Smarty\Template $_smarty_tpl) { public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'D:\\projetphp\\views'; $_smarty_current_dir = 'D:\\projetphp\\views';

View file

@ -1,11 +1,11 @@
<?php <?php
/* Smarty version 5.7.0, created on 2026-02-19 18:00:38 /* Smarty version 5.7.0, created on 2026-02-19 19:37:45
from 'file:views/_partial/footer.tpl' */ from 'file:views/_partial/footer.tpl' */
/* @var \Smarty\Template $_smarty_tpl */ /* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.7.0', 'version' => '5.7.0',
'unifunc' => 'content_69974fc6e880f1_33985729', 'unifunc' => 'content_69976689ccd1e8_62225255',
'has_nocache_code' => false, 'has_nocache_code' => false,
'file_dependency' => 'file_dependency' =>
array ( array (
@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
array ( array (
), ),
))) { ))) {
function content_69974fc6e880f1_33985729 (\Smarty\Template $_smarty_tpl) { function content_69976689ccd1e8_62225255 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'D:\\projetphp\\views\\_partial'; $_smarty_current_dir = 'D:\\projetphp\\views\\_partial';
?> ?>
<footer class="footer container-fluid d-flex justify-content-around mt-auto"> <footer class="footer container-fluid d-flex justify-content-around mt-auto">

View file

@ -1,11 +1,11 @@
<?php <?php
/* Smarty version 5.7.0, created on 2026-02-19 18:00:38 /* Smarty version 5.7.0, created on 2026-02-19 19:37:43
from 'file:views/_partial/preview.tpl' */ from 'file:views/_partial/preview.tpl' */
/* @var \Smarty\Template $_smarty_tpl */ /* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.7.0', 'version' => '5.7.0',
'unifunc' => 'content_69974fc6d37d90_86084313', 'unifunc' => 'content_69976687c2cde7_58748034',
'has_nocache_code' => false, 'has_nocache_code' => false,
'file_dependency' => 'file_dependency' =>
array ( array (
@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
array ( array (
), ),
))) { ))) {
function content_69974fc6d37d90_86084313 (\Smarty\Template $_smarty_tpl) { function content_69976687c2cde7_58748034 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'D:\\projetphp\\views\\_partial'; $_smarty_current_dir = 'D:\\projetphp\\views\\_partial';
?><article class="col-md-3 mb-5 <?php if ((true && (true && null !== ($_SESSION['user'] ?? null))) && $_SESSION['user']['user_status'] == 2) {?> pb-5 <?php }?>" style="border-radius: 100px ;"> ?><article class="col-md-3 mb-5 <?php if ((true && (true && null !== ($_SESSION['user'] ?? null))) && $_SESSION['user']['user_status'] == 2) {?> pb-5 <?php }?>" style="border-radius: 100px ;">
<div class="card h-100 shadow article-card rounded-4" style="border-width: 2px; overflow: hidden;"> <div class="card h-100 shadow article-card rounded-4" style="border-width: 2px; overflow: hidden;">

View file

@ -1,18 +1,18 @@
<?php <?php
/* Smarty version 5.7.0, created on 2026-02-19 18:00:38 /* Smarty version 5.7.0, created on 2026-02-19 19:37:45
from 'file:views/_partial/header.tpl' */ from 'file:views/_partial/header.tpl' */
/* @var \Smarty\Template $_smarty_tpl */ /* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.7.0', 'version' => '5.7.0',
'unifunc' => 'content_69974fc6bd10a6_20132978', 'unifunc' => 'content_69976689b86271_22891813',
'has_nocache_code' => false, 'has_nocache_code' => false,
'file_dependency' => 'file_dependency' =>
array ( array (
'8056b95e7f6b28be5e36947735d13c8d176ec944' => '8056b95e7f6b28be5e36947735d13c8d176ec944' =>
array ( array (
0 => 'views/_partial/header.tpl', 0 => 'views/_partial/header.tpl',
1 => 1771520240, 1 => 1771529669,
2 => 'file', 2 => 'file',
), ),
), ),
@ -21,7 +21,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'file:views/_partial/messages.tpl' => 1, 'file:views/_partial/messages.tpl' => 1,
), ),
))) { ))) {
function content_69974fc6bd10a6_20132978 (\Smarty\Template $_smarty_tpl) { function content_69976689b86271_22891813 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'D:\\projetphp\\views\\_partial'; $_smarty_current_dir = 'D:\\projetphp\\views\\_partial';
?><!DOCTYPE html> ?><!DOCTYPE html>
<html lang="fr"> <html lang="fr">
@ -86,7 +86,8 @@ $_smarty_current_dir = 'D:\\projetphp\\views\\_partial';
<?php } else { ?> <?php } else { ?>
<ul class="navbar-nav"> <ul class="navbar-nav">
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="edit_account.php" title="Modifier mon compte" aria-label="Modifier mon compte"> <a class="nav-link" href="index.php?ctrl=user&action=user&id=<?php echo $_SESSION['user']['user_id'];?>
" title="Modifier mon compte" aria-label="Modifier mon compte">
<img src="<?php echo $_SESSION['user']['user_image'];?> <img src="<?php echo $_SESSION['user']['user_image'];?>
" "
class="rounded-circle flex-shrink-0 mt-2 ml-5" class="rounded-circle flex-shrink-0 mt-2 ml-5"

View file

@ -65,7 +65,7 @@
{* Utilisateur connecté *} {* Utilisateur connecté *}
<ul class="navbar-nav"> <ul class="navbar-nav">
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="edit_account.php" title="Modifier mon compte" aria-label="Modifier mon compte"> <a class="nav-link" href="index.php?ctrl=user&action=user&id={$smarty.session.user.user_id}" title="Modifier mon compte" aria-label="Modifier mon compte">
<img src="{$smarty.session.user.user_image}" <img src="{$smarty.session.user.user_image}"
class="rounded-circle flex-shrink-0 mt-2 ml-5" class="rounded-circle flex-shrink-0 mt-2 ml-5"
style="width: 36px; height: 36px; object-fit: cover;" style="width: 36px; height: 36px; object-fit: cover;"

View file

@ -23,7 +23,12 @@
{/if} {/if}
<p class="mt-3">{$user->getDescription()}</p> <p class="mt-3">{$user->getDescription()}</p>
{if $smarty.session.user.user_id == $user->getId()}
<a class="btn btn-sm btn-primary flex-fill"
href="?ctrl=user&action=edit">Edit account</a>
{/if}
</div> </div>
</div> </div>
</div> </div>
</section> </section>