<?php
/**
 * Page Header (HTML head + nav)
 * PHP User Registration - https://rskworld.in
 * Developer: Molla Samser | RSK World
 * Contact: help@rskworld.in | +91 93305 39277
 * Year: 2026
 */
$pageTitle = $pageTitle ?? 'PHP User Registration';
$baseHref = $baseHref ?? '';
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?= htmlspecialchars($pageTitle) ?> — rskworld.in</title>
    <link rel="stylesheet" href="<?= $baseHref ? $baseHref . '/' : rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/' ?>assets/css/style.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
</head>
<body>
    <header class="site-header">
        <div class="container">
            <a href="index.php" class="logo">PHP Registration <span>rskworld.in</span></a>
            <nav>
                <?php if (isLoggedIn()): ?>
                    <a href="<?= $baseHref ? $baseHref . '/' : '' ?>dashboard.php">Dashboard</a>
                    <a href="<?= $baseHref ? $baseHref . '/' : '' ?>profile.php">Profile</a>
                    <?php if (function_exists('isAdmin') && isAdmin()): ?>
                        <a href="<?= $baseHref ? $baseHref . '/' : '' ?>admin/index.php">Admin</a>
                    <?php endif; ?>
                    <a href="<?= $baseHref ? $baseHref . '/' : '' ?>logout.php">Log Out</a>
                <?php else: ?>
                    <a href="<?= $baseHref ? $baseHref . '/' : '' ?>login.php">Log In</a>
                    <a href="<?= $baseHref ? $baseHref . '/' : '' ?>register.php">Register</a>
                <?php endif; ?>
            </nav>
        </div>
    </header>
    <main class="main-content">
