mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-01-15 11:05:14 +00:00
45 lines
1.8 KiB
PHP
45 lines
1.8 KiB
PHP
<?php
|
|
// Include required files and commands by every page on header
|
|
session_start();
|
|
|
|
if (is_dir("ui/")) {
|
|
include_once("ui/functions.php");
|
|
} else {
|
|
include_once("../ui/functions.php");
|
|
}
|
|
|
|
$conn = mysqli_connect("localhost", "uwu", "fennec621", "swag");
|
|
if ($conn->connect_error) {
|
|
echo "<p class='alert alert-low'>Could not connect to database</p>";
|
|
}
|
|
|
|
// Check which directory icons are in
|
|
if (is_dir("assets/icons/")) {
|
|
$dir = "assets/icons/";
|
|
} else {
|
|
$dir = "../assets/icons/";
|
|
}
|
|
?>
|
|
|
|
<nav class="nav-root flex-left between">
|
|
<div class="nav-name flex-left">
|
|
<h3>OnlyLegs</h3>
|
|
</div>
|
|
<div class="nav-links flex-left">
|
|
<?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>";
|
|
echo "<a class='btn alert-default flyout-display' href='https://superdupersecteteuploadtest.fluffybean.gay?srch=show'><img class='svg' src='".$dir."binoculars.svg'><span class='nav-hide'>Search</span></a>";
|
|
echo "<hr>";
|
|
|
|
if (loggedin()) {
|
|
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>";
|
|
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'>".substr($_SESSION["username"], 0, 15)."</span></a>";
|
|
} else {
|
|
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>";
|
|
}
|
|
?>
|
|
</div>
|
|
</nav>
|