Fix navbar on some pages

This commit is contained in:
Peder Bergebakken Sundt 2018-02-10 18:05:38 +01:00
parent b914590ea8
commit 25da4a80f2
2 changed files with 5 additions and 18 deletions

View File

@ -3,6 +3,7 @@ ini_set('display_errors', '1');
date_default_timezone_set('Europe/Oslo'); date_default_timezone_set('Europe/Oslo');
setlocale(LC_ALL, 'no_NO'); setlocale(LC_ALL, 'no_NO');
error_reporting(E_ALL); error_reporting(E_ALL);
require __DIR__ . '/../../../inc/navbar.php';
require __DIR__ . '/../../../src/_autoload.php'; require __DIR__ . '/../../../src/_autoload.php';
require __DIR__ . '/../../../sql_config.php'; require __DIR__ . '/../../../sql_config.php';
require_once(__DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php'); require_once(__DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php');
@ -34,23 +35,8 @@ $users = $userManager->getAllUserData();
<link rel="stylesheet" href="../../css/admin.css"> <link rel="stylesheet" href="../../css/admin.css">
<nav> <nav>
<ul> <?php echo navbar(2, ''); ?>
<li class="active"><a href="index.php">hjem</a></li> <?php echo loginbar(); ?>
<li><a href="aktiviteter/">aktiviteter</a></li>
<li><a href="../prosjekt/">prosjekter</a></li>
<li><a href="kontakt">kontakt</a></li>
<li><a href="pvv/">wiki</a></li>
</ul>
<?php
$attr = $as->getAttributes();
if($attr){
$uname = $attr["uid"][0];
echo '<p class="login">logget inn som: ' . $uname . '</p>';
}else{
echo '<a class="login" href="' . $as->getLoginURL() . '">logg inn</a>';
}
?>
</nav> </nav>
<header class="admin">Bruker&shy;administrasjon</header> <header class="admin">Bruker&shy;administrasjon</header>

View File

@ -1,6 +1,7 @@
<?php <?php
date_default_timezone_set('Europe/Oslo'); date_default_timezone_set('Europe/Oslo');
setlocale(LC_ALL, 'no_NO'); setlocale(LC_ALL, 'no_NO');
require __DIR__ . '/../../inc/navbar.php';
require __DIR__ . '/../../src/_autoload.php'; require __DIR__ . '/../../src/_autoload.php';
require __DIR__ . '/../../sql_config.php'; require __DIR__ . '/../../sql_config.php';