php-gallery/ui/header.php

30 lines
1.2 KiB
PHP
Raw Normal View History

<?php
session_start();
if (is_dir("assets/icons/")) {
$dir = "assets/icons/";
} else {
$dir = "../assets/icons/";
}
?>
2022-07-25 15:13:26 +00:00
2022-07-21 18:42:03 +00:00
<nav class="nav-root flex-left between">
2022-07-21 14:53:04 +00:00
<div class="nav-name flex-left">
2022-07-24 12:20:12 +00:00
<h3>Fluffys Amazing Gallery!</h3>
2022-07-21 14:53:04 +00:00
</div>
2022-07-23 14:03:11 +00:00
<div class="nav-links flex-left">
2022-07-25 15:13:26 +00:00
<?php
echo "<a class='btn alert-default' href='https://superdupersecteteuploadtest.fluffybean.gay'><img class='svg' src='".$dir."house.svg'><span class='nav-hide'>Home</span></a>";
echo "<hr>";
2022-07-25 15:13:26 +00:00
if (isset($_SESSION["username"])) {
echo "<a class='btn alert-default' href='https://superdupersecteteuploadtest.fluffybean.gay/upload.php'><img class='svg' src='".$dir."upload.svg'><span class='nav-hide'>Upload</span></a>";
2022-07-25 17:28:55 +00:00
echo "<hr>";
echo "<a class='btn alert-default' href='https://superdupersecteteuploadtest.fluffybean.gay/account/account.php'><img class='svg' src='".$dir."user-circle.svg'><span class='nav-hide'>".$_SESSION["username"]."</span></a>";
2022-07-25 15:13:26 +00:00
} else {
2022-07-26 17:16:17 +00:00
echo "<a class='btn alert-high' href='https://superdupersecteteuploadtest.fluffybean.gay/account/login.php'><img class='svg' src='".$dir."user-circle-plus.svg'><span class='nav-hide'>Login</span></a>";
2022-07-25 15:13:26 +00:00
}
?>
2022-07-21 14:53:04 +00:00
</div>
2022-07-21 18:42:03 +00:00
</nav>