diff options
Diffstat (limited to 'app/view/templates/navart.php')
-rw-r--r-- | app/view/templates/navart.php | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/app/view/templates/navart.php b/app/view/templates/navart.php new file mode 100644 index 0000000..b6a7219 --- /dev/null +++ b/app/view/templates/navart.php @@ -0,0 +1,85 @@ +<style> +.menu { + all:initial; + position: fixed; + top: 0; + right: 0; + z-index: 10; + background-color: var(--color1); +} + +div#dropmenu { + display: none; +} + +.menu:hover div#dropmenu { + display: block; +} + +</style> + + +<div class="menu" > + <?= $user->level() ?> + <div id="dropmenu"> + + <ul> + + <li> + <a class="button" href="./">home</a> + </li> + + +<?php if($user->isvisitor()) { ?> + + <li> + <form action="./?action=login<?= $art->id() !== null ? '&id=' . $art->id() : '' ?>" method="post"> + <input type="password" name="pass" id="loginpass" placeholder="password"> + <input type="submit" value="login"> + </form> + </li> + +<?php } else { ?> + + <li> + <form action="./?action=logout<?= $art->id() !== null ? '&id=' . $art->id() : '' ?>" method="post"> + <input type="submit" value="logout"> + </form> + </li> + +<?php } ?> + + +<?php if($user->canedit() && $artexist) { ?> + + <li> + <a class="button" href="?id=<?=$art->id() ?>" target="_blank">display</a> + </li> + <li> + <a class="button" href="?id=<?=$art->id() ?>&aff=edit" >edit</a> + </li> + +<?php } ?> + + +<?php if ($user->canedit()) { ?> + + <li> + <a class="button" href="?aff=media" >Media</a> + </li> + +<?php } ?> + +<?php if($user->isadmin()) { ?> + + <li> + <a class="button" href="?aff=admin" >Admin</a> + </li> + +<?php } ?> + + + + + </div> +</div>
\ No newline at end of file |