+<table id="home">
<?php
+global $is_logged_in;
-function home()
-{
- global $connection;
-
- $requete = "SELECT NumCl, NomCl, CodePosteCl, VilleCl FROM CLIENTS";
- $result = $connection->query($requete);
- echo "<table border=1>\n";
- echo "<tr><td>Code_CL</td><td>Nom</td><td>Rue</td><td>Ville</td></tr>\n";
- while ($ligne = $result->fetch_row()) {
- $code = htmlentities($ligne[0]);
- $nom = htmlentities($ligne[1]);
- $rue = htmlentities($ligne[2]);
- $ville = htmlentities($ligne[3]);
- echo "<tr><td>$code</td><td>$nom</td><td>$rue</td><td>$ville</td></tr>\n";
- }
- echo "</table>\n";
- $result->close();
+if (!$is_logged_in) {
+ $root_url = $configs['root_url'];
+ echo " <tr>\n";
+ echo " <td><a href=\"$root_url/index.php?page=login\">S'identifier</a></td>\n";
+ echo " <td><a href=\"$root_url/index.php?page=register\">Créer un compte</a></td>\n";
+ echo " </tr>\n";
}
-
-home();
-
?>
+ <tr>
+ <td<?php if (!$is_logged_in) { echo " colspan=\"2\""; } ?>><a href="<?php echo $configs['root_url'] ?>/index.php?page=search">Rechercher un vol</a></td>
+ </tr>
+</table>