From eba3102a67d5bd53f0a1004365fcb8aad3f6a3bf Mon Sep 17 00:00:00 2001
From: vbochet <vbochet@gmail.com>
Date: Fri, 29 Apr 2016 15:23:06 +0200
Subject: [PATCH] =?UTF-8?q?Modification=20du=20header=20inclus=20dans=20to?=
 =?UTF-8?q?utes=20les=20pages=20pour=20prendre=20en=20compte=20les=20varia?=
 =?UTF-8?q?bles=20de=20session=20d=C3=A9finies=20lors=20de=20la=20connexio?=
 =?UTF-8?q?n?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 app/view/Includes/header.include.html | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/app/view/Includes/header.include.html b/app/view/Includes/header.include.html
index 2fc4832..ecf38f0 100644
--- a/app/view/Includes/header.include.html
+++ b/app/view/Includes/header.include.html
@@ -1,3 +1,8 @@
+<?php 
+if(!isset($_SESSION)) { // si 
+	session_start(); 
+}
+?>
 <!DOCTYPE html>
 <html lang="fr">
 <head>
@@ -30,10 +35,23 @@
         <div class="col-4 space col-m-1">
 
         </div>
+		<?php 
+		if(isset($_SESSION['connected']) && $_SESSION['connected'] == true) {
+		?>
+        <div class="connexion col-3 col-m-6">
+            <?php echo $_SESSION['user']->prenom.' '.$_SESSION['user']->nom; ?>
+        </div>
+		<?php 
+		}
+		else { 
+		?>
         <div class="connexion col-3 col-m-6">
             <div class="signin"><a class="connexion-link" href="<?php echo BASE_URL; ?>/inscription">Inscription</a></div>
             <div class="login"><a class="connexion-link" href="<?php echo BASE_URL; ?>/connexion">Connexion</a></div>
         </div>
+		<?php 
+		} 
+		?>
 
     </header>
 	
-- 
GitLab