Commit | Line | Data |
---|---|---|
fb6aedc2 JB |
1 | <?php |
2 | include('header.html'); | |
a96fefe1 | 3 | include('lib/utils.php'); |
65fc0194 JB |
4 | /** |
5 | * Let's use an array as the list of tunables. | |
6 | * Put in a variable the inclusion of this file: | |
7 | * $config_var = include('config.php'); | |
8 | */ | |
9 | $configs = include('config.php'); | |
a96fefe1 JB |
10 | |
11 | /** | |
12 | * [session_start start a unique session for the current browser client] | |
13 | */ | |
14 | session_start(); | |
15 | $is_logged_in = chk_logged_in(); | |
65fc0194 JB |
16 | ?> |
17 | <div id="header"> | |
18 | <!-- Put headers stuff here --> | |
19 | <a href="<?php echo $configs['root_url'] ?>/index.php?page=home">Bienvenue sur Air Polytech !</a> | |
20 | </div> | |
a96fefe1 JB |
21 | <div id="account"> |
22 | <a href="<?php echo $configs['root_url'] ?>/index.php?page=account">Mon espace client</a> | |
23 | <br> | |
24 | <?php | |
25 | $root_url = $configs['root_url']; | |
26 | if ($is_logged_in) { | |
27 | echo htmlentities($_SESSION['email']) . " <br>"; | |
28 | echo "<a href=\"$root_url/index.php?page=logout\">Se déconnecter</a>"; | |
29 | } else { | |
30 | echo "<a href=\"$root_url/index.php?page=login\">S'identifier</a>"; | |
31 | } | |
32 | ?> | |
33 | </div> | |
34 | <div id="menu"> | |
d5622f71 | 35 | | <a href="<?php echo $configs['root_url'] ?>/index.php?page=home">Accueil</a> |
33eb6f2a JB |
36 | | <a href="<?php echo $configs['root_url'] ?>/index.php?page=search">Rechercher un vol</a> |
37 | | | |
38 | <?php | |
39 | if ($is_logged_in) { | |
22f1dc64 | 40 | echo "<a href=\"" . $configs['root_url'] . "/index.php?page=reservations\">Mes réservations</a> |\n"; |
33eb6f2a JB |
41 | } |
42 | ?> | |
a96fefe1 JB |
43 | </div> |
44 | ||
65fc0194 JB |
45 | <?php |
46 | ||
fb6aedc2 | 47 | |
a96fefe1 | 48 | |
fb6aedc2 | 49 | ?> |