39 lines
1.7 KiB
PHP
39 lines
1.7 KiB
PHP
<?php
|
|
if (session_status() == PHP_SESSION_NONE) {
|
|
session_start();
|
|
}
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title><?php echo isset($pageTitle) ? $pageTitle . ' - MagiCV' : 'MagiCV'; ?></title>
|
|
<link rel="stylesheet" href="/public/css/style.css?v=<?php echo time(); ?>">
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<nav>
|
|
<a href="/" class="logo">MagiCV</a>
|
|
<ul>
|
|
<?php if (isset($_SESSION['user_id'])): ?>
|
|
<li><a href="/dashboard.php">Dashboard</a></li>
|
|
<li><a href="/templates_preview.php">Templates</a></li>
|
|
<?php if (isset($_SESSION['role']) && $_SESSION['role'] == 'free'): ?>
|
|
<li><a href="/upgrade.php" class="button-secondary">Upgrade to PRO</a></li>
|
|
<?php endif; ?>
|
|
<?php if (isset($_SESSION['role']) && $_SESSION['role'] == 'admin'): ?>
|
|
<li><a href="/admin/index.php" class="button-secondary">Admin</a></li>
|
|
<?php endif; ?>
|
|
<li><a href="/logout.php">Logout</a></li>
|
|
<?php else: ?>
|
|
<li><a href="/templates_preview.php">Templates</a></li>
|
|
<li><a href="/#features">Features</a></li>
|
|
<li><a href="/login.php">Login</a></li>
|
|
<li><a href="/register.php" class="button">Sign Up</a></li>
|
|
<?php endif; ?>
|
|
</ul>
|
|
</nav>
|
|
</header>
|
|
<main>
|