Commit c55d51f100348a3d485abc4abbe3032febed8fa1
1 parent
5a3b28cc
Ajout compte
Showing
2 changed files
with
5 additions
and
4 deletions
Show diff stats
site/accesBase.php
@@ -63,6 +63,7 @@ | @@ -63,6 +63,7 @@ | ||
63 | function getGroupe($id) | 63 | function getGroupe($id) |
64 | { | 64 | { |
65 | $db = connexion(); | 65 | $db = connexion(); |
66 | + echo "doeoee"; | ||
66 | $query = "SELECT groupe FROM membres where identifiant = '$id'"; | 67 | $query = "SELECT groupe FROM membres where identifiant = '$id'"; |
67 | $result = pg_query($db, $query) or die("La requête a echoué : ".pg_last_error()); | 68 | $result = pg_query($db, $query) or die("La requête a echoué : ".pg_last_error()); |
68 | $tab = pg_fetch_assoc($result); | 69 | $tab = pg_fetch_assoc($result); |
site/header.php
@@ -17,10 +17,10 @@ | @@ -17,10 +17,10 @@ | ||
17 | <a href="rechercheGraphe.php"><i class="fas fa-chart-line"></i> Graphiques</a> | 17 | <a href="rechercheGraphe.php"><i class="fas fa-chart-line"></i> Graphiques</a> |
18 | <a href="data.php"><i class="fas fa-database"></i> Valeurs</a> | 18 | <a href="data.php"><i class="fas fa-database"></i> Valeurs</a> |
19 | <?php | 19 | <?php |
20 | - //if(getGroupe($_SESSION['Login'])==0) | ||
21 | - //{ | ||
22 | - //echo '<a href="inscrire.php"><i class="far fa-plus-square"></i> Compte</a>'; | ||
23 | - //} | 20 | + if(getGroupe($_SESSION['Login'])==0) |
21 | + { | ||
22 | + echo '<a href="inscrire.php"><i class="far fa-plus-square"></i> Compte</a>'; | ||
23 | + } | ||
24 | ?> | 24 | ?> |
25 | <a href="deconnecter.php"><i class="fa fa-power-off"></i> Deconnexion</a> | 25 | <a href="deconnecter.php"><i class="fa fa-power-off"></i> Deconnexion</a> |
26 | <?php | 26 | <?php |