2022-06-04 16:05:54 +02:00
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<title>Padel Tournaments System</title>
|
2022-06-14 15:12:31 +02:00
|
|
|
<link href="style.css" rel="stylesheet">
|
2022-06-19 10:11:28 +02:00
|
|
|
<script>function logout() {
|
2022-06-19 22:40:31 +02:00
|
|
|
localStorage.removeItem('token');
|
2022-06-19 10:11:28 +02:00
|
|
|
location.reload();
|
|
|
|
}
|
|
|
|
|
|
|
|
function logoutVisibility() {
|
|
|
|
if (localStorage.getItem("token") !== null) {
|
|
|
|
document.getElementById("logout").style.display = "";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
document.getElementById("logout").style.display = "none";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function loginVisibility() {
|
|
|
|
if (localStorage.getItem("token") !== null) {
|
|
|
|
document.getElementById("login").style.display = "none";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
document.getElementById("login").style.display = "";
|
|
|
|
|
|
|
|
}
|
2022-06-19 22:40:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function checkRole() {
|
|
|
|
if (localStorage.getItem("token") !== null) {
|
|
|
|
|
|
|
|
fetch('https://dragonmaster.pl/inz/user', {
|
|
|
|
headers: {
|
|
|
|
Authorization: ("Bearer " + localStorage.getItem("token"))
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.then(res => res.json())
|
|
|
|
.then(json => {
|
|
|
|
if (json['role'] == '1') {
|
|
|
|
document.getElementById("creator").style.display = "none";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
document.getElementById("creator").style.display = '';
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
document.getElementById("creator").style.display = "none";
|
|
|
|
}
|
|
|
|
|
2022-06-19 10:11:28 +02:00
|
|
|
}</script>
|
2022-06-04 16:05:54 +02:00
|
|
|
</head>
|
|
|
|
|
2022-06-19 22:40:31 +02:00
|
|
|
<body onload="logoutVisibility(); loginVisibility(); checkRole()">
|
2022-06-19 10:11:28 +02:00
|
|
|
<header>
|
|
|
|
<div class="logoBox">
|
|
|
|
<a class="header_link" href="../index.html"><img class="logo" src="../../_global/logo.svg"
|
|
|
|
alt="Logo error"></a>
|
|
|
|
</div>
|
|
|
|
<div class="linkBox">
|
|
|
|
<!-- <span class="dot">JM</span>-->
|
2022-06-19 10:22:16 +02:00
|
|
|
<button class="loginButton" type="submit" onclick="window.location.href='../logowanie/index.html'"
|
2022-06-19 10:11:28 +02:00
|
|
|
id="login">LOGOWANIE</button>
|
|
|
|
<button class="loginButton" id="logout" onclick="logout()">Wyloguj</button>
|
|
|
|
<a class="header_link" href="../kontakt/index.html">Kontakt</a>
|
2022-06-19 22:40:31 +02:00
|
|
|
<a class="header-link " href="#">Ranking</a>
|
2022-06-19 13:33:34 +02:00
|
|
|
<a class=" header_link" href="../index.html">Kalendarz turniejów</a>
|
2022-06-19 22:40:31 +02:00
|
|
|
<a class="header_link" href="../../panel_organizatora/dodawanie%20turnieju/index.html"
|
|
|
|
id="creator">Tworzenie
|
|
|
|
turnieju</a>
|
2022-06-19 10:11:28 +02:00
|
|
|
</div>
|
|
|
|
</header>
|
2022-06-04 16:05:54 +02:00
|
|
|
|
|
|
|
|
2022-06-19 10:11:28 +02:00
|
|
|
<div class="container">
|
|
|
|
<h1>Strona w budowie</h1>
|
|
|
|
</div>
|
2022-06-04 16:05:54 +02:00
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|