-
Notifications
You must be signed in to change notification settings - Fork 0
/
navbar.php
39 lines (37 loc) · 2.02 KB
/
navbar.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="index.php"><h3>Lambda </h3></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="mediateque.php">Accés à la Mediathèque <span class="sr-only">(current)</span></a>
</li>
</ul>
<?php if(empty($_COOKIE['id'])) { ?>
<form class="form-inline my-2 my-lg-0" role="form" method="post" action="Traitement/traitementConnexion.php">
<div class="form-group">
<input type="email" class="form-control" required name="mail" placeholder="Adresse mail" required>
<input type="password" class="form-control" required name="mdp" placeholder="Mot de passe" required>
</div>
<button type="submit" class="btn btn-default"><font size=2>Connexion</font></button>
</form>
<div class="form-inline my-2 my-lg-0">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="inscription.php">Inscription <span class="sr-only">(current)</span></a>
</li>
</ul>
</div>
<?php } elseif(isset($_COOKIE['id'])) {
include("APP/connexionPDO.php");
$id = $_COOKIE['id'];
$req = $bdd->prepare('SELECT * FROM information WHERE id= :id');
$req-> execute(array('id'=>$id));
$donnees= $req->fetch();
echo $donnees['mail'];
echo '<a style="margin-left:12px;" href="Traitement/traitementDeconnexion.php">Deconnexion</a>';
} ?>
</div>
</nav>