FabrikaHradekTour/forum.php

62 lines
1.9 KiB
PHP
Raw Normal View History

2024-05-09 07:45:07 +02:00
<?php
2024-05-22 16:06:17 +02:00
include("./res/global.php");
2024-05-09 07:45:07 +02:00
session_start();
2024-05-22 16:06:17 +02:00
if (!isset($_SESSION["username"])) goto fail;
$out = $database -> query("SELECT username FROM user WHERE BINARY username=\"" . $_SESSION["username"] . "\"");
if ($out -> num_rows != 1)
2024-05-09 07:45:07 +02:00
{
2024-05-22 16:06:17 +02:00
fail:
echo "nope";
header("Location: ./index.php");
return;
2024-05-09 07:45:07 +02:00
}
?>
2024-05-22 16:06:17 +02:00
2024-05-09 07:45:07 +02:00
<!DOCTYPE html>
<html lang="cs">
<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">
<link rel="icon" type="image/x-icon" href="http://109.123.243.163/fht/favicon.ico">
<meta name="author" content="Smejkal, Suljakovic, Somr">
<meta name="description" content="Průvodce Hrádeckou Fabrikou">
<meta name="keywords" content="Foto, Old, Abandoned, Creepy, Panorama">
2024-05-20 19:45:32 +02:00
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
2024-05-20 19:14:44 +02:00
2024-05-09 07:45:07 +02:00
<script src="./res/global.js"></script>
<link rel="stylesheet" href="./res/global.css">
2024-05-16 21:06:40 +02:00
<script src="./res/forum/script.js"></script>
2024-05-09 07:45:07 +02:00
<link rel="stylesheet" href="./res/forum/style.css">
<title>Fabrika Hrádek Tour</title>
</head>
2024-05-25 21:57:11 +02:00
<body onload="show('home')">
2024-05-09 07:45:07 +02:00
<button id="back_button" onclick="move('./index.php', true)">&#8701;</button>
<div id="main_panel">
2024-05-10 16:02:09 +02:00
<div id="upper_panel">
<?php
include("./res/global.php");
$out = $database -> query("SELECT username, admin FROM user WHERE BINARY username=\"" . $_SESSION["username"] . "\" AND admin=\"1\"");
2024-05-10 16:02:09 +02:00
if ($out -> num_rows == 1)
{
2024-05-16 21:06:40 +02:00
echo '<img onclick="show(\'admin\')" src="./res/forum/images/admin.png" alt="Tlačítko adminského panelu">';
2024-05-10 16:02:09 +02:00
}
?>
2024-05-16 21:06:40 +02:00
<img onclick="show('user')" src="./res/forum/images/user.png" alt="Tlačítko nastavení profilu">
<img onclick="show('home')" src="./res/forum/images/home.png" alt="Tlačítko domovské stránky">
2024-05-09 07:45:07 +02:00
</div>
</div>
</body>
</html>