You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Courtail/inclusions/barre_menu.php

63 lines
2.3 KiB

<?php
if (isset($_GET['page']) && !empty($_GET['page'])) {
?>
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="/pages/gestion/administration.php?page=accueil">Courtail</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li <?php if ($_GET['page'] == 'accueil' || $_GET['page'] == 'alias') {echo 'class="active"';} ?>><a href="/pages/gestion/administration.php?page=alias">Alias</a></li>
<?php if (testPrivileges()=="administrateur") { ?>
<li <?php if ($_GET['page'] == 'domaines') {echo 'class="active"';} ?>><a href="/pages/gestion/administration.php?page=domaines">Domaines</a></li>
<li <?php if ($_GET['page'] == 'listes_noires') {echo 'class="active"';} ?>><a href="/pages/gestion/administration.php?page=listes_noires">Listes noires</a></li>
<?php } ?>
</ul>
<ul class="nav navbar-nav navbar-right">
<li <?php if ($_GET['page'] == 'accueil') {echo 'class="parametres"';} ?>><a href="/pages/gestion/administration.php?page=parametres">Paramètres</a></li>
<li><a href="/services/traitements/utilisateurs/deconnexion.php">Déconnexion</a></li>
</ul>
</div>
</div>
</nav>
<?php
}
/**
* Page importé intégrant le menu de navigation dans la page d'administration centrale.
*/
echo <<<_HEREDOC_
<div>
<table>
<tr>
<td><a href="/pages/gestion/administration.php?page=accueil">Courtail</a></td>
<td><a href="/pages/gestion/administration.php?page=alias">Alias</a></td>
_HEREDOC_;
if (testPrivileges()=="administrateur") {
echo <<<_HEREDOC_
<td><a href="/pages/gestion/administration.php?page=domaines">Domaines</a></td>
<td><a href="/pages/gestion/administration.php?page=listes_noires">Listes noires</a></td>
_HEREDOC_;
}
echo <<<_HEREDOC_
<td><a href="/pages/gestion/administration.php?page=parametres">Paramètres</a></td>
<td><a href="/services/traitements/utilisateurs/deconnexion.php">Déconnexion</a></td>
</tr>
</table>
</div>
_HEREDOC_;
if (isset($_GET['message']) && !empty($_GET['message'])) {
switch ($_GET['message']) {
case "bienvenue":
echo "<p class=\"messages_retour_ko\">Bienvenue ".$_SESSION['nom_utilisateur'].". Vous êtes authentifié en tant qu'".$_SESSION['privilege_utilisateur'].".</p>";
break;
}
}
?>