37 lines
1.3 KiB
PHP
37 lines
1.3 KiB
PHP
<?php
|
|
session_start();
|
|
|
|
if (!isset($_SESSION['admin_logged_in']) || $_SESSION['admin_logged_in'] !== true) {
|
|
header('Location: pages/login.php');
|
|
exit;
|
|
}
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="pl">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Salony Admin</title>
|
|
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
|
|
</head>
|
|
<body class="bg-gray-100 min-h-screen">
|
|
<header class="bg-white shadow-md px-6 py-4 flex items-center justify-between">
|
|
<h1 class="text-2xl font-bold text-gray-800">
|
|
<a href="<?php echo __DIR__ . '/../'; ?>">Panel</a>
|
|
</h1>
|
|
|
|
<?php if (isset($_SESSION['admin_logged_in']) && $_SESSION['admin_logged_in'] === true): ?>
|
|
<a
|
|
href="<?php echo __DIR__ . '/../pages/logout.php'; ?>"
|
|
class="flex items-center gap-2 bg-red-600 hover:bg-red-700 text-white px-4 py-2 rounded-md shadow transition-all font-medium">
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a2 2 0 01-2 2H5a2 2 0 01-2-2V7a2 2 0 012-2h6a2 2 0 012 2v1" />
|
|
</svg>
|
|
Wyloguj
|
|
</a>
|
|
<?php endif; ?>
|
|
</header>
|
|
|
|
<main class="p-6">
|