\n";
$result .= "\t\t
\n";
$menuItems = [
'Hjem' => '',
'Kalender' => 'kalender',
'Aktiviteter' => 'aktiviteter',
'Prosjekter' => 'prosjekt',
'Kontakt' => 'kontakt',
'Wiki' => 'pvv'
];
foreach($menuItems as $caption => $link) {
$result .= "\t\t\t"
. "- " . $caption . "
\n"
;
}
$result .= "\t\t\t" . '☰' . "\n";
return $result . "\t\t
\n";
}
function loginBar($sp = 'default-sp') {
$result = "\n";
require_once(__DIR__ . '/../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php');
$as = new SimpleSAML_Auth_Simple($sp);
$attr = $as->getAttributes();
if($attr) {
$uname = $attr['uid'][0];
$result .= "\t\tLogget inn som: " . htmlspecialchars($uname) . "
\n";
} else {
$result .= "\t\tgetLoginURL()) . "\">Logg inn\n";
}
return $result;
}