This commit is contained in:
William 2022-02-15 12:29:40 +01:00
parent 7646d2cc32
commit 9eab1bafaf
2 changed files with 7 additions and 1 deletions

View File

@ -36,6 +36,8 @@ class User
$row = $sth->fetch(PDO::FETCH_ASSOC);
$this->powerLevel = $row['Nivå'];
} else {
$this->powerLevel = 0;
}
}

View File

@ -38,13 +38,17 @@
<ul>
<li><a href="<?=$this->config['root_url']?>index.php">Forside</a></li>
<li><a href="<?=$this->config['root_url']?>example.php">Eksempel</a></li>
<li><a href="<?=$this->config['root_url']?>simulator.php">Simulator</a></li>
<li><a href="<?=$this->config['root_url']?>teamtable/index.php">Se lagene</a></li>
</ul>
<?php if ($this->user->powerLevel > 0): ?>
<h4>Tillatelser</h4>
<ul>
<li><a href="<?=$this->config['root_url']?>simulator.php">Simulator</a></li>
<li><a href="<?=$this->config['root_url']?>teamtable/edit/index.php">Endre lagene</a></li>
</ul>
<?php endif; ?>
</div>
<hr class="hidden">