<?php $page = "User"; $action="view"; ?>
<?php include "../../routes/user.php"; ?>
<?php include "../layout/header.php"; ?>

<body>
    <?php include "../layout/navbar.php"; ?>
    <div class="container-fluid">
        <div class="row">
            <?php include "../layout/sidenav.php"; ?>

            <main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
                <div
                    class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
                    <h1 class="h2"><?php echo $user->name; ?></h1>
                </div>
                <h5> <strong> Username: </strong> <?php echo $user->username; ?></h5>

                <h5> <strong> Email: </strong> <?php echo $user->email; ?></h5>

                <h5> <strong> Role: </strong> 
                    <?php if($user->access_level == 1) { 
                            echo "Admin";
                        } else {
                            echo "User";
                        } 
                    ?>
                </h5>
            </main>
        </div>
    </div>
</body>

</html>