2022-12-30 03:25:40 +00:00
|
|
|
<?php
|
|
|
|
require 'config/database.php';
|
|
|
|
|
2023-01-15 01:22:14 +00:00
|
|
|
if(isset($_SESSION['user-id'])) {
|
|
|
|
$id = filter_var($_SESSION['user-id'], FILTER_SANITIZE_NUMBER_INT);
|
|
|
|
$query = "SELECT avatar FROM users WHERE id='$id'";
|
|
|
|
$result = mysqli_query($connection, $query);
|
|
|
|
$avatar = mysqli_fetch_assoc($result);
|
|
|
|
}
|
2022-12-30 03:25:40 +00:00
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
<!DOCTYPE HTML>
|
2024-03-29 06:07:20 +00:00
|
|
|
<html lang="en">
|
2022-12-30 03:25:40 +00:00
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
2024-03-29 06:07:20 +00:00
|
|
|
<meta http-equiv="Cache-Control" content="max-age=600">
|
2022-12-30 03:25:40 +00:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
2024-03-29 06:07:20 +00:00
|
|
|
<title>Blog Website</title>
|
2022-12-30 03:25:40 +00:00
|
|
|
<!-- CUSTOM STYLESHEET -->
|
|
|
|
<link rel="stylesheet" href="<?= ROOT_URL ?>css/style.css">
|
|
|
|
<!-- ICONSCOUT CDN -->
|
|
|
|
<link rel="stylesheet" href="https://unicons.iconscout.com/release/v4.0.0/css/line.css">
|
|
|
|
<!-- GOOGLE FONT(MONTSERATE) -->
|
|
|
|
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,800;1,700&display=swap" rel="stylesheet">
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<nav>
|
|
|
|
<div class="container nav__container">
|
|
|
|
<a href="<?= ROOT_URL ?>index.php" class="nav__logo">UNDEREMPLOYED</a>
|
|
|
|
<ul class="nav__items">
|
|
|
|
<li><a href="<?= ROOT_URL ?>blog.php">Blog</a></li>
|
|
|
|
<li><a href="<?= ROOT_URL ?>about.php">About</a></li>
|
|
|
|
<li><a href="<?= ROOT_URL ?>services.php">Services</a></li>
|
|
|
|
<li><a href="<?= ROOT_URL ?>contact.php">Contact</a></li>
|
2023-01-15 01:22:14 +00:00
|
|
|
<?php if(isset($_SESSION['user-id'])) : ?>
|
|
|
|
|
|
|
|
<li class="nav__profile">
|
2022-12-30 03:25:40 +00:00
|
|
|
<div class="avatar">
|
2023-01-15 01:22:14 +00:00
|
|
|
<img src="<?= ROOT_URL . 'images/' . $avatar['avatar'] ?>">
|
2022-12-30 03:25:40 +00:00
|
|
|
</div>
|
|
|
|
<ul>
|
|
|
|
<li><a href="<?= ROOT_URL ?>/admin/index.php">Dashboard</a></li>
|
|
|
|
<li><a href="<?= ROOT_URL ?>logout.php">Logout</a></li>
|
|
|
|
</ul>
|
2023-01-15 01:22:14 +00:00
|
|
|
</li>
|
|
|
|
<?php else : ?>
|
|
|
|
<li><a href="<?= ROOT_URL ?>signin.php">SignIn</a></li>
|
|
|
|
<?php endif ?>
|
2022-12-30 03:25:40 +00:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
<button id="open__nav-btn"><i class="uil uil-bars"></i></button>
|
|
|
|
<button id="close__nav-btn"><i class="uil uil-multiply"></i></button>
|
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
<!-- ======================== END OF NAV ======================== -->
|
|
|
|
|