83 lines
2.5 KiB
PHP
83 lines
2.5 KiB
PHP
<?php
|
||
if (!isset($hide_nav)) {
|
||
$hide_nav = FALSE;
|
||
}
|
||
|
||
if (!isset($hide_menu)) {
|
||
$hide_menu = FALSE;
|
||
}
|
||
?>
|
||
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title><?=htmlspecialchars($title);?> – Stafett for livet tellesystem</title>
|
||
|
||
<link rel="stylesheet" href="<?=$this->config['root_url']?>static/style/main.css">
|
||
<link rel="icon" href="<?=$this->config['root_url']?>static/img/cropped-kf-propell-ikon-32x32.png">
|
||
<body>
|
||
|
||
<div id="header">
|
||
<a href="<?=$this->config['root_url']?>">Stafett for livet tellesystem</a>
|
||
</div>
|
||
|
||
<hr class="hidden">
|
||
|
||
<?php if ($hide_menu == FALSE): ?>
|
||
<div id="menu">
|
||
<small>
|
||
|
||
<?php if ($this->user->logged_in): ?>
|
||
<span><?=htmlspecialchars($this->user->username)?></span>
|
||
<a href="<?=$this->config['root_url']?>logout.php">Logg ut</a>
|
||
<?php else: ?>
|
||
<span>Ikke pålogget</span>
|
||
<a href="<?=$this->config['root_url']?>login.php">Logg inn</a>
|
||
<?php endif; ?>
|
||
|
||
</small>
|
||
</div>
|
||
|
||
<hr class="hidden">
|
||
|
||
<?php endif; ?>
|
||
|
||
|
||
<div id="container">
|
||
|
||
<?php if ($hide_nav == FALSE): ?>
|
||
<div id="nav">
|
||
|
||
<h4>Felles</h4>
|
||
<ul>
|
||
<li><a href="<?=$this->config['root_url']?>index.php">Forside</a></li>
|
||
<li><a href="<?=$this->config['root_url']?>race/results.php">Resultater</a></li>
|
||
</ul>
|
||
|
||
<?php if ($this->user->logged_in): ?>
|
||
<?php if ($this->user->power_level > 0): ?>
|
||
<h4>Admin</h4>
|
||
<ul>
|
||
<li><a href="<?=$this->config['root_url']?>race/configure/index.php">Konfigurer</a></li>
|
||
<li><a href="<?=$this->config['root_url']?>race/configure/simulator.php">Simulator</a></li>
|
||
</ul>
|
||
<?php endif; ?>
|
||
<?php endif; ?>
|
||
|
||
</div>
|
||
|
||
<hr class="hidden">
|
||
|
||
<?php endif; ?>
|
||
|
||
|
||
<div id="main">
|
||
<?php
|
||
// display flashed messages
|
||
foreach ($this->session->getFlashedMessages() as $msg)
|
||
{
|
||
echo "<div class=\"alert {$msg["type"]}\" role=\"alert\">{$msg["message"]}</div>";
|
||
}
|
||
?>
|