This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccount/resources/views/layout/top.php

93 lines
No EOL
5 KiB
PHP

<html>
<head>
<title>Keks Account</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://bootswatch.com/4/flatly/bootstrap.min.css" type="text/css" rel="stylesheet">
<script src="https://code.jquery.com/jquery-3.3.1.min.js" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
</head>
<body>
<div class="container" style="margin-top: 30px;min-height: calc(100vh - 100px);">
<nav class="navbar navbar-expand-lg navbar-dark bg-primary" style="margin-bottom: 20px">
<a class="navbar-brand" href="/">Keks Account</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor01" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarColor01">
<ul class="navbar-nav mr-auto">
<!--<li class="nav-item">
<a class="nav-link" href="/">Home</a>
</li>!-->
<!--<li class="nav-item">
<a class="nav-link" href="#">Features</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Privacy</a>
</li>!-->
</ul>
<?php if(is_null($user)) { ?>
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="/gui/login">Login</a>
</li>
<?php if($settingsArray["registration_possible"]) { ?>
<li class="nav-item">
<a class="nav-link" href="/gui/register">Register</a>
</li>
<?php } ?>
</ul>
<?php } else { ?>
<ul class="navbar-nav ml-auto">
<?php if($user->developer) { ?>
<li class="nav-item">
<a class="nav-link" href="/gui/apps">Apps</a>
</li>
<?php } ?>
<?php if($user->admin) { ?>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Admin
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="/gui/admin/settings">Settings</a>
<a class="dropdown-item" href="/gui/admin/users">Users</a>
<a class="dropdown-item" href="/gui/admin/apps">Apps</a>
<?php if($settingsArray["invites"]) {
echo '<a class="dropdown-item" href="/gui/admin/invites">Invites</a>';
}?>
</div>
</li>
<?php } ?>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<?php echo $user->username; ?>
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="/gui/profile">Profile</a>
<a class="dropdown-item" href="/gui/access">Apps</a>
<!--<a class="dropdown-item disabled" href="#">Privacy</a>!-->
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="/gui/logout">Logout</a>
</div>
</li>
</ul>
<?php } ?>
</div>
</nav>
<?php
if(!is_null($user) && $user->getMail() == null) {
?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-warning" role="alert">
Your E-Mail adress is not validated, please check your mails and click on the link to validate your E-Mail.
</div>
</div>
</div>
<?php } ?>