<?php

// Redirect if user is not logged in
if (!isset($_SESSION['user'])) {
    header("Location: index.php");
    exit();
}

// Get user details from session
$user = $_SESSION['user'];

//echo "Welcome " . htmlspecialchars($user['name'] ?? 'User') . "<br>";
//echo "Email: " . htmlspecialchars($user['email'] ?? '') . "<br>";
//echo "Phone: " . htmlspecialchars($user['phone'] ?? '') . "<br>";

?>


<div class="app-sidebar__user"><img class="app-sidebar__user-avatar" src="images/logo_b.png" alt="User Image">
    <div>
        <p class="app-sidebar__user-name"><?php echo htmlspecialchars($user['name'] ?? 'User') ?></p>
        <p class="app-sidebar__user-designation">IT EXPERT</p>
    </div>
</div>