Podcast-server/includes/header.php

31 lines
1.3 KiB
PHP

<?php
require_once __DIR__ . '/db.php';
require_once __DIR__ . '/functions.php';
$site_title = getSetting($pdo, 'site_title');
$banner_image = getSetting($pdo, 'banner_image');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php echo htmlspecialchars($site_title); ?></title>
<link rel="stylesheet" href="<?php echo PROJECT_ROOT_URL; ?>/assets/css/style.css">
<link rel="icon" type="image/png" href="<?php echo PROJECT_ROOT_URL; ?>/assets/uploads/images/icon.png">
</head>
<body>
<nav>
<a href="<?php echo PROJECT_ROOT_URL; ?>/" class="logo"><?php echo htmlspecialchars($site_title); ?></a>
<div class="nav-links">
<a href="<?php echo PROJECT_ROOT_URL; ?>/">Home</a>
<a href="<?php echo PROJECT_ROOT_URL; ?>/subscribe.php">How to Subscribe</a>
<button id="notify-btn" class="notify-btn">🔔 Notify Me</button>
<?php if (isAdmin()): ?>
<a href="<?php echo PROJECT_ROOT_URL; ?>/admin/dashboard.php">Dashboard</a>
<a href="<?php echo PROJECT_ROOT_URL; ?>/admin/logout.php">Logout</a>
<?php else: ?>
<a href="<?php echo PROJECT_ROOT_URL; ?>/admin/login.php">Admin</a>
<?php endif; ?>
</div>
</nav>