Commit a0ba0bb6d6419fb5b0f8a5ec1ebea44fdc3c3a7e

Authored by Jean Wasilewski
1 parent c187ba8f

Disconnection added

Showing 2 changed files with 13 additions and 2 deletions   Show diff stats
logout.php 0 → 100644
@@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
  1 +<?php
  2 +session_start();
  3 +session_destroy();
  4 +?>
@@ -10,8 +10,15 @@ @@ -10,8 +10,15 @@
10 </div> 10 </div>
11 <div class="collapse navbar-collapse"> 11 <div class="collapse navbar-collapse">
12 <?php 12 <?php
13 - if (isset($_SESSION["connected"]) && $_SESSION["connected"])  
14 - echo '<p class="navbar-text navbar-right">Bienvenue, <a href="#" class="navbar-link">'.$_SESSION["realname"].'</a></p>'; 13 + if (isset($_SESSION["connected"]) && $_SESSION["connected"])
  14 +?>
  15 + <p class="navbar-text navbar-right">
  16 + Bienvenue, <a href="#" class="navbar-link"><?php echo $_SESSION["realname"];?>.'</a>
  17 + </p>
  18 + <p class="navbar-right">
  19 + <a href="#" onclick="file('logout.php');document.location.reload();" class="glyphicon glyphicon-star"></a>
  20 + </p>
  21 +<?php
15 else 22 else
16 echo '<p class="navbar-text navbar-right"><a href="#" class="navbar-link" onClick="loadNewDoc(\'connect.php\');">Se connecter</a></p>'; 23 echo '<p class="navbar-text navbar-right"><a href="#" class="navbar-link" onClick="loadNewDoc(\'connect.php\');">Se connecter</a></p>';
17 ?> 24 ?>