php-gallery/ui/nav.php

21 lines
1.1 KiB
PHP
Raw Normal View History

2022-08-12 16:54:35 +00:00
<nav class="nav-root flex-left">
2022-08-03 16:46:50 +00:00
<div class="nav-name flex-left">
2022-08-15 10:56:05 +00:00
<p><?php echo $setup_json['name']; ?></p>
2022-08-03 16:46:50 +00:00
</div>
<div class="nav-links flex-left">
2022-08-12 16:54:35 +00:00
<a class='btn' href='<?php echo $root_dir; ?>index.php'><img class='svg' src='<?php echo $root_dir; ?>assets/icons/house.svg'><span class='nav-hide'>Home</span></a>
2022-08-03 16:46:50 +00:00
<hr>
2022-08-12 16:54:35 +00:00
<a class='btn' href='<?php echo $root_dir; ?>search.php'><img class='svg' src='<?php echo $root_dir; ?>assets/icons/binoculars.svg'><span class='nav-hide'>Search</span></a>
2022-08-03 16:46:50 +00:00
<hr>
<?php
if (loggedin()) {
2022-08-12 16:54:35 +00:00
echo "<a class='btn' href='".$root_dir."upload.php'><img class='svg' src='".$root_dir."assets/icons/upload.svg'><span class='nav-hide'>Upload</span></a>";
2022-08-03 16:46:50 +00:00
echo "<hr>";
2022-09-07 09:41:18 +00:00
echo "<a class='btn' href='".$root_dir."/account.php'><img class='svg' src='".$root_dir."assets/icons/user-circle.svg'><span class='nav-hide'>".substr($_SESSION["username"], 0, 15)."</span></a>";
2022-08-03 16:46:50 +00:00
} else {
2022-09-07 09:41:18 +00:00
echo "<a class='btn' href='".$root_dir."/account.php'><img class='svg' src='".$root_dir."assets/icons/sign-in.svg'><span class='nav-hide'>Login</span></a>";
2022-08-03 16:46:50 +00:00
}
?>
</div>
</nav>